From 4c89eebdf9817020973b745941a2c6d4ab38783b Mon Sep 17 00:00:00 2001 From: "kong[bot]" <123129154+kong[bot]@users.noreply.github.com> Date: Sat, 14 Nov 2026 19:29:40 +0000 Subject: [PATCH] chore(api): sync OpenAPI contract --- .../generated/.openapi-generator/FILES | 221 +- lib/volcano/generated/README.md | 332 +- .../generated/lib/volcano-generated.rb | 223 +- .../api/account_sessions_api.rb | 305 + .../volcano-generated/api/anon_keys_api.rb | 2 +- .../volcano-generated/api/auth_admin_api.rb | 2 +- .../api/auth_configuration_api.rb | 18 +- .../api/authentication_api.rb | 52 +- .../lib/volcano-generated/api/autofix_api.rb | 222 - .../volcano-generated/api/connectors_api.rb | 273 + .../api/database_backups_api.rb | 6 +- .../api/database_branches_api.rb | 2 +- .../api/database_migrations_api.rb | 456 + .../api/database_queries_api.rb | 10 +- .../volcano-generated/api/databases_api.rb | 2 +- .../api/durable_functions_api.rb | 362 +- .../lib/volcano-generated/api/forks_api.rb | 106 + .../volcano-generated/api/frontends_api.rb | 2108 +- .../volcano-generated/api/functions_api.rb | 854 +- .../api/git_connections_api.rb | 357 +- .../lib/volcano-generated/api/issues_api.rb | 77 +- .../volcano-generated/api/lava_flow_api.rb | 921 + .../lib/volcano-generated/api/locks_api.rb | 2 +- .../lib/volcano-generated/api/logs_api.rb | 10 +- .../api/notifications_api.rb | 285 + .../api/o_auth_authentication_api.rb | 16 +- .../api/o_auth_configuration_api.rb | 2 +- .../api/project_access_tokens_api.rb | 13 +- .../api/project_imports_api.rb | 10 +- .../lib/volcano-generated/api/projects_api.rb | 404 +- .../lib/volcano-generated/api/realtime_api.rb | 70 +- .../volcano-generated/api/sandboxes_api.rb | 278 +- .../volcano-generated/api/service_keys_api.rb | 6 +- .../lib/volcano-generated/api/shares_api.rb | 753 + .../api/slack_connections_api.rb | 401 + .../api/storage_admin_api.rb | 2 +- .../api/storage_buckets_api.rb | 2 +- .../api/storage_objects_api.rb | 2 +- .../api/storage_policies_api.rb | 4 +- .../lib/volcano-generated/api/system_api.rb | 6 +- .../api/variable_environments_api.rb | 2 +- .../volcano-generated/api/variables_api.rb | 2 +- .../api/verified_domains_api.rb | 2 +- .../lib/volcano-generated/api_client.rb | 2 +- .../lib/volcano-generated/api_error.rb | 2 +- .../lib/volcano-generated/api_model_base.rb | 2 +- .../lib/volcano-generated/configuration.rb | 2 +- .../models/account_session.rb | 420 + .../models/account_session_list.rb | 232 + .../models/aikido_connector.rb | 214 + .../models/aikido_connector_create.rb | 320 + .../{autofix_stage.rb => aikido_region.rb} | 16 +- ...autofix_provider.rb => aikido_severity.rb} | 16 +- .../lib/volcano-generated/models/anon_key.rb | 2 +- .../volcano-generated/models/auth_config.rb | 30 +- .../models/auth_confirm_email200_response.rb | 2 +- .../auth_confirm_email_change200_response.rb | 2 +- .../auth_confirm_email_change_request.rb | 2 +- .../models/auth_confirm_email_request.rb | 2 +- .../auth_convert_anonymous200_response.rb | 2 +- .../models/auth_device_authorize_request.rb | 2 +- .../models/auth_device_token_request.rb | 2 +- .../models/auth_device_verify200_response.rb | 2 +- .../models/auth_device_verify_request.rb | 2 +- .../auth_forgot_password200_response.rb | 2 +- .../models/auth_forgot_password_request.rb | 2 +- .../auth_get_my_sessions200_response.rb | 2 +- .../models/auth_hosted_page.rb | 2 +- .../models/auth_hosted_page_defaults.rb | 2 +- .../models/auth_hosted_page_response.rb | 2 +- .../models/auth_hosted_page_runtime.rb | 2 +- .../models/auth_identities_response.rb | 2 +- .../volcano-generated/models/auth_identity.rb | 2 +- .../models/auth_insights_interval.rb | 2 +- .../models/auth_insights_response.rb | 2 +- .../models/auth_insights_series_point.rb | 2 +- .../models/auth_insights_summary.rb | 2 +- .../models/auth_insights_window.rb | 2 +- .../auth_link_o_auth_provider200_response.rb | 2 +- .../auth_list_o_auth_providers200_response.rb | 2 +- ...h_providers200_response_providers_inner.rb | 92 +- .../models/auth_method_summary.rb | 2 +- .../models/auth_methods_response.rb | 2 +- .../models/auth_o_auth_exchange_request.rb | 2 +- .../models/auth_page_appearance_defaults.rb | 2 +- .../models/auth_page_appearance_options.rb | 2 +- .../models/auth_page_appearance_response.rb | 2 +- .../models/auth_page_density.rb | 2 +- .../models/auth_page_font.rb | 2 +- .../models/auth_page_layout.rb | 2 +- .../models/auth_page_radius.rb | 2 +- .../models/auth_page_scale.rb | 2 +- .../models/auth_page_theme.rb | 2 +- .../models/auth_page_theme_colors.rb | 2 +- .../models/auth_password_policy.rb | 2 +- .../models/auth_platform_exchange_request.rb | 2 +- .../models/auth_refresh_request.rb | 2 +- .../auth_request_email_change200_response.rb | 2 +- .../auth_request_email_change_request.rb | 2 +- .../models/auth_reset_password200_response.rb | 2 +- .../models/auth_reset_password_request.rb | 2 +- .../volcano-generated/models/auth_session.rb | 2 +- .../models/auth_signin_request.rb | 2 +- .../models/auth_signup_anonymous_request.rb | 2 +- .../models/auth_signup_request.rb | 2 +- .../models/auth_signup_response.rb | 2 +- .../models/auth_token_response.rb | 2 +- .../models/auth_update_user_request.rb | 2 +- .../lib/volcano-generated/models/auth_user.rb | 2 +- .../models/autofix_settings.rb | 385 - .../models/ban_auth_user_request.rb | 2 +- .../models/ban_user_response.rb | 2 +- .../models/batch_function_deploy_failure.rb | 2 +- .../models/batch_function_deploy_response.rb | 2 +- ...onfig_frontend_custom_domain_tls_config.rb | 2 +- ...g_frontend_custom_domain_tls_config_not.rb | 2 +- .../models/call_mcp200_response.rb | 2 +- .../models/call_mcp200_response_error.rb | 2 +- .../models/call_mcp200_response_id.rb | 2 +- .../models/call_mcp_request.rb | 2 +- .../models/call_mcp_request_id.rb | 2 +- .../call_o_auth_provider_api200_response.rb | 2 +- .../call_o_auth_provider_api_request.rb | 2 +- .../volcano-generated/models/capability.rb | 22 +- .../models/capability_list.rb | 2 +- .../models/capability_status.rb | 9 +- .../complete_upload_session_response.rb | 2 +- .../models/configure_auth_methods_request.rb | 2 +- ...h_methods_request_oauth_providers_inner.rb | 2 +- .../models/connect_project_git_request.rb | 4 +- .../lib/volcano-generated/models/connector.rb | 311 + .../models/connector_create.rb | 215 + .../{autofix_model.rb => connector_type.rb} | 19 +- .../models/connectors_response.rb | 166 + .../models/create_anon_key_request.rb | 2 +- .../models/create_database_backup_request.rb | 4 +- .../models/create_database_branch_request.rb | 4 +- .../models/create_database_request.rb | 2 +- .../models/create_database_restore_request.rb | 2 +- .../models/create_email_template_request.rb | 4 +- .../create_frontend_custom_domain_request.rb | 2 +- .../create_frontend_deployment_request.rb | 166 + .../models/create_frontend_domain_request.rb | 209 + .../create_frontend_function_route_request.rb | 2 +- .../models/create_frontend_route_request.rb | 220 + .../create_function_scheduler_request.rb | 2 +- .../models/create_issue_request.rb | 249 + .../models/create_o_auth_config_request.rb | 2 +- .../create_project_access_token_request.rb | 2 +- .../models/create_project_request.rb | 18 +- .../models/create_sandbox_session_request.rb | 39 +- .../models/create_sandbox_template_request.rb | 2 +- .../models/create_service_key_request.rb | 4 +- .../models/create_storage_bucket_request.rb | 2 +- .../models/create_storage_policy_request.rb | 2 +- .../models/create_upload_session_request.rb | 2 +- .../models/create_upload_session_response.rb | 2 +- .../create_variable_environment_request.rb | 2 +- .../models/create_variable_request.rb | 2 +- .../models/created_project_access_token.rb | 4 +- .../lib/volcano-generated/models/database.rb | 2 +- .../models/database_backup.rb | 8 +- .../models/database_backup_list.rb | 2 +- .../models/database_backup_schedule.rb | 2 +- .../models/database_backup_schedule_entry.rb | 2 +- .../models/database_branch.rb | 2 +- .../models/database_branch_list.rb | 2 +- .../models/database_branch_storage.rb | 2 +- .../models/database_delete_request.rb | 2 +- .../models/database_insert_request.rb | 2 +- .../models/database_migration_baseline.rb | 167 + .../database_migration_conflict_error.rb | 191 + .../models/database_migration_file.rb | 231 + .../models/database_migration_file_error.rb | 205 + .../database_migration_files_request.rb | 184 + .../database_migration_history_entry.rb | 279 + .../models/database_migration_run.rb | 450 + .../models/database_migration_run_error.rb | 217 + .../models/database_migration_run_file.rb | 224 + .../models/database_migration_run_list.rb | 166 + .../models/database_migration_warning.rb | 226 + .../models/database_migrations.rb | 177 + .../models/database_query_filter.rb | 2 +- .../models/database_query_filter_value.rb | 2 +- ...atabase_query_filter_value_one_of_inner.rb | 2 +- .../models/database_query_order.rb | 2 +- .../database_query_performance_database.rb | 2 +- .../models/database_query_performance_item.rb | 2 +- .../database_query_performance_response.rb | 2 +- .../models/database_query_result.rb | 2 +- .../models/database_restore.rb | 2 +- .../models/database_restore_conflict_error.rb | 191 + .../models/database_restore_list.rb | 2 +- .../models/database_restore_window.rb | 2 +- .../models/database_select_request.rb | 2 +- .../models/database_stats.rb | 2 +- .../models/database_update_request.rb | 2 +- .../models/default_email_template.rb | 269 + .../models/delete_database202_response.rb | 2 +- .../delete_database_backup200_response.rb | 2 +- .../delete_database_branch202_response.rb | 2 +- .../models/deployment_commit.rb | 309 + .../models/deployment_phase.rb | 2 +- .../models/deployment_progress.rb | 2 +- .../models/deployment_reference.rb | 2 +- .../models/device_authorization_response.rb | 2 +- .../models/durable_approval.rb | 2 +- .../models/durable_approval_counts.rb | 2 +- .../models/durable_approval_daily_counts.rb | 2 +- .../models/durable_approval_decider.rb | 2 +- .../models/durable_approval_decision.rb | 2 +- .../durable_approval_decision_request.rb | 2 +- .../models/durable_approval_execution.rb | 2 +- .../models/durable_approval_function.rb | 2 +- .../durable_approval_function_counts.rb | 2 +- .../models/durable_approval_registration.rb | 2 +- .../models/durable_approval_stats.rb | 2 +- .../models/durable_approval_status.rb | 2 +- .../models/durable_callback_error.rb | 235 + .../models/durable_callback_outcome.rb | 186 + .../models/durable_callback_registration.rb | 208 + .../models/durable_callback_status.rb | 42 + .../models/durable_execution.rb | 4 +- .../models/durable_execution_error.rb | 2 +- .../models/durable_execution_invocation.rb | 2 +- .../models/durable_execution_operation.rb | 2 +- .../durable_execution_operation_attempt.rb | 2 +- .../durable_execution_operation_list.rb | 2 +- .../models/durable_execution_status.rb | 2 +- .../models/durable_function.rb | 4 +- .../models/durable_function_config.rb | 4 +- .../models/durable_message.rb | 2 +- .../models/durable_message_direction.rb | 8 +- .../models/durable_message_list.rb | 2 +- .../models/durable_message_sender.rb | 2 +- .../durable_message_session_registration.rb | 2 +- .../models/durable_message_status.rb | 2 +- .../models/durable_message_wait.rb | 2 +- .../models/durable_message_wait_list.rb | 2 +- .../durable_message_wait_registration.rb | 2 +- .../models/durable_message_wait_status.rb | 2 +- .../models/email_template.rb | 53 +- .../lib/volcano-generated/models/error.rb | 4 +- .../models/export_project_source_request.rb | 20 +- .../models/fail_durable_callback_request.rb | 220 + .../models/fork_create_request.rb | 279 + .../lib/volcano-generated/models/frontend.rb | 55 +- .../models/frontend_candidate.rb | 390 + .../models/frontend_candidate_deployment.rb | 299 + .../models/frontend_candidate_list.rb | 166 + .../frontend_custom_domain_conflict_error.rb | 4 +- .../models/frontend_custom_domain_list.rb | 166 + .../models/frontend_custom_domain_redirect.rb | 215 + ...frontend_custom_domain_redirect_request.rb | 230 + .../models/frontend_custom_domain_response.rb | 17 +- .../frontend_custom_domain_tls_config.rb | 2 +- .../frontend_custom_domain_tls_config_not.rb | 2 +- ...end_custom_domain_tls_config_not_any_of.rb | 2 +- ...nd_custom_domain_tls_config_not_any_of1.rb | 2 +- .../models/frontend_deployment.rb | 23 +- .../models/frontend_domain_routing_record.rb | 2 +- .../frontend_domain_verification_record.rb | 2 +- .../models/frontend_function_route.rb | 2 +- .../models/frontend_function_route_list.rb | 2 +- .../models/frontend_route.rb | 352 + .../models/frontend_route_list.rb | 166 + .../models/frontend_serving.rb | 199 + .../models/frontend_usage_daily_entry.rb | 2 +- .../models/frontend_usage_data.rb | 2 +- .../models/frontend_usage_history_response.rb | 2 +- .../lib/volcano-generated/models/function.rb | 19 +- .../models/function_candidate.rb | 509 + .../models/function_candidate_deployment.rb | 367 + .../function_candidate_deployment_list.rb | 166 + .../models/function_candidate_list.rb | 166 + .../models/function_deployment.rb | 13 +- .../models/function_http_auth_mode.rb | 2 +- .../models/function_image_digest.rb | 186 + .../models/function_invocation_mode.rb | 2 +- .../models/function_invocation_request.rb | 4 +- .../volcano-generated/models/function_kind.rb | 2 +- .../models/function_kind_filter.rb | 2 +- .../models/function_production_environment.rb | 200 + .../models/function_promotion_request.rb | 174 + .../models/function_region.rb | 2 +- .../models/function_rollback_request.rb | 186 + .../models/function_runtime_deployment.rb | 2 +- .../models/function_runtime_option.rb | 2 +- .../models/function_runtimes_response.rb | 2 +- .../models/function_scheduler.rb | 97 +- .../function_scheduler_list_response.rb | 2 +- .../models/function_serving.rb | 236 + .../models/function_serving_activation.rb | 302 + .../models/function_visibility.rb | 2 +- .../models/get_auth_methods200_response.rb | 2 +- ...auth_methods200_response_email_password.rb | 2 +- ...thods200_response_oauth_providers_inner.rb | 2 +- ...get_default_email_templates200_response.rb | 149 + .../models/git_connect_start_response.rb | 2 +- .../models/git_connection.rb | 2 +- .../models/git_connections_response.rb | 2 +- .../models/git_deployment_migration_run.rb | 191 + .../models/git_deployment_run.rb | 379 + .../models/git_deployment_run_error.rb | 193 + .../models/git_deployment_run_status.rb | 44 + .../models/git_installation.rb | 2 +- .../models/git_installations_response.rb | 2 +- .../models/git_repositories_response.rb | 2 +- .../models/git_repository.rb | 12 +- .../models/git_repository_reference.rb | 193 + .../heartbeat_durable_callback_request.rb | 194 + .../models/hosted_auth_page_type.rb | 2 +- .../hosted_login_email_check_request.rb | 2 +- .../hosted_login_email_check_response.rb | 2 +- .../models/hosted_login_options_response.rb | 2 +- .../models/hosted_renderable_page_type.rb | 2 +- .../models/import_connect_start_response.rb | 2 +- .../models/import_connection.rb | 2 +- .../models/import_connections_response.rb | 2 +- .../models/import_provider.rb | 2 +- .../volcano-generated/models/import_source.rb | 2 +- .../models/import_sources_response.rb | 2 +- .../lib/volcano-generated/models/issue.rb | 92 +- .../volcano-generated/models/issue_finding.rb | 352 + .../volcano-generated/models/issue_source.rb | 43 + .../volcano-generated/models/issue_status.rb | 2 +- .../models/lavaflow_aikido_binding.rb | 213 + .../models/lavaflow_aikido_binding_target.rb | 171 + .../models/lavaflow_allowed_workflow.rb | 212 + .../models/lavaflow_anomaly.rb | 177 + .../models/lavaflow_autonomy.rb | 41 + .../models/lavaflow_category_counts.rb | 347 + .../models/lavaflow_code_quality_settings.rb | 166 + .../models/lavaflow_code_quality_update.rb | 165 + .../models/lavaflow_commit_origin.rb | 42 + .../models/lavaflow_connector_binding.rb | 294 + .../lavaflow_connector_binding_create.rb | 211 + .../lavaflow_connector_bindings_response.rb | 166 + .../models/lavaflow_day_counts.rb | 218 + .../models/lavaflow_diagnosis.rb | 275 + .../models/lavaflow_draft_reason.rb | 41 + .../models/lavaflow_failure.rb | 192 + .../models/lavaflow_fix_outcome.rb | 241 + .../models/lavaflow_held_fix_open.rb | 269 + .../models/lavaflow_held_workflows.rb | 235 + .../models/lavaflow_hold_reason.rb | 222 + .../models/lavaflow_involved_resource.rb | 211 + .../lavaflow_involved_resource_count.rb | 191 + .../models/lavaflow_issue_summary.rb | 390 + .../models/lavaflow_lineage.rb | 415 + .../models/lavaflow_lineage_evidence.rb | 365 + .../lavaflow_lineage_evidence_deployment.rb | 192 + .../models/lavaflow_log_line.rb | 202 + .../models/lavaflow_merge.rb | 242 + .../models/lavaflow_merge_policy.rb | 177 + .../models/lavaflow_merge_policy_update.rb | 169 + .../models/lavaflow_merge_status.rb | 43 + .../models/lavaflow_outcome_counts.rb | 244 + .../models/lavaflow_outcome_coverage.rb | 330 + .../models/lavaflow_outcome_current.rb | 276 + .../models/lavaflow_outcome_day.rb | 216 + .../models/lavaflow_outcome_values.rb | 220 + .../models/lavaflow_outcomes.rb | 299 + .../models/lavaflow_outcomes_coverage.rb | 216 + .../models/lavaflow_pull_request.rb | 315 + .../lavaflow_pull_request_state_counts.rb | 243 + .../lavaflow_repository_check_command.rb | 216 + .../models/lavaflow_repository_checks.rb | 225 + .../models/lavaflow_resource.rb | 284 + .../models/lavaflow_resource_list.rb | 166 + .../models/lavaflow_resource_reference.rb | 241 + .../models/lavaflow_review.rb | 265 + .../models/lavaflow_review_finding.rb | 241 + .../models/lavaflow_review_person_reason.rb | 193 + .../models/lavaflow_review_stop.rb | 46 + .../volcano-generated/models/lavaflow_run.rb | 806 + .../models/lavaflow_run_category.rb | 45 + .../models/lavaflow_run_counts.rb | 281 + .../models/lavaflow_run_create.rb | 193 + .../models/lavaflow_run_mode.rb | 40 + .../models/lavaflow_run_progress.rb | 244 + .../models/lavaflow_run_reference.rb | 178 + .../models/lavaflow_run_status.rb | 46 + .../models/lavaflow_run_status_counts.rb | 347 + .../models/lavaflow_run_summary.rb | 528 + .../volcano-generated/models/lavaflow_scan.rb | 509 + .../models/lavaflow_scan_billed_finding.rb | 248 + .../models/lavaflow_scan_counts.rb | 301 + .../models/lavaflow_scan_resource.rb | 241 + .../models/lavaflow_scan_status.rb | 43 + .../models/lavaflow_settings.rb | 399 + .../models/lavaflow_settings_update.rb | 234 + .../models/lavaflow_skip_reason.rb | 56 + .../models/lavaflow_slack_binding.rb | 242 + .../models/lavaflow_slack_binding_target.rb | 177 + ...g_autofix.rb => lavaflow_source_commit.rb} | 85 +- .../models/lavaflow_source_unavailable.rb | 200 + .../lavaflow_source_unavailable_reason.rb | 46 + .../models/lavaflow_stats.rb | 283 + .../models/lavaflow_stats_totals.rb | 190 + .../models/lavaflow_workflow_source.rb | 193 + .../models/list_anon_keys200_response.rb | 2 +- ..._available_o_auth_providers200_response.rb | 2 +- ...h_providers200_response_providers_inner.rb | 2 +- ...list_database_regions200_response_inner.rb | 2 +- .../list_email_templates200_response.rb | 2 +- .../models/list_o_auth_configs200_response.rb | 2 +- ...ist_postgres_versions200_response_inner.rb | 2 +- .../list_storage_buckets200_response.rb | 2 +- .../list_storage_objects_admin200_response.rb | 2 +- .../models/live_log_level.rb | 2 +- .../models/log_activity_bucket.rb | 2 +- .../models/log_activity_bucket_counts.rb | 2 +- .../models/log_activity_request.rb | 2 +- .../models/log_activity_response.rb | 2 +- .../models/log_app_request_resource.rb | 221 + .../models/log_database_request_resource.rb | 2 +- .../models/log_deployment.rb | 2 +- .../models/log_deployment_request_selector.rb | 2 +- .../lib/volcano-generated/models/log_event.rb | 2 +- .../models/log_event_body.rb | 2 +- .../models/log_frontend_request_resource.rb | 2 +- .../models/log_function_request_resource.rb | 2 +- .../models/log_request_resource.rb | 4 +- .../volcano-generated/models/log_resource.rb | 10 +- .../models/log_search_event.rb | 2 +- .../models/log_search_request.rb | 2 +- .../models/log_search_response.rb | 2 +- .../models/log_stream_request.rb | 2 +- ...onfig_frontend_custom_domain_tls_config.rb | 2 +- .../models/metric_usage_data.rb | 2 +- ...uest.rb => notification_email_settings.rb} | 116 +- .../models/notification_email_status.rb | 41 + .../models/notification_settings.rb | 252 + .../models/notification_test_delivery.rb | 234 + .../models/notification_test_result.rb | 166 + .../models/notification_webhook_settings.rb | 185 + .../volcano-generated/models/o_auth_config.rb | 2 +- .../models/o_auth_error_response.rb | 2 +- .../open_durable_message_session_request.rb | 2 +- .../models/paginated_auth_users.rb | 2 +- .../models/paginated_databases.rb | 2 +- .../models/paginated_durable_approvals.rb | 2 +- .../models/paginated_durable_executions.rb | 2 +- .../models/paginated_durable_functions.rb | 2 +- .../models/paginated_frontend_deployments.rb | 2 +- .../models/paginated_frontends.rb | 2 +- .../models/paginated_function_deployments.rb | 2 +- .../models/paginated_functions.rb | 2 +- .../models/paginated_git_deployment_runs.rb | 230 + .../models/paginated_issues.rb | 2 +- .../models/paginated_lavaflow_runs.rb | 240 + .../models/paginated_lavaflow_scans.rb | 230 + .../models/paginated_project_access_tokens.rb | 2 +- .../paginated_project_custom_domains.rb | 2 +- .../models/paginated_project_deployments.rb | 2 +- .../models/paginated_projects.rb | 2 +- .../models/paginated_service_keys.rb | 2 +- .../models/paginated_share_releases.rb | 230 + .../models/paginated_storage_buckets.rb | 2 +- .../models/paginated_variables.rb | 2 +- .../models/platform_exchange_response.rb | 2 +- .../models/preview_auth_page_request.rb | 2 +- .../models/preview_auth_page_response.rb | 2 +- .../lib/volcano-generated/models/project.rb | 2 +- .../models/project_access_token.rb | 4 +- .../project_access_token_listed_scope.rb | 41 + .../models/project_access_token_scope.rb | 2 +- .../models/project_access_token_usage.rb | 2 +- .../project_access_token_usage_daily_entry.rb | 2 +- .../models/project_config.rb | 26 +- .../models/project_config_apply_result.rb | 2 +- .../project_config_apply_result_entry.rb | 14 +- .../models/project_config_apply_summary.rb | 2 +- .../models/project_config_auth.rb | 2 +- .../models/project_config_auth_cors.rb | 20 +- .../models/project_config_auth_email.rb | 2 +- .../models/project_config_auth_email_from.rb | 4 +- ...ect_config_auth_email_password_provider.rb | 2 +- .../models/project_config_auth_email_smtp.rb | 2 +- .../project_config_auth_email_verification.rb | 2 +- .../project_config_auth_managed_pages.rb | 2 +- .../project_config_auth_page_appearance.rb | 2 +- .../project_config_auth_page_layouts.rb | 2 +- .../models/project_config_auth_password.rb | 2 +- .../project_config_auth_password_reset.rb | 2 +- .../models/project_config_auth_providers.rb | 2 +- .../models/project_config_auth_rate_limits.rb | 2 +- .../models/project_config_auth_redirects.rb | 2 +- .../models/project_config_auth_sessions.rb | 2 +- .../models/project_config_auth_signup.rb | 2 +- .../models/project_config_auth_tokens.rb | 2 +- .../models/project_config_bucket.rb | 2 +- .../models/project_config_bucket_policy.rb | 2 +- .../models/project_config_custom_domain.rb | 2 +- .../project_config_custom_domain_redirect.rb | 228 + .../models/project_config_database.rb | 2 +- .../models/project_config_email_template.rb | 3 +- .../models/project_config_email_templates.rb | 2 +- .../models/project_config_frontend.rb | 76 +- .../project_config_frontend_custom_domain.rb | 193 + ...onfig_frontend_custom_domain_tls_config.rb | 2 +- .../project_config_frontend_function_route.rb | 2 +- .../models/project_config_frontend_route.rb | 229 + .../models/project_config_function.rb | 2 +- .../models/project_config_hosted_page.rb | 2 +- .../models/project_config_hosted_pages.rb | 2 +- .../models/project_config_missing_resource.rb | 2 +- .../models/project_config_notifications.rb | 166 + .../models/project_config_o_auth_provider.rb | 2 +- .../models/project_config_project.rb | 2 +- .../models/project_config_realtime.rb | 2 +- .../models/project_config_sandbox.rb | 2 +- .../models/project_config_scheduler.rb | 2 +- .../models/project_config_skipped_resource.rb | 2 +- .../models/project_config_validation_error.rb | 2 +- ...roject_config_validation_error_response.rb | 2 +- .../models/project_config_variable.rb | 2 +- .../models/project_deployment.rb | 13 +- .../models/project_deployment_resource.rb | 2 +- .../models/project_deployment_summary.rb | 2 +- .../models/project_frontend_custom_domain.rb | 17 +- ..._frontend_custom_domain_all_of_frontend.rb | 2 +- .../models/project_git_connection.rb | 32 +- .../models/project_git_connection_summary.rb | 3 +- .../models/project_git_deploy_settings.rb | 32 +- .../models/project_git_owner_push.rb | 237 + .../models/project_health_category.rb | 2 +- .../models/project_health_check.rb | 2 +- .../models/project_health_data_status.rb | 2 +- .../models/project_health_evidence.rb | 2 +- .../models/project_health_resource.rb | 6 +- .../models/project_health_response.rb | 2 +- .../models/project_health_scope.rb | 2 +- .../models/project_health_status.rb | 6 +- .../models/project_health_summary.rb | 2 +- .../models/project_import_action.rb | 2 +- .../models/project_import_action_code.rb | 2 +- .../models/project_import_destination.rb | 2 +- .../models/project_import_destination_mode.rb | 2 +- .../models/project_import_disposition.rb | 2 +- .../models/project_import_finding.rb | 2 +- .../models/project_import_impact.rb | 2 +- .../project_import_preflight_request.rb | 2 +- .../models/project_import_readiness.rb | 2 +- .../models/project_import_report.rb | 2 +- .../models/project_import_resource.rb | 2 +- .../models/project_import_resource_kind.rb | 2 +- .../models/project_import_run.rb | 3 +- .../models/project_import_run_status.rb | 2 +- .../models/project_import_start_request.rb | 2 +- .../models/project_import_summary.rb | 2 +- .../models/project_import_target.rb | 2 +- .../models/project_lock_lease.rb | 2 +- .../models/project_lock_lease_request.rb | 2 +- .../models/project_lock_state.rb | 2 +- .../models/project_metrics_data_status.rb | 2 +- .../models/project_metrics_dimensions.rb | 2 +- .../models/project_metrics_group_by.rb | 2 +- .../models/project_metrics_metric.rb | 2 +- .../models/project_metrics_query.rb | 2 +- .../models/project_metrics_query_request.rb | 2 +- .../models/project_metrics_query_response.rb | 2 +- .../project_metrics_query_time_range.rb | 2 +- .../models/project_metrics_result.rb | 2 +- .../models/project_metrics_unit.rb | 2 +- .../models/project_metrics_value.rb | 2 +- .../models/project_metrics_window.rb | 2 +- .../models/project_source_export.rb | 2 +- .../models/project_source_export_omission.rb | 2 +- .../models/project_source_export_skip.rb | 2 +- .../models/project_source_export_state.rb | 2 +- .../models/project_template_installation.rb | 29 +- .../project_template_installation_source.rb | 243 + .../models/project_usage_response.rb | 2 +- .../promote_frontend_candidate_request.rb | 173 + .../models/publish_durable_message_request.rb | 2 +- .../models/publish_sandbox_preset_request.rb | 2 +- .../models/realtime_config.rb | 2 +- .../models/realtime_plan_limits.rb | 2 +- .../models/realtime_publish_request.rb | 236 + .../models/realtime_publish_result.rb | 165 + .../models/realtime_stats.rb | 2 +- ...fresh_o_auth_provider_token200_response.rb | 2 +- .../register_durable_callback_request.rb | 333 + .../register_durable_message_wait_request.rb | 2 +- .../rename_variable_environment_request.rb | 2 +- ...place_frontend_shared_variables_request.rb | 2 +- .../replace_shared_variables_request.rb | 2 +- .../request_durable_approval_request.rb | 2 +- .../reset_database_password200_response.rb | 2 +- .../models/resolve_function_response.rb | 4 +- .../models/resource_reference.rb | 2 +- .../rollback_frontend_serving_request.rb | 185 + .../models/sandbox_access.rb | 2 +- .../models/sandbox_access_request.rb | 2 +- .../models/sandbox_build_log_page.rb | 2 +- .../sandbox_build_log_page_data_inner.rb | 2 +- .../models/sandbox_capacity.rb | 2 +- .../models/sandbox_capacity_list.rb | 2 +- .../models/sandbox_command_request.rb | 20 +- .../models/sandbox_command_result.rb | 41 +- .../models/sandbox_deployment.rb | 2 +- .../models/sandbox_deployment_page.rb | 2 +- .../models/sandbox_execution_request.rb | 33 +- .../models/sandbox_execution_result.rb | 35 +- .../models/sandbox_file_archive.rb | 288 + .../models/sandbox_file_entry.rb | 389 + .../models/sandbox_file_list_result.rb | 260 + .../models/sandbox_file_part.rb | 349 + .../models/sandbox_file_part_request.rb | 399 + .../models/sandbox_file_read_request.rb | 2 +- .../models/sandbox_file_result.rb | 2 +- .../models/sandbox_file_write_request.rb | 2 +- .../models/sandbox_limits_applied.rb | 41 + .../models/sandbox_pagination.rb | 2 +- .../models/sandbox_preset.rb | 2 +- .../models/sandbox_preset_list.rb | 2 +- .../models/sandbox_session.rb | 83 +- .../models/sandbox_session_applied_limits.rb | 207 + .../models/sandbox_session_executions.rb | 166 + .../models/sandbox_session_limits.rb | 215 + .../models/sandbox_session_network.rb | 218 + .../models/sandbox_session_network_request.rb | 190 + .../models/sandbox_session_page.rb | 2 +- .../models/sandbox_subject_grant_request.rb | 2 +- .../models/sandbox_template.rb | 2 +- .../models/sandbox_template_page.rb | 2 +- .../models/schedule_request.rb | 2 +- .../models/scheduler_failure_alert_policy.rb | 258 + .../models/scheduler_failure_notify_on.rb | 40 + .../models/send_durable_message_request.rb | 2 +- .../volcano-generated/models/service_key.rb | 4 +- ...t_project_git_production_branch_request.rb | 13 +- .../set_project_git_root_directory_request.rb | 174 + .../lib/volcano-generated/models/share.rb | 446 + .../models/share_create_request.rb | 244 + .../models/share_daily_count.rb | 241 + .../models/share_draft_changed_error.rb | 240 + .../models/share_kind_count.rb | 241 + .../volcano-generated/models/share_preview.rb | 255 + .../models/share_preview_release.rb | 375 + .../volcano-generated/models/share_release.rb | 484 + .../models/share_release_create_request.rb | 297 + .../models/share_release_draft.rb | 336 + .../models/share_release_function.rb | 309 + .../models/share_release_omission.rb | 210 + .../models/share_release_ref.rb | 190 + .../volcano-generated/models/share_stats.rb | 221 + .../models/share_update_request.rb | 259 + .../models/share_variable.rb | 230 + .../models/shared_variables_replace_result.rb | 167 + .../models/shares_response.rb | 166 + .../models/skipped_served_function.rb | 246 + .../models/slack_authorization_response.rb | 165 + .../volcano-generated/models/slack_channel.rb | 228 + .../models/slack_channels_response.rb | 166 + .../models/slack_connection.rb | 310 + .../models/slack_connections_response.rb | 166 + .../models/slack_connector.rb | 177 + .../models/storage_bucket.rb | 2 +- .../models/storage_copy_request.rb | 2 +- .../models/storage_list_response.rb | 2 +- .../models/storage_move_request.rb | 2 +- .../models/storage_object.rb | 2 +- .../models/storage_object_with_bucket.rb | 2 +- .../models/storage_policy.rb | 2 +- .../volcano-generated/models/storage_stats.rb | 2 +- .../models/storage_visibility_request.rb | 2 +- .../succeed_durable_callback_request.rb | 207 + .../models/test_email_request.rb | 2 +- .../models/test_email_response.rb | 2 +- .../models/unban_user_response.rb | 2 +- .../models/update_auth_config_request.rb | 19 +- .../models/update_auth_hosted_page_request.rb | 2 +- .../models/update_auth_page_layout_request.rb | 2 +- .../models/update_auth_page_theme_request.rb | 2 +- .../models/update_database_branch_request.rb | 2 +- .../models/update_database_type_request.rb | 2 +- .../models/update_email_template_request.rb | 3 +- .../update_frontend_custom_domain_request.rb | 151 + .../models/update_function_request.rb | 2 +- .../update_function_scheduler_request.rb | 2 +- .../models/update_issue_request.rb | 2 +- .../models/update_notification_email.rb | 178 + .../update_notification_settings_request.rb | 166 + .../models/update_notification_webhook.rb | 178 + .../models/update_o_auth_config_request.rb | 2 +- ...ate_project_git_deploy_settings_request.rb | 24 +- .../models/update_project_request.rb | 2 +- .../models/update_realtime_config_request.rb | 2 +- .../models/update_sandbox_template_request.rb | 2 +- .../update_scheduler_failure_alert_policy.rb | 215 + .../models/update_storage_bucket_request.rb | 2 +- .../models/update_variable_request.rb | 2 +- .../models/upload_session_part.rb | 2 +- .../models/upload_session_status_response.rb | 2 +- .../upload_storage_object201_response.rb | 2 +- .../models/usage_data_point.rb | 2 +- .../lib/volcano-generated/models/variable.rb | 2 +- .../models/variable_environment.rb | 2 +- .../models/variable_environment_list.rb | 2 +- .../models/verified_domain.rb | 2 +- .../models/verified_domains_response.rb | 2 +- .../models/verify_domain_request.rb | 2 +- .../lib/volcano-generated/version.rb | 2 +- lib/volcano/generated/spec/spec_helper.rb | 2 +- .../generated/volcano-generated.gemspec | 4 +- openapi/openapi.yaml | 44237 ++++++++++------ 709 files changed, 83608 insertions(+), 18213 deletions(-) create mode 100644 lib/volcano/generated/lib/volcano-generated/api/account_sessions_api.rb delete mode 100644 lib/volcano/generated/lib/volcano-generated/api/autofix_api.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/api/connectors_api.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/api/database_migrations_api.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/api/forks_api.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/api/lava_flow_api.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/api/notifications_api.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/api/shares_api.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/api/slack_connections_api.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/account_session.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/account_session_list.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/aikido_connector.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/aikido_connector_create.rb rename lib/volcano/generated/lib/volcano-generated/models/{autofix_stage.rb => aikido_region.rb} (71%) rename lib/volcano/generated/lib/volcano-generated/models/{autofix_provider.rb => aikido_severity.rb} (70%) delete mode 100644 lib/volcano/generated/lib/volcano-generated/models/autofix_settings.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/connector.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/connector_create.rb rename lib/volcano/generated/lib/volcano-generated/models/{autofix_model.rb => connector_type.rb} (51%) create mode 100644 lib/volcano/generated/lib/volcano-generated/models/connectors_response.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/create_frontend_deployment_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/create_frontend_domain_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/create_frontend_route_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/create_issue_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/database_migration_baseline.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/database_migration_conflict_error.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/database_migration_file.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/database_migration_file_error.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/database_migration_files_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/database_migration_history_entry.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/database_migration_run.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/database_migration_run_error.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/database_migration_run_file.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/database_migration_run_list.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/database_migration_warning.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/database_migrations.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/database_restore_conflict_error.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/default_email_template.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/deployment_commit.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/durable_callback_error.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/durable_callback_outcome.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/durable_callback_registration.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/durable_callback_status.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/fail_durable_callback_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/fork_create_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/frontend_candidate.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/frontend_candidate_deployment.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/frontend_candidate_list.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_list.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_redirect.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_redirect_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/frontend_route.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/frontend_route_list.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/frontend_serving.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/function_candidate.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/function_candidate_deployment.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/function_candidate_deployment_list.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/function_candidate_list.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/function_image_digest.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/function_production_environment.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/function_promotion_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/function_rollback_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/function_serving.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/function_serving_activation.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/get_default_email_templates200_response.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/git_deployment_migration_run.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/git_deployment_run.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/git_deployment_run_error.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/git_deployment_run_status.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/git_repository_reference.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/heartbeat_durable_callback_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/issue_finding.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/issue_source.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_aikido_binding.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_aikido_binding_target.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_allowed_workflow.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_anomaly.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_autonomy.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_category_counts.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_code_quality_settings.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_code_quality_update.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_commit_origin.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_connector_binding.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_connector_binding_create.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_connector_bindings_response.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_day_counts.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_diagnosis.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_draft_reason.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_failure.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_fix_outcome.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_held_fix_open.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_held_workflows.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_hold_reason.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_involved_resource.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_involved_resource_count.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_issue_summary.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_lineage.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_lineage_evidence.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_lineage_evidence_deployment.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_log_line.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge_policy.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge_policy_update.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge_status.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_counts.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_coverage.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_current.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_day.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_values.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcomes.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcomes_coverage.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_pull_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_pull_request_state_counts.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_repository_check_command.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_repository_checks.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_resource.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_resource_list.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_resource_reference.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_review.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_review_finding.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_review_person_reason.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_review_stop.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_run.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_category.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_counts.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_create.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_mode.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_progress.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_reference.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_status.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_status_counts.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_summary.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_billed_finding.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_counts.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_resource.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_status.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_settings.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_settings_update.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_skip_reason.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_slack_binding.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_slack_binding_target.rb rename lib/volcano/generated/lib/volcano-generated/models/{project_config_autofix.rb => lavaflow_source_commit.rb} (74%) create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_source_unavailable.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_source_unavailable_reason.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_stats.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_stats_totals.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/lavaflow_workflow_source.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/log_app_request_resource.rb rename lib/volcano/generated/lib/volcano-generated/models/{update_autofix_settings_request.rb => notification_email_settings.rb} (63%) create mode 100644 lib/volcano/generated/lib/volcano-generated/models/notification_email_status.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/notification_settings.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/notification_test_delivery.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/notification_test_result.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/notification_webhook_settings.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/paginated_git_deployment_runs.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/paginated_lavaflow_runs.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/paginated_lavaflow_scans.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/paginated_share_releases.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/project_access_token_listed_scope.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain_redirect.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_custom_domain.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_route.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/project_config_notifications.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/project_git_owner_push.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/project_template_installation_source.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/promote_frontend_candidate_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/realtime_publish_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/realtime_publish_result.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/register_durable_callback_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/rollback_frontend_serving_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/sandbox_file_archive.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/sandbox_file_entry.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/sandbox_file_list_result.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/sandbox_file_part.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/sandbox_file_part_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/sandbox_limits_applied.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/sandbox_session_applied_limits.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/sandbox_session_executions.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/sandbox_session_limits.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/sandbox_session_network.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/sandbox_session_network_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/scheduler_failure_alert_policy.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/scheduler_failure_notify_on.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/set_project_git_root_directory_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_create_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_daily_count.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_draft_changed_error.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_kind_count.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_preview.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_preview_release.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_release.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_release_create_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_release_draft.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_release_function.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_release_omission.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_release_ref.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_stats.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_update_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/share_variable.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/shared_variables_replace_result.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/shares_response.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/skipped_served_function.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/slack_authorization_response.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/slack_channel.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/slack_channels_response.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/slack_connection.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/slack_connections_response.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/slack_connector.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/succeed_durable_callback_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/update_frontend_custom_domain_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/update_notification_email.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/update_notification_settings_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/update_notification_webhook.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/update_scheduler_failure_alert_policy.rb diff --git a/lib/volcano/generated/.openapi-generator/FILES b/lib/volcano/generated/.openapi-generator/FILES index 844bf12e..fc22251e 100644 --- a/lib/volcano/generated/.openapi-generator/FILES +++ b/lib/volcano/generated/.openapi-generator/FILES @@ -9,22 +9,27 @@ README.md Rakefile git_push.sh lib/volcano-generated.rb +lib/volcano-generated/api/account_sessions_api.rb lib/volcano-generated/api/anon_keys_api.rb lib/volcano-generated/api/auth_admin_api.rb lib/volcano-generated/api/auth_configuration_api.rb lib/volcano-generated/api/authentication_api.rb -lib/volcano-generated/api/autofix_api.rb +lib/volcano-generated/api/connectors_api.rb lib/volcano-generated/api/database_backups_api.rb lib/volcano-generated/api/database_branches_api.rb +lib/volcano-generated/api/database_migrations_api.rb lib/volcano-generated/api/database_queries_api.rb lib/volcano-generated/api/databases_api.rb lib/volcano-generated/api/durable_functions_api.rb +lib/volcano-generated/api/forks_api.rb lib/volcano-generated/api/frontends_api.rb lib/volcano-generated/api/functions_api.rb lib/volcano-generated/api/git_connections_api.rb lib/volcano-generated/api/issues_api.rb +lib/volcano-generated/api/lava_flow_api.rb lib/volcano-generated/api/locks_api.rb lib/volcano-generated/api/logs_api.rb +lib/volcano-generated/api/notifications_api.rb lib/volcano-generated/api/o_auth_authentication_api.rb lib/volcano-generated/api/o_auth_configuration_api.rb lib/volcano-generated/api/project_access_tokens_api.rb @@ -33,6 +38,8 @@ lib/volcano-generated/api/projects_api.rb lib/volcano-generated/api/realtime_api.rb lib/volcano-generated/api/sandboxes_api.rb lib/volcano-generated/api/service_keys_api.rb +lib/volcano-generated/api/shares_api.rb +lib/volcano-generated/api/slack_connections_api.rb lib/volcano-generated/api/storage_admin_api.rb lib/volcano-generated/api/storage_buckets_api.rb lib/volcano-generated/api/storage_objects_api.rb @@ -45,6 +52,12 @@ lib/volcano-generated/api_client.rb lib/volcano-generated/api_error.rb lib/volcano-generated/api_model_base.rb lib/volcano-generated/configuration.rb +lib/volcano-generated/models/account_session.rb +lib/volcano-generated/models/account_session_list.rb +lib/volcano-generated/models/aikido_connector.rb +lib/volcano-generated/models/aikido_connector_create.rb +lib/volcano-generated/models/aikido_region.rb +lib/volcano-generated/models/aikido_severity.rb lib/volcano-generated/models/anon_key.rb lib/volcano-generated/models/auth_config.rb lib/volcano-generated/models/auth_confirm_email200_response.rb @@ -101,10 +114,6 @@ lib/volcano-generated/models/auth_signup_response.rb lib/volcano-generated/models/auth_token_response.rb lib/volcano-generated/models/auth_update_user_request.rb lib/volcano-generated/models/auth_user.rb -lib/volcano-generated/models/autofix_model.rb -lib/volcano-generated/models/autofix_provider.rb -lib/volcano-generated/models/autofix_settings.rb -lib/volcano-generated/models/autofix_stage.rb lib/volcano-generated/models/ban_auth_user_request.rb lib/volcano-generated/models/ban_user_response.rb lib/volcano-generated/models/batch_function_deploy_failure.rb @@ -125,6 +134,10 @@ lib/volcano-generated/models/complete_upload_session_response.rb lib/volcano-generated/models/configure_auth_methods_request.rb lib/volcano-generated/models/configure_auth_methods_request_oauth_providers_inner.rb lib/volcano-generated/models/connect_project_git_request.rb +lib/volcano-generated/models/connector.rb +lib/volcano-generated/models/connector_create.rb +lib/volcano-generated/models/connector_type.rb +lib/volcano-generated/models/connectors_response.rb lib/volcano-generated/models/create_anon_key_request.rb lib/volcano-generated/models/create_database_backup_request.rb lib/volcano-generated/models/create_database_branch_request.rb @@ -132,8 +145,12 @@ lib/volcano-generated/models/create_database_request.rb lib/volcano-generated/models/create_database_restore_request.rb lib/volcano-generated/models/create_email_template_request.rb lib/volcano-generated/models/create_frontend_custom_domain_request.rb +lib/volcano-generated/models/create_frontend_deployment_request.rb +lib/volcano-generated/models/create_frontend_domain_request.rb lib/volcano-generated/models/create_frontend_function_route_request.rb +lib/volcano-generated/models/create_frontend_route_request.rb lib/volcano-generated/models/create_function_scheduler_request.rb +lib/volcano-generated/models/create_issue_request.rb lib/volcano-generated/models/create_o_auth_config_request.rb lib/volcano-generated/models/create_project_access_token_request.rb lib/volcano-generated/models/create_project_request.rb @@ -157,6 +174,18 @@ lib/volcano-generated/models/database_branch_list.rb lib/volcano-generated/models/database_branch_storage.rb lib/volcano-generated/models/database_delete_request.rb lib/volcano-generated/models/database_insert_request.rb +lib/volcano-generated/models/database_migration_baseline.rb +lib/volcano-generated/models/database_migration_conflict_error.rb +lib/volcano-generated/models/database_migration_file.rb +lib/volcano-generated/models/database_migration_file_error.rb +lib/volcano-generated/models/database_migration_files_request.rb +lib/volcano-generated/models/database_migration_history_entry.rb +lib/volcano-generated/models/database_migration_run.rb +lib/volcano-generated/models/database_migration_run_error.rb +lib/volcano-generated/models/database_migration_run_file.rb +lib/volcano-generated/models/database_migration_run_list.rb +lib/volcano-generated/models/database_migration_warning.rb +lib/volcano-generated/models/database_migrations.rb lib/volcano-generated/models/database_query_filter.rb lib/volcano-generated/models/database_query_filter_value.rb lib/volcano-generated/models/database_query_filter_value_one_of_inner.rb @@ -166,14 +195,17 @@ lib/volcano-generated/models/database_query_performance_item.rb lib/volcano-generated/models/database_query_performance_response.rb lib/volcano-generated/models/database_query_result.rb lib/volcano-generated/models/database_restore.rb +lib/volcano-generated/models/database_restore_conflict_error.rb lib/volcano-generated/models/database_restore_list.rb lib/volcano-generated/models/database_restore_window.rb lib/volcano-generated/models/database_select_request.rb lib/volcano-generated/models/database_stats.rb lib/volcano-generated/models/database_update_request.rb +lib/volcano-generated/models/default_email_template.rb lib/volcano-generated/models/delete_database202_response.rb lib/volcano-generated/models/delete_database_backup200_response.rb lib/volcano-generated/models/delete_database_branch202_response.rb +lib/volcano-generated/models/deployment_commit.rb lib/volcano-generated/models/deployment_phase.rb lib/volcano-generated/models/deployment_progress.rb lib/volcano-generated/models/deployment_reference.rb @@ -190,6 +222,10 @@ lib/volcano-generated/models/durable_approval_function_counts.rb lib/volcano-generated/models/durable_approval_registration.rb lib/volcano-generated/models/durable_approval_stats.rb lib/volcano-generated/models/durable_approval_status.rb +lib/volcano-generated/models/durable_callback_error.rb +lib/volcano-generated/models/durable_callback_outcome.rb +lib/volcano-generated/models/durable_callback_registration.rb +lib/volcano-generated/models/durable_callback_status.rb lib/volcano-generated/models/durable_execution.rb lib/volcano-generated/models/durable_execution_error.rb lib/volcano-generated/models/durable_execution_invocation.rb @@ -212,8 +248,16 @@ lib/volcano-generated/models/durable_message_wait_status.rb lib/volcano-generated/models/email_template.rb lib/volcano-generated/models/error.rb lib/volcano-generated/models/export_project_source_request.rb +lib/volcano-generated/models/fail_durable_callback_request.rb +lib/volcano-generated/models/fork_create_request.rb lib/volcano-generated/models/frontend.rb +lib/volcano-generated/models/frontend_candidate.rb +lib/volcano-generated/models/frontend_candidate_deployment.rb +lib/volcano-generated/models/frontend_candidate_list.rb lib/volcano-generated/models/frontend_custom_domain_conflict_error.rb +lib/volcano-generated/models/frontend_custom_domain_list.rb +lib/volcano-generated/models/frontend_custom_domain_redirect.rb +lib/volcano-generated/models/frontend_custom_domain_redirect_request.rb lib/volcano-generated/models/frontend_custom_domain_response.rb lib/volcano-generated/models/frontend_custom_domain_tls_config.rb lib/volcano-generated/models/frontend_custom_domain_tls_config_not.rb @@ -224,33 +268,53 @@ lib/volcano-generated/models/frontend_domain_routing_record.rb lib/volcano-generated/models/frontend_domain_verification_record.rb lib/volcano-generated/models/frontend_function_route.rb lib/volcano-generated/models/frontend_function_route_list.rb +lib/volcano-generated/models/frontend_route.rb +lib/volcano-generated/models/frontend_route_list.rb +lib/volcano-generated/models/frontend_serving.rb lib/volcano-generated/models/frontend_usage_daily_entry.rb lib/volcano-generated/models/frontend_usage_data.rb lib/volcano-generated/models/frontend_usage_history_response.rb lib/volcano-generated/models/function.rb +lib/volcano-generated/models/function_candidate.rb +lib/volcano-generated/models/function_candidate_deployment.rb +lib/volcano-generated/models/function_candidate_deployment_list.rb +lib/volcano-generated/models/function_candidate_list.rb lib/volcano-generated/models/function_deployment.rb lib/volcano-generated/models/function_http_auth_mode.rb +lib/volcano-generated/models/function_image_digest.rb lib/volcano-generated/models/function_invocation_mode.rb lib/volcano-generated/models/function_invocation_request.rb lib/volcano-generated/models/function_kind.rb lib/volcano-generated/models/function_kind_filter.rb +lib/volcano-generated/models/function_production_environment.rb +lib/volcano-generated/models/function_promotion_request.rb lib/volcano-generated/models/function_region.rb +lib/volcano-generated/models/function_rollback_request.rb lib/volcano-generated/models/function_runtime_deployment.rb lib/volcano-generated/models/function_runtime_option.rb lib/volcano-generated/models/function_runtimes_response.rb lib/volcano-generated/models/function_scheduler.rb lib/volcano-generated/models/function_scheduler_list_response.rb +lib/volcano-generated/models/function_serving.rb +lib/volcano-generated/models/function_serving_activation.rb lib/volcano-generated/models/function_visibility.rb lib/volcano-generated/models/get_auth_methods200_response.rb lib/volcano-generated/models/get_auth_methods200_response_email_password.rb lib/volcano-generated/models/get_auth_methods200_response_oauth_providers_inner.rb +lib/volcano-generated/models/get_default_email_templates200_response.rb lib/volcano-generated/models/git_connect_start_response.rb lib/volcano-generated/models/git_connection.rb lib/volcano-generated/models/git_connections_response.rb +lib/volcano-generated/models/git_deployment_migration_run.rb +lib/volcano-generated/models/git_deployment_run.rb +lib/volcano-generated/models/git_deployment_run_error.rb +lib/volcano-generated/models/git_deployment_run_status.rb lib/volcano-generated/models/git_installation.rb lib/volcano-generated/models/git_installations_response.rb lib/volcano-generated/models/git_repositories_response.rb lib/volcano-generated/models/git_repository.rb +lib/volcano-generated/models/git_repository_reference.rb +lib/volcano-generated/models/heartbeat_durable_callback_request.rb lib/volcano-generated/models/hosted_auth_page_type.rb lib/volcano-generated/models/hosted_login_email_check_request.rb lib/volcano-generated/models/hosted_login_email_check_response.rb @@ -263,7 +327,84 @@ lib/volcano-generated/models/import_provider.rb lib/volcano-generated/models/import_source.rb lib/volcano-generated/models/import_sources_response.rb lib/volcano-generated/models/issue.rb +lib/volcano-generated/models/issue_finding.rb +lib/volcano-generated/models/issue_source.rb lib/volcano-generated/models/issue_status.rb +lib/volcano-generated/models/lavaflow_aikido_binding.rb +lib/volcano-generated/models/lavaflow_aikido_binding_target.rb +lib/volcano-generated/models/lavaflow_allowed_workflow.rb +lib/volcano-generated/models/lavaflow_anomaly.rb +lib/volcano-generated/models/lavaflow_autonomy.rb +lib/volcano-generated/models/lavaflow_category_counts.rb +lib/volcano-generated/models/lavaflow_code_quality_settings.rb +lib/volcano-generated/models/lavaflow_code_quality_update.rb +lib/volcano-generated/models/lavaflow_commit_origin.rb +lib/volcano-generated/models/lavaflow_connector_binding.rb +lib/volcano-generated/models/lavaflow_connector_binding_create.rb +lib/volcano-generated/models/lavaflow_connector_bindings_response.rb +lib/volcano-generated/models/lavaflow_day_counts.rb +lib/volcano-generated/models/lavaflow_diagnosis.rb +lib/volcano-generated/models/lavaflow_draft_reason.rb +lib/volcano-generated/models/lavaflow_failure.rb +lib/volcano-generated/models/lavaflow_fix_outcome.rb +lib/volcano-generated/models/lavaflow_held_fix_open.rb +lib/volcano-generated/models/lavaflow_held_workflows.rb +lib/volcano-generated/models/lavaflow_hold_reason.rb +lib/volcano-generated/models/lavaflow_involved_resource.rb +lib/volcano-generated/models/lavaflow_involved_resource_count.rb +lib/volcano-generated/models/lavaflow_issue_summary.rb +lib/volcano-generated/models/lavaflow_lineage.rb +lib/volcano-generated/models/lavaflow_lineage_evidence.rb +lib/volcano-generated/models/lavaflow_lineage_evidence_deployment.rb +lib/volcano-generated/models/lavaflow_log_line.rb +lib/volcano-generated/models/lavaflow_merge.rb +lib/volcano-generated/models/lavaflow_merge_policy.rb +lib/volcano-generated/models/lavaflow_merge_policy_update.rb +lib/volcano-generated/models/lavaflow_merge_status.rb +lib/volcano-generated/models/lavaflow_outcome_counts.rb +lib/volcano-generated/models/lavaflow_outcome_coverage.rb +lib/volcano-generated/models/lavaflow_outcome_current.rb +lib/volcano-generated/models/lavaflow_outcome_day.rb +lib/volcano-generated/models/lavaflow_outcome_values.rb +lib/volcano-generated/models/lavaflow_outcomes.rb +lib/volcano-generated/models/lavaflow_outcomes_coverage.rb +lib/volcano-generated/models/lavaflow_pull_request.rb +lib/volcano-generated/models/lavaflow_pull_request_state_counts.rb +lib/volcano-generated/models/lavaflow_repository_check_command.rb +lib/volcano-generated/models/lavaflow_repository_checks.rb +lib/volcano-generated/models/lavaflow_resource.rb +lib/volcano-generated/models/lavaflow_resource_list.rb +lib/volcano-generated/models/lavaflow_resource_reference.rb +lib/volcano-generated/models/lavaflow_review.rb +lib/volcano-generated/models/lavaflow_review_finding.rb +lib/volcano-generated/models/lavaflow_review_person_reason.rb +lib/volcano-generated/models/lavaflow_review_stop.rb +lib/volcano-generated/models/lavaflow_run.rb +lib/volcano-generated/models/lavaflow_run_category.rb +lib/volcano-generated/models/lavaflow_run_counts.rb +lib/volcano-generated/models/lavaflow_run_create.rb +lib/volcano-generated/models/lavaflow_run_mode.rb +lib/volcano-generated/models/lavaflow_run_progress.rb +lib/volcano-generated/models/lavaflow_run_reference.rb +lib/volcano-generated/models/lavaflow_run_status.rb +lib/volcano-generated/models/lavaflow_run_status_counts.rb +lib/volcano-generated/models/lavaflow_run_summary.rb +lib/volcano-generated/models/lavaflow_scan.rb +lib/volcano-generated/models/lavaflow_scan_billed_finding.rb +lib/volcano-generated/models/lavaflow_scan_counts.rb +lib/volcano-generated/models/lavaflow_scan_resource.rb +lib/volcano-generated/models/lavaflow_scan_status.rb +lib/volcano-generated/models/lavaflow_settings.rb +lib/volcano-generated/models/lavaflow_settings_update.rb +lib/volcano-generated/models/lavaflow_skip_reason.rb +lib/volcano-generated/models/lavaflow_slack_binding.rb +lib/volcano-generated/models/lavaflow_slack_binding_target.rb +lib/volcano-generated/models/lavaflow_source_commit.rb +lib/volcano-generated/models/lavaflow_source_unavailable.rb +lib/volcano-generated/models/lavaflow_source_unavailable_reason.rb +lib/volcano-generated/models/lavaflow_stats.rb +lib/volcano-generated/models/lavaflow_stats_totals.rb +lib/volcano-generated/models/lavaflow_workflow_source.rb lib/volcano-generated/models/list_anon_keys200_response.rb lib/volcano-generated/models/list_available_o_auth_providers200_response.rb lib/volcano-generated/models/list_available_o_auth_providers200_response_providers_inner.rb @@ -278,6 +419,7 @@ lib/volcano-generated/models/log_activity_bucket.rb lib/volcano-generated/models/log_activity_bucket_counts.rb lib/volcano-generated/models/log_activity_request.rb lib/volcano-generated/models/log_activity_response.rb +lib/volcano-generated/models/log_app_request_resource.rb lib/volcano-generated/models/log_database_request_resource.rb lib/volcano-generated/models/log_deployment.rb lib/volcano-generated/models/log_deployment_request_selector.rb @@ -293,6 +435,12 @@ lib/volcano-generated/models/log_search_response.rb lib/volcano-generated/models/log_stream_request.rb lib/volcano-generated/models/managed_project_config_frontend_custom_domain_tls_config.rb lib/volcano-generated/models/metric_usage_data.rb +lib/volcano-generated/models/notification_email_settings.rb +lib/volcano-generated/models/notification_email_status.rb +lib/volcano-generated/models/notification_settings.rb +lib/volcano-generated/models/notification_test_delivery.rb +lib/volcano-generated/models/notification_test_result.rb +lib/volcano-generated/models/notification_webhook_settings.rb lib/volcano-generated/models/o_auth_config.rb lib/volcano-generated/models/o_auth_error_response.rb lib/volcano-generated/models/open_durable_message_session_request.rb @@ -305,12 +453,16 @@ lib/volcano-generated/models/paginated_frontend_deployments.rb lib/volcano-generated/models/paginated_frontends.rb lib/volcano-generated/models/paginated_function_deployments.rb lib/volcano-generated/models/paginated_functions.rb +lib/volcano-generated/models/paginated_git_deployment_runs.rb lib/volcano-generated/models/paginated_issues.rb +lib/volcano-generated/models/paginated_lavaflow_runs.rb +lib/volcano-generated/models/paginated_lavaflow_scans.rb lib/volcano-generated/models/paginated_project_access_tokens.rb lib/volcano-generated/models/paginated_project_custom_domains.rb lib/volcano-generated/models/paginated_project_deployments.rb lib/volcano-generated/models/paginated_projects.rb lib/volcano-generated/models/paginated_service_keys.rb +lib/volcano-generated/models/paginated_share_releases.rb lib/volcano-generated/models/paginated_storage_buckets.rb lib/volcano-generated/models/paginated_variables.rb lib/volcano-generated/models/platform_exchange_response.rb @@ -318,6 +470,7 @@ lib/volcano-generated/models/preview_auth_page_request.rb lib/volcano-generated/models/preview_auth_page_response.rb lib/volcano-generated/models/project.rb lib/volcano-generated/models/project_access_token.rb +lib/volcano-generated/models/project_access_token_listed_scope.rb lib/volcano-generated/models/project_access_token_scope.rb lib/volcano-generated/models/project_access_token_usage.rb lib/volcano-generated/models/project_access_token_usage_daily_entry.rb @@ -343,20 +496,23 @@ lib/volcano-generated/models/project_config_auth_redirects.rb lib/volcano-generated/models/project_config_auth_sessions.rb lib/volcano-generated/models/project_config_auth_signup.rb lib/volcano-generated/models/project_config_auth_tokens.rb -lib/volcano-generated/models/project_config_autofix.rb lib/volcano-generated/models/project_config_bucket.rb lib/volcano-generated/models/project_config_bucket_policy.rb lib/volcano-generated/models/project_config_custom_domain.rb +lib/volcano-generated/models/project_config_custom_domain_redirect.rb lib/volcano-generated/models/project_config_database.rb lib/volcano-generated/models/project_config_email_template.rb lib/volcano-generated/models/project_config_email_templates.rb lib/volcano-generated/models/project_config_frontend.rb +lib/volcano-generated/models/project_config_frontend_custom_domain.rb lib/volcano-generated/models/project_config_frontend_custom_domain_tls_config.rb lib/volcano-generated/models/project_config_frontend_function_route.rb +lib/volcano-generated/models/project_config_frontend_route.rb lib/volcano-generated/models/project_config_function.rb lib/volcano-generated/models/project_config_hosted_page.rb lib/volcano-generated/models/project_config_hosted_pages.rb lib/volcano-generated/models/project_config_missing_resource.rb +lib/volcano-generated/models/project_config_notifications.rb lib/volcano-generated/models/project_config_o_auth_provider.rb lib/volcano-generated/models/project_config_project.rb lib/volcano-generated/models/project_config_realtime.rb @@ -374,6 +530,7 @@ lib/volcano-generated/models/project_frontend_custom_domain_all_of_frontend.rb lib/volcano-generated/models/project_git_connection.rb lib/volcano-generated/models/project_git_connection_summary.rb lib/volcano-generated/models/project_git_deploy_settings.rb +lib/volcano-generated/models/project_git_owner_push.rb lib/volcano-generated/models/project_health_category.rb lib/volcano-generated/models/project_health_check.rb lib/volcano-generated/models/project_health_data_status.rb @@ -420,13 +577,18 @@ lib/volcano-generated/models/project_source_export_omission.rb lib/volcano-generated/models/project_source_export_skip.rb lib/volcano-generated/models/project_source_export_state.rb lib/volcano-generated/models/project_template_installation.rb +lib/volcano-generated/models/project_template_installation_source.rb lib/volcano-generated/models/project_usage_response.rb +lib/volcano-generated/models/promote_frontend_candidate_request.rb lib/volcano-generated/models/publish_durable_message_request.rb lib/volcano-generated/models/publish_sandbox_preset_request.rb lib/volcano-generated/models/realtime_config.rb lib/volcano-generated/models/realtime_plan_limits.rb +lib/volcano-generated/models/realtime_publish_request.rb +lib/volcano-generated/models/realtime_publish_result.rb lib/volcano-generated/models/realtime_stats.rb lib/volcano-generated/models/refresh_o_auth_provider_token200_response.rb +lib/volcano-generated/models/register_durable_callback_request.rb lib/volcano-generated/models/register_durable_message_wait_request.rb lib/volcano-generated/models/rename_variable_environment_request.rb lib/volcano-generated/models/replace_frontend_shared_variables_request.rb @@ -435,6 +597,7 @@ lib/volcano-generated/models/request_durable_approval_request.rb lib/volcano-generated/models/reset_database_password200_response.rb lib/volcano-generated/models/resolve_function_response.rb lib/volcano-generated/models/resource_reference.rb +lib/volcano-generated/models/rollback_frontend_serving_request.rb lib/volcano-generated/models/sandbox_access.rb lib/volcano-generated/models/sandbox_access_request.rb lib/volcano-generated/models/sandbox_build_log_page.rb @@ -447,21 +610,60 @@ lib/volcano-generated/models/sandbox_deployment.rb lib/volcano-generated/models/sandbox_deployment_page.rb lib/volcano-generated/models/sandbox_execution_request.rb lib/volcano-generated/models/sandbox_execution_result.rb +lib/volcano-generated/models/sandbox_file_archive.rb +lib/volcano-generated/models/sandbox_file_entry.rb +lib/volcano-generated/models/sandbox_file_list_result.rb +lib/volcano-generated/models/sandbox_file_part.rb +lib/volcano-generated/models/sandbox_file_part_request.rb lib/volcano-generated/models/sandbox_file_read_request.rb lib/volcano-generated/models/sandbox_file_result.rb lib/volcano-generated/models/sandbox_file_write_request.rb +lib/volcano-generated/models/sandbox_limits_applied.rb lib/volcano-generated/models/sandbox_pagination.rb lib/volcano-generated/models/sandbox_preset.rb lib/volcano-generated/models/sandbox_preset_list.rb lib/volcano-generated/models/sandbox_session.rb +lib/volcano-generated/models/sandbox_session_applied_limits.rb +lib/volcano-generated/models/sandbox_session_executions.rb +lib/volcano-generated/models/sandbox_session_limits.rb +lib/volcano-generated/models/sandbox_session_network.rb +lib/volcano-generated/models/sandbox_session_network_request.rb lib/volcano-generated/models/sandbox_session_page.rb lib/volcano-generated/models/sandbox_subject_grant_request.rb lib/volcano-generated/models/sandbox_template.rb lib/volcano-generated/models/sandbox_template_page.rb lib/volcano-generated/models/schedule_request.rb +lib/volcano-generated/models/scheduler_failure_alert_policy.rb +lib/volcano-generated/models/scheduler_failure_notify_on.rb lib/volcano-generated/models/send_durable_message_request.rb lib/volcano-generated/models/service_key.rb lib/volcano-generated/models/set_project_git_production_branch_request.rb +lib/volcano-generated/models/set_project_git_root_directory_request.rb +lib/volcano-generated/models/share.rb +lib/volcano-generated/models/share_create_request.rb +lib/volcano-generated/models/share_daily_count.rb +lib/volcano-generated/models/share_draft_changed_error.rb +lib/volcano-generated/models/share_kind_count.rb +lib/volcano-generated/models/share_preview.rb +lib/volcano-generated/models/share_preview_release.rb +lib/volcano-generated/models/share_release.rb +lib/volcano-generated/models/share_release_create_request.rb +lib/volcano-generated/models/share_release_draft.rb +lib/volcano-generated/models/share_release_function.rb +lib/volcano-generated/models/share_release_omission.rb +lib/volcano-generated/models/share_release_ref.rb +lib/volcano-generated/models/share_stats.rb +lib/volcano-generated/models/share_update_request.rb +lib/volcano-generated/models/share_variable.rb +lib/volcano-generated/models/shared_variables_replace_result.rb +lib/volcano-generated/models/shares_response.rb +lib/volcano-generated/models/skipped_served_function.rb +lib/volcano-generated/models/slack_authorization_response.rb +lib/volcano-generated/models/slack_channel.rb +lib/volcano-generated/models/slack_channels_response.rb +lib/volcano-generated/models/slack_connection.rb +lib/volcano-generated/models/slack_connections_response.rb +lib/volcano-generated/models/slack_connector.rb lib/volcano-generated/models/storage_bucket.rb lib/volcano-generated/models/storage_copy_request.rb lib/volcano-generated/models/storage_list_response.rb @@ -471,6 +673,7 @@ lib/volcano-generated/models/storage_object_with_bucket.rb lib/volcano-generated/models/storage_policy.rb lib/volcano-generated/models/storage_stats.rb lib/volcano-generated/models/storage_visibility_request.rb +lib/volcano-generated/models/succeed_durable_callback_request.rb lib/volcano-generated/models/test_email_request.rb lib/volcano-generated/models/test_email_response.rb lib/volcano-generated/models/unban_user_response.rb @@ -478,18 +681,22 @@ lib/volcano-generated/models/update_auth_config_request.rb lib/volcano-generated/models/update_auth_hosted_page_request.rb lib/volcano-generated/models/update_auth_page_layout_request.rb lib/volcano-generated/models/update_auth_page_theme_request.rb -lib/volcano-generated/models/update_autofix_settings_request.rb lib/volcano-generated/models/update_database_branch_request.rb lib/volcano-generated/models/update_database_type_request.rb lib/volcano-generated/models/update_email_template_request.rb +lib/volcano-generated/models/update_frontend_custom_domain_request.rb lib/volcano-generated/models/update_function_request.rb lib/volcano-generated/models/update_function_scheduler_request.rb lib/volcano-generated/models/update_issue_request.rb +lib/volcano-generated/models/update_notification_email.rb +lib/volcano-generated/models/update_notification_settings_request.rb +lib/volcano-generated/models/update_notification_webhook.rb lib/volcano-generated/models/update_o_auth_config_request.rb lib/volcano-generated/models/update_project_git_deploy_settings_request.rb lib/volcano-generated/models/update_project_request.rb lib/volcano-generated/models/update_realtime_config_request.rb lib/volcano-generated/models/update_sandbox_template_request.rb +lib/volcano-generated/models/update_scheduler_failure_alert_policy.rb lib/volcano-generated/models/update_storage_bucket_request.rb lib/volcano-generated/models/update_variable_request.rb lib/volcano-generated/models/upload_session_part.rb diff --git a/lib/volcano/generated/README.md b/lib/volcano/generated/README.md index 19e377be..b40f7c5a 100644 --- a/lib/volcano/generated/README.md +++ b/lib/volcano/generated/README.md @@ -4,7 +4,7 @@ Volcano::Generated - the Ruby gem for the Volcano API Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). -This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -65,23 +65,25 @@ Volcano::Generated.configure do |config| config.access_token = 'YOUR_BEARER_TOKEN' # Configure a proc to get access tokens in lieu of the static access_token configuration config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } - - # Configure Bearer authorization (opaque): ProjectAccessToken - config.access_token = 'YOUR_BEARER_TOKEN' - # Configure a proc to get access tokens in lieu of the static access_token configuration - config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } end -api_instance = Volcano::Generated::AnonKeysApi.new -id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Project ID -create_anon_key_request = Volcano::Generated::CreateAnonKeyRequest.new({name: 'frontend-app'}) # CreateAnonKeyRequest | +api_instance = Volcano::Generated::AccountSessionsApi.new +opts = { + page: 56, # Integer | Page number (1-indexed). Omit it for the first page, and always with `cursor` or `ending_before`. + limit: 56, # Integer | Number of sessions per page (max 100, default 20) + sort: 'last_activity', # String | Sort key. `last_activity` (default) orders by most recent activity and supports offset pagination only. `created_at` orders by session start and supports both offset and cursor pagination. + status: 'active', # String | Filter by whether the session can still be refreshed. Omit for every stored session, including expired ones. `expired` is not supported with cursor pagination. + cursor: 'cursor_example', # String | Opaque keyset cursor from a previous response's `next_cursor`. Requires `sort=created_at`; mutually exclusive with `page` and `ending_before`. + ending_before: 'ending_before_example', # String | Opaque keyset cursor from a previous response's `prev_cursor`, paging backward. Requires `sort=created_at`; mutually exclusive with `page` and `cursor`. + offset: 56 # Integer | Bounded number of rows to skip past the cursor anchor (the hybrid jump, maximum 100000). Ignored unless `cursor` or `ending_before` is supplied. +} begin - #Create anon key - result = api_instance.create_anon_key(id, create_anon_key_request) + #List your account's sign-in sessions + result = api_instance.list_account_sessions(opts) p result rescue Volcano::Generated::ApiError => e - puts "Exception when calling AnonKeysApi->create_anon_key: #{e}" + puts "Exception when calling AccountSessionsApi->list_account_sessions: #{e}" end ``` @@ -92,6 +94,10 @@ All URIs are relative to *https://api.volcano.dev* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*Volcano::Generated::AccountSessionsApi* | [**list_account_sessions**](docs/AccountSessionsApi.md#list_account_sessions) | **GET** /user/sessions | List your account's sign-in sessions +*Volcano::Generated::AccountSessionsApi* | [**revoke_account_session**](docs/AccountSessionsApi.md#revoke_account_session) | **DELETE** /user/sessions/{sessionId} | Sign out one session +*Volcano::Generated::AccountSessionsApi* | [**revoke_current_user_token**](docs/AccountSessionsApi.md#revoke_current_user_token) | **DELETE** /user/tokens/current | Revoke the calling platform token +*Volcano::Generated::AccountSessionsApi* | [**revoke_other_account_sessions**](docs/AccountSessionsApi.md#revoke_other_account_sessions) | **DELETE** /user/sessions | Sign out every other session *Volcano::Generated::AnonKeysApi* | [**create_anon_key**](docs/AnonKeysApi.md#create_anon_key) | **POST** /projects/{id}/anon-keys | Create anon key *Volcano::Generated::AnonKeysApi* | [**get_anon_key**](docs/AnonKeysApi.md#get_anon_key) | **GET** /projects/{id}/anon-keys/{keyId} | Get anon key *Volcano::Generated::AnonKeysApi* | [**list_anon_keys**](docs/AnonKeysApi.md#list_anon_keys) | **GET** /projects/{id}/anon-keys | List anon keys @@ -155,9 +161,10 @@ Class | Method | HTTP request | Description *Volcano::Generated::AuthenticationApi* | [**auth_signup_anonymous**](docs/AuthenticationApi.md#auth_signup_anonymous) | **POST** /auth/signup-anonymous | Create anonymous user *Volcano::Generated::AuthenticationApi* | [**auth_unlink_identity**](docs/AuthenticationApi.md#auth_unlink_identity) | **DELETE** /auth/user/identities/{identityId} | Unlink an identity from the current user *Volcano::Generated::AuthenticationApi* | [**auth_update_user**](docs/AuthenticationApi.md#auth_update_user) | **PUT** /auth/user | Update user profile -*Volcano::Generated::AutofixApi* | [**delete_autofix_api_key**](docs/AutofixApi.md#delete_autofix_api_key) | **DELETE** /projects/{id}/autofix/api-key | Delete the API key -*Volcano::Generated::AutofixApi* | [**get_autofix_settings**](docs/AutofixApi.md#get_autofix_settings) | **GET** /projects/{id}/autofix | Get autofix settings -*Volcano::Generated::AutofixApi* | [**update_autofix_settings**](docs/AutofixApi.md#update_autofix_settings) | **PUT** /projects/{id}/autofix | Replace autofix settings +*Volcano::Generated::ConnectorsApi* | [**create_connector**](docs/ConnectorsApi.md#create_connector) | **POST** /connectors | Connect a service +*Volcano::Generated::ConnectorsApi* | [**delete_connector**](docs/ConnectorsApi.md#delete_connector) | **DELETE** /connectors/{connector_id} | Remove a connector +*Volcano::Generated::ConnectorsApi* | [**get_connector**](docs/ConnectorsApi.md#get_connector) | **GET** /connectors/{connector_id} | Get a connector +*Volcano::Generated::ConnectorsApi* | [**list_connectors**](docs/ConnectorsApi.md#list_connectors) | **GET** /connectors | List connectors *Volcano::Generated::DatabaseBackupsApi* | [**create_database_backup**](docs/DatabaseBackupsApi.md#create_database_backup) | **POST** /projects/{id}/databases/{databaseName}/backups | Back up a database *Volcano::Generated::DatabaseBackupsApi* | [**create_database_restore**](docs/DatabaseBackupsApi.md#create_database_restore) | **POST** /projects/{id}/databases/{databaseName}/restores | Restore a database *Volcano::Generated::DatabaseBackupsApi* | [**delete_database_backup**](docs/DatabaseBackupsApi.md#delete_database_backup) | **DELETE** /projects/{id}/databases/{databaseName}/backups/{backupName} | Delete a backup @@ -174,6 +181,11 @@ Class | Method | HTTP request | Description *Volcano::Generated::DatabaseBranchesApi* | [**reset_database_branch**](docs/DatabaseBranchesApi.md#reset_database_branch) | **POST** /projects/{id}/databases/{databaseName}/branches/{branchName}/reset | Reset a branch to its parent's current state *Volcano::Generated::DatabaseBranchesApi* | [**reset_database_branch_password**](docs/DatabaseBranchesApi.md#reset_database_branch_password) | **POST** /projects/{id}/databases/{databaseName}/branches/{branchName}/reset-password | Rotate a branch's password *Volcano::Generated::DatabaseBranchesApi* | [**update_database_branch**](docs/DatabaseBranchesApi.md#update_database_branch) | **PATCH** /projects/{id}/databases/{databaseName}/branches/{branchName} | Extend a branch's lifetime +*Volcano::Generated::DatabaseMigrationsApi* | [**baseline_database_migrations**](docs/DatabaseMigrationsApi.md#baseline_database_migrations) | **POST** /projects/{id}/databases/{databaseName}/migrations/baseline | Record migrations as applied without running them +*Volcano::Generated::DatabaseMigrationsApi* | [**create_database_migration_run**](docs/DatabaseMigrationsApi.md#create_database_migration_run) | **POST** /projects/{id}/databases/{databaseName}/migration-runs | Apply migrations to a database +*Volcano::Generated::DatabaseMigrationsApi* | [**get_database_migration_run**](docs/DatabaseMigrationsApi.md#get_database_migration_run) | **GET** /projects/{id}/databases/{databaseName}/migration-runs/{runId} | Get a migration run +*Volcano::Generated::DatabaseMigrationsApi* | [**get_database_migrations**](docs/DatabaseMigrationsApi.md#get_database_migrations) | **GET** /projects/{id}/databases/{databaseName}/migrations | Get a database's migration history +*Volcano::Generated::DatabaseMigrationsApi* | [**list_database_migration_runs**](docs/DatabaseMigrationsApi.md#list_database_migration_runs) | **GET** /projects/{id}/databases/{databaseName}/migration-runs | List a database's migration runs *Volcano::Generated::DatabaseQueriesApi* | [**query_database_branch_delete**](docs/DatabaseQueriesApi.md#query_database_branch_delete) | **POST** /databases/{databaseName}/branches/{branchName}/query/delete | Delete data from database (REST API) *Volcano::Generated::DatabaseQueriesApi* | [**query_database_branch_insert**](docs/DatabaseQueriesApi.md#query_database_branch_insert) | **POST** /databases/{databaseName}/branches/{branchName}/query/insert | Insert data into database (REST API) *Volcano::Generated::DatabaseQueriesApi* | [**query_database_branch_ping**](docs/DatabaseQueriesApi.md#query_database_branch_ping) | **POST** /databases/{databaseName}/branches/{branchName}/query/ping | Database connectivity probe (REST API) @@ -200,12 +212,14 @@ Class | Method | HTTP request | Description *Volcano::Generated::DurableFunctionsApi* | [**delete_durable_function**](docs/DurableFunctionsApi.md#delete_durable_function) | **DELETE** /projects/{id}/durable-functions/{functionId} | Delete a durable function *Volcano::Generated::DurableFunctionsApi* | [**delete_durable_function_scheduler**](docs/DurableFunctionsApi.md#delete_durable_function_scheduler) | **DELETE** /projects/{id}/durable-functions/{functionId}/schedulers/{schedulerId} | Delete a durable function scheduler *Volcano::Generated::DurableFunctionsApi* | [**deny_durable_approval**](docs/DurableFunctionsApi.md#deny_durable_approval) | **POST** /projects/{id}/durable-approvals/{approvalId}/deny | Deny a durable approval +*Volcano::Generated::DurableFunctionsApi* | [**fail_durable_callback**](docs/DurableFunctionsApi.md#fail_durable_callback) | **POST** /durable-callbacks/fail | Fail a waiting step *Volcano::Generated::DurableFunctionsApi* | [**get_durable_approval**](docs/DurableFunctionsApi.md#get_durable_approval) | **GET** /projects/{id}/durable-approvals/{approvalId} | Get a durable approval *Volcano::Generated::DurableFunctionsApi* | [**get_durable_approval_stats**](docs/DurableFunctionsApi.md#get_durable_approval_stats) | **GET** /projects/{id}/durable-approvals/stats | Get durable approval statistics *Volcano::Generated::DurableFunctionsApi* | [**get_durable_execution**](docs/DurableFunctionsApi.md#get_durable_execution) | **GET** /projects/{id}/durable-functions/{functionId}/executions/{executionId} | Get a durable execution *Volcano::Generated::DurableFunctionsApi* | [**get_durable_execution_from_application**](docs/DurableFunctionsApi.md#get_durable_execution_from_application) | **GET** /durable-functions/{functionId}/executions/{executionId} | Get a durable execution from an application *Volcano::Generated::DurableFunctionsApi* | [**get_durable_function**](docs/DurableFunctionsApi.md#get_durable_function) | **GET** /projects/{id}/durable-functions/{functionId} | Get durable function by ID or name *Volcano::Generated::DurableFunctionsApi* | [**get_durable_function_scheduler**](docs/DurableFunctionsApi.md#get_durable_function_scheduler) | **GET** /projects/{id}/durable-functions/{functionId}/schedulers/{schedulerId} | Get a durable function scheduler +*Volcano::Generated::DurableFunctionsApi* | [**heartbeat_durable_callback**](docs/DurableFunctionsApi.md#heartbeat_durable_callback) | **POST** /durable-callbacks/heartbeat | Keep a waiting step alive *Volcano::Generated::DurableFunctionsApi* | [**list_durable_approvals**](docs/DurableFunctionsApi.md#list_durable_approvals) | **GET** /projects/{id}/durable-approvals | List durable approvals *Volcano::Generated::DurableFunctionsApi* | [**list_durable_execution_operations**](docs/DurableFunctionsApi.md#list_durable_execution_operations) | **GET** /projects/{id}/durable-functions/{functionId}/executions/{executionId}/operations | List a durable execution's operations *Volcano::Generated::DurableFunctionsApi* | [**list_durable_executions**](docs/DurableFunctionsApi.md#list_durable_executions) | **GET** /projects/{id}/durable-functions/{functionId}/executions | List a durable function's executions @@ -217,6 +231,7 @@ Class | Method | HTTP request | Description *Volcano::Generated::DurableFunctionsApi* | [**list_durable_messages_from_application**](docs/DurableFunctionsApi.md#list_durable_messages_from_application) | **GET** /durable-functions/{functionId}/executions/{executionId}/messages | List a durable execution's messages from an application *Volcano::Generated::DurableFunctionsApi* | [**open_durable_message_session**](docs/DurableFunctionsApi.md#open_durable_message_session) | **POST** /durable-messages/sessions | Open a messages session from inside a workflow *Volcano::Generated::DurableFunctionsApi* | [**publish_durable_message**](docs/DurableFunctionsApi.md#publish_durable_message) | **POST** /durable-messages/publish | Publish a message from inside a workflow +*Volcano::Generated::DurableFunctionsApi* | [**register_durable_callback**](docs/DurableFunctionsApi.md#register_durable_callback) | **POST** /durable-callbacks | Get a callback token from inside a workflow *Volcano::Generated::DurableFunctionsApi* | [**register_durable_message_wait**](docs/DurableFunctionsApi.md#register_durable_message_wait) | **POST** /durable-messages/waits | Wait for a message from inside a workflow *Volcano::Generated::DurableFunctionsApi* | [**request_durable_approval**](docs/DurableFunctionsApi.md#request_durable_approval) | **POST** /durable-approvals | Request an approval from inside a workflow *Volcano::Generated::DurableFunctionsApi* | [**send_durable_message**](docs/DurableFunctionsApi.md#send_durable_message) | **POST** /projects/{id}/durable-functions/{functionId}/executions/{executionId}/messages | Send a message to a durable execution @@ -225,37 +240,66 @@ Class | Method | HTTP request | Description *Volcano::Generated::DurableFunctionsApi* | [**start_durable_execution_from_application**](docs/DurableFunctionsApi.md#start_durable_execution_from_application) | **POST** /durable-functions/{functionId}/executions | Start a durable execution from an application *Volcano::Generated::DurableFunctionsApi* | [**stop_durable_execution**](docs/DurableFunctionsApi.md#stop_durable_execution) | **POST** /projects/{id}/durable-functions/{functionId}/executions/{executionId}/stop | Stop a durable execution *Volcano::Generated::DurableFunctionsApi* | [**stop_durable_execution_from_application**](docs/DurableFunctionsApi.md#stop_durable_execution_from_application) | **POST** /durable-functions/{functionId}/executions/{executionId}/stop | Stop a durable execution from an application +*Volcano::Generated::DurableFunctionsApi* | [**succeed_durable_callback**](docs/DurableFunctionsApi.md#succeed_durable_callback) | **POST** /durable-callbacks/succeed | Complete a waiting step with a result *Volcano::Generated::DurableFunctionsApi* | [**update_durable_function_scheduler**](docs/DurableFunctionsApi.md#update_durable_function_scheduler) | **PATCH** /projects/{id}/durable-functions/{functionId}/schedulers/{schedulerId} | Update a durable function scheduler +*Volcano::Generated::ForksApi* | [**create_fork**](docs/ForksApi.md#create_fork) | **POST** /forks | Fork a share into a project of your own *Volcano::Generated::FrontendsApi* | [**create_frontend**](docs/FrontendsApi.md#create_frontend) | **POST** /projects/{id}/frontends | Create a new frontend deployment +*Volcano::Generated::FrontendsApi* | [**create_frontend_candidate**](docs/FrontendsApi.md#create_frontend_candidate) | **POST** /projects/{id}/frontends/{frontendId}/candidates | Create a frontend Candidate *Volcano::Generated::FrontendsApi* | [**create_frontend_custom_domain**](docs/FrontendsApi.md#create_frontend_custom_domain) | **POST** /projects/{id}/frontends/{frontendId}/domain | Configure frontend custom domain +*Volcano::Generated::FrontendsApi* | [**create_frontend_deployment**](docs/FrontendsApi.md#create_frontend_deployment) | **POST** /projects/{id}/frontends/{frontendId}/deployments | Deploy an existing build to a frontend +*Volcano::Generated::FrontendsApi* | [**create_frontend_domain**](docs/FrontendsApi.md#create_frontend_domain) | **POST** /projects/{id}/frontends/{frontendId}/domains | Add a custom domain to a frontend *Volcano::Generated::FrontendsApi* | [**create_frontend_function_route**](docs/FrontendsApi.md#create_frontend_function_route) | **POST** /projects/{id}/frontends/{frontendId}/function-routes | Route a Frontend path to an HTTP Function +*Volcano::Generated::FrontendsApi* | [**create_frontend_route**](docs/FrontendsApi.md#create_frontend_route) | **POST** /projects/{id}/frontends/{frontendId}/frontend-routes | Mount another Frontend at a path *Volcano::Generated::FrontendsApi* | [**delete_frontend**](docs/FrontendsApi.md#delete_frontend) | **DELETE** /projects/{id}/frontends/{frontendId} | Delete a frontend +*Volcano::Generated::FrontendsApi* | [**delete_frontend_candidate**](docs/FrontendsApi.md#delete_frontend_candidate) | **DELETE** /projects/{id}/frontends/{frontendId}/candidates/{candidateId} | Delete a frontend Candidate *Volcano::Generated::FrontendsApi* | [**delete_frontend_custom_domain**](docs/FrontendsApi.md#delete_frontend_custom_domain) | **DELETE** /projects/{id}/frontends/{frontendId}/domain | Delete frontend custom domain +*Volcano::Generated::FrontendsApi* | [**delete_frontend_domain**](docs/FrontendsApi.md#delete_frontend_domain) | **DELETE** /projects/{id}/frontends/{frontendId}/domains/{domain} | Remove a custom domain from a frontend *Volcano::Generated::FrontendsApi* | [**delete_frontend_function_route**](docs/FrontendsApi.md#delete_frontend_function_route) | **DELETE** /projects/{id}/frontends/{frontendId}/function-routes/{routeId} | Delete a Frontend Function route +*Volcano::Generated::FrontendsApi* | [**delete_frontend_route**](docs/FrontendsApi.md#delete_frontend_route) | **DELETE** /projects/{id}/frontends/{frontendId}/frontend-routes/{routeId} | Delete a Frontend route *Volcano::Generated::FrontendsApi* | [**get_frontend**](docs/FrontendsApi.md#get_frontend) | **GET** /projects/{id}/frontends/{frontendId} | Get frontend details +*Volcano::Generated::FrontendsApi* | [**get_frontend_candidate**](docs/FrontendsApi.md#get_frontend_candidate) | **GET** /projects/{id}/frontends/{frontendId}/candidates/{candidateId} | Get a frontend Candidate *Volcano::Generated::FrontendsApi* | [**get_frontend_custom_domain**](docs/FrontendsApi.md#get_frontend_custom_domain) | **GET** /projects/{id}/frontends/{frontendId}/domain | Get frontend custom domain status +*Volcano::Generated::FrontendsApi* | [**get_frontend_domain**](docs/FrontendsApi.md#get_frontend_domain) | **GET** /projects/{id}/frontends/{frontendId}/domains/{domain} | Get a frontend custom domain +*Volcano::Generated::FrontendsApi* | [**get_frontend_serving**](docs/FrontendsApi.md#get_frontend_serving) | **GET** /projects/{id}/frontends/{frontendId}/serving | Get what a frontend serves *Volcano::Generated::FrontendsApi* | [**get_frontend_usage_history**](docs/FrontendsApi.md#get_frontend_usage_history) | **GET** /projects/{id}/frontends/{frontendId}/usage | Per-day request and error counts for a single frontend +*Volcano::Generated::FrontendsApi* | [**list_frontend_candidates**](docs/FrontendsApi.md#list_frontend_candidates) | **GET** /projects/{id}/frontends/{frontendId}/candidates | List a frontend's Candidates *Volcano::Generated::FrontendsApi* | [**list_frontend_deployments**](docs/FrontendsApi.md#list_frontend_deployments) | **GET** /projects/{id}/frontends/{frontendId}/deployments | List frontend deployments +*Volcano::Generated::FrontendsApi* | [**list_frontend_domains**](docs/FrontendsApi.md#list_frontend_domains) | **GET** /projects/{id}/frontends/{frontendId}/domains | List a frontend's custom domains *Volcano::Generated::FrontendsApi* | [**list_frontend_function_routes**](docs/FrontendsApi.md#list_frontend_function_routes) | **GET** /projects/{id}/frontends/{frontendId}/function-routes | List a Frontend's Function routes +*Volcano::Generated::FrontendsApi* | [**list_frontend_routes**](docs/FrontendsApi.md#list_frontend_routes) | **GET** /projects/{id}/frontends/{frontendId}/frontend-routes | List a Frontend's Frontend routes *Volcano::Generated::FrontendsApi* | [**list_frontends**](docs/FrontendsApi.md#list_frontends) | **GET** /projects/{id}/frontends | List all frontends in a project *Volcano::Generated::FrontendsApi* | [**list_project_custom_domains**](docs/FrontendsApi.md#list_project_custom_domains) | **GET** /projects/{id}/domains | List all custom domains in a project +*Volcano::Generated::FrontendsApi* | [**promote_frontend_candidate**](docs/FrontendsApi.md#promote_frontend_candidate) | **POST** /projects/{id}/frontends/{frontendId}/candidates/{candidateId}/promote | Promote a frontend Candidate *Volcano::Generated::FrontendsApi* | [**redeploy_frontend**](docs/FrontendsApi.md#redeploy_frontend) | **POST** /projects/{id}/frontends/{frontendId}/redeploy | Redeploy frontend using latest uploaded artifact +*Volcano::Generated::FrontendsApi* | [**redeploy_frontend_candidate**](docs/FrontendsApi.md#redeploy_frontend_candidate) | **POST** /projects/{id}/frontends/{frontendId}/candidates/{candidateId}/deployments | Deploy a new archive to a frontend Candidate +*Volcano::Generated::FrontendsApi* | [**rollback_frontend_serving**](docs/FrontendsApi.md#rollback_frontend_serving) | **POST** /projects/{id}/frontends/{frontendId}/serving/rollback | Roll a frontend back to the runtime it served before +*Volcano::Generated::FrontendsApi* | [**update_frontend_domain**](docs/FrontendsApi.md#update_frontend_domain) | **PATCH** /projects/{id}/frontends/{frontendId}/domains/{domain} | Set or clear a custom domain's redirect *Volcano::Generated::FrontendsApi* | [**update_frontend_function_route**](docs/FrontendsApi.md#update_frontend_function_route) | **PUT** /projects/{id}/frontends/{frontendId}/function-routes/{routeId} | Replace a Frontend Function route +*Volcano::Generated::FrontendsApi* | [**update_frontend_route**](docs/FrontendsApi.md#update_frontend_route) | **PUT** /projects/{id}/frontends/{frontendId}/frontend-routes/{routeId} | Replace a Frontend route *Volcano::Generated::FunctionsApi* | [**create_function**](docs/FunctionsApi.md#create_function) | **POST** /projects/{id}/functions | Create or update function code +*Volcano::Generated::FunctionsApi* | [**create_function_candidate**](docs/FunctionsApi.md#create_function_candidate) | **POST** /projects/{id}/functions/{functionId}/candidates | Create a function preview *Volcano::Generated::FunctionsApi* | [**create_function_scheduler**](docs/FunctionsApi.md#create_function_scheduler) | **POST** /projects/{id}/functions/{functionId}/schedulers | Create a scheduler for a function *Volcano::Generated::FunctionsApi* | [**create_functions_batch**](docs/FunctionsApi.md#create_functions_batch) | **POST** /projects/{id}/functions/batch | Deploy multiple functions in one request *Volcano::Generated::FunctionsApi* | [**delete_function**](docs/FunctionsApi.md#delete_function) | **DELETE** /projects/{id}/functions/{functionId} | Delete a function +*Volcano::Generated::FunctionsApi* | [**delete_function_candidate**](docs/FunctionsApi.md#delete_function_candidate) | **DELETE** /projects/{id}/functions/{functionId}/candidates/{candidateId} | Delete a function preview *Volcano::Generated::FunctionsApi* | [**delete_function_scheduler**](docs/FunctionsApi.md#delete_function_scheduler) | **DELETE** /projects/{id}/functions/{functionId}/schedulers/{schedulerId} | Delete a function scheduler *Volcano::Generated::FunctionsApi* | [**get_function**](docs/FunctionsApi.md#get_function) | **GET** /projects/{id}/functions/{functionId} | Get function by ID +*Volcano::Generated::FunctionsApi* | [**get_function_candidate**](docs/FunctionsApi.md#get_function_candidate) | **GET** /projects/{id}/functions/{functionId}/candidates/{candidateId} | Get a function preview *Volcano::Generated::FunctionsApi* | [**get_function_scheduler**](docs/FunctionsApi.md#get_function_scheduler) | **GET** /projects/{id}/functions/{functionId}/schedulers/{schedulerId} | Get a function scheduler +*Volcano::Generated::FunctionsApi* | [**get_function_serving**](docs/FunctionsApi.md#get_function_serving) | **GET** /projects/{id}/functions/{functionId}/serving | Get what a function runs *Volcano::Generated::FunctionsApi* | [**invoke_function**](docs/FunctionsApi.md#invoke_function) | **POST** /functions/{functionId}/invoke | Invoke a function +*Volcano::Generated::FunctionsApi* | [**list_function_candidate_deployments**](docs/FunctionsApi.md#list_function_candidate_deployments) | **GET** /projects/{id}/functions/{functionId}/candidates/{candidateId}/deployments | List a function preview's deployments +*Volcano::Generated::FunctionsApi* | [**list_function_candidates**](docs/FunctionsApi.md#list_function_candidates) | **GET** /projects/{id}/functions/{functionId}/candidates | List a function's previews *Volcano::Generated::FunctionsApi* | [**list_function_deployments**](docs/FunctionsApi.md#list_function_deployments) | **GET** /projects/{id}/functions/{functionId}/deployments | List function deployments *Volcano::Generated::FunctionsApi* | [**list_function_regions**](docs/FunctionsApi.md#list_function_regions) | **GET** /functions/regions | List available regions for function deployment *Volcano::Generated::FunctionsApi* | [**list_function_runtimes**](docs/FunctionsApi.md#list_function_runtimes) | **GET** /functions/runtimes | List supported function runtimes *Volcano::Generated::FunctionsApi* | [**list_function_schedulers**](docs/FunctionsApi.md#list_function_schedulers) | **GET** /projects/{id}/functions/{functionId}/schedulers | List schedulers for a function *Volcano::Generated::FunctionsApi* | [**list_functions**](docs/FunctionsApi.md#list_functions) | **GET** /projects/{id}/functions | List all functions in a project *Volcano::Generated::FunctionsApi* | [**list_project_schedulers**](docs/FunctionsApi.md#list_project_schedulers) | **GET** /projects/{id}/schedulers | List every function scheduler in a project +*Volcano::Generated::FunctionsApi* | [**promote_function_candidate**](docs/FunctionsApi.md#promote_function_candidate) | **POST** /projects/{id}/functions/{functionId}/candidates/{candidateId}/promote | Promote a function preview +*Volcano::Generated::FunctionsApi* | [**redeploy_function_candidate**](docs/FunctionsApi.md#redeploy_function_candidate) | **POST** /projects/{id}/functions/{functionId}/candidates/{candidateId}/deployments | Deploy new source to a function preview *Volcano::Generated::FunctionsApi* | [**resolve_function_for_invocation**](docs/FunctionsApi.md#resolve_function_for_invocation) | **GET** /functions/resolve | Resolve function name for invocation +*Volcano::Generated::FunctionsApi* | [**rollback_function_serving**](docs/FunctionsApi.md#rollback_function_serving) | **POST** /projects/{id}/functions/{functionId}/serving/rollback | Roll back what a function runs *Volcano::Generated::FunctionsApi* | [**update_function**](docs/FunctionsApi.md#update_function) | **PATCH** /projects/{id}/functions/{functionId} | Update function settings *Volcano::Generated::FunctionsApi* | [**update_function_scheduler**](docs/FunctionsApi.md#update_function_scheduler) | **PATCH** /projects/{id}/functions/{functionId}/schedulers/{schedulerId} | Update a function scheduler *Volcano::Generated::GitConnectionsApi* | [**cancel_project_source_export**](docs/GitConnectionsApi.md#cancel_project_source_export) | **DELETE** /projects/{id}/source-export | Cancel an incomplete source export @@ -263,19 +307,36 @@ Class | Method | HTTP request | Description *Volcano::Generated::GitConnectionsApi* | [**delete_git_connection**](docs/GitConnectionsApi.md#delete_git_connection) | **DELETE** /user/git/connections/{connectionId} | Delete a git provider connection *Volcano::Generated::GitConnectionsApi* | [**disconnect_project_git**](docs/GitConnectionsApi.md#disconnect_project_git) | **DELETE** /projects/{id}/git-connection | Disconnect a project's repo connection *Volcano::Generated::GitConnectionsApi* | [**export_project_source**](docs/GitConnectionsApi.md#export_project_source) | **POST** /projects/{id}/source-export | Initialize an empty repository with a project's stored source +*Volcano::Generated::GitConnectionsApi* | [**get_git_deployment_run**](docs/GitConnectionsApi.md#get_git_deployment_run) | **GET** /projects/{id}/git-deployment-runs/{runId} | Get a Git deployment run *Volcano::Generated::GitConnectionsApi* | [**get_project_git_connection**](docs/GitConnectionsApi.md#get_project_git_connection) | **GET** /projects/{id}/git-connection | Get a project's repo connection *Volcano::Generated::GitConnectionsApi* | [**get_project_git_deploy_settings**](docs/GitConnectionsApi.md#get_project_git_deploy_settings) | **GET** /projects/{id}/git-deploy-settings | Get a project's Git auto-deploy settings +*Volcano::Generated::GitConnectionsApi* | [**get_project_git_owner_push**](docs/GitConnectionsApi.md#get_project_git_owner_push) | **GET** /projects/{id}/git-connection/owner-push | Check whether the project owner can push to the connected repository *Volcano::Generated::GitConnectionsApi* | [**get_project_source_export**](docs/GitConnectionsApi.md#get_project_source_export) | **GET** /projects/{id}/source-export | Report the project's source-of-truth state *Volcano::Generated::GitConnectionsApi* | [**git_connect_callback**](docs/GitConnectionsApi.md#git_connect_callback) | **GET** /github/callback | Complete a GitHub App connection callback *Volcano::Generated::GitConnectionsApi* | [**list_git_connections**](docs/GitConnectionsApi.md#list_git_connections) | **GET** /user/git/connections | List git provider connections +*Volcano::Generated::GitConnectionsApi* | [**list_git_deployment_runs**](docs/GitConnectionsApi.md#list_git_deployment_runs) | **GET** /projects/{id}/git-deployment-runs | List a project's Git deployment runs *Volcano::Generated::GitConnectionsApi* | [**list_git_installation_repositories**](docs/GitConnectionsApi.md#list_git_installation_repositories) | **GET** /user/git/connections/{connectionId}/installations/{installationId}/repositories | List repos accessible to a connection through an installation *Volcano::Generated::GitConnectionsApi* | [**list_git_installations**](docs/GitConnectionsApi.md#list_git_installations) | **GET** /user/git/connections/{connectionId}/installations | List GitHub App installations accessible to a connection *Volcano::Generated::GitConnectionsApi* | [**set_project_git_production_branch**](docs/GitConnectionsApi.md#set_project_git_production_branch) | **PUT** /projects/{id}/git-connection/production-branch | Set the branch a project deploys from +*Volcano::Generated::GitConnectionsApi* | [**set_project_git_root_directory**](docs/GitConnectionsApi.md#set_project_git_root_directory) | **PUT** /projects/{id}/git-connection/root-directory | Set the directory a project builds from *Volcano::Generated::GitConnectionsApi* | [**start_git_connect**](docs/GitConnectionsApi.md#start_git_connect) | **POST** /user/git/connect | Start a git provider connection *Volcano::Generated::GitConnectionsApi* | [**update_project_git_deploy_settings**](docs/GitConnectionsApi.md#update_project_git_deploy_settings) | **PUT** /projects/{id}/git-deploy-settings | Update a project's Git auto-deploy settings +*Volcano::Generated::IssuesApi* | [**create_issue**](docs/IssuesApi.md#create_issue) | **POST** /issues | Create an issue *Volcano::Generated::IssuesApi* | [**get_issue**](docs/IssuesApi.md#get_issue) | **GET** /projects/{id}/issues/{issueId} | Get an issue *Volcano::Generated::IssuesApi* | [**list_issues**](docs/IssuesApi.md#list_issues) | **GET** /projects/{id}/issues | List issues *Volcano::Generated::IssuesApi* | [**update_issue**](docs/IssuesApi.md#update_issue) | **PATCH** /projects/{id}/issues/{issueId} | Update an issue +*Volcano::Generated::LavaFlowApi* | [**create_lavaflow_connector_binding**](docs/LavaFlowApi.md#create_lavaflow_connector_binding) | **POST** /lavaflow/connector-bindings | Bind a connector to the project +*Volcano::Generated::LavaFlowApi* | [**create_lavaflow_held_fix_open**](docs/LavaFlowApi.md#create_lavaflow_held_fix_open) | **POST** /lavaflow/held-fix-opens | Open a held LavaFlow fix +*Volcano::Generated::LavaFlowApi* | [**create_lavaflow_run**](docs/LavaFlowApi.md#create_lavaflow_run) | **POST** /lavaflow/runs | Start a LavaFlow run +*Volcano::Generated::LavaFlowApi* | [**delete_lavaflow_connector_binding**](docs/LavaFlowApi.md#delete_lavaflow_connector_binding) | **DELETE** /lavaflow/connector-bindings/{binding_id} | Remove a connector binding +*Volcano::Generated::LavaFlowApi* | [**get_lavaflow_run**](docs/LavaFlowApi.md#get_lavaflow_run) | **GET** /lavaflow/runs/{run_id} | Get a LavaFlow run +*Volcano::Generated::LavaFlowApi* | [**get_lavaflow_settings**](docs/LavaFlowApi.md#get_lavaflow_settings) | **GET** /lavaflow/settings | Get LavaFlow settings +*Volcano::Generated::LavaFlowApi* | [**get_lavaflow_stats**](docs/LavaFlowApi.md#get_lavaflow_stats) | **GET** /lavaflow/stats | Get LavaFlow stats +*Volcano::Generated::LavaFlowApi* | [**list_lavaflow_connector_bindings**](docs/LavaFlowApi.md#list_lavaflow_connector_bindings) | **GET** /lavaflow/connector-bindings | List the project's connector bindings +*Volcano::Generated::LavaFlowApi* | [**list_lavaflow_resources**](docs/LavaFlowApi.md#list_lavaflow_resources) | **GET** /lavaflow/resources | List LavaFlow's resources +*Volcano::Generated::LavaFlowApi* | [**list_lavaflow_runs**](docs/LavaFlowApi.md#list_lavaflow_runs) | **GET** /lavaflow/runs | List LavaFlow runs +*Volcano::Generated::LavaFlowApi* | [**list_lavaflow_scans**](docs/LavaFlowApi.md#list_lavaflow_scans) | **GET** /lavaflow/scans | List LavaFlow Code Quality scans +*Volcano::Generated::LavaFlowApi* | [**patch_lavaflow_settings**](docs/LavaFlowApi.md#patch_lavaflow_settings) | **PATCH** /lavaflow/settings | Update LavaFlow settings *Volcano::Generated::LocksApi* | [**acquire_project_lock**](docs/LocksApi.md#acquire_project_lock) | **POST** /locks/{key}/lease | Acquire a project lock *Volcano::Generated::LocksApi* | [**force_release_project_lock**](docs/LocksApi.md#force_release_project_lock) | **DELETE** /locks/{key} | Force release a project lock *Volcano::Generated::LocksApi* | [**get_project_lock**](docs/LocksApi.md#get_project_lock) | **GET** /locks/{key} | Read a project lock @@ -284,6 +345,10 @@ Class | Method | HTTP request | Description *Volcano::Generated::LogsApi* | [**get_project_log_activity**](docs/LogsApi.md#get_project_log_activity) | **POST** /projects/{id}/logs/activity | Get project log activity *Volcano::Generated::LogsApi* | [**search_project_logs**](docs/LogsApi.md#search_project_logs) | **POST** /projects/{id}/logs/search | Search project logs *Volcano::Generated::LogsApi* | [**stream_project_logs**](docs/LogsApi.md#stream_project_logs) | **POST** /projects/{id}/logs/stream | Stream project logs +*Volcano::Generated::NotificationsApi* | [**get_notification_settings**](docs/NotificationsApi.md#get_notification_settings) | **GET** /projects/{id}/notifications | Get notification settings +*Volcano::Generated::NotificationsApi* | [**rotate_notification_webhook_secret**](docs/NotificationsApi.md#rotate_notification_webhook_secret) | **POST** /projects/{id}/notifications/webhook-secret | Rotate the webhook signing secret +*Volcano::Generated::NotificationsApi* | [**send_test_notification**](docs/NotificationsApi.md#send_test_notification) | **POST** /projects/{id}/notifications/test | Send a test notification +*Volcano::Generated::NotificationsApi* | [**update_notification_settings**](docs/NotificationsApi.md#update_notification_settings) | **PUT** /projects/{id}/notifications | Update notification settings *Volcano::Generated::OAuthAuthenticationApi* | [**auth_device_authorize**](docs/OAuthAuthenticationApi.md#auth_device_authorize) | **POST** /auth/device/authorize | Start RFC8628 device authorization *Volcano::Generated::OAuthAuthenticationApi* | [**auth_device_token**](docs/OAuthAuthenticationApi.md#auth_device_token) | **POST** /auth/device/token | Poll device token endpoint *Volcano::Generated::OAuthAuthenticationApi* | [**auth_device_verify**](docs/OAuthAuthenticationApi.md#auth_device_verify) | **POST** /auth/device/verify | Approve or deny a device code @@ -325,29 +390,37 @@ Class | Method | HTTP request | Description *Volcano::Generated::ProjectsApi* | [**delete_project_logo**](docs/ProjectsApi.md#delete_project_logo) | **DELETE** /projects/{id}/logo | Remove the project logo *Volcano::Generated::ProjectsApi* | [**disconnect_project_git**](docs/ProjectsApi.md#disconnect_project_git) | **DELETE** /projects/{id}/git-connection | Disconnect a project's repo connection *Volcano::Generated::ProjectsApi* | [**export_project_source**](docs/ProjectsApi.md#export_project_source) | **POST** /projects/{id}/source-export | Initialize an empty repository with a project's stored source +*Volcano::Generated::ProjectsApi* | [**get_git_deployment_run**](docs/ProjectsApi.md#get_git_deployment_run) | **GET** /projects/{id}/git-deployment-runs/{runId} | Get a Git deployment run *Volcano::Generated::ProjectsApi* | [**get_project**](docs/ProjectsApi.md#get_project) | **GET** /projects/{id} | Get project by ID *Volcano::Generated::ProjectsApi* | [**get_project_config**](docs/ProjectsApi.md#get_project_config) | **GET** /projects/{id}/config | Export project configuration *Volcano::Generated::ProjectsApi* | [**get_project_git_connection**](docs/ProjectsApi.md#get_project_git_connection) | **GET** /projects/{id}/git-connection | Get a project's repo connection *Volcano::Generated::ProjectsApi* | [**get_project_git_deploy_settings**](docs/ProjectsApi.md#get_project_git_deploy_settings) | **GET** /projects/{id}/git-deploy-settings | Get a project's Git auto-deploy settings +*Volcano::Generated::ProjectsApi* | [**get_project_git_owner_push**](docs/ProjectsApi.md#get_project_git_owner_push) | **GET** /projects/{id}/git-connection/owner-push | Check whether the project owner can push to the connected repository *Volcano::Generated::ProjectsApi* | [**get_project_health**](docs/ProjectsApi.md#get_project_health) | **GET** /projects/{id}/health | Get project health *Volcano::Generated::ProjectsApi* | [**get_project_logo**](docs/ProjectsApi.md#get_project_logo) | **GET** /projects/{id}/logo | Get the project logo image *Volcano::Generated::ProjectsApi* | [**get_project_source_export**](docs/ProjectsApi.md#get_project_source_export) | **GET** /projects/{id}/source-export | Report the project's source-of-truth state *Volcano::Generated::ProjectsApi* | [**get_project_usage**](docs/ProjectsApi.md#get_project_usage) | **GET** /projects/{id}/usage | Get usage metrics for a project *Volcano::Generated::ProjectsApi* | [**list_deployments**](docs/ProjectsApi.md#list_deployments) | **GET** /deployments | List deployments across a user's projects +*Volcano::Generated::ProjectsApi* | [**list_git_deployment_runs**](docs/ProjectsApi.md#list_git_deployment_runs) | **GET** /projects/{id}/git-deployment-runs | List a project's Git deployment runs +*Volcano::Generated::ProjectsApi* | [**list_project_capabilities**](docs/ProjectsApi.md#list_project_capabilities) | **GET** /projects/{id}/capabilities | List a project's capabilities *Volcano::Generated::ProjectsApi* | [**list_project_deployments**](docs/ProjectsApi.md#list_project_deployments) | **GET** /projects/{id}/deployments | List deployments in a project *Volcano::Generated::ProjectsApi* | [**list_projects**](docs/ProjectsApi.md#list_projects) | **GET** /projects | List all projects for authenticated user *Volcano::Generated::ProjectsApi* | [**query_project_metrics**](docs/ProjectsApi.md#query_project_metrics) | **POST** /projects/{id}/metrics/query | Query project runtime metrics *Volcano::Generated::ProjectsApi* | [**replace_frontend_shared_variables**](docs/ProjectsApi.md#replace_frontend_shared_variables) | **PUT** /projects/{id}/frontend-shared-variables | Replace frontend shared variable names *Volcano::Generated::ProjectsApi* | [**replace_shared_variables**](docs/ProjectsApi.md#replace_shared_variables) | **PUT** /projects/{id}/shared-variables | Replace shared variable names *Volcano::Generated::ProjectsApi* | [**set_project_git_production_branch**](docs/ProjectsApi.md#set_project_git_production_branch) | **PUT** /projects/{id}/git-connection/production-branch | Set the branch a project deploys from +*Volcano::Generated::ProjectsApi* | [**set_project_git_root_directory**](docs/ProjectsApi.md#set_project_git_root_directory) | **PUT** /projects/{id}/git-connection/root-directory | Set the directory a project builds from *Volcano::Generated::ProjectsApi* | [**summarize_project_deployments**](docs/ProjectsApi.md#summarize_project_deployments) | **GET** /projects/{id}/deployments/summary | Summarize deployments in a project *Volcano::Generated::ProjectsApi* | [**update_project**](docs/ProjectsApi.md#update_project) | **PATCH** /projects/{id} | Update project metadata and region policy *Volcano::Generated::ProjectsApi* | [**update_project_git_deploy_settings**](docs/ProjectsApi.md#update_project_git_deploy_settings) | **PUT** /projects/{id}/git-deploy-settings | Update a project's Git auto-deploy settings *Volcano::Generated::ProjectsApi* | [**upload_project_logo**](docs/ProjectsApi.md#upload_project_logo) | **POST** /projects/{id}/logo | Upload or replace the project logo *Volcano::Generated::RealtimeApi* | [**get_realtime_config**](docs/RealtimeApi.md#get_realtime_config) | **GET** /projects/{id}/realtime/config | Get realtime configuration for a project *Volcano::Generated::RealtimeApi* | [**get_realtime_stats**](docs/RealtimeApi.md#get_realtime_stats) | **GET** /projects/{id}/realtime/stats | Get realtime statistics for a project +*Volcano::Generated::RealtimeApi* | [**publish_realtime_message**](docs/RealtimeApi.md#publish_realtime_message) | **POST** /realtime/v1/publish | Publish a message to a Realtime channel *Volcano::Generated::RealtimeApi* | [**update_realtime_config**](docs/RealtimeApi.md#update_realtime_config) | **PUT** /projects/{id}/realtime/config | Update realtime configuration for a project *Volcano::Generated::SandboxesApi* | [**create_sandbox**](docs/SandboxesApi.md#create_sandbox) | **POST** /projects/{id}/sandboxes | Create a sandbox template from a verified preset +*Volcano::Generated::SandboxesApi* | [**create_sandbox_file_archive**](docs/SandboxesApi.md#create_sandbox_file_archive) | **POST** /sandbox-file-archives | Extract a tar archive into a session's workspace +*Volcano::Generated::SandboxesApi* | [**create_sandbox_file_part**](docs/SandboxesApi.md#create_sandbox_file_part) | **POST** /sandbox-file-parts | Write one part of a large workspace file *Volcano::Generated::SandboxesApi* | [**create_sandbox_session**](docs/SandboxesApi.md#create_sandbox_session) | **POST** /projects/{id}/sandbox-sessions | Start a sandbox session *Volcano::Generated::SandboxesApi* | [**create_sandbox_session_access**](docs/SandboxesApi.md#create_sandbox_session_access) | **POST** /sandbox-sessions/{sessionId}/access | Issue a short-lived port-scoped access credential *Volcano::Generated::SandboxesApi* | [**delete_sandbox**](docs/SandboxesApi.md#delete_sandbox) | **DELETE** /projects/{id}/sandboxes/{sandboxId} | Retire a template and terminate its sessions @@ -362,6 +435,7 @@ Class | Method | HTTP request | Description *Volcano::Generated::SandboxesApi* | [**grant_sandbox_session**](docs/SandboxesApi.md#grant_sandbox_session) | **PUT** /sandbox-sessions/{sessionId}/grants/{subjectId} | Authorize an authenticated project user for this session *Volcano::Generated::SandboxesApi* | [**list_sandbox_deployments**](docs/SandboxesApi.md#list_sandbox_deployments) | **GET** /projects/{id}/sandboxes/{sandboxId}/deployments | List sandbox deployment history *Volcano::Generated::SandboxesApi* | [**list_sandbox_presets**](docs/SandboxesApi.md#list_sandbox_presets) | **GET** /sandboxes/presets | List available sandbox presets +*Volcano::Generated::SandboxesApi* | [**list_sandbox_session_files**](docs/SandboxesApi.md#list_sandbox_session_files) | **GET** /sandbox-session-files | List workspace files *Volcano::Generated::SandboxesApi* | [**list_sandbox_sessions**](docs/SandboxesApi.md#list_sandbox_sessions) | **GET** /projects/{id}/sandbox-sessions | List project sandbox sessions *Volcano::Generated::SandboxesApi* | [**list_sandboxes**](docs/SandboxesApi.md#list_sandboxes) | **GET** /projects/{id}/sandboxes | List sandbox templates *Volcano::Generated::SandboxesApi* | [**read_sandbox_session_file**](docs/SandboxesApi.md#read_sandbox_session_file) | **POST** /sandbox-sessions/{sessionId}/files/read | Read a workspace file @@ -376,6 +450,22 @@ Class | Method | HTTP request | Description *Volcano::Generated::ServiceKeysApi* | [**get_service_key**](docs/ServiceKeysApi.md#get_service_key) | **GET** /projects/{id}/service-keys/{keyId} | Get service key *Volcano::Generated::ServiceKeysApi* | [**list_service_keys**](docs/ServiceKeysApi.md#list_service_keys) | **GET** /projects/{id}/service-keys | List service keys (paginated) *Volcano::Generated::ServiceKeysApi* | [**regenerate_service_key**](docs/ServiceKeysApi.md#regenerate_service_key) | **POST** /projects/{id}/service-keys/{keyId}/regenerate | Regenerate service key +*Volcano::Generated::SharesApi* | [**create_share**](docs/SharesApi.md#create_share) | **POST** /shares | Create a deploy link +*Volcano::Generated::SharesApi* | [**delete_share**](docs/SharesApi.md#delete_share) | **DELETE** /shares/{share_id} | Delete a deploy link +*Volcano::Generated::SharesApi* | [**get_share**](docs/SharesApi.md#get_share) | **GET** /shares/{share_id} | Get a deploy link +*Volcano::Generated::SharesApi* | [**get_share_preview**](docs/SharesApi.md#get_share_preview) | **GET** /share-previews/{share_id} | Preview what a deploy link deploys +*Volcano::Generated::SharesApi* | [**get_share_release_draft**](docs/SharesApi.md#get_share_release_draft) | **GET** /share-release-drafts | Show what publishing a deploy link would release +*Volcano::Generated::SharesApi* | [**get_share_stats**](docs/SharesApi.md#get_share_stats) | **GET** /share-stats | Get a deploy link's click and deploy counts +*Volcano::Generated::SharesApi* | [**list_share_releases**](docs/SharesApi.md#list_share_releases) | **GET** /share-releases | List a deploy link's releases +*Volcano::Generated::SharesApi* | [**list_shares**](docs/SharesApi.md#list_shares) | **GET** /shares | List a project's deploy links +*Volcano::Generated::SharesApi* | [**publish_share_release**](docs/SharesApi.md#publish_share_release) | **POST** /share-releases | Publish a deploy link release +*Volcano::Generated::SharesApi* | [**update_share**](docs/SharesApi.md#update_share) | **PATCH** /shares/{share_id} | Edit or switch a deploy link on or off +*Volcano::Generated::SlackConnectionsApi* | [**delete_slack_connection**](docs/SlackConnectionsApi.md#delete_slack_connection) | **DELETE** /user/slack/connections/{connectionId} | Disconnect a Slack identity +*Volcano::Generated::SlackConnectionsApi* | [**list_slack_channels**](docs/SlackConnectionsApi.md#list_slack_channels) | **GET** /user/slack/channels | List a workspace's channels for binding +*Volcano::Generated::SlackConnectionsApi* | [**list_slack_connections**](docs/SlackConnectionsApi.md#list_slack_connections) | **GET** /user/slack/connections | List connected Slack identities +*Volcano::Generated::SlackConnectionsApi* | [**slack_callback**](docs/SlackConnectionsApi.md#slack_callback) | **GET** /slack/callback | Complete a Slack install or connection +*Volcano::Generated::SlackConnectionsApi* | [**start_slack_connect**](docs/SlackConnectionsApi.md#start_slack_connect) | **POST** /user/slack/connections | Start connecting a Slack identity +*Volcano::Generated::SlackConnectionsApi* | [**start_slack_install**](docs/SlackConnectionsApi.md#start_slack_install) | **POST** /user/slack/installations | Start installing the Volcano Slack app *Volcano::Generated::StorageAdminApi* | [**get_storage_stats**](docs/StorageAdminApi.md#get_storage_stats) | **GET** /projects/{id}/storage/stats | Get storage statistics for a project *Volcano::Generated::StorageAdminApi* | [**list_storage_objects_admin**](docs/StorageAdminApi.md#list_storage_objects_admin) | **GET** /projects/{id}/storage/objects | List all storage objects in a project *Volcano::Generated::StorageBucketsApi* | [**create_storage_bucket**](docs/StorageBucketsApi.md#create_storage_bucket) | **POST** /projects/{id}/storage/buckets | Create a new storage bucket @@ -419,6 +509,12 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Volcano::Generated::AccountSession](docs/AccountSession.md) + - [Volcano::Generated::AccountSessionList](docs/AccountSessionList.md) + - [Volcano::Generated::AikidoConnector](docs/AikidoConnector.md) + - [Volcano::Generated::AikidoConnectorCreate](docs/AikidoConnectorCreate.md) + - [Volcano::Generated::AikidoRegion](docs/AikidoRegion.md) + - [Volcano::Generated::AikidoSeverity](docs/AikidoSeverity.md) - [Volcano::Generated::AnonKey](docs/AnonKey.md) - [Volcano::Generated::AuthConfig](docs/AuthConfig.md) - [Volcano::Generated::AuthConfirmEmail200Response](docs/AuthConfirmEmail200Response.md) @@ -475,10 +571,6 @@ Class | Method | HTTP request | Description - [Volcano::Generated::AuthTokenResponse](docs/AuthTokenResponse.md) - [Volcano::Generated::AuthUpdateUserRequest](docs/AuthUpdateUserRequest.md) - [Volcano::Generated::AuthUser](docs/AuthUser.md) - - [Volcano::Generated::AutofixModel](docs/AutofixModel.md) - - [Volcano::Generated::AutofixProvider](docs/AutofixProvider.md) - - [Volcano::Generated::AutofixSettings](docs/AutofixSettings.md) - - [Volcano::Generated::AutofixStage](docs/AutofixStage.md) - [Volcano::Generated::BYOCProjectConfigFrontendCustomDomainTLSConfig](docs/BYOCProjectConfigFrontendCustomDomainTLSConfig.md) - [Volcano::Generated::BYOCProjectConfigFrontendCustomDomainTLSConfigNot](docs/BYOCProjectConfigFrontendCustomDomainTLSConfigNot.md) - [Volcano::Generated::BanAuthUserRequest](docs/BanAuthUserRequest.md) @@ -499,6 +591,10 @@ Class | Method | HTTP request | Description - [Volcano::Generated::ConfigureAuthMethodsRequest](docs/ConfigureAuthMethodsRequest.md) - [Volcano::Generated::ConfigureAuthMethodsRequestOauthProvidersInner](docs/ConfigureAuthMethodsRequestOauthProvidersInner.md) - [Volcano::Generated::ConnectProjectGitRequest](docs/ConnectProjectGitRequest.md) + - [Volcano::Generated::Connector](docs/Connector.md) + - [Volcano::Generated::ConnectorCreate](docs/ConnectorCreate.md) + - [Volcano::Generated::ConnectorType](docs/ConnectorType.md) + - [Volcano::Generated::ConnectorsResponse](docs/ConnectorsResponse.md) - [Volcano::Generated::CreateAnonKeyRequest](docs/CreateAnonKeyRequest.md) - [Volcano::Generated::CreateDatabaseBackupRequest](docs/CreateDatabaseBackupRequest.md) - [Volcano::Generated::CreateDatabaseBranchRequest](docs/CreateDatabaseBranchRequest.md) @@ -506,8 +602,12 @@ Class | Method | HTTP request | Description - [Volcano::Generated::CreateDatabaseRestoreRequest](docs/CreateDatabaseRestoreRequest.md) - [Volcano::Generated::CreateEmailTemplateRequest](docs/CreateEmailTemplateRequest.md) - [Volcano::Generated::CreateFrontendCustomDomainRequest](docs/CreateFrontendCustomDomainRequest.md) + - [Volcano::Generated::CreateFrontendDeploymentRequest](docs/CreateFrontendDeploymentRequest.md) + - [Volcano::Generated::CreateFrontendDomainRequest](docs/CreateFrontendDomainRequest.md) - [Volcano::Generated::CreateFrontendFunctionRouteRequest](docs/CreateFrontendFunctionRouteRequest.md) + - [Volcano::Generated::CreateFrontendRouteRequest](docs/CreateFrontendRouteRequest.md) - [Volcano::Generated::CreateFunctionSchedulerRequest](docs/CreateFunctionSchedulerRequest.md) + - [Volcano::Generated::CreateIssueRequest](docs/CreateIssueRequest.md) - [Volcano::Generated::CreateOAuthConfigRequest](docs/CreateOAuthConfigRequest.md) - [Volcano::Generated::CreateProjectAccessTokenRequest](docs/CreateProjectAccessTokenRequest.md) - [Volcano::Generated::CreateProjectRequest](docs/CreateProjectRequest.md) @@ -531,6 +631,18 @@ Class | Method | HTTP request | Description - [Volcano::Generated::DatabaseBranchStorage](docs/DatabaseBranchStorage.md) - [Volcano::Generated::DatabaseDeleteRequest](docs/DatabaseDeleteRequest.md) - [Volcano::Generated::DatabaseInsertRequest](docs/DatabaseInsertRequest.md) + - [Volcano::Generated::DatabaseMigrationBaseline](docs/DatabaseMigrationBaseline.md) + - [Volcano::Generated::DatabaseMigrationConflictError](docs/DatabaseMigrationConflictError.md) + - [Volcano::Generated::DatabaseMigrationFile](docs/DatabaseMigrationFile.md) + - [Volcano::Generated::DatabaseMigrationFileError](docs/DatabaseMigrationFileError.md) + - [Volcano::Generated::DatabaseMigrationFilesRequest](docs/DatabaseMigrationFilesRequest.md) + - [Volcano::Generated::DatabaseMigrationHistoryEntry](docs/DatabaseMigrationHistoryEntry.md) + - [Volcano::Generated::DatabaseMigrationRun](docs/DatabaseMigrationRun.md) + - [Volcano::Generated::DatabaseMigrationRunError](docs/DatabaseMigrationRunError.md) + - [Volcano::Generated::DatabaseMigrationRunFile](docs/DatabaseMigrationRunFile.md) + - [Volcano::Generated::DatabaseMigrationRunList](docs/DatabaseMigrationRunList.md) + - [Volcano::Generated::DatabaseMigrationWarning](docs/DatabaseMigrationWarning.md) + - [Volcano::Generated::DatabaseMigrations](docs/DatabaseMigrations.md) - [Volcano::Generated::DatabaseQueryFilter](docs/DatabaseQueryFilter.md) - [Volcano::Generated::DatabaseQueryFilterValue](docs/DatabaseQueryFilterValue.md) - [Volcano::Generated::DatabaseQueryFilterValueOneOfInner](docs/DatabaseQueryFilterValueOneOfInner.md) @@ -540,14 +652,17 @@ Class | Method | HTTP request | Description - [Volcano::Generated::DatabaseQueryPerformanceResponse](docs/DatabaseQueryPerformanceResponse.md) - [Volcano::Generated::DatabaseQueryResult](docs/DatabaseQueryResult.md) - [Volcano::Generated::DatabaseRestore](docs/DatabaseRestore.md) + - [Volcano::Generated::DatabaseRestoreConflictError](docs/DatabaseRestoreConflictError.md) - [Volcano::Generated::DatabaseRestoreList](docs/DatabaseRestoreList.md) - [Volcano::Generated::DatabaseRestoreWindow](docs/DatabaseRestoreWindow.md) - [Volcano::Generated::DatabaseSelectRequest](docs/DatabaseSelectRequest.md) - [Volcano::Generated::DatabaseStats](docs/DatabaseStats.md) - [Volcano::Generated::DatabaseUpdateRequest](docs/DatabaseUpdateRequest.md) + - [Volcano::Generated::DefaultEmailTemplate](docs/DefaultEmailTemplate.md) - [Volcano::Generated::DeleteDatabase202Response](docs/DeleteDatabase202Response.md) - [Volcano::Generated::DeleteDatabaseBackup200Response](docs/DeleteDatabaseBackup200Response.md) - [Volcano::Generated::DeleteDatabaseBranch202Response](docs/DeleteDatabaseBranch202Response.md) + - [Volcano::Generated::DeploymentCommit](docs/DeploymentCommit.md) - [Volcano::Generated::DeploymentPhase](docs/DeploymentPhase.md) - [Volcano::Generated::DeploymentProgress](docs/DeploymentProgress.md) - [Volcano::Generated::DeploymentReference](docs/DeploymentReference.md) @@ -564,6 +679,10 @@ Class | Method | HTTP request | Description - [Volcano::Generated::DurableApprovalRegistration](docs/DurableApprovalRegistration.md) - [Volcano::Generated::DurableApprovalStats](docs/DurableApprovalStats.md) - [Volcano::Generated::DurableApprovalStatus](docs/DurableApprovalStatus.md) + - [Volcano::Generated::DurableCallbackError](docs/DurableCallbackError.md) + - [Volcano::Generated::DurableCallbackOutcome](docs/DurableCallbackOutcome.md) + - [Volcano::Generated::DurableCallbackRegistration](docs/DurableCallbackRegistration.md) + - [Volcano::Generated::DurableCallbackStatus](docs/DurableCallbackStatus.md) - [Volcano::Generated::DurableExecution](docs/DurableExecution.md) - [Volcano::Generated::DurableExecutionError](docs/DurableExecutionError.md) - [Volcano::Generated::DurableExecutionInvocation](docs/DurableExecutionInvocation.md) @@ -586,8 +705,16 @@ Class | Method | HTTP request | Description - [Volcano::Generated::EmailTemplate](docs/EmailTemplate.md) - [Volcano::Generated::Error](docs/Error.md) - [Volcano::Generated::ExportProjectSourceRequest](docs/ExportProjectSourceRequest.md) + - [Volcano::Generated::FailDurableCallbackRequest](docs/FailDurableCallbackRequest.md) + - [Volcano::Generated::ForkCreateRequest](docs/ForkCreateRequest.md) - [Volcano::Generated::Frontend](docs/Frontend.md) + - [Volcano::Generated::FrontendCandidate](docs/FrontendCandidate.md) + - [Volcano::Generated::FrontendCandidateDeployment](docs/FrontendCandidateDeployment.md) + - [Volcano::Generated::FrontendCandidateList](docs/FrontendCandidateList.md) - [Volcano::Generated::FrontendCustomDomainConflictError](docs/FrontendCustomDomainConflictError.md) + - [Volcano::Generated::FrontendCustomDomainList](docs/FrontendCustomDomainList.md) + - [Volcano::Generated::FrontendCustomDomainRedirect](docs/FrontendCustomDomainRedirect.md) + - [Volcano::Generated::FrontendCustomDomainRedirectRequest](docs/FrontendCustomDomainRedirectRequest.md) - [Volcano::Generated::FrontendCustomDomainResponse](docs/FrontendCustomDomainResponse.md) - [Volcano::Generated::FrontendCustomDomainTLSConfig](docs/FrontendCustomDomainTLSConfig.md) - [Volcano::Generated::FrontendCustomDomainTLSConfigNot](docs/FrontendCustomDomainTLSConfigNot.md) @@ -598,33 +725,53 @@ Class | Method | HTTP request | Description - [Volcano::Generated::FrontendDomainVerificationRecord](docs/FrontendDomainVerificationRecord.md) - [Volcano::Generated::FrontendFunctionRoute](docs/FrontendFunctionRoute.md) - [Volcano::Generated::FrontendFunctionRouteList](docs/FrontendFunctionRouteList.md) + - [Volcano::Generated::FrontendRoute](docs/FrontendRoute.md) + - [Volcano::Generated::FrontendRouteList](docs/FrontendRouteList.md) + - [Volcano::Generated::FrontendServing](docs/FrontendServing.md) - [Volcano::Generated::FrontendUsageDailyEntry](docs/FrontendUsageDailyEntry.md) - [Volcano::Generated::FrontendUsageData](docs/FrontendUsageData.md) - [Volcano::Generated::FrontendUsageHistoryResponse](docs/FrontendUsageHistoryResponse.md) - [Volcano::Generated::Function](docs/Function.md) + - [Volcano::Generated::FunctionCandidate](docs/FunctionCandidate.md) + - [Volcano::Generated::FunctionCandidateDeployment](docs/FunctionCandidateDeployment.md) + - [Volcano::Generated::FunctionCandidateDeploymentList](docs/FunctionCandidateDeploymentList.md) + - [Volcano::Generated::FunctionCandidateList](docs/FunctionCandidateList.md) - [Volcano::Generated::FunctionDeployment](docs/FunctionDeployment.md) - [Volcano::Generated::FunctionHTTPAuthMode](docs/FunctionHTTPAuthMode.md) + - [Volcano::Generated::FunctionImageDigest](docs/FunctionImageDigest.md) - [Volcano::Generated::FunctionInvocationMode](docs/FunctionInvocationMode.md) - [Volcano::Generated::FunctionInvocationRequest](docs/FunctionInvocationRequest.md) - [Volcano::Generated::FunctionKind](docs/FunctionKind.md) - [Volcano::Generated::FunctionKindFilter](docs/FunctionKindFilter.md) + - [Volcano::Generated::FunctionProductionEnvironment](docs/FunctionProductionEnvironment.md) + - [Volcano::Generated::FunctionPromotionRequest](docs/FunctionPromotionRequest.md) - [Volcano::Generated::FunctionRegion](docs/FunctionRegion.md) + - [Volcano::Generated::FunctionRollbackRequest](docs/FunctionRollbackRequest.md) - [Volcano::Generated::FunctionRuntimeDeployment](docs/FunctionRuntimeDeployment.md) - [Volcano::Generated::FunctionRuntimeOption](docs/FunctionRuntimeOption.md) - [Volcano::Generated::FunctionRuntimesResponse](docs/FunctionRuntimesResponse.md) - [Volcano::Generated::FunctionScheduler](docs/FunctionScheduler.md) - [Volcano::Generated::FunctionSchedulerListResponse](docs/FunctionSchedulerListResponse.md) + - [Volcano::Generated::FunctionServing](docs/FunctionServing.md) + - [Volcano::Generated::FunctionServingActivation](docs/FunctionServingActivation.md) - [Volcano::Generated::FunctionVisibility](docs/FunctionVisibility.md) - [Volcano::Generated::GetAuthMethods200Response](docs/GetAuthMethods200Response.md) - [Volcano::Generated::GetAuthMethods200ResponseEmailPassword](docs/GetAuthMethods200ResponseEmailPassword.md) - [Volcano::Generated::GetAuthMethods200ResponseOauthProvidersInner](docs/GetAuthMethods200ResponseOauthProvidersInner.md) + - [Volcano::Generated::GetDefaultEmailTemplates200Response](docs/GetDefaultEmailTemplates200Response.md) - [Volcano::Generated::GitConnectStartResponse](docs/GitConnectStartResponse.md) - [Volcano::Generated::GitConnection](docs/GitConnection.md) - [Volcano::Generated::GitConnectionsResponse](docs/GitConnectionsResponse.md) + - [Volcano::Generated::GitDeploymentMigrationRun](docs/GitDeploymentMigrationRun.md) + - [Volcano::Generated::GitDeploymentRun](docs/GitDeploymentRun.md) + - [Volcano::Generated::GitDeploymentRunError](docs/GitDeploymentRunError.md) + - [Volcano::Generated::GitDeploymentRunStatus](docs/GitDeploymentRunStatus.md) - [Volcano::Generated::GitInstallation](docs/GitInstallation.md) - [Volcano::Generated::GitInstallationsResponse](docs/GitInstallationsResponse.md) - [Volcano::Generated::GitRepositoriesResponse](docs/GitRepositoriesResponse.md) - [Volcano::Generated::GitRepository](docs/GitRepository.md) + - [Volcano::Generated::GitRepositoryReference](docs/GitRepositoryReference.md) + - [Volcano::Generated::HeartbeatDurableCallbackRequest](docs/HeartbeatDurableCallbackRequest.md) - [Volcano::Generated::HostedAuthPageType](docs/HostedAuthPageType.md) - [Volcano::Generated::HostedLoginEmailCheckRequest](docs/HostedLoginEmailCheckRequest.md) - [Volcano::Generated::HostedLoginEmailCheckResponse](docs/HostedLoginEmailCheckResponse.md) @@ -637,7 +784,84 @@ Class | Method | HTTP request | Description - [Volcano::Generated::ImportSource](docs/ImportSource.md) - [Volcano::Generated::ImportSourcesResponse](docs/ImportSourcesResponse.md) - [Volcano::Generated::Issue](docs/Issue.md) + - [Volcano::Generated::IssueFinding](docs/IssueFinding.md) + - [Volcano::Generated::IssueSource](docs/IssueSource.md) - [Volcano::Generated::IssueStatus](docs/IssueStatus.md) + - [Volcano::Generated::LavaflowAikidoBinding](docs/LavaflowAikidoBinding.md) + - [Volcano::Generated::LavaflowAikidoBindingTarget](docs/LavaflowAikidoBindingTarget.md) + - [Volcano::Generated::LavaflowAllowedWorkflow](docs/LavaflowAllowedWorkflow.md) + - [Volcano::Generated::LavaflowAnomaly](docs/LavaflowAnomaly.md) + - [Volcano::Generated::LavaflowAutonomy](docs/LavaflowAutonomy.md) + - [Volcano::Generated::LavaflowCategoryCounts](docs/LavaflowCategoryCounts.md) + - [Volcano::Generated::LavaflowCodeQualitySettings](docs/LavaflowCodeQualitySettings.md) + - [Volcano::Generated::LavaflowCodeQualityUpdate](docs/LavaflowCodeQualityUpdate.md) + - [Volcano::Generated::LavaflowCommitOrigin](docs/LavaflowCommitOrigin.md) + - [Volcano::Generated::LavaflowConnectorBinding](docs/LavaflowConnectorBinding.md) + - [Volcano::Generated::LavaflowConnectorBindingCreate](docs/LavaflowConnectorBindingCreate.md) + - [Volcano::Generated::LavaflowConnectorBindingsResponse](docs/LavaflowConnectorBindingsResponse.md) + - [Volcano::Generated::LavaflowDayCounts](docs/LavaflowDayCounts.md) + - [Volcano::Generated::LavaflowDiagnosis](docs/LavaflowDiagnosis.md) + - [Volcano::Generated::LavaflowDraftReason](docs/LavaflowDraftReason.md) + - [Volcano::Generated::LavaflowFailure](docs/LavaflowFailure.md) + - [Volcano::Generated::LavaflowFixOutcome](docs/LavaflowFixOutcome.md) + - [Volcano::Generated::LavaflowHeldFixOpen](docs/LavaflowHeldFixOpen.md) + - [Volcano::Generated::LavaflowHeldWorkflows](docs/LavaflowHeldWorkflows.md) + - [Volcano::Generated::LavaflowHoldReason](docs/LavaflowHoldReason.md) + - [Volcano::Generated::LavaflowInvolvedResource](docs/LavaflowInvolvedResource.md) + - [Volcano::Generated::LavaflowInvolvedResourceCount](docs/LavaflowInvolvedResourceCount.md) + - [Volcano::Generated::LavaflowIssueSummary](docs/LavaflowIssueSummary.md) + - [Volcano::Generated::LavaflowLineage](docs/LavaflowLineage.md) + - [Volcano::Generated::LavaflowLineageEvidence](docs/LavaflowLineageEvidence.md) + - [Volcano::Generated::LavaflowLineageEvidenceDeployment](docs/LavaflowLineageEvidenceDeployment.md) + - [Volcano::Generated::LavaflowLogLine](docs/LavaflowLogLine.md) + - [Volcano::Generated::LavaflowMerge](docs/LavaflowMerge.md) + - [Volcano::Generated::LavaflowMergePolicy](docs/LavaflowMergePolicy.md) + - [Volcano::Generated::LavaflowMergePolicyUpdate](docs/LavaflowMergePolicyUpdate.md) + - [Volcano::Generated::LavaflowMergeStatus](docs/LavaflowMergeStatus.md) + - [Volcano::Generated::LavaflowOutcomeCounts](docs/LavaflowOutcomeCounts.md) + - [Volcano::Generated::LavaflowOutcomeCoverage](docs/LavaflowOutcomeCoverage.md) + - [Volcano::Generated::LavaflowOutcomeCurrent](docs/LavaflowOutcomeCurrent.md) + - [Volcano::Generated::LavaflowOutcomeDay](docs/LavaflowOutcomeDay.md) + - [Volcano::Generated::LavaflowOutcomeValues](docs/LavaflowOutcomeValues.md) + - [Volcano::Generated::LavaflowOutcomes](docs/LavaflowOutcomes.md) + - [Volcano::Generated::LavaflowOutcomesCoverage](docs/LavaflowOutcomesCoverage.md) + - [Volcano::Generated::LavaflowPullRequest](docs/LavaflowPullRequest.md) + - [Volcano::Generated::LavaflowPullRequestStateCounts](docs/LavaflowPullRequestStateCounts.md) + - [Volcano::Generated::LavaflowRepositoryCheckCommand](docs/LavaflowRepositoryCheckCommand.md) + - [Volcano::Generated::LavaflowRepositoryChecks](docs/LavaflowRepositoryChecks.md) + - [Volcano::Generated::LavaflowResource](docs/LavaflowResource.md) + - [Volcano::Generated::LavaflowResourceList](docs/LavaflowResourceList.md) + - [Volcano::Generated::LavaflowResourceReference](docs/LavaflowResourceReference.md) + - [Volcano::Generated::LavaflowReview](docs/LavaflowReview.md) + - [Volcano::Generated::LavaflowReviewFinding](docs/LavaflowReviewFinding.md) + - [Volcano::Generated::LavaflowReviewPersonReason](docs/LavaflowReviewPersonReason.md) + - [Volcano::Generated::LavaflowReviewStop](docs/LavaflowReviewStop.md) + - [Volcano::Generated::LavaflowRun](docs/LavaflowRun.md) + - [Volcano::Generated::LavaflowRunCategory](docs/LavaflowRunCategory.md) + - [Volcano::Generated::LavaflowRunCounts](docs/LavaflowRunCounts.md) + - [Volcano::Generated::LavaflowRunCreate](docs/LavaflowRunCreate.md) + - [Volcano::Generated::LavaflowRunMode](docs/LavaflowRunMode.md) + - [Volcano::Generated::LavaflowRunProgress](docs/LavaflowRunProgress.md) + - [Volcano::Generated::LavaflowRunReference](docs/LavaflowRunReference.md) + - [Volcano::Generated::LavaflowRunStatus](docs/LavaflowRunStatus.md) + - [Volcano::Generated::LavaflowRunStatusCounts](docs/LavaflowRunStatusCounts.md) + - [Volcano::Generated::LavaflowRunSummary](docs/LavaflowRunSummary.md) + - [Volcano::Generated::LavaflowScan](docs/LavaflowScan.md) + - [Volcano::Generated::LavaflowScanBilledFinding](docs/LavaflowScanBilledFinding.md) + - [Volcano::Generated::LavaflowScanCounts](docs/LavaflowScanCounts.md) + - [Volcano::Generated::LavaflowScanResource](docs/LavaflowScanResource.md) + - [Volcano::Generated::LavaflowScanStatus](docs/LavaflowScanStatus.md) + - [Volcano::Generated::LavaflowSettings](docs/LavaflowSettings.md) + - [Volcano::Generated::LavaflowSettingsUpdate](docs/LavaflowSettingsUpdate.md) + - [Volcano::Generated::LavaflowSkipReason](docs/LavaflowSkipReason.md) + - [Volcano::Generated::LavaflowSlackBinding](docs/LavaflowSlackBinding.md) + - [Volcano::Generated::LavaflowSlackBindingTarget](docs/LavaflowSlackBindingTarget.md) + - [Volcano::Generated::LavaflowSourceCommit](docs/LavaflowSourceCommit.md) + - [Volcano::Generated::LavaflowSourceUnavailable](docs/LavaflowSourceUnavailable.md) + - [Volcano::Generated::LavaflowSourceUnavailableReason](docs/LavaflowSourceUnavailableReason.md) + - [Volcano::Generated::LavaflowStats](docs/LavaflowStats.md) + - [Volcano::Generated::LavaflowStatsTotals](docs/LavaflowStatsTotals.md) + - [Volcano::Generated::LavaflowWorkflowSource](docs/LavaflowWorkflowSource.md) - [Volcano::Generated::ListAnonKeys200Response](docs/ListAnonKeys200Response.md) - [Volcano::Generated::ListAvailableOAuthProviders200Response](docs/ListAvailableOAuthProviders200Response.md) - [Volcano::Generated::ListAvailableOAuthProviders200ResponseProvidersInner](docs/ListAvailableOAuthProviders200ResponseProvidersInner.md) @@ -652,6 +876,7 @@ Class | Method | HTTP request | Description - [Volcano::Generated::LogActivityBucketCounts](docs/LogActivityBucketCounts.md) - [Volcano::Generated::LogActivityRequest](docs/LogActivityRequest.md) - [Volcano::Generated::LogActivityResponse](docs/LogActivityResponse.md) + - [Volcano::Generated::LogAppRequestResource](docs/LogAppRequestResource.md) - [Volcano::Generated::LogDatabaseRequestResource](docs/LogDatabaseRequestResource.md) - [Volcano::Generated::LogDeployment](docs/LogDeployment.md) - [Volcano::Generated::LogDeploymentRequestSelector](docs/LogDeploymentRequestSelector.md) @@ -667,6 +892,12 @@ Class | Method | HTTP request | Description - [Volcano::Generated::LogStreamRequest](docs/LogStreamRequest.md) - [Volcano::Generated::ManagedProjectConfigFrontendCustomDomainTLSConfig](docs/ManagedProjectConfigFrontendCustomDomainTLSConfig.md) - [Volcano::Generated::MetricUsageData](docs/MetricUsageData.md) + - [Volcano::Generated::NotificationEmailSettings](docs/NotificationEmailSettings.md) + - [Volcano::Generated::NotificationEmailStatus](docs/NotificationEmailStatus.md) + - [Volcano::Generated::NotificationSettings](docs/NotificationSettings.md) + - [Volcano::Generated::NotificationTestDelivery](docs/NotificationTestDelivery.md) + - [Volcano::Generated::NotificationTestResult](docs/NotificationTestResult.md) + - [Volcano::Generated::NotificationWebhookSettings](docs/NotificationWebhookSettings.md) - [Volcano::Generated::OAuthConfig](docs/OAuthConfig.md) - [Volcano::Generated::OAuthErrorResponse](docs/OAuthErrorResponse.md) - [Volcano::Generated::OpenDurableMessageSessionRequest](docs/OpenDurableMessageSessionRequest.md) @@ -679,12 +910,16 @@ Class | Method | HTTP request | Description - [Volcano::Generated::PaginatedFrontends](docs/PaginatedFrontends.md) - [Volcano::Generated::PaginatedFunctionDeployments](docs/PaginatedFunctionDeployments.md) - [Volcano::Generated::PaginatedFunctions](docs/PaginatedFunctions.md) + - [Volcano::Generated::PaginatedGitDeploymentRuns](docs/PaginatedGitDeploymentRuns.md) - [Volcano::Generated::PaginatedIssues](docs/PaginatedIssues.md) + - [Volcano::Generated::PaginatedLavaflowRuns](docs/PaginatedLavaflowRuns.md) + - [Volcano::Generated::PaginatedLavaflowScans](docs/PaginatedLavaflowScans.md) - [Volcano::Generated::PaginatedProjectAccessTokens](docs/PaginatedProjectAccessTokens.md) - [Volcano::Generated::PaginatedProjectCustomDomains](docs/PaginatedProjectCustomDomains.md) - [Volcano::Generated::PaginatedProjectDeployments](docs/PaginatedProjectDeployments.md) - [Volcano::Generated::PaginatedProjects](docs/PaginatedProjects.md) - [Volcano::Generated::PaginatedServiceKeys](docs/PaginatedServiceKeys.md) + - [Volcano::Generated::PaginatedShareReleases](docs/PaginatedShareReleases.md) - [Volcano::Generated::PaginatedStorageBuckets](docs/PaginatedStorageBuckets.md) - [Volcano::Generated::PaginatedVariables](docs/PaginatedVariables.md) - [Volcano::Generated::PlatformExchangeResponse](docs/PlatformExchangeResponse.md) @@ -692,6 +927,7 @@ Class | Method | HTTP request | Description - [Volcano::Generated::PreviewAuthPageResponse](docs/PreviewAuthPageResponse.md) - [Volcano::Generated::Project](docs/Project.md) - [Volcano::Generated::ProjectAccessToken](docs/ProjectAccessToken.md) + - [Volcano::Generated::ProjectAccessTokenListedScope](docs/ProjectAccessTokenListedScope.md) - [Volcano::Generated::ProjectAccessTokenScope](docs/ProjectAccessTokenScope.md) - [Volcano::Generated::ProjectAccessTokenUsage](docs/ProjectAccessTokenUsage.md) - [Volcano::Generated::ProjectAccessTokenUsageDailyEntry](docs/ProjectAccessTokenUsageDailyEntry.md) @@ -717,20 +953,23 @@ Class | Method | HTTP request | Description - [Volcano::Generated::ProjectConfigAuthSessions](docs/ProjectConfigAuthSessions.md) - [Volcano::Generated::ProjectConfigAuthSignup](docs/ProjectConfigAuthSignup.md) - [Volcano::Generated::ProjectConfigAuthTokens](docs/ProjectConfigAuthTokens.md) - - [Volcano::Generated::ProjectConfigAutofix](docs/ProjectConfigAutofix.md) - [Volcano::Generated::ProjectConfigBucket](docs/ProjectConfigBucket.md) - [Volcano::Generated::ProjectConfigBucketPolicy](docs/ProjectConfigBucketPolicy.md) - [Volcano::Generated::ProjectConfigCustomDomain](docs/ProjectConfigCustomDomain.md) + - [Volcano::Generated::ProjectConfigCustomDomainRedirect](docs/ProjectConfigCustomDomainRedirect.md) - [Volcano::Generated::ProjectConfigDatabase](docs/ProjectConfigDatabase.md) - [Volcano::Generated::ProjectConfigEmailTemplate](docs/ProjectConfigEmailTemplate.md) - [Volcano::Generated::ProjectConfigEmailTemplates](docs/ProjectConfigEmailTemplates.md) - [Volcano::Generated::ProjectConfigFrontend](docs/ProjectConfigFrontend.md) + - [Volcano::Generated::ProjectConfigFrontendCustomDomain](docs/ProjectConfigFrontendCustomDomain.md) - [Volcano::Generated::ProjectConfigFrontendCustomDomainTLSConfig](docs/ProjectConfigFrontendCustomDomainTLSConfig.md) - [Volcano::Generated::ProjectConfigFrontendFunctionRoute](docs/ProjectConfigFrontendFunctionRoute.md) + - [Volcano::Generated::ProjectConfigFrontendRoute](docs/ProjectConfigFrontendRoute.md) - [Volcano::Generated::ProjectConfigFunction](docs/ProjectConfigFunction.md) - [Volcano::Generated::ProjectConfigHostedPage](docs/ProjectConfigHostedPage.md) - [Volcano::Generated::ProjectConfigHostedPages](docs/ProjectConfigHostedPages.md) - [Volcano::Generated::ProjectConfigMissingResource](docs/ProjectConfigMissingResource.md) + - [Volcano::Generated::ProjectConfigNotifications](docs/ProjectConfigNotifications.md) - [Volcano::Generated::ProjectConfigOAuthProvider](docs/ProjectConfigOAuthProvider.md) - [Volcano::Generated::ProjectConfigProject](docs/ProjectConfigProject.md) - [Volcano::Generated::ProjectConfigRealtime](docs/ProjectConfigRealtime.md) @@ -748,6 +987,7 @@ Class | Method | HTTP request | Description - [Volcano::Generated::ProjectGitConnection](docs/ProjectGitConnection.md) - [Volcano::Generated::ProjectGitConnectionSummary](docs/ProjectGitConnectionSummary.md) - [Volcano::Generated::ProjectGitDeploySettings](docs/ProjectGitDeploySettings.md) + - [Volcano::Generated::ProjectGitOwnerPush](docs/ProjectGitOwnerPush.md) - [Volcano::Generated::ProjectHealthCategory](docs/ProjectHealthCategory.md) - [Volcano::Generated::ProjectHealthCheck](docs/ProjectHealthCheck.md) - [Volcano::Generated::ProjectHealthDataStatus](docs/ProjectHealthDataStatus.md) @@ -794,13 +1034,18 @@ Class | Method | HTTP request | Description - [Volcano::Generated::ProjectSourceExportSkip](docs/ProjectSourceExportSkip.md) - [Volcano::Generated::ProjectSourceExportState](docs/ProjectSourceExportState.md) - [Volcano::Generated::ProjectTemplateInstallation](docs/ProjectTemplateInstallation.md) + - [Volcano::Generated::ProjectTemplateInstallationSource](docs/ProjectTemplateInstallationSource.md) - [Volcano::Generated::ProjectUsageResponse](docs/ProjectUsageResponse.md) + - [Volcano::Generated::PromoteFrontendCandidateRequest](docs/PromoteFrontendCandidateRequest.md) - [Volcano::Generated::PublishDurableMessageRequest](docs/PublishDurableMessageRequest.md) - [Volcano::Generated::PublishSandboxPresetRequest](docs/PublishSandboxPresetRequest.md) - [Volcano::Generated::RealtimeConfig](docs/RealtimeConfig.md) - [Volcano::Generated::RealtimePlanLimits](docs/RealtimePlanLimits.md) + - [Volcano::Generated::RealtimePublishRequest](docs/RealtimePublishRequest.md) + - [Volcano::Generated::RealtimePublishResult](docs/RealtimePublishResult.md) - [Volcano::Generated::RealtimeStats](docs/RealtimeStats.md) - [Volcano::Generated::RefreshOAuthProviderToken200Response](docs/RefreshOAuthProviderToken200Response.md) + - [Volcano::Generated::RegisterDurableCallbackRequest](docs/RegisterDurableCallbackRequest.md) - [Volcano::Generated::RegisterDurableMessageWaitRequest](docs/RegisterDurableMessageWaitRequest.md) - [Volcano::Generated::RenameVariableEnvironmentRequest](docs/RenameVariableEnvironmentRequest.md) - [Volcano::Generated::ReplaceFrontendSharedVariablesRequest](docs/ReplaceFrontendSharedVariablesRequest.md) @@ -809,6 +1054,7 @@ Class | Method | HTTP request | Description - [Volcano::Generated::ResetDatabasePassword200Response](docs/ResetDatabasePassword200Response.md) - [Volcano::Generated::ResolveFunctionResponse](docs/ResolveFunctionResponse.md) - [Volcano::Generated::ResourceReference](docs/ResourceReference.md) + - [Volcano::Generated::RollbackFrontendServingRequest](docs/RollbackFrontendServingRequest.md) - [Volcano::Generated::SandboxAccess](docs/SandboxAccess.md) - [Volcano::Generated::SandboxAccessRequest](docs/SandboxAccessRequest.md) - [Volcano::Generated::SandboxBuildLogPage](docs/SandboxBuildLogPage.md) @@ -821,21 +1067,60 @@ Class | Method | HTTP request | Description - [Volcano::Generated::SandboxDeploymentPage](docs/SandboxDeploymentPage.md) - [Volcano::Generated::SandboxExecutionRequest](docs/SandboxExecutionRequest.md) - [Volcano::Generated::SandboxExecutionResult](docs/SandboxExecutionResult.md) + - [Volcano::Generated::SandboxFileArchive](docs/SandboxFileArchive.md) + - [Volcano::Generated::SandboxFileEntry](docs/SandboxFileEntry.md) + - [Volcano::Generated::SandboxFileListResult](docs/SandboxFileListResult.md) + - [Volcano::Generated::SandboxFilePart](docs/SandboxFilePart.md) + - [Volcano::Generated::SandboxFilePartRequest](docs/SandboxFilePartRequest.md) - [Volcano::Generated::SandboxFileReadRequest](docs/SandboxFileReadRequest.md) - [Volcano::Generated::SandboxFileResult](docs/SandboxFileResult.md) - [Volcano::Generated::SandboxFileWriteRequest](docs/SandboxFileWriteRequest.md) + - [Volcano::Generated::SandboxLimitsApplied](docs/SandboxLimitsApplied.md) - [Volcano::Generated::SandboxPagination](docs/SandboxPagination.md) - [Volcano::Generated::SandboxPreset](docs/SandboxPreset.md) - [Volcano::Generated::SandboxPresetList](docs/SandboxPresetList.md) - [Volcano::Generated::SandboxSession](docs/SandboxSession.md) + - [Volcano::Generated::SandboxSessionAppliedLimits](docs/SandboxSessionAppliedLimits.md) + - [Volcano::Generated::SandboxSessionExecutions](docs/SandboxSessionExecutions.md) + - [Volcano::Generated::SandboxSessionLimits](docs/SandboxSessionLimits.md) + - [Volcano::Generated::SandboxSessionNetwork](docs/SandboxSessionNetwork.md) + - [Volcano::Generated::SandboxSessionNetworkRequest](docs/SandboxSessionNetworkRequest.md) - [Volcano::Generated::SandboxSessionPage](docs/SandboxSessionPage.md) - [Volcano::Generated::SandboxSubjectGrantRequest](docs/SandboxSubjectGrantRequest.md) - [Volcano::Generated::SandboxTemplate](docs/SandboxTemplate.md) - [Volcano::Generated::SandboxTemplatePage](docs/SandboxTemplatePage.md) - [Volcano::Generated::ScheduleRequest](docs/ScheduleRequest.md) + - [Volcano::Generated::SchedulerFailureAlertPolicy](docs/SchedulerFailureAlertPolicy.md) + - [Volcano::Generated::SchedulerFailureNotifyOn](docs/SchedulerFailureNotifyOn.md) - [Volcano::Generated::SendDurableMessageRequest](docs/SendDurableMessageRequest.md) - [Volcano::Generated::ServiceKey](docs/ServiceKey.md) - [Volcano::Generated::SetProjectGitProductionBranchRequest](docs/SetProjectGitProductionBranchRequest.md) + - [Volcano::Generated::SetProjectGitRootDirectoryRequest](docs/SetProjectGitRootDirectoryRequest.md) + - [Volcano::Generated::Share](docs/Share.md) + - [Volcano::Generated::ShareCreateRequest](docs/ShareCreateRequest.md) + - [Volcano::Generated::ShareDailyCount](docs/ShareDailyCount.md) + - [Volcano::Generated::ShareDraftChangedError](docs/ShareDraftChangedError.md) + - [Volcano::Generated::ShareKindCount](docs/ShareKindCount.md) + - [Volcano::Generated::SharePreview](docs/SharePreview.md) + - [Volcano::Generated::SharePreviewRelease](docs/SharePreviewRelease.md) + - [Volcano::Generated::ShareRelease](docs/ShareRelease.md) + - [Volcano::Generated::ShareReleaseCreateRequest](docs/ShareReleaseCreateRequest.md) + - [Volcano::Generated::ShareReleaseDraft](docs/ShareReleaseDraft.md) + - [Volcano::Generated::ShareReleaseFunction](docs/ShareReleaseFunction.md) + - [Volcano::Generated::ShareReleaseOmission](docs/ShareReleaseOmission.md) + - [Volcano::Generated::ShareReleaseRef](docs/ShareReleaseRef.md) + - [Volcano::Generated::ShareStats](docs/ShareStats.md) + - [Volcano::Generated::ShareUpdateRequest](docs/ShareUpdateRequest.md) + - [Volcano::Generated::ShareVariable](docs/ShareVariable.md) + - [Volcano::Generated::SharedVariablesReplaceResult](docs/SharedVariablesReplaceResult.md) + - [Volcano::Generated::SharesResponse](docs/SharesResponse.md) + - [Volcano::Generated::SkippedServedFunction](docs/SkippedServedFunction.md) + - [Volcano::Generated::SlackAuthorizationResponse](docs/SlackAuthorizationResponse.md) + - [Volcano::Generated::SlackChannel](docs/SlackChannel.md) + - [Volcano::Generated::SlackChannelsResponse](docs/SlackChannelsResponse.md) + - [Volcano::Generated::SlackConnection](docs/SlackConnection.md) + - [Volcano::Generated::SlackConnectionsResponse](docs/SlackConnectionsResponse.md) + - [Volcano::Generated::SlackConnector](docs/SlackConnector.md) - [Volcano::Generated::StorageBucket](docs/StorageBucket.md) - [Volcano::Generated::StorageCopyRequest](docs/StorageCopyRequest.md) - [Volcano::Generated::StorageListResponse](docs/StorageListResponse.md) @@ -845,6 +1130,7 @@ Class | Method | HTTP request | Description - [Volcano::Generated::StoragePolicy](docs/StoragePolicy.md) - [Volcano::Generated::StorageStats](docs/StorageStats.md) - [Volcano::Generated::StorageVisibilityRequest](docs/StorageVisibilityRequest.md) + - [Volcano::Generated::SucceedDurableCallbackRequest](docs/SucceedDurableCallbackRequest.md) - [Volcano::Generated::TestEmailRequest](docs/TestEmailRequest.md) - [Volcano::Generated::TestEmailResponse](docs/TestEmailResponse.md) - [Volcano::Generated::UnbanUserResponse](docs/UnbanUserResponse.md) @@ -852,18 +1138,22 @@ Class | Method | HTTP request | Description - [Volcano::Generated::UpdateAuthHostedPageRequest](docs/UpdateAuthHostedPageRequest.md) - [Volcano::Generated::UpdateAuthPageLayoutRequest](docs/UpdateAuthPageLayoutRequest.md) - [Volcano::Generated::UpdateAuthPageThemeRequest](docs/UpdateAuthPageThemeRequest.md) - - [Volcano::Generated::UpdateAutofixSettingsRequest](docs/UpdateAutofixSettingsRequest.md) - [Volcano::Generated::UpdateDatabaseBranchRequest](docs/UpdateDatabaseBranchRequest.md) - [Volcano::Generated::UpdateDatabaseTypeRequest](docs/UpdateDatabaseTypeRequest.md) - [Volcano::Generated::UpdateEmailTemplateRequest](docs/UpdateEmailTemplateRequest.md) + - [Volcano::Generated::UpdateFrontendCustomDomainRequest](docs/UpdateFrontendCustomDomainRequest.md) - [Volcano::Generated::UpdateFunctionRequest](docs/UpdateFunctionRequest.md) - [Volcano::Generated::UpdateFunctionSchedulerRequest](docs/UpdateFunctionSchedulerRequest.md) - [Volcano::Generated::UpdateIssueRequest](docs/UpdateIssueRequest.md) + - [Volcano::Generated::UpdateNotificationEmail](docs/UpdateNotificationEmail.md) + - [Volcano::Generated::UpdateNotificationSettingsRequest](docs/UpdateNotificationSettingsRequest.md) + - [Volcano::Generated::UpdateNotificationWebhook](docs/UpdateNotificationWebhook.md) - [Volcano::Generated::UpdateOAuthConfigRequest](docs/UpdateOAuthConfigRequest.md) - [Volcano::Generated::UpdateProjectGitDeploySettingsRequest](docs/UpdateProjectGitDeploySettingsRequest.md) - [Volcano::Generated::UpdateProjectRequest](docs/UpdateProjectRequest.md) - [Volcano::Generated::UpdateRealtimeConfigRequest](docs/UpdateRealtimeConfigRequest.md) - [Volcano::Generated::UpdateSandboxTemplateRequest](docs/UpdateSandboxTemplateRequest.md) + - [Volcano::Generated::UpdateSchedulerFailureAlertPolicy](docs/UpdateSchedulerFailureAlertPolicy.md) - [Volcano::Generated::UpdateStorageBucketRequest](docs/UpdateStorageBucketRequest.md) - [Volcano::Generated::UpdateVariableRequest](docs/UpdateVariableRequest.md) - [Volcano::Generated::UploadSessionPart](docs/UploadSessionPart.md) diff --git a/lib/volcano/generated/lib/volcano-generated.rb b/lib/volcano/generated/lib/volcano-generated.rb index a0516a26..44c94bb4 100644 --- a/lib/volcano/generated/lib/volcano-generated.rb +++ b/lib/volcano/generated/lib/volcano-generated.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -18,6 +18,12 @@ require 'volcano-generated/configuration' # Models +Volcano::Generated.autoload :AccountSession, 'volcano-generated/models/account_session' +Volcano::Generated.autoload :AccountSessionList, 'volcano-generated/models/account_session_list' +Volcano::Generated.autoload :AikidoConnector, 'volcano-generated/models/aikido_connector' +Volcano::Generated.autoload :AikidoConnectorCreate, 'volcano-generated/models/aikido_connector_create' +Volcano::Generated.autoload :AikidoRegion, 'volcano-generated/models/aikido_region' +Volcano::Generated.autoload :AikidoSeverity, 'volcano-generated/models/aikido_severity' Volcano::Generated.autoload :AnonKey, 'volcano-generated/models/anon_key' Volcano::Generated.autoload :AuthConfig, 'volcano-generated/models/auth_config' Volcano::Generated.autoload :AuthConfirmEmail200Response, 'volcano-generated/models/auth_confirm_email200_response' @@ -74,10 +80,6 @@ Volcano::Generated.autoload :AuthTokenResponse, 'volcano-generated/models/auth_token_response' Volcano::Generated.autoload :AuthUpdateUserRequest, 'volcano-generated/models/auth_update_user_request' Volcano::Generated.autoload :AuthUser, 'volcano-generated/models/auth_user' -Volcano::Generated.autoload :AutofixModel, 'volcano-generated/models/autofix_model' -Volcano::Generated.autoload :AutofixProvider, 'volcano-generated/models/autofix_provider' -Volcano::Generated.autoload :AutofixSettings, 'volcano-generated/models/autofix_settings' -Volcano::Generated.autoload :AutofixStage, 'volcano-generated/models/autofix_stage' Volcano::Generated.autoload :BYOCProjectConfigFrontendCustomDomainTLSConfig, 'volcano-generated/models/byoc_project_config_frontend_custom_domain_tls_config' Volcano::Generated.autoload :BYOCProjectConfigFrontendCustomDomainTLSConfigNot, 'volcano-generated/models/byoc_project_config_frontend_custom_domain_tls_config_not' Volcano::Generated.autoload :BanAuthUserRequest, 'volcano-generated/models/ban_auth_user_request' @@ -98,6 +100,10 @@ Volcano::Generated.autoload :ConfigureAuthMethodsRequest, 'volcano-generated/models/configure_auth_methods_request' Volcano::Generated.autoload :ConfigureAuthMethodsRequestOauthProvidersInner, 'volcano-generated/models/configure_auth_methods_request_oauth_providers_inner' Volcano::Generated.autoload :ConnectProjectGitRequest, 'volcano-generated/models/connect_project_git_request' +Volcano::Generated.autoload :Connector, 'volcano-generated/models/connector' +Volcano::Generated.autoload :ConnectorCreate, 'volcano-generated/models/connector_create' +Volcano::Generated.autoload :ConnectorType, 'volcano-generated/models/connector_type' +Volcano::Generated.autoload :ConnectorsResponse, 'volcano-generated/models/connectors_response' Volcano::Generated.autoload :CreateAnonKeyRequest, 'volcano-generated/models/create_anon_key_request' Volcano::Generated.autoload :CreateDatabaseBackupRequest, 'volcano-generated/models/create_database_backup_request' Volcano::Generated.autoload :CreateDatabaseBranchRequest, 'volcano-generated/models/create_database_branch_request' @@ -105,8 +111,12 @@ Volcano::Generated.autoload :CreateDatabaseRestoreRequest, 'volcano-generated/models/create_database_restore_request' Volcano::Generated.autoload :CreateEmailTemplateRequest, 'volcano-generated/models/create_email_template_request' Volcano::Generated.autoload :CreateFrontendCustomDomainRequest, 'volcano-generated/models/create_frontend_custom_domain_request' +Volcano::Generated.autoload :CreateFrontendDeploymentRequest, 'volcano-generated/models/create_frontend_deployment_request' +Volcano::Generated.autoload :CreateFrontendDomainRequest, 'volcano-generated/models/create_frontend_domain_request' Volcano::Generated.autoload :CreateFrontendFunctionRouteRequest, 'volcano-generated/models/create_frontend_function_route_request' +Volcano::Generated.autoload :CreateFrontendRouteRequest, 'volcano-generated/models/create_frontend_route_request' Volcano::Generated.autoload :CreateFunctionSchedulerRequest, 'volcano-generated/models/create_function_scheduler_request' +Volcano::Generated.autoload :CreateIssueRequest, 'volcano-generated/models/create_issue_request' Volcano::Generated.autoload :CreateOAuthConfigRequest, 'volcano-generated/models/create_o_auth_config_request' Volcano::Generated.autoload :CreateProjectAccessTokenRequest, 'volcano-generated/models/create_project_access_token_request' Volcano::Generated.autoload :CreateProjectRequest, 'volcano-generated/models/create_project_request' @@ -130,6 +140,18 @@ Volcano::Generated.autoload :DatabaseBranchStorage, 'volcano-generated/models/database_branch_storage' Volcano::Generated.autoload :DatabaseDeleteRequest, 'volcano-generated/models/database_delete_request' Volcano::Generated.autoload :DatabaseInsertRequest, 'volcano-generated/models/database_insert_request' +Volcano::Generated.autoload :DatabaseMigrationBaseline, 'volcano-generated/models/database_migration_baseline' +Volcano::Generated.autoload :DatabaseMigrationConflictError, 'volcano-generated/models/database_migration_conflict_error' +Volcano::Generated.autoload :DatabaseMigrationFile, 'volcano-generated/models/database_migration_file' +Volcano::Generated.autoload :DatabaseMigrationFileError, 'volcano-generated/models/database_migration_file_error' +Volcano::Generated.autoload :DatabaseMigrationFilesRequest, 'volcano-generated/models/database_migration_files_request' +Volcano::Generated.autoload :DatabaseMigrationHistoryEntry, 'volcano-generated/models/database_migration_history_entry' +Volcano::Generated.autoload :DatabaseMigrationRun, 'volcano-generated/models/database_migration_run' +Volcano::Generated.autoload :DatabaseMigrationRunError, 'volcano-generated/models/database_migration_run_error' +Volcano::Generated.autoload :DatabaseMigrationRunFile, 'volcano-generated/models/database_migration_run_file' +Volcano::Generated.autoload :DatabaseMigrationRunList, 'volcano-generated/models/database_migration_run_list' +Volcano::Generated.autoload :DatabaseMigrationWarning, 'volcano-generated/models/database_migration_warning' +Volcano::Generated.autoload :DatabaseMigrations, 'volcano-generated/models/database_migrations' Volcano::Generated.autoload :DatabaseQueryFilter, 'volcano-generated/models/database_query_filter' Volcano::Generated.autoload :DatabaseQueryFilterValue, 'volcano-generated/models/database_query_filter_value' Volcano::Generated.autoload :DatabaseQueryFilterValueOneOfInner, 'volcano-generated/models/database_query_filter_value_one_of_inner' @@ -139,14 +161,17 @@ Volcano::Generated.autoload :DatabaseQueryPerformanceResponse, 'volcano-generated/models/database_query_performance_response' Volcano::Generated.autoload :DatabaseQueryResult, 'volcano-generated/models/database_query_result' Volcano::Generated.autoload :DatabaseRestore, 'volcano-generated/models/database_restore' +Volcano::Generated.autoload :DatabaseRestoreConflictError, 'volcano-generated/models/database_restore_conflict_error' Volcano::Generated.autoload :DatabaseRestoreList, 'volcano-generated/models/database_restore_list' Volcano::Generated.autoload :DatabaseRestoreWindow, 'volcano-generated/models/database_restore_window' Volcano::Generated.autoload :DatabaseSelectRequest, 'volcano-generated/models/database_select_request' Volcano::Generated.autoload :DatabaseStats, 'volcano-generated/models/database_stats' Volcano::Generated.autoload :DatabaseUpdateRequest, 'volcano-generated/models/database_update_request' +Volcano::Generated.autoload :DefaultEmailTemplate, 'volcano-generated/models/default_email_template' Volcano::Generated.autoload :DeleteDatabase202Response, 'volcano-generated/models/delete_database202_response' Volcano::Generated.autoload :DeleteDatabaseBackup200Response, 'volcano-generated/models/delete_database_backup200_response' Volcano::Generated.autoload :DeleteDatabaseBranch202Response, 'volcano-generated/models/delete_database_branch202_response' +Volcano::Generated.autoload :DeploymentCommit, 'volcano-generated/models/deployment_commit' Volcano::Generated.autoload :DeploymentPhase, 'volcano-generated/models/deployment_phase' Volcano::Generated.autoload :DeploymentProgress, 'volcano-generated/models/deployment_progress' Volcano::Generated.autoload :DeploymentReference, 'volcano-generated/models/deployment_reference' @@ -163,6 +188,10 @@ Volcano::Generated.autoload :DurableApprovalRegistration, 'volcano-generated/models/durable_approval_registration' Volcano::Generated.autoload :DurableApprovalStats, 'volcano-generated/models/durable_approval_stats' Volcano::Generated.autoload :DurableApprovalStatus, 'volcano-generated/models/durable_approval_status' +Volcano::Generated.autoload :DurableCallbackError, 'volcano-generated/models/durable_callback_error' +Volcano::Generated.autoload :DurableCallbackOutcome, 'volcano-generated/models/durable_callback_outcome' +Volcano::Generated.autoload :DurableCallbackRegistration, 'volcano-generated/models/durable_callback_registration' +Volcano::Generated.autoload :DurableCallbackStatus, 'volcano-generated/models/durable_callback_status' Volcano::Generated.autoload :DurableExecution, 'volcano-generated/models/durable_execution' Volcano::Generated.autoload :DurableExecutionError, 'volcano-generated/models/durable_execution_error' Volcano::Generated.autoload :DurableExecutionInvocation, 'volcano-generated/models/durable_execution_invocation' @@ -185,8 +214,16 @@ Volcano::Generated.autoload :EmailTemplate, 'volcano-generated/models/email_template' Volcano::Generated.autoload :Error, 'volcano-generated/models/error' Volcano::Generated.autoload :ExportProjectSourceRequest, 'volcano-generated/models/export_project_source_request' +Volcano::Generated.autoload :FailDurableCallbackRequest, 'volcano-generated/models/fail_durable_callback_request' +Volcano::Generated.autoload :ForkCreateRequest, 'volcano-generated/models/fork_create_request' Volcano::Generated.autoload :Frontend, 'volcano-generated/models/frontend' +Volcano::Generated.autoload :FrontendCandidate, 'volcano-generated/models/frontend_candidate' +Volcano::Generated.autoload :FrontendCandidateDeployment, 'volcano-generated/models/frontend_candidate_deployment' +Volcano::Generated.autoload :FrontendCandidateList, 'volcano-generated/models/frontend_candidate_list' Volcano::Generated.autoload :FrontendCustomDomainConflictError, 'volcano-generated/models/frontend_custom_domain_conflict_error' +Volcano::Generated.autoload :FrontendCustomDomainList, 'volcano-generated/models/frontend_custom_domain_list' +Volcano::Generated.autoload :FrontendCustomDomainRedirect, 'volcano-generated/models/frontend_custom_domain_redirect' +Volcano::Generated.autoload :FrontendCustomDomainRedirectRequest, 'volcano-generated/models/frontend_custom_domain_redirect_request' Volcano::Generated.autoload :FrontendCustomDomainResponse, 'volcano-generated/models/frontend_custom_domain_response' Volcano::Generated.autoload :FrontendCustomDomainTLSConfig, 'volcano-generated/models/frontend_custom_domain_tls_config' Volcano::Generated.autoload :FrontendCustomDomainTLSConfigNot, 'volcano-generated/models/frontend_custom_domain_tls_config_not' @@ -197,33 +234,53 @@ Volcano::Generated.autoload :FrontendDomainVerificationRecord, 'volcano-generated/models/frontend_domain_verification_record' Volcano::Generated.autoload :FrontendFunctionRoute, 'volcano-generated/models/frontend_function_route' Volcano::Generated.autoload :FrontendFunctionRouteList, 'volcano-generated/models/frontend_function_route_list' +Volcano::Generated.autoload :FrontendRoute, 'volcano-generated/models/frontend_route' +Volcano::Generated.autoload :FrontendRouteList, 'volcano-generated/models/frontend_route_list' +Volcano::Generated.autoload :FrontendServing, 'volcano-generated/models/frontend_serving' Volcano::Generated.autoload :FrontendUsageDailyEntry, 'volcano-generated/models/frontend_usage_daily_entry' Volcano::Generated.autoload :FrontendUsageData, 'volcano-generated/models/frontend_usage_data' Volcano::Generated.autoload :FrontendUsageHistoryResponse, 'volcano-generated/models/frontend_usage_history_response' Volcano::Generated.autoload :Function, 'volcano-generated/models/function' +Volcano::Generated.autoload :FunctionCandidate, 'volcano-generated/models/function_candidate' +Volcano::Generated.autoload :FunctionCandidateDeployment, 'volcano-generated/models/function_candidate_deployment' +Volcano::Generated.autoload :FunctionCandidateDeploymentList, 'volcano-generated/models/function_candidate_deployment_list' +Volcano::Generated.autoload :FunctionCandidateList, 'volcano-generated/models/function_candidate_list' Volcano::Generated.autoload :FunctionDeployment, 'volcano-generated/models/function_deployment' Volcano::Generated.autoload :FunctionHTTPAuthMode, 'volcano-generated/models/function_http_auth_mode' +Volcano::Generated.autoload :FunctionImageDigest, 'volcano-generated/models/function_image_digest' Volcano::Generated.autoload :FunctionInvocationMode, 'volcano-generated/models/function_invocation_mode' Volcano::Generated.autoload :FunctionInvocationRequest, 'volcano-generated/models/function_invocation_request' Volcano::Generated.autoload :FunctionKind, 'volcano-generated/models/function_kind' Volcano::Generated.autoload :FunctionKindFilter, 'volcano-generated/models/function_kind_filter' +Volcano::Generated.autoload :FunctionProductionEnvironment, 'volcano-generated/models/function_production_environment' +Volcano::Generated.autoload :FunctionPromotionRequest, 'volcano-generated/models/function_promotion_request' Volcano::Generated.autoload :FunctionRegion, 'volcano-generated/models/function_region' +Volcano::Generated.autoload :FunctionRollbackRequest, 'volcano-generated/models/function_rollback_request' Volcano::Generated.autoload :FunctionRuntimeDeployment, 'volcano-generated/models/function_runtime_deployment' Volcano::Generated.autoload :FunctionRuntimeOption, 'volcano-generated/models/function_runtime_option' Volcano::Generated.autoload :FunctionRuntimesResponse, 'volcano-generated/models/function_runtimes_response' Volcano::Generated.autoload :FunctionScheduler, 'volcano-generated/models/function_scheduler' Volcano::Generated.autoload :FunctionSchedulerListResponse, 'volcano-generated/models/function_scheduler_list_response' +Volcano::Generated.autoload :FunctionServing, 'volcano-generated/models/function_serving' +Volcano::Generated.autoload :FunctionServingActivation, 'volcano-generated/models/function_serving_activation' Volcano::Generated.autoload :FunctionVisibility, 'volcano-generated/models/function_visibility' Volcano::Generated.autoload :GetAuthMethods200Response, 'volcano-generated/models/get_auth_methods200_response' Volcano::Generated.autoload :GetAuthMethods200ResponseEmailPassword, 'volcano-generated/models/get_auth_methods200_response_email_password' Volcano::Generated.autoload :GetAuthMethods200ResponseOauthProvidersInner, 'volcano-generated/models/get_auth_methods200_response_oauth_providers_inner' +Volcano::Generated.autoload :GetDefaultEmailTemplates200Response, 'volcano-generated/models/get_default_email_templates200_response' Volcano::Generated.autoload :GitConnectStartResponse, 'volcano-generated/models/git_connect_start_response' Volcano::Generated.autoload :GitConnection, 'volcano-generated/models/git_connection' Volcano::Generated.autoload :GitConnectionsResponse, 'volcano-generated/models/git_connections_response' +Volcano::Generated.autoload :GitDeploymentMigrationRun, 'volcano-generated/models/git_deployment_migration_run' +Volcano::Generated.autoload :GitDeploymentRun, 'volcano-generated/models/git_deployment_run' +Volcano::Generated.autoload :GitDeploymentRunError, 'volcano-generated/models/git_deployment_run_error' +Volcano::Generated.autoload :GitDeploymentRunStatus, 'volcano-generated/models/git_deployment_run_status' Volcano::Generated.autoload :GitInstallation, 'volcano-generated/models/git_installation' Volcano::Generated.autoload :GitInstallationsResponse, 'volcano-generated/models/git_installations_response' Volcano::Generated.autoload :GitRepositoriesResponse, 'volcano-generated/models/git_repositories_response' Volcano::Generated.autoload :GitRepository, 'volcano-generated/models/git_repository' +Volcano::Generated.autoload :GitRepositoryReference, 'volcano-generated/models/git_repository_reference' +Volcano::Generated.autoload :HeartbeatDurableCallbackRequest, 'volcano-generated/models/heartbeat_durable_callback_request' Volcano::Generated.autoload :HostedAuthPageType, 'volcano-generated/models/hosted_auth_page_type' Volcano::Generated.autoload :HostedLoginEmailCheckRequest, 'volcano-generated/models/hosted_login_email_check_request' Volcano::Generated.autoload :HostedLoginEmailCheckResponse, 'volcano-generated/models/hosted_login_email_check_response' @@ -236,7 +293,84 @@ Volcano::Generated.autoload :ImportSource, 'volcano-generated/models/import_source' Volcano::Generated.autoload :ImportSourcesResponse, 'volcano-generated/models/import_sources_response' Volcano::Generated.autoload :Issue, 'volcano-generated/models/issue' +Volcano::Generated.autoload :IssueFinding, 'volcano-generated/models/issue_finding' +Volcano::Generated.autoload :IssueSource, 'volcano-generated/models/issue_source' Volcano::Generated.autoload :IssueStatus, 'volcano-generated/models/issue_status' +Volcano::Generated.autoload :LavaflowAikidoBinding, 'volcano-generated/models/lavaflow_aikido_binding' +Volcano::Generated.autoload :LavaflowAikidoBindingTarget, 'volcano-generated/models/lavaflow_aikido_binding_target' +Volcano::Generated.autoload :LavaflowAllowedWorkflow, 'volcano-generated/models/lavaflow_allowed_workflow' +Volcano::Generated.autoload :LavaflowAnomaly, 'volcano-generated/models/lavaflow_anomaly' +Volcano::Generated.autoload :LavaflowAutonomy, 'volcano-generated/models/lavaflow_autonomy' +Volcano::Generated.autoload :LavaflowCategoryCounts, 'volcano-generated/models/lavaflow_category_counts' +Volcano::Generated.autoload :LavaflowCodeQualitySettings, 'volcano-generated/models/lavaflow_code_quality_settings' +Volcano::Generated.autoload :LavaflowCodeQualityUpdate, 'volcano-generated/models/lavaflow_code_quality_update' +Volcano::Generated.autoload :LavaflowCommitOrigin, 'volcano-generated/models/lavaflow_commit_origin' +Volcano::Generated.autoload :LavaflowConnectorBinding, 'volcano-generated/models/lavaflow_connector_binding' +Volcano::Generated.autoload :LavaflowConnectorBindingCreate, 'volcano-generated/models/lavaflow_connector_binding_create' +Volcano::Generated.autoload :LavaflowConnectorBindingsResponse, 'volcano-generated/models/lavaflow_connector_bindings_response' +Volcano::Generated.autoload :LavaflowDayCounts, 'volcano-generated/models/lavaflow_day_counts' +Volcano::Generated.autoload :LavaflowDiagnosis, 'volcano-generated/models/lavaflow_diagnosis' +Volcano::Generated.autoload :LavaflowDraftReason, 'volcano-generated/models/lavaflow_draft_reason' +Volcano::Generated.autoload :LavaflowFailure, 'volcano-generated/models/lavaflow_failure' +Volcano::Generated.autoload :LavaflowFixOutcome, 'volcano-generated/models/lavaflow_fix_outcome' +Volcano::Generated.autoload :LavaflowHeldFixOpen, 'volcano-generated/models/lavaflow_held_fix_open' +Volcano::Generated.autoload :LavaflowHeldWorkflows, 'volcano-generated/models/lavaflow_held_workflows' +Volcano::Generated.autoload :LavaflowHoldReason, 'volcano-generated/models/lavaflow_hold_reason' +Volcano::Generated.autoload :LavaflowInvolvedResource, 'volcano-generated/models/lavaflow_involved_resource' +Volcano::Generated.autoload :LavaflowInvolvedResourceCount, 'volcano-generated/models/lavaflow_involved_resource_count' +Volcano::Generated.autoload :LavaflowIssueSummary, 'volcano-generated/models/lavaflow_issue_summary' +Volcano::Generated.autoload :LavaflowLineage, 'volcano-generated/models/lavaflow_lineage' +Volcano::Generated.autoload :LavaflowLineageEvidence, 'volcano-generated/models/lavaflow_lineage_evidence' +Volcano::Generated.autoload :LavaflowLineageEvidenceDeployment, 'volcano-generated/models/lavaflow_lineage_evidence_deployment' +Volcano::Generated.autoload :LavaflowLogLine, 'volcano-generated/models/lavaflow_log_line' +Volcano::Generated.autoload :LavaflowMerge, 'volcano-generated/models/lavaflow_merge' +Volcano::Generated.autoload :LavaflowMergePolicy, 'volcano-generated/models/lavaflow_merge_policy' +Volcano::Generated.autoload :LavaflowMergePolicyUpdate, 'volcano-generated/models/lavaflow_merge_policy_update' +Volcano::Generated.autoload :LavaflowMergeStatus, 'volcano-generated/models/lavaflow_merge_status' +Volcano::Generated.autoload :LavaflowOutcomeCounts, 'volcano-generated/models/lavaflow_outcome_counts' +Volcano::Generated.autoload :LavaflowOutcomeCoverage, 'volcano-generated/models/lavaflow_outcome_coverage' +Volcano::Generated.autoload :LavaflowOutcomeCurrent, 'volcano-generated/models/lavaflow_outcome_current' +Volcano::Generated.autoload :LavaflowOutcomeDay, 'volcano-generated/models/lavaflow_outcome_day' +Volcano::Generated.autoload :LavaflowOutcomeValues, 'volcano-generated/models/lavaflow_outcome_values' +Volcano::Generated.autoload :LavaflowOutcomes, 'volcano-generated/models/lavaflow_outcomes' +Volcano::Generated.autoload :LavaflowOutcomesCoverage, 'volcano-generated/models/lavaflow_outcomes_coverage' +Volcano::Generated.autoload :LavaflowPullRequest, 'volcano-generated/models/lavaflow_pull_request' +Volcano::Generated.autoload :LavaflowPullRequestStateCounts, 'volcano-generated/models/lavaflow_pull_request_state_counts' +Volcano::Generated.autoload :LavaflowRepositoryCheckCommand, 'volcano-generated/models/lavaflow_repository_check_command' +Volcano::Generated.autoload :LavaflowRepositoryChecks, 'volcano-generated/models/lavaflow_repository_checks' +Volcano::Generated.autoload :LavaflowResource, 'volcano-generated/models/lavaflow_resource' +Volcano::Generated.autoload :LavaflowResourceList, 'volcano-generated/models/lavaflow_resource_list' +Volcano::Generated.autoload :LavaflowResourceReference, 'volcano-generated/models/lavaflow_resource_reference' +Volcano::Generated.autoload :LavaflowReview, 'volcano-generated/models/lavaflow_review' +Volcano::Generated.autoload :LavaflowReviewFinding, 'volcano-generated/models/lavaflow_review_finding' +Volcano::Generated.autoload :LavaflowReviewPersonReason, 'volcano-generated/models/lavaflow_review_person_reason' +Volcano::Generated.autoload :LavaflowReviewStop, 'volcano-generated/models/lavaflow_review_stop' +Volcano::Generated.autoload :LavaflowRun, 'volcano-generated/models/lavaflow_run' +Volcano::Generated.autoload :LavaflowRunCategory, 'volcano-generated/models/lavaflow_run_category' +Volcano::Generated.autoload :LavaflowRunCounts, 'volcano-generated/models/lavaflow_run_counts' +Volcano::Generated.autoload :LavaflowRunCreate, 'volcano-generated/models/lavaflow_run_create' +Volcano::Generated.autoload :LavaflowRunMode, 'volcano-generated/models/lavaflow_run_mode' +Volcano::Generated.autoload :LavaflowRunProgress, 'volcano-generated/models/lavaflow_run_progress' +Volcano::Generated.autoload :LavaflowRunReference, 'volcano-generated/models/lavaflow_run_reference' +Volcano::Generated.autoload :LavaflowRunStatus, 'volcano-generated/models/lavaflow_run_status' +Volcano::Generated.autoload :LavaflowRunStatusCounts, 'volcano-generated/models/lavaflow_run_status_counts' +Volcano::Generated.autoload :LavaflowRunSummary, 'volcano-generated/models/lavaflow_run_summary' +Volcano::Generated.autoload :LavaflowScan, 'volcano-generated/models/lavaflow_scan' +Volcano::Generated.autoload :LavaflowScanBilledFinding, 'volcano-generated/models/lavaflow_scan_billed_finding' +Volcano::Generated.autoload :LavaflowScanCounts, 'volcano-generated/models/lavaflow_scan_counts' +Volcano::Generated.autoload :LavaflowScanResource, 'volcano-generated/models/lavaflow_scan_resource' +Volcano::Generated.autoload :LavaflowScanStatus, 'volcano-generated/models/lavaflow_scan_status' +Volcano::Generated.autoload :LavaflowSettings, 'volcano-generated/models/lavaflow_settings' +Volcano::Generated.autoload :LavaflowSettingsUpdate, 'volcano-generated/models/lavaflow_settings_update' +Volcano::Generated.autoload :LavaflowSkipReason, 'volcano-generated/models/lavaflow_skip_reason' +Volcano::Generated.autoload :LavaflowSlackBinding, 'volcano-generated/models/lavaflow_slack_binding' +Volcano::Generated.autoload :LavaflowSlackBindingTarget, 'volcano-generated/models/lavaflow_slack_binding_target' +Volcano::Generated.autoload :LavaflowSourceCommit, 'volcano-generated/models/lavaflow_source_commit' +Volcano::Generated.autoload :LavaflowSourceUnavailable, 'volcano-generated/models/lavaflow_source_unavailable' +Volcano::Generated.autoload :LavaflowSourceUnavailableReason, 'volcano-generated/models/lavaflow_source_unavailable_reason' +Volcano::Generated.autoload :LavaflowStats, 'volcano-generated/models/lavaflow_stats' +Volcano::Generated.autoload :LavaflowStatsTotals, 'volcano-generated/models/lavaflow_stats_totals' +Volcano::Generated.autoload :LavaflowWorkflowSource, 'volcano-generated/models/lavaflow_workflow_source' Volcano::Generated.autoload :ListAnonKeys200Response, 'volcano-generated/models/list_anon_keys200_response' Volcano::Generated.autoload :ListAvailableOAuthProviders200Response, 'volcano-generated/models/list_available_o_auth_providers200_response' Volcano::Generated.autoload :ListAvailableOAuthProviders200ResponseProvidersInner, 'volcano-generated/models/list_available_o_auth_providers200_response_providers_inner' @@ -251,6 +385,7 @@ Volcano::Generated.autoload :LogActivityBucketCounts, 'volcano-generated/models/log_activity_bucket_counts' Volcano::Generated.autoload :LogActivityRequest, 'volcano-generated/models/log_activity_request' Volcano::Generated.autoload :LogActivityResponse, 'volcano-generated/models/log_activity_response' +Volcano::Generated.autoload :LogAppRequestResource, 'volcano-generated/models/log_app_request_resource' Volcano::Generated.autoload :LogDatabaseRequestResource, 'volcano-generated/models/log_database_request_resource' Volcano::Generated.autoload :LogDeployment, 'volcano-generated/models/log_deployment' Volcano::Generated.autoload :LogDeploymentRequestSelector, 'volcano-generated/models/log_deployment_request_selector' @@ -266,6 +401,12 @@ Volcano::Generated.autoload :LogStreamRequest, 'volcano-generated/models/log_stream_request' Volcano::Generated.autoload :ManagedProjectConfigFrontendCustomDomainTLSConfig, 'volcano-generated/models/managed_project_config_frontend_custom_domain_tls_config' Volcano::Generated.autoload :MetricUsageData, 'volcano-generated/models/metric_usage_data' +Volcano::Generated.autoload :NotificationEmailSettings, 'volcano-generated/models/notification_email_settings' +Volcano::Generated.autoload :NotificationEmailStatus, 'volcano-generated/models/notification_email_status' +Volcano::Generated.autoload :NotificationSettings, 'volcano-generated/models/notification_settings' +Volcano::Generated.autoload :NotificationTestDelivery, 'volcano-generated/models/notification_test_delivery' +Volcano::Generated.autoload :NotificationTestResult, 'volcano-generated/models/notification_test_result' +Volcano::Generated.autoload :NotificationWebhookSettings, 'volcano-generated/models/notification_webhook_settings' Volcano::Generated.autoload :OAuthConfig, 'volcano-generated/models/o_auth_config' Volcano::Generated.autoload :OAuthErrorResponse, 'volcano-generated/models/o_auth_error_response' Volcano::Generated.autoload :OpenDurableMessageSessionRequest, 'volcano-generated/models/open_durable_message_session_request' @@ -278,12 +419,16 @@ Volcano::Generated.autoload :PaginatedFrontends, 'volcano-generated/models/paginated_frontends' Volcano::Generated.autoload :PaginatedFunctionDeployments, 'volcano-generated/models/paginated_function_deployments' Volcano::Generated.autoload :PaginatedFunctions, 'volcano-generated/models/paginated_functions' +Volcano::Generated.autoload :PaginatedGitDeploymentRuns, 'volcano-generated/models/paginated_git_deployment_runs' Volcano::Generated.autoload :PaginatedIssues, 'volcano-generated/models/paginated_issues' +Volcano::Generated.autoload :PaginatedLavaflowRuns, 'volcano-generated/models/paginated_lavaflow_runs' +Volcano::Generated.autoload :PaginatedLavaflowScans, 'volcano-generated/models/paginated_lavaflow_scans' Volcano::Generated.autoload :PaginatedProjectAccessTokens, 'volcano-generated/models/paginated_project_access_tokens' Volcano::Generated.autoload :PaginatedProjectCustomDomains, 'volcano-generated/models/paginated_project_custom_domains' Volcano::Generated.autoload :PaginatedProjectDeployments, 'volcano-generated/models/paginated_project_deployments' Volcano::Generated.autoload :PaginatedProjects, 'volcano-generated/models/paginated_projects' Volcano::Generated.autoload :PaginatedServiceKeys, 'volcano-generated/models/paginated_service_keys' +Volcano::Generated.autoload :PaginatedShareReleases, 'volcano-generated/models/paginated_share_releases' Volcano::Generated.autoload :PaginatedStorageBuckets, 'volcano-generated/models/paginated_storage_buckets' Volcano::Generated.autoload :PaginatedVariables, 'volcano-generated/models/paginated_variables' Volcano::Generated.autoload :PlatformExchangeResponse, 'volcano-generated/models/platform_exchange_response' @@ -291,6 +436,7 @@ Volcano::Generated.autoload :PreviewAuthPageResponse, 'volcano-generated/models/preview_auth_page_response' Volcano::Generated.autoload :Project, 'volcano-generated/models/project' Volcano::Generated.autoload :ProjectAccessToken, 'volcano-generated/models/project_access_token' +Volcano::Generated.autoload :ProjectAccessTokenListedScope, 'volcano-generated/models/project_access_token_listed_scope' Volcano::Generated.autoload :ProjectAccessTokenScope, 'volcano-generated/models/project_access_token_scope' Volcano::Generated.autoload :ProjectAccessTokenUsage, 'volcano-generated/models/project_access_token_usage' Volcano::Generated.autoload :ProjectAccessTokenUsageDailyEntry, 'volcano-generated/models/project_access_token_usage_daily_entry' @@ -316,20 +462,23 @@ Volcano::Generated.autoload :ProjectConfigAuthSessions, 'volcano-generated/models/project_config_auth_sessions' Volcano::Generated.autoload :ProjectConfigAuthSignup, 'volcano-generated/models/project_config_auth_signup' Volcano::Generated.autoload :ProjectConfigAuthTokens, 'volcano-generated/models/project_config_auth_tokens' -Volcano::Generated.autoload :ProjectConfigAutofix, 'volcano-generated/models/project_config_autofix' Volcano::Generated.autoload :ProjectConfigBucket, 'volcano-generated/models/project_config_bucket' Volcano::Generated.autoload :ProjectConfigBucketPolicy, 'volcano-generated/models/project_config_bucket_policy' Volcano::Generated.autoload :ProjectConfigCustomDomain, 'volcano-generated/models/project_config_custom_domain' +Volcano::Generated.autoload :ProjectConfigCustomDomainRedirect, 'volcano-generated/models/project_config_custom_domain_redirect' Volcano::Generated.autoload :ProjectConfigDatabase, 'volcano-generated/models/project_config_database' Volcano::Generated.autoload :ProjectConfigEmailTemplate, 'volcano-generated/models/project_config_email_template' Volcano::Generated.autoload :ProjectConfigEmailTemplates, 'volcano-generated/models/project_config_email_templates' Volcano::Generated.autoload :ProjectConfigFrontend, 'volcano-generated/models/project_config_frontend' +Volcano::Generated.autoload :ProjectConfigFrontendCustomDomain, 'volcano-generated/models/project_config_frontend_custom_domain' Volcano::Generated.autoload :ProjectConfigFrontendCustomDomainTLSConfig, 'volcano-generated/models/project_config_frontend_custom_domain_tls_config' Volcano::Generated.autoload :ProjectConfigFrontendFunctionRoute, 'volcano-generated/models/project_config_frontend_function_route' +Volcano::Generated.autoload :ProjectConfigFrontendRoute, 'volcano-generated/models/project_config_frontend_route' Volcano::Generated.autoload :ProjectConfigFunction, 'volcano-generated/models/project_config_function' Volcano::Generated.autoload :ProjectConfigHostedPage, 'volcano-generated/models/project_config_hosted_page' Volcano::Generated.autoload :ProjectConfigHostedPages, 'volcano-generated/models/project_config_hosted_pages' Volcano::Generated.autoload :ProjectConfigMissingResource, 'volcano-generated/models/project_config_missing_resource' +Volcano::Generated.autoload :ProjectConfigNotifications, 'volcano-generated/models/project_config_notifications' Volcano::Generated.autoload :ProjectConfigOAuthProvider, 'volcano-generated/models/project_config_o_auth_provider' Volcano::Generated.autoload :ProjectConfigProject, 'volcano-generated/models/project_config_project' Volcano::Generated.autoload :ProjectConfigRealtime, 'volcano-generated/models/project_config_realtime' @@ -347,6 +496,7 @@ Volcano::Generated.autoload :ProjectGitConnection, 'volcano-generated/models/project_git_connection' Volcano::Generated.autoload :ProjectGitConnectionSummary, 'volcano-generated/models/project_git_connection_summary' Volcano::Generated.autoload :ProjectGitDeploySettings, 'volcano-generated/models/project_git_deploy_settings' +Volcano::Generated.autoload :ProjectGitOwnerPush, 'volcano-generated/models/project_git_owner_push' Volcano::Generated.autoload :ProjectHealthCategory, 'volcano-generated/models/project_health_category' Volcano::Generated.autoload :ProjectHealthCheck, 'volcano-generated/models/project_health_check' Volcano::Generated.autoload :ProjectHealthDataStatus, 'volcano-generated/models/project_health_data_status' @@ -393,13 +543,18 @@ Volcano::Generated.autoload :ProjectSourceExportSkip, 'volcano-generated/models/project_source_export_skip' Volcano::Generated.autoload :ProjectSourceExportState, 'volcano-generated/models/project_source_export_state' Volcano::Generated.autoload :ProjectTemplateInstallation, 'volcano-generated/models/project_template_installation' +Volcano::Generated.autoload :ProjectTemplateInstallationSource, 'volcano-generated/models/project_template_installation_source' Volcano::Generated.autoload :ProjectUsageResponse, 'volcano-generated/models/project_usage_response' +Volcano::Generated.autoload :PromoteFrontendCandidateRequest, 'volcano-generated/models/promote_frontend_candidate_request' Volcano::Generated.autoload :PublishDurableMessageRequest, 'volcano-generated/models/publish_durable_message_request' Volcano::Generated.autoload :PublishSandboxPresetRequest, 'volcano-generated/models/publish_sandbox_preset_request' Volcano::Generated.autoload :RealtimeConfig, 'volcano-generated/models/realtime_config' Volcano::Generated.autoload :RealtimePlanLimits, 'volcano-generated/models/realtime_plan_limits' +Volcano::Generated.autoload :RealtimePublishRequest, 'volcano-generated/models/realtime_publish_request' +Volcano::Generated.autoload :RealtimePublishResult, 'volcano-generated/models/realtime_publish_result' Volcano::Generated.autoload :RealtimeStats, 'volcano-generated/models/realtime_stats' Volcano::Generated.autoload :RefreshOAuthProviderToken200Response, 'volcano-generated/models/refresh_o_auth_provider_token200_response' +Volcano::Generated.autoload :RegisterDurableCallbackRequest, 'volcano-generated/models/register_durable_callback_request' Volcano::Generated.autoload :RegisterDurableMessageWaitRequest, 'volcano-generated/models/register_durable_message_wait_request' Volcano::Generated.autoload :RenameVariableEnvironmentRequest, 'volcano-generated/models/rename_variable_environment_request' Volcano::Generated.autoload :ReplaceFrontendSharedVariablesRequest, 'volcano-generated/models/replace_frontend_shared_variables_request' @@ -408,6 +563,7 @@ Volcano::Generated.autoload :ResetDatabasePassword200Response, 'volcano-generated/models/reset_database_password200_response' Volcano::Generated.autoload :ResolveFunctionResponse, 'volcano-generated/models/resolve_function_response' Volcano::Generated.autoload :ResourceReference, 'volcano-generated/models/resource_reference' +Volcano::Generated.autoload :RollbackFrontendServingRequest, 'volcano-generated/models/rollback_frontend_serving_request' Volcano::Generated.autoload :SandboxAccess, 'volcano-generated/models/sandbox_access' Volcano::Generated.autoload :SandboxAccessRequest, 'volcano-generated/models/sandbox_access_request' Volcano::Generated.autoload :SandboxBuildLogPage, 'volcano-generated/models/sandbox_build_log_page' @@ -420,21 +576,60 @@ Volcano::Generated.autoload :SandboxDeploymentPage, 'volcano-generated/models/sandbox_deployment_page' Volcano::Generated.autoload :SandboxExecutionRequest, 'volcano-generated/models/sandbox_execution_request' Volcano::Generated.autoload :SandboxExecutionResult, 'volcano-generated/models/sandbox_execution_result' +Volcano::Generated.autoload :SandboxFileArchive, 'volcano-generated/models/sandbox_file_archive' +Volcano::Generated.autoload :SandboxFileEntry, 'volcano-generated/models/sandbox_file_entry' +Volcano::Generated.autoload :SandboxFileListResult, 'volcano-generated/models/sandbox_file_list_result' +Volcano::Generated.autoload :SandboxFilePart, 'volcano-generated/models/sandbox_file_part' +Volcano::Generated.autoload :SandboxFilePartRequest, 'volcano-generated/models/sandbox_file_part_request' Volcano::Generated.autoload :SandboxFileReadRequest, 'volcano-generated/models/sandbox_file_read_request' Volcano::Generated.autoload :SandboxFileResult, 'volcano-generated/models/sandbox_file_result' Volcano::Generated.autoload :SandboxFileWriteRequest, 'volcano-generated/models/sandbox_file_write_request' +Volcano::Generated.autoload :SandboxLimitsApplied, 'volcano-generated/models/sandbox_limits_applied' Volcano::Generated.autoload :SandboxPagination, 'volcano-generated/models/sandbox_pagination' Volcano::Generated.autoload :SandboxPreset, 'volcano-generated/models/sandbox_preset' Volcano::Generated.autoload :SandboxPresetList, 'volcano-generated/models/sandbox_preset_list' Volcano::Generated.autoload :SandboxSession, 'volcano-generated/models/sandbox_session' +Volcano::Generated.autoload :SandboxSessionAppliedLimits, 'volcano-generated/models/sandbox_session_applied_limits' +Volcano::Generated.autoload :SandboxSessionExecutions, 'volcano-generated/models/sandbox_session_executions' +Volcano::Generated.autoload :SandboxSessionLimits, 'volcano-generated/models/sandbox_session_limits' +Volcano::Generated.autoload :SandboxSessionNetwork, 'volcano-generated/models/sandbox_session_network' +Volcano::Generated.autoload :SandboxSessionNetworkRequest, 'volcano-generated/models/sandbox_session_network_request' Volcano::Generated.autoload :SandboxSessionPage, 'volcano-generated/models/sandbox_session_page' Volcano::Generated.autoload :SandboxSubjectGrantRequest, 'volcano-generated/models/sandbox_subject_grant_request' Volcano::Generated.autoload :SandboxTemplate, 'volcano-generated/models/sandbox_template' Volcano::Generated.autoload :SandboxTemplatePage, 'volcano-generated/models/sandbox_template_page' Volcano::Generated.autoload :ScheduleRequest, 'volcano-generated/models/schedule_request' +Volcano::Generated.autoload :SchedulerFailureAlertPolicy, 'volcano-generated/models/scheduler_failure_alert_policy' +Volcano::Generated.autoload :SchedulerFailureNotifyOn, 'volcano-generated/models/scheduler_failure_notify_on' Volcano::Generated.autoload :SendDurableMessageRequest, 'volcano-generated/models/send_durable_message_request' Volcano::Generated.autoload :ServiceKey, 'volcano-generated/models/service_key' Volcano::Generated.autoload :SetProjectGitProductionBranchRequest, 'volcano-generated/models/set_project_git_production_branch_request' +Volcano::Generated.autoload :SetProjectGitRootDirectoryRequest, 'volcano-generated/models/set_project_git_root_directory_request' +Volcano::Generated.autoload :Share, 'volcano-generated/models/share' +Volcano::Generated.autoload :ShareCreateRequest, 'volcano-generated/models/share_create_request' +Volcano::Generated.autoload :ShareDailyCount, 'volcano-generated/models/share_daily_count' +Volcano::Generated.autoload :ShareDraftChangedError, 'volcano-generated/models/share_draft_changed_error' +Volcano::Generated.autoload :ShareKindCount, 'volcano-generated/models/share_kind_count' +Volcano::Generated.autoload :SharePreview, 'volcano-generated/models/share_preview' +Volcano::Generated.autoload :SharePreviewRelease, 'volcano-generated/models/share_preview_release' +Volcano::Generated.autoload :ShareRelease, 'volcano-generated/models/share_release' +Volcano::Generated.autoload :ShareReleaseCreateRequest, 'volcano-generated/models/share_release_create_request' +Volcano::Generated.autoload :ShareReleaseDraft, 'volcano-generated/models/share_release_draft' +Volcano::Generated.autoload :ShareReleaseFunction, 'volcano-generated/models/share_release_function' +Volcano::Generated.autoload :ShareReleaseOmission, 'volcano-generated/models/share_release_omission' +Volcano::Generated.autoload :ShareReleaseRef, 'volcano-generated/models/share_release_ref' +Volcano::Generated.autoload :ShareStats, 'volcano-generated/models/share_stats' +Volcano::Generated.autoload :ShareUpdateRequest, 'volcano-generated/models/share_update_request' +Volcano::Generated.autoload :ShareVariable, 'volcano-generated/models/share_variable' +Volcano::Generated.autoload :SharedVariablesReplaceResult, 'volcano-generated/models/shared_variables_replace_result' +Volcano::Generated.autoload :SharesResponse, 'volcano-generated/models/shares_response' +Volcano::Generated.autoload :SkippedServedFunction, 'volcano-generated/models/skipped_served_function' +Volcano::Generated.autoload :SlackAuthorizationResponse, 'volcano-generated/models/slack_authorization_response' +Volcano::Generated.autoload :SlackChannel, 'volcano-generated/models/slack_channel' +Volcano::Generated.autoload :SlackChannelsResponse, 'volcano-generated/models/slack_channels_response' +Volcano::Generated.autoload :SlackConnection, 'volcano-generated/models/slack_connection' +Volcano::Generated.autoload :SlackConnectionsResponse, 'volcano-generated/models/slack_connections_response' +Volcano::Generated.autoload :SlackConnector, 'volcano-generated/models/slack_connector' Volcano::Generated.autoload :StorageBucket, 'volcano-generated/models/storage_bucket' Volcano::Generated.autoload :StorageCopyRequest, 'volcano-generated/models/storage_copy_request' Volcano::Generated.autoload :StorageListResponse, 'volcano-generated/models/storage_list_response' @@ -444,6 +639,7 @@ Volcano::Generated.autoload :StoragePolicy, 'volcano-generated/models/storage_policy' Volcano::Generated.autoload :StorageStats, 'volcano-generated/models/storage_stats' Volcano::Generated.autoload :StorageVisibilityRequest, 'volcano-generated/models/storage_visibility_request' +Volcano::Generated.autoload :SucceedDurableCallbackRequest, 'volcano-generated/models/succeed_durable_callback_request' Volcano::Generated.autoload :TestEmailRequest, 'volcano-generated/models/test_email_request' Volcano::Generated.autoload :TestEmailResponse, 'volcano-generated/models/test_email_response' Volcano::Generated.autoload :UnbanUserResponse, 'volcano-generated/models/unban_user_response' @@ -451,18 +647,22 @@ Volcano::Generated.autoload :UpdateAuthHostedPageRequest, 'volcano-generated/models/update_auth_hosted_page_request' Volcano::Generated.autoload :UpdateAuthPageLayoutRequest, 'volcano-generated/models/update_auth_page_layout_request' Volcano::Generated.autoload :UpdateAuthPageThemeRequest, 'volcano-generated/models/update_auth_page_theme_request' -Volcano::Generated.autoload :UpdateAutofixSettingsRequest, 'volcano-generated/models/update_autofix_settings_request' Volcano::Generated.autoload :UpdateDatabaseBranchRequest, 'volcano-generated/models/update_database_branch_request' Volcano::Generated.autoload :UpdateDatabaseTypeRequest, 'volcano-generated/models/update_database_type_request' Volcano::Generated.autoload :UpdateEmailTemplateRequest, 'volcano-generated/models/update_email_template_request' +Volcano::Generated.autoload :UpdateFrontendCustomDomainRequest, 'volcano-generated/models/update_frontend_custom_domain_request' Volcano::Generated.autoload :UpdateFunctionRequest, 'volcano-generated/models/update_function_request' Volcano::Generated.autoload :UpdateFunctionSchedulerRequest, 'volcano-generated/models/update_function_scheduler_request' Volcano::Generated.autoload :UpdateIssueRequest, 'volcano-generated/models/update_issue_request' +Volcano::Generated.autoload :UpdateNotificationEmail, 'volcano-generated/models/update_notification_email' +Volcano::Generated.autoload :UpdateNotificationSettingsRequest, 'volcano-generated/models/update_notification_settings_request' +Volcano::Generated.autoload :UpdateNotificationWebhook, 'volcano-generated/models/update_notification_webhook' Volcano::Generated.autoload :UpdateOAuthConfigRequest, 'volcano-generated/models/update_o_auth_config_request' Volcano::Generated.autoload :UpdateProjectGitDeploySettingsRequest, 'volcano-generated/models/update_project_git_deploy_settings_request' Volcano::Generated.autoload :UpdateProjectRequest, 'volcano-generated/models/update_project_request' Volcano::Generated.autoload :UpdateRealtimeConfigRequest, 'volcano-generated/models/update_realtime_config_request' Volcano::Generated.autoload :UpdateSandboxTemplateRequest, 'volcano-generated/models/update_sandbox_template_request' +Volcano::Generated.autoload :UpdateSchedulerFailureAlertPolicy, 'volcano-generated/models/update_scheduler_failure_alert_policy' Volcano::Generated.autoload :UpdateStorageBucketRequest, 'volcano-generated/models/update_storage_bucket_request' Volcano::Generated.autoload :UpdateVariableRequest, 'volcano-generated/models/update_variable_request' Volcano::Generated.autoload :UploadSessionPart, 'volcano-generated/models/upload_session_part' @@ -477,22 +677,27 @@ Volcano::Generated.autoload :VerifyDomainRequest, 'volcano-generated/models/verify_domain_request' # APIs +Volcano::Generated.autoload :AccountSessionsApi, 'volcano-generated/api/account_sessions_api' Volcano::Generated.autoload :AnonKeysApi, 'volcano-generated/api/anon_keys_api' Volcano::Generated.autoload :AuthAdminApi, 'volcano-generated/api/auth_admin_api' Volcano::Generated.autoload :AuthConfigurationApi, 'volcano-generated/api/auth_configuration_api' Volcano::Generated.autoload :AuthenticationApi, 'volcano-generated/api/authentication_api' -Volcano::Generated.autoload :AutofixApi, 'volcano-generated/api/autofix_api' +Volcano::Generated.autoload :ConnectorsApi, 'volcano-generated/api/connectors_api' Volcano::Generated.autoload :DatabaseBackupsApi, 'volcano-generated/api/database_backups_api' Volcano::Generated.autoload :DatabaseBranchesApi, 'volcano-generated/api/database_branches_api' +Volcano::Generated.autoload :DatabaseMigrationsApi, 'volcano-generated/api/database_migrations_api' Volcano::Generated.autoload :DatabaseQueriesApi, 'volcano-generated/api/database_queries_api' Volcano::Generated.autoload :DatabasesApi, 'volcano-generated/api/databases_api' Volcano::Generated.autoload :DurableFunctionsApi, 'volcano-generated/api/durable_functions_api' +Volcano::Generated.autoload :ForksApi, 'volcano-generated/api/forks_api' Volcano::Generated.autoload :FrontendsApi, 'volcano-generated/api/frontends_api' Volcano::Generated.autoload :FunctionsApi, 'volcano-generated/api/functions_api' Volcano::Generated.autoload :GitConnectionsApi, 'volcano-generated/api/git_connections_api' Volcano::Generated.autoload :IssuesApi, 'volcano-generated/api/issues_api' +Volcano::Generated.autoload :LavaFlowApi, 'volcano-generated/api/lava_flow_api' Volcano::Generated.autoload :LocksApi, 'volcano-generated/api/locks_api' Volcano::Generated.autoload :LogsApi, 'volcano-generated/api/logs_api' +Volcano::Generated.autoload :NotificationsApi, 'volcano-generated/api/notifications_api' Volcano::Generated.autoload :OAuthAuthenticationApi, 'volcano-generated/api/o_auth_authentication_api' Volcano::Generated.autoload :OAuthConfigurationApi, 'volcano-generated/api/o_auth_configuration_api' Volcano::Generated.autoload :ProjectAccessTokensApi, 'volcano-generated/api/project_access_tokens_api' @@ -501,6 +706,8 @@ Volcano::Generated.autoload :RealtimeApi, 'volcano-generated/api/realtime_api' Volcano::Generated.autoload :SandboxesApi, 'volcano-generated/api/sandboxes_api' Volcano::Generated.autoload :ServiceKeysApi, 'volcano-generated/api/service_keys_api' +Volcano::Generated.autoload :SharesApi, 'volcano-generated/api/shares_api' +Volcano::Generated.autoload :SlackConnectionsApi, 'volcano-generated/api/slack_connections_api' Volcano::Generated.autoload :StorageAdminApi, 'volcano-generated/api/storage_admin_api' Volcano::Generated.autoload :StorageBucketsApi, 'volcano-generated/api/storage_buckets_api' Volcano::Generated.autoload :StorageObjectsApi, 'volcano-generated/api/storage_objects_api' diff --git a/lib/volcano/generated/lib/volcano-generated/api/account_sessions_api.rb b/lib/volcano/generated/lib/volcano-generated/api/account_sessions_api.rb new file mode 100644 index 00000000..7c781914 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/api/account_sessions_api.rb @@ -0,0 +1,305 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'cgi' + +module Volcano::Generated + class AccountSessionsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # List your account's sign-in sessions + # Lists the sign-in sessions of the account that owns the calling platform token: dashboard sign-ins (`kind: browser`) and CLI logins (`kind: cli`). The session the calling token was exchanged from is marked `is_current: true`. A token created in the dashboard or through the management API, rather than by signing in, has no session, so no session is current. Ordering and pagination match `GET /auth/user/sessions`. Only a platform token (`pk-`) can call it. A project access token is refused with `403`. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page Page number (1-indexed). Omit it for the first page, and always with `cursor` or `ending_before`. + # @option opts [Integer] :limit Number of sessions per page (max 100, default 20) + # @option opts [String] :sort Sort key. `last_activity` (default) orders by most recent activity and supports offset pagination only. `created_at` orders by session start and supports both offset and cursor pagination. (default to 'last_activity') + # @option opts [String] :status Filter by whether the session can still be refreshed. Omit for every stored session, including expired ones. `expired` is not supported with cursor pagination. + # @option opts [String] :cursor Opaque keyset cursor from a previous response's `next_cursor`. Requires `sort=created_at`; mutually exclusive with `page` and `ending_before`. + # @option opts [String] :ending_before Opaque keyset cursor from a previous response's `prev_cursor`, paging backward. Requires `sort=created_at`; mutually exclusive with `page` and `cursor`. + # @option opts [Integer] :offset Bounded number of rows to skip past the cursor anchor (the hybrid jump, maximum 100000). Ignored unless `cursor` or `ending_before` is supplied. + # @return [AccountSessionList] + def list_account_sessions(opts = {}) + data, _status_code, _headers = list_account_sessions_with_http_info(opts) + data + end + + # List your account's sign-in sessions + # Lists the sign-in sessions of the account that owns the calling platform token: dashboard sign-ins (`kind: browser`) and CLI logins (`kind: cli`). The session the calling token was exchanged from is marked `is_current: true`. A token created in the dashboard or through the management API, rather than by signing in, has no session, so no session is current. Ordering and pagination match `GET /auth/user/sessions`. Only a platform token (`pk-`) can call it. A project access token is refused with `403`. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page Page number (1-indexed). Omit it for the first page, and always with `cursor` or `ending_before`. + # @option opts [Integer] :limit Number of sessions per page (max 100, default 20) + # @option opts [String] :sort Sort key. `last_activity` (default) orders by most recent activity and supports offset pagination only. `created_at` orders by session start and supports both offset and cursor pagination. (default to 'last_activity') + # @option opts [String] :status Filter by whether the session can still be refreshed. Omit for every stored session, including expired ones. `expired` is not supported with cursor pagination. + # @option opts [String] :cursor Opaque keyset cursor from a previous response's `next_cursor`. Requires `sort=created_at`; mutually exclusive with `page` and `ending_before`. + # @option opts [String] :ending_before Opaque keyset cursor from a previous response's `prev_cursor`, paging backward. Requires `sort=created_at`; mutually exclusive with `page` and `cursor`. + # @option opts [Integer] :offset Bounded number of rows to skip past the cursor anchor (the hybrid jump, maximum 100000). Ignored unless `cursor` or `ending_before` is supplied. + # @return [Array<(AccountSessionList, Integer, Hash)>] AccountSessionList data, response status code and response headers + def list_account_sessions_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AccountSessionsApi.list_account_sessions ...' + end + if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AccountSessionsApi.list_account_sessions, must be greater than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountSessionsApi.list_account_sessions, must be smaller than or equal to 100.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountSessionsApi.list_account_sessions, must be greater than or equal to 1.' + end + + allowable_values = ["last_activity", "created_at"] + if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) + fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" + end + allowable_values = ["active", "expired"] + if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) + fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" + end + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 100000 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling AccountSessionsApi.list_account_sessions, must be smaller than or equal to 100000.' + end + + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling AccountSessionsApi.list_account_sessions, must be greater than or equal to 0.' + end + + # resource path + local_var_path = '/user/sessions' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'AccountSessionList' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken'] + + new_options = opts.merge( + :operation => :"AccountSessionsApi.list_account_sessions", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AccountSessionsApi#list_account_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Sign out one session + # Ends one of the account's sessions and revokes the platform tokens exchanged from it. A session that is not the account's, or does not exist, answers `404`. + # @param session_id [String] The session ID, from `GET /user/sessions` + # @param [Hash] opts the optional parameters + # @return [nil] + def revoke_account_session(session_id, opts = {}) + revoke_account_session_with_http_info(session_id, opts) + nil + end + + # Sign out one session + # Ends one of the account's sessions and revokes the platform tokens exchanged from it. A session that is not the account's, or does not exist, answers `404`. + # @param session_id [String] The session ID, from `GET /user/sessions` + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def revoke_account_session_with_http_info(session_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AccountSessionsApi.revoke_account_session ...' + end + # verify the required parameter 'session_id' is set + if @api_client.config.client_side_validation && session_id.nil? + fail ArgumentError, "Missing the required parameter 'session_id' when calling AccountSessionsApi.revoke_account_session" + end + # resource path + local_var_path = '/user/sessions/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken'] + + new_options = opts.merge( + :operation => :"AccountSessionsApi.revoke_account_session", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AccountSessionsApi#revoke_account_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Revoke the calling platform token + # Revokes the platform token that authenticates this request, and ends the sign-in session it was created from, if any. Ending the session also revokes every other token created from it. Every later request with the token answers `401`. Only a platform token (`pk-`) can call it. A project access token is refused with `403`. + # @param [Hash] opts the optional parameters + # @return [nil] + def revoke_current_user_token(opts = {}) + revoke_current_user_token_with_http_info(opts) + nil + end + + # Revoke the calling platform token + # Revokes the platform token that authenticates this request, and ends the sign-in session it was created from, if any. Ending the session also revokes every other token created from it. Every later request with the token answers `401`. Only a platform token (`pk-`) can call it. A project access token is refused with `403`. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def revoke_current_user_token_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AccountSessionsApi.revoke_current_user_token ...' + end + # resource path + local_var_path = '/user/tokens/current' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken'] + + new_options = opts.merge( + :operation => :"AccountSessionsApi.revoke_current_user_token", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AccountSessionsApi#revoke_current_user_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Sign out every other session + # Ends every session of the account except the one the calling token was exchanged from, and revokes the platform tokens exchanged from them. When the calling token has no session, every session ends. Platform tokens that were never linked to a session, such as one created in the dashboard or through the management API, keep working. Revoke each with `DELETE /user/tokens/current`. + # @param [Hash] opts the optional parameters + # @return [nil] + def revoke_other_account_sessions(opts = {}) + revoke_other_account_sessions_with_http_info(opts) + nil + end + + # Sign out every other session + # Ends every session of the account except the one the calling token was exchanged from, and revokes the platform tokens exchanged from them. When the calling token has no session, every session ends. Platform tokens that were never linked to a session, such as one created in the dashboard or through the management API, keep working. Revoke each with `DELETE /user/tokens/current`. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def revoke_other_account_sessions_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AccountSessionsApi.revoke_other_account_sessions ...' + end + # resource path + local_var_path = '/user/sessions' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken'] + + new_options = opts.merge( + :operation => :"AccountSessionsApi.revoke_other_account_sessions", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AccountSessionsApi#revoke_other_account_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/api/anon_keys_api.rb b/lib/volcano/generated/lib/volcano-generated/api/anon_keys_api.rb index 516419f5..ac44417b 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/anon_keys_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/anon_keys_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/api/auth_admin_api.rb b/lib/volcano/generated/lib/volcano-generated/api/auth_admin_api.rb index 7c9d9c62..aea5a962 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/auth_admin_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/auth_admin_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/api/auth_configuration_api.rb b/lib/volcano/generated/lib/volcano-generated/api/auth_configuration_api.rb index 5d9056d4..3062d47c 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/auth_configuration_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/auth_configuration_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -620,7 +620,7 @@ def get_auth_page_appearance_with_http_info(id, opts = {}) # Get default email template by type # @param type [String] # @param [Hash] opts the optional parameters - # @return [EmailTemplate] + # @return [DefaultEmailTemplate] def get_default_email_template(type, opts = {}) data, _status_code, _headers = get_default_email_template_with_http_info(type, opts) data @@ -629,7 +629,7 @@ def get_default_email_template(type, opts = {}) # Get default email template by type # @param type [String] # @param [Hash] opts the optional parameters - # @return [Array<(EmailTemplate, Integer, Hash)>] EmailTemplate data, response status code and response headers + # @return [Array<(DefaultEmailTemplate, Integer, Hash)>] DefaultEmailTemplate data, response status code and response headers def get_default_email_template_with_http_info(type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthConfigurationApi.get_default_email_template ...' @@ -661,7 +661,7 @@ def get_default_email_template_with_http_info(type, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'EmailTemplate' + return_type = opts[:debug_return_type] || 'DefaultEmailTemplate' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -686,7 +686,7 @@ def get_default_email_template_with_http_info(type, opts = {}) # Get default email templates # Returns the default email templates used when no custom template is configured. # @param [Hash] opts the optional parameters - # @return [ListEmailTemplates200Response] + # @return [GetDefaultEmailTemplates200Response] def get_default_email_templates(opts = {}) data, _status_code, _headers = get_default_email_templates_with_http_info(opts) data @@ -695,7 +695,7 @@ def get_default_email_templates(opts = {}) # Get default email templates # Returns the default email templates used when no custom template is configured. # @param [Hash] opts the optional parameters - # @return [Array<(ListEmailTemplates200Response, Integer, Hash)>] ListEmailTemplates200Response data, response status code and response headers + # @return [Array<(GetDefaultEmailTemplates200Response, Integer, Hash)>] GetDefaultEmailTemplates200Response data, response status code and response headers def get_default_email_templates_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AuthConfigurationApi.get_default_email_templates ...' @@ -718,7 +718,7 @@ def get_default_email_templates_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'ListEmailTemplates200Response' + return_type = opts[:debug_return_type] || 'GetDefaultEmailTemplates200Response' # auth_names auth_names = opts[:debug_auth_names] || [] @@ -1337,7 +1337,7 @@ def render_managed_auth_page_with_http_info(id, page_type, opts = {}) end # Send a test email using the project's saved SMTP config - # Sends a diagnostic email to `to_email` using the project's persisted `auth_config` SMTP credentials. If `html_body` or `text_body` is supplied, the override path is taken: those values (plus optional `subject`) are rendered through html/text templates against the project's `Data` and used as the body — used by the template editor's \"Send Test\" affordance to preview an unsaved template. With both bodies omitted, a hardcoded diagnostic message is sent and any `subject` field is ignored. Sending `subject` alone (no bodies) is rejected with 400 to avoid a silently-dropped subject or a blank message. Also rejects with 400 if `email_enabled=false`, `smtp_host` is empty, or the saved `smtp_password` can't be read and must be set again. + # Sends a diagnostic email to `to_email` using the project's persisted `auth_config` SMTP credentials. If `html_body` or `text_body` is supplied, the override path is taken: those values (plus optional `subject`) are rendered through html/text templates against the project's `Data` and used as the body — used by the template editor's \"Send Test\" affordance to preview an unsaved template. With both bodies omitted, a hardcoded diagnostic message is sent and any `subject` field is ignored. Sending `subject` alone (no bodies) is rejected with 400 to avoid a silently-dropped subject or a blank message. Also rejects with 400 if `email_enabled=false`, `smtp_host` is empty, or the saved `smtp_password` can't be read and must be set again. Sender values with interior line breaks return 400 before SMTP delivery. Rendered override subjects containing a line break have outer whitespace trimmed; any remaining interior line break returns 400 before delivery. # @param id [String] Project ID # @param test_email_request [TestEmailRequest] # @param [Hash] opts the optional parameters @@ -1348,7 +1348,7 @@ def test_email_config(id, test_email_request, opts = {}) end # Send a test email using the project's saved SMTP config - # Sends a diagnostic email to `to_email` using the project's persisted `auth_config` SMTP credentials. If `html_body` or `text_body` is supplied, the override path is taken: those values (plus optional `subject`) are rendered through html/text templates against the project's `Data` and used as the body — used by the template editor's \"Send Test\" affordance to preview an unsaved template. With both bodies omitted, a hardcoded diagnostic message is sent and any `subject` field is ignored. Sending `subject` alone (no bodies) is rejected with 400 to avoid a silently-dropped subject or a blank message. Also rejects with 400 if `email_enabled=false`, `smtp_host` is empty, or the saved `smtp_password` can't be read and must be set again. + # Sends a diagnostic email to `to_email` using the project's persisted `auth_config` SMTP credentials. If `html_body` or `text_body` is supplied, the override path is taken: those values (plus optional `subject`) are rendered through html/text templates against the project's `Data` and used as the body — used by the template editor's \"Send Test\" affordance to preview an unsaved template. With both bodies omitted, a hardcoded diagnostic message is sent and any `subject` field is ignored. Sending `subject` alone (no bodies) is rejected with 400 to avoid a silently-dropped subject or a blank message. Also rejects with 400 if `email_enabled=false`, `smtp_host` is empty, or the saved `smtp_password` can't be read and must be set again. Sender values with interior line breaks return 400 before SMTP delivery. Rendered override subjects containing a line break have outer whitespace trimmed; any remaining interior line break returns 400 before delivery. # @param id [String] Project ID # @param test_email_request [TestEmailRequest] # @param [Hash] opts the optional parameters diff --git a/lib/volcano/generated/lib/volcano-generated/api/authentication_api.rb b/lib/volcano/generated/lib/volcano-generated/api/authentication_api.rb index 0a7d35ee..97f8ed53 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/authentication_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/authentication_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -402,6 +402,8 @@ def auth_delete_my_session_with_http_info(session_id, opts = {}) # Generates recovery token and stores it (email sending pending). Returns generic message to prevent email enumeration. Project is identified via the anon key. # @param auth_forgot_password_request [AuthForgotPasswordRequest] # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @return [AuthForgotPassword200Response] def auth_forgot_password(auth_forgot_password_request, opts = {}) data, _status_code, _headers = auth_forgot_password_with_http_info(auth_forgot_password_request, opts) @@ -412,6 +414,8 @@ def auth_forgot_password(auth_forgot_password_request, opts = {}) # Generates recovery token and stores it (email sending pending). Returns generic message to prevent email enumeration. Project is identified via the anon key. # @param auth_forgot_password_request [AuthForgotPasswordRequest] # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @return [Array<(AuthForgotPassword200Response, Integer, Hash)>] AuthForgotPassword200Response data, response status code and response headers def auth_forgot_password_with_http_info(auth_forgot_password_request, opts = {}) if @api_client.config.debugging @@ -436,6 +440,8 @@ def auth_forgot_password_with_http_info(auth_forgot_password_request, opts = {}) if !content_type.nil? header_params['Content-Type'] = content_type end + header_params[:'X-Volcano-Proxy-Authorization'] = opts[:'x_volcano_proxy_authorization'] if !opts[:'x_volcano_proxy_authorization'].nil? + header_params[:'X-Volcano-Client-IP'] = opts[:'x_volcano_client_ip'] if !opts[:'x_volcano_client_ip'].nil? # form parameters form_params = opts[:form_params] || {} @@ -575,6 +581,8 @@ def auth_get_my_sessions_with_http_info(opts = {}) # Get the effective password policy # Returns the backend-enforced password bounds and compromised-password screening status for the project identified by the anon key. A valid anon key is required, but no route-specific auth permission is needed. # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @return [AuthPasswordPolicy] def auth_get_password_policy(opts = {}) data, _status_code, _headers = auth_get_password_policy_with_http_info(opts) @@ -584,6 +592,8 @@ def auth_get_password_policy(opts = {}) # Get the effective password policy # Returns the backend-enforced password bounds and compromised-password screening status for the project identified by the anon key. A valid anon key is required, but no route-specific auth permission is needed. # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @return [Array<(AuthPasswordPolicy, Integer, Hash)>] AuthPasswordPolicy data, response status code and response headers def auth_get_password_policy_with_http_info(opts = {}) if @api_client.config.debugging @@ -599,6 +609,8 @@ def auth_get_password_policy_with_http_info(opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + header_params[:'X-Volcano-Proxy-Authorization'] = opts[:'x_volcano_proxy_authorization'] if !opts[:'x_volcano_proxy_authorization'].nil? + header_params[:'X-Volcano-Client-IP'] = opts[:'x_volcano_client_ip'] if !opts[:'x_volcano_client_ip'].nil? # form parameters form_params = opts[:form_params] || {} @@ -803,6 +815,8 @@ def auth_list_methods_with_http_info(opts = {}) # Logout (revoke refresh token) # Invalidate a refresh token. Requires an anon key. Send `refresh_token` for the default flow. An eligible cookie-mode browser request may instead send `session_mode: cookie` with an empty token; logout remains idempotent when the cookie is missing or expired. # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @option opts [AuthRefreshRequest] :auth_refresh_request # @return [nil] def auth_logout(opts = {}) @@ -813,6 +827,8 @@ def auth_logout(opts = {}) # Logout (revoke refresh token) # Invalidate a refresh token. Requires an anon key. Send `refresh_token` for the default flow. An eligible cookie-mode browser request may instead send `session_mode: cookie` with an empty token; logout remains idempotent when the cookie is missing or expired. # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @option opts [AuthRefreshRequest] :auth_refresh_request # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def auth_logout_with_http_info(opts = {}) @@ -827,11 +843,15 @@ def auth_logout_with_http_info(opts = {}) # header parameters header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end + header_params[:'X-Volcano-Proxy-Authorization'] = opts[:'x_volcano_proxy_authorization'] if !opts[:'x_volcano_proxy_authorization'].nil? + header_params[:'X-Volcano-Client-IP'] = opts[:'x_volcano_client_ip'] if !opts[:'x_volcano_client_ip'].nil? # form parameters form_params = opts[:form_params] || {} @@ -928,6 +948,8 @@ def auth_promote_method_with_http_info(method_id, opts = {}) # Refresh access token # Get a new access token using a refresh token. Requires an anon key. Send `refresh_token` in the body for the default flow. An eligible cookie-mode browser request may instead send `session_mode: cookie` with an empty token or omit the request body; the API reads and resets the project's HttpOnly cookie and omits `refresh_token` from the response. # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @option opts [AuthRefreshRequest] :auth_refresh_request # @return [AuthTokenResponse] def auth_refresh(opts = {}) @@ -938,6 +960,8 @@ def auth_refresh(opts = {}) # Refresh access token # Get a new access token using a refresh token. Requires an anon key. Send `refresh_token` in the body for the default flow. An eligible cookie-mode browser request may instead send `session_mode: cookie` with an empty token or omit the request body; the API reads and resets the project's HttpOnly cookie and omits `refresh_token` from the response. # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @option opts [AuthRefreshRequest] :auth_refresh_request # @return [Array<(AuthTokenResponse, Integer, Hash)>] AuthTokenResponse data, response status code and response headers def auth_refresh_with_http_info(opts = {}) @@ -959,6 +983,8 @@ def auth_refresh_with_http_info(opts = {}) if !content_type.nil? header_params['Content-Type'] = content_type end + header_params[:'X-Volcano-Proxy-Authorization'] = opts[:'x_volcano_proxy_authorization'] if !opts[:'x_volcano_proxy_authorization'].nil? + header_params[:'X-Volcano-Client-IP'] = opts[:'x_volcano_client_ip'] if !opts[:'x_volcano_client_ip'].nil? # form parameters form_params = opts[:form_params] || {} @@ -1129,6 +1155,8 @@ def auth_resend_confirmation_with_http_info(auth_forgot_password_request, opts = # Reset password using recovery token from forgot-password. Revokes all existing sessions for security. # @param auth_reset_password_request [AuthResetPasswordRequest] # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @return [AuthResetPassword200Response] def auth_reset_password(auth_reset_password_request, opts = {}) data, _status_code, _headers = auth_reset_password_with_http_info(auth_reset_password_request, opts) @@ -1139,6 +1167,8 @@ def auth_reset_password(auth_reset_password_request, opts = {}) # Reset password using recovery token from forgot-password. Revokes all existing sessions for security. # @param auth_reset_password_request [AuthResetPasswordRequest] # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @return [Array<(AuthResetPassword200Response, Integer, Hash)>] AuthResetPassword200Response data, response status code and response headers def auth_reset_password_with_http_info(auth_reset_password_request, opts = {}) if @api_client.config.debugging @@ -1163,6 +1193,8 @@ def auth_reset_password_with_http_info(auth_reset_password_request, opts = {}) if !content_type.nil? header_params['Content-Type'] = content_type end + header_params[:'X-Volcano-Proxy-Authorization'] = opts[:'x_volcano_proxy_authorization'] if !opts[:'x_volcano_proxy_authorization'].nil? + header_params[:'X-Volcano-Client-IP'] = opts[:'x_volcano_client_ip'] if !opts[:'x_volcano_client_ip'].nil? # form parameters form_params = opts[:form_params] || {} @@ -1197,6 +1229,8 @@ def auth_reset_password_with_http_info(auth_reset_password_request, opts = {}) # Authenticate with email and password. Requires an anon key. Set `session_mode` to `cookie` to request HttpOnly refresh-token storage. Cookie mode is honored only for an exact, credentialed CORS origin on the same schemeful site as this API. Otherwise the response retains the refresh token in its body. A frontend on its default Volcano URL is cross-site with this API and so always gets the body token. # @param auth_signin_request [AuthSigninRequest] # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @return [AuthTokenResponse] def auth_signin(auth_signin_request, opts = {}) data, _status_code, _headers = auth_signin_with_http_info(auth_signin_request, opts) @@ -1207,6 +1241,8 @@ def auth_signin(auth_signin_request, opts = {}) # Authenticate with email and password. Requires an anon key. Set `session_mode` to `cookie` to request HttpOnly refresh-token storage. Cookie mode is honored only for an exact, credentialed CORS origin on the same schemeful site as this API. Otherwise the response retains the refresh token in its body. A frontend on its default Volcano URL is cross-site with this API and so always gets the body token. # @param auth_signin_request [AuthSigninRequest] # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @return [Array<(AuthTokenResponse, Integer, Hash)>] AuthTokenResponse data, response status code and response headers def auth_signin_with_http_info(auth_signin_request, opts = {}) if @api_client.config.debugging @@ -1231,6 +1267,8 @@ def auth_signin_with_http_info(auth_signin_request, opts = {}) if !content_type.nil? header_params['Content-Type'] = content_type end + header_params[:'X-Volcano-Proxy-Authorization'] = opts[:'x_volcano_proxy_authorization'] if !opts[:'x_volcano_proxy_authorization'].nil? + header_params[:'X-Volcano-Client-IP'] = opts[:'x_volcano_client_ip'] if !opts[:'x_volcano_client_ip'].nil? # form parameters form_params = opts[:form_params] || {} @@ -1265,6 +1303,8 @@ def auth_signin_with_http_info(auth_signin_request, opts = {}) # Create a new end-user account. The project is determined from the anon key. Requires project-specific anon key in Authorization header. **Session-less**: signup never issues a session. On success it returns a uniform acknowledgement (`AuthSignupResponse`) with no tokens; the client obtains a session with a subsequent `POST /auth/signin`. If email confirmation is enabled for the project, a confirmation email is sent and `confirmation_required` is `true`. **Anti-enumeration**: a signup for an already-registered email returns the exact same `201` response as a fresh signup — it never returns `409` — so the response cannot be used to discover which emails are registered. # @param auth_signup_request [AuthSignupRequest] # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @return [AuthSignupResponse] def auth_signup(auth_signup_request, opts = {}) data, _status_code, _headers = auth_signup_with_http_info(auth_signup_request, opts) @@ -1275,6 +1315,8 @@ def auth_signup(auth_signup_request, opts = {}) # Create a new end-user account. The project is determined from the anon key. Requires project-specific anon key in Authorization header. **Session-less**: signup never issues a session. On success it returns a uniform acknowledgement (`AuthSignupResponse`) with no tokens; the client obtains a session with a subsequent `POST /auth/signin`. If email confirmation is enabled for the project, a confirmation email is sent and `confirmation_required` is `true`. **Anti-enumeration**: a signup for an already-registered email returns the exact same `201` response as a fresh signup — it never returns `409` — so the response cannot be used to discover which emails are registered. # @param auth_signup_request [AuthSignupRequest] # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @return [Array<(AuthSignupResponse, Integer, Hash)>] AuthSignupResponse data, response status code and response headers def auth_signup_with_http_info(auth_signup_request, opts = {}) if @api_client.config.debugging @@ -1299,6 +1341,8 @@ def auth_signup_with_http_info(auth_signup_request, opts = {}) if !content_type.nil? header_params['Content-Type'] = content_type end + header_params[:'X-Volcano-Proxy-Authorization'] = opts[:'x_volcano_proxy_authorization'] if !opts[:'x_volcano_proxy_authorization'].nil? + header_params[:'X-Volcano-Client-IP'] = opts[:'x_volcano_client_ip'] if !opts[:'x_volcano_client_ip'].nil? # form parameters form_params = opts[:form_params] || {} @@ -1332,6 +1376,8 @@ def auth_signup_with_http_info(auth_signup_request, opts = {}) # Create anonymous user # Create guest user without email/password. User metadata (like display_name) can be included and will appear in realtime presence events. Requires enable_anonymous_signins to be true. # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @option opts [AuthSignupAnonymousRequest] :auth_signup_anonymous_request Optional user metadata # @return [AuthTokenResponse] def auth_signup_anonymous(opts = {}) @@ -1342,6 +1388,8 @@ def auth_signup_anonymous(opts = {}) # Create anonymous user # Create guest user without email/password. User metadata (like display_name) can be included and will appear in realtime presence events. Requires enable_anonymous_signins to be true. # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @option opts [AuthSignupAnonymousRequest] :auth_signup_anonymous_request Optional user metadata # @return [Array<(AuthTokenResponse, Integer, Hash)>] AuthTokenResponse data, response status code and response headers def auth_signup_anonymous_with_http_info(opts = {}) @@ -1363,6 +1411,8 @@ def auth_signup_anonymous_with_http_info(opts = {}) if !content_type.nil? header_params['Content-Type'] = content_type end + header_params[:'X-Volcano-Proxy-Authorization'] = opts[:'x_volcano_proxy_authorization'] if !opts[:'x_volcano_proxy_authorization'].nil? + header_params[:'X-Volcano-Client-IP'] = opts[:'x_volcano_client_ip'] if !opts[:'x_volcano_client_ip'].nil? # form parameters form_params = opts[:form_params] || {} diff --git a/lib/volcano/generated/lib/volcano-generated/api/autofix_api.rb b/lib/volcano/generated/lib/volcano-generated/api/autofix_api.rb deleted file mode 100644 index 8cd1c88e..00000000 --- a/lib/volcano/generated/lib/volcano-generated/api/autofix_api.rb +++ /dev/null @@ -1,222 +0,0 @@ -=begin -#Volcano API - -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. - -The version of the OpenAPI document: 3.0.0 -Contact: support@volcano.dev -Generated by: https://openapi-generator.tech -Generator version: 7.17.0 - -=end - -require 'cgi' - -module Volcano::Generated - class AutofixApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Delete the API key - # Deletes the project's stored API key and returns the settings. Autofix on the key's provider runs on that key, so it turns off; on another provider it stays as it is. Deleting when no key is stored succeeds. Turning autofix off or switching providers never deletes the key, and neither does applying a project configuration. This works where autofix is not available, for a project that saved settings. Project access tokens are refused. - # @param id [String] Project ID - # @param [Hash] opts the optional parameters - # @return [AutofixSettings] - def delete_autofix_api_key(id, opts = {}) - data, _status_code, _headers = delete_autofix_api_key_with_http_info(id, opts) - data - end - - # Delete the API key - # Deletes the project's stored API key and returns the settings. Autofix on the key's provider runs on that key, so it turns off; on another provider it stays as it is. Deleting when no key is stored succeeds. Turning autofix off or switching providers never deletes the key, and neither does applying a project configuration. This works where autofix is not available, for a project that saved settings. Project access tokens are refused. - # @param id [String] Project ID - # @param [Hash] opts the optional parameters - # @return [Array<(AutofixSettings, Integer, Hash)>] AutofixSettings data, response status code and response headers - def delete_autofix_api_key_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AutofixApi.delete_autofix_api_key ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling AutofixApi.delete_autofix_api_key" - end - # resource path - local_var_path = '/projects/{id}/autofix/api-key'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'AutofixSettings' - - # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] - - new_options = opts.merge( - :operation => :"AutofixApi.delete_autofix_api_key", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AutofixApi#delete_autofix_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get autofix settings - # Returns whether Volcano diagnoses the project's issues with AI, how far a run may go, and which model it uses. A project that never saved settings returns the defaults, with autofix off. Your API key is never returned. `api_key_configured`, `api_key_provider`, and `api_key_last4` show whether one is set and which provider it belongs to. Where autofix is not available, saved settings stay readable. A project that never saved any answers `404` with code `feature_unavailable`. - # @param id [String] Project ID - # @param [Hash] opts the optional parameters - # @return [AutofixSettings] - def get_autofix_settings(id, opts = {}) - data, _status_code, _headers = get_autofix_settings_with_http_info(id, opts) - data - end - - # Get autofix settings - # Returns whether Volcano diagnoses the project's issues with AI, how far a run may go, and which model it uses. A project that never saved settings returns the defaults, with autofix off. Your API key is never returned. `api_key_configured`, `api_key_provider`, and `api_key_last4` show whether one is set and which provider it belongs to. Where autofix is not available, saved settings stay readable. A project that never saved any answers `404` with code `feature_unavailable`. - # @param id [String] Project ID - # @param [Hash] opts the optional parameters - # @return [Array<(AutofixSettings, Integer, Hash)>] AutofixSettings data, response status code and response headers - def get_autofix_settings_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AutofixApi.get_autofix_settings ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling AutofixApi.get_autofix_settings" - end - # resource path - local_var_path = '/projects/{id}/autofix'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'AutofixSettings' - - # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] - - new_options = opts.merge( - :operation => :"AutofixApi.get_autofix_settings", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AutofixApi#get_autofix_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Replace autofix settings - # Replaces the project's autofix settings. Omitted fields take their defaults, except three: an omitted `provider` or `model` keeps its saved value, and an omitted `api_key` keeps the stored key. So `{\"enabled\": false}` turns autofix off and keeps the key. Project access tokens are refused. Autofix opens pull requests in the project's repository, so a person turns it on with a platform token or in the dashboard. Turning autofix on needs a plan that includes it. Settings that are already on stay stored after a downgrade, and saving them again is not refused, but no run starts until the plan includes autofix again. Other saves need no plan. Provider `anthropic` runs on your own API key. A key belongs to the provider it was saved with, and turning autofix on with a provider that runs on your own key needs one for it. Turning autofix off or switching providers keeps the stored key; only `DELETE /projects/{id}/autofix/api-key` removes it. Turning autofix on with provider `volcano` needs the `autofix.managed_models` capability; without it the request answers `400` with code `feature_unavailable`. Where autofix is not available, a project with saved settings can still change them with `enabled: false`. Turning autofix on answers `404` with code `feature_unavailable`. - # @param id [String] Project ID - # @param update_autofix_settings_request [UpdateAutofixSettingsRequest] - # @param [Hash] opts the optional parameters - # @return [AutofixSettings] - def update_autofix_settings(id, update_autofix_settings_request, opts = {}) - data, _status_code, _headers = update_autofix_settings_with_http_info(id, update_autofix_settings_request, opts) - data - end - - # Replace autofix settings - # Replaces the project's autofix settings. Omitted fields take their defaults, except three: an omitted `provider` or `model` keeps its saved value, and an omitted `api_key` keeps the stored key. So `{\"enabled\": false}` turns autofix off and keeps the key. Project access tokens are refused. Autofix opens pull requests in the project's repository, so a person turns it on with a platform token or in the dashboard. Turning autofix on needs a plan that includes it. Settings that are already on stay stored after a downgrade, and saving them again is not refused, but no run starts until the plan includes autofix again. Other saves need no plan. Provider `anthropic` runs on your own API key. A key belongs to the provider it was saved with, and turning autofix on with a provider that runs on your own key needs one for it. Turning autofix off or switching providers keeps the stored key; only `DELETE /projects/{id}/autofix/api-key` removes it. Turning autofix on with provider `volcano` needs the `autofix.managed_models` capability; without it the request answers `400` with code `feature_unavailable`. Where autofix is not available, a project with saved settings can still change them with `enabled: false`. Turning autofix on answers `404` with code `feature_unavailable`. - # @param id [String] Project ID - # @param update_autofix_settings_request [UpdateAutofixSettingsRequest] - # @param [Hash] opts the optional parameters - # @return [Array<(AutofixSettings, Integer, Hash)>] AutofixSettings data, response status code and response headers - def update_autofix_settings_with_http_info(id, update_autofix_settings_request, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AutofixApi.update_autofix_settings ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling AutofixApi.update_autofix_settings" - end - # verify the required parameter 'update_autofix_settings_request' is set - if @api_client.config.client_side_validation && update_autofix_settings_request.nil? - fail ArgumentError, "Missing the required parameter 'update_autofix_settings_request' when calling AutofixApi.update_autofix_settings" - end - # resource path - local_var_path = '/projects/{id}/autofix'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(update_autofix_settings_request) - - # return_type - return_type = opts[:debug_return_type] || 'AutofixSettings' - - # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] - - new_options = opts.merge( - :operation => :"AutofixApi.update_autofix_settings", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AutofixApi#update_autofix_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/volcano/generated/lib/volcano-generated/api/connectors_api.rb b/lib/volcano/generated/lib/volcano-generated/api/connectors_api.rb new file mode 100644 index 00000000..46748db2 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/api/connectors_api.rb @@ -0,0 +1,273 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'cgi' + +module Volcano::Generated + class ConnectorsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Connect a service + # Connects an outside service with credentials the caller created there, and answers `201` with the connector. Today that is an `aikido` workspace, so LavaFlow can fix the security issues Aikido finds on the caller's projects. Install the Volcano Slack app with `POST /user/slack/installations` instead: it needs the browser. For Aikido, create a REST API client in Aikido's settings with read access to issues, repositories and the workspace, and a webhook signing secret on its webhooks page. Volcano checks the client with Aikido, reads which workspace it belongs to, and stores all three values encrypted; it never returns them. Then point an Aikido webhook for new issues at `https:///webhooks/aikido`, and bind projects with `POST /lavaflow/connector-bindings`. Volcano writes nothing back to Aikido. A workspace connects to one Volcano account at a time. Connecting Aikido needs LavaFlow and Aikido reports to be available in this environment, as the `lavaflow.aikido` capability reports; otherwise this answers `404` with code `feature_unavailable`. + # @param connector_create [ConnectorCreate] + # @param [Hash] opts the optional parameters + # @return [Connector] + def create_connector(connector_create, opts = {}) + data, _status_code, _headers = create_connector_with_http_info(connector_create, opts) + data + end + + # Connect a service + # Connects an outside service with credentials the caller created there, and answers `201` with the connector. Today that is an `aikido` workspace, so LavaFlow can fix the security issues Aikido finds on the caller's projects. Install the Volcano Slack app with `POST /user/slack/installations` instead: it needs the browser. For Aikido, create a REST API client in Aikido's settings with read access to issues, repositories and the workspace, and a webhook signing secret on its webhooks page. Volcano checks the client with Aikido, reads which workspace it belongs to, and stores all three values encrypted; it never returns them. Then point an Aikido webhook for new issues at `https://<api-host>/webhooks/aikido`, and bind projects with `POST /lavaflow/connector-bindings`. Volcano writes nothing back to Aikido. A workspace connects to one Volcano account at a time. Connecting Aikido needs LavaFlow and Aikido reports to be available in this environment, as the `lavaflow.aikido` capability reports; otherwise this answers `404` with code `feature_unavailable`. + # @param connector_create [ConnectorCreate] + # @param [Hash] opts the optional parameters + # @return [Array<(Connector, Integer, Hash)>] Connector data, response status code and response headers + def create_connector_with_http_info(connector_create, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ConnectorsApi.create_connector ...' + end + # verify the required parameter 'connector_create' is set + if @api_client.config.client_side_validation && connector_create.nil? + fail ArgumentError, "Missing the required parameter 'connector_create' when calling ConnectorsApi.create_connector" + end + # resource path + local_var_path = '/connectors' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(connector_create) + + # return_type + return_type = opts[:debug_return_type] || 'Connector' + + # auth_names + auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken', 'UserToken'] + + new_options = opts.merge( + :operation => :"ConnectorsApi.create_connector", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ConnectorsApi#create_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Remove a connector + # Removes a connector. Removing a `slack` connector uninstalls the Volcano app from the Slack workspace, for every Volcano account that uses it. Only the person who installed the app there can remove it (`removable` is `true` for them); anyone else can uninstall the app in Slack. The workspace's channels stop reporting problems at their next check, which also cancels reports still queued. The channel bindings stay, and report again if the app is installed in the workspace again. Removing an `aikido` connector deletes its credentials and its project bindings, and cancels its queued reports at their next check. Remove the webhook in Aikido too: Volcano refuses its deliveries from then on. Removing works whether or not reporting problems from either service is available in this environment. + # @param connector_id [String] The connector's ID, from listing connectors + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_connector(connector_id, opts = {}) + delete_connector_with_http_info(connector_id, opts) + nil + end + + # Remove a connector + # Removes a connector. Removing a `slack` connector uninstalls the Volcano app from the Slack workspace, for every Volcano account that uses it. Only the person who installed the app there can remove it (`removable` is `true` for them); anyone else can uninstall the app in Slack. The workspace's channels stop reporting problems at their next check, which also cancels reports still queued. The channel bindings stay, and report again if the app is installed in the workspace again. Removing an `aikido` connector deletes its credentials and its project bindings, and cancels its queued reports at their next check. Remove the webhook in Aikido too: Volcano refuses its deliveries from then on. Removing works whether or not reporting problems from either service is available in this environment. + # @param connector_id [String] The connector's ID, from listing connectors + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_connector_with_http_info(connector_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ConnectorsApi.delete_connector ...' + end + # verify the required parameter 'connector_id' is set + if @api_client.config.client_side_validation && connector_id.nil? + fail ArgumentError, "Missing the required parameter 'connector_id' when calling ConnectorsApi.delete_connector" + end + # resource path + local_var_path = '/connectors/{connector_id}'.sub('{' + 'connector_id' + '}', CGI.escape(connector_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken', 'UserToken'] + + new_options = opts.merge( + :operation => :"ConnectorsApi.delete_connector", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ConnectorsApi#delete_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a connector + # Returns one connector the caller can use, as listing connectors shows it. A connector the caller cannot see answers like one that doesn't exist. + # @param connector_id [String] The connector's ID, from listing connectors + # @param [Hash] opts the optional parameters + # @return [Connector] + def get_connector(connector_id, opts = {}) + data, _status_code, _headers = get_connector_with_http_info(connector_id, opts) + data + end + + # Get a connector + # Returns one connector the caller can use, as listing connectors shows it. A connector the caller cannot see answers like one that doesn't exist. + # @param connector_id [String] The connector's ID, from listing connectors + # @param [Hash] opts the optional parameters + # @return [Array<(Connector, Integer, Hash)>] Connector data, response status code and response headers + def get_connector_with_http_info(connector_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ConnectorsApi.get_connector ...' + end + # verify the required parameter 'connector_id' is set + if @api_client.config.client_side_validation && connector_id.nil? + fail ArgumentError, "Missing the required parameter 'connector_id' when calling ConnectorsApi.get_connector" + end + # resource path + local_var_path = '/connectors/{connector_id}'.sub('{' + 'connector_id' + '}', CGI.escape(connector_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Connector' + + # auth_names + auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken', 'UserToken'] + + new_options = opts.merge( + :operation => :"ConnectorsApi.get_connector", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ConnectorsApi#get_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List connectors + # Lists the connectors the caller can use. A connector links Volcano to an outside service. A `slack` connector is a Slack workspace the Volcano app is installed in: it is listed to the person who installed it there, and to anyone with a Slack identity in that workspace connected to their Volcano account. Add one with `POST /user/slack/installations`. An `aikido` connector is an Aikido workspace the caller connected with `POST /connectors`; it holds their Aikido credentials, so it is listed to them alone. The list answers whether or not reporting problems from either service is available in this environment, so turning it off strands no connector. + # @param [Hash] opts the optional parameters + # @return [ConnectorsResponse] + def list_connectors(opts = {}) + data, _status_code, _headers = list_connectors_with_http_info(opts) + data + end + + # List connectors + # Lists the connectors the caller can use. A connector links Volcano to an outside service. A `slack` connector is a Slack workspace the Volcano app is installed in: it is listed to the person who installed it there, and to anyone with a Slack identity in that workspace connected to their Volcano account. Add one with `POST /user/slack/installations`. An `aikido` connector is an Aikido workspace the caller connected with `POST /connectors`; it holds their Aikido credentials, so it is listed to them alone. The list answers whether or not reporting problems from either service is available in this environment, so turning it off strands no connector. + # @param [Hash] opts the optional parameters + # @return [Array<(ConnectorsResponse, Integer, Hash)>] ConnectorsResponse data, response status code and response headers + def list_connectors_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ConnectorsApi.list_connectors ...' + end + # resource path + local_var_path = '/connectors' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ConnectorsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken', 'UserToken'] + + new_options = opts.merge( + :operation => :"ConnectorsApi.list_connectors", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ConnectorsApi#list_connectors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/api/database_backups_api.rb b/lib/volcano/generated/lib/volcano-generated/api/database_backups_api.rb index 39d10fe5..09963052 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/database_backups_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/database_backups_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -544,7 +544,7 @@ def get_database_restore_with_http_info(id, database_name, restore_id, opts = {} end # List a database's backups - # Returns every backup of the database, newest first, together with the window a point-in-time restore may target. Both backups you took and backups the schedule produced are listed; `source` tells them apart. Only manual backups count against the plan's backup allowance. + # Returns every backup of the database, newest first, together with the window a point-in-time restore may target. Backups you took, backups the schedule produced, and backups taken before migrations are all listed; `source` tells them apart. Only manual backups count against the plan's backup allowance. # @param id [String] Project ID # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) # @param [Hash] opts the optional parameters @@ -555,7 +555,7 @@ def list_database_backups(id, database_name, opts = {}) end # List a database's backups - # Returns every backup of the database, newest first, together with the window a point-in-time restore may target. Both backups you took and backups the schedule produced are listed; `source` tells them apart. Only manual backups count against the plan's backup allowance. + # Returns every backup of the database, newest first, together with the window a point-in-time restore may target. Backups you took, backups the schedule produced, and backups taken before migrations are all listed; `source` tells them apart. Only manual backups count against the plan's backup allowance. # @param id [String] Project ID # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) # @param [Hash] opts the optional parameters diff --git a/lib/volcano/generated/lib/volcano-generated/api/database_branches_api.rb b/lib/volcano/generated/lib/volcano-generated/api/database_branches_api.rb index a65e0c4b..0dc0154d 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/database_branches_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/database_branches_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/api/database_migrations_api.rb b/lib/volcano/generated/lib/volcano-generated/api/database_migrations_api.rb new file mode 100644 index 00000000..4e9b913e --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/api/database_migrations_api.rb @@ -0,0 +1,456 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'cgi' + +module Volcano::Generated + class DatabaseMigrationsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Record migrations as applied without running them + # Records each file in the database's migration history as applied, without running it. Use it once for a database whose schema already reflects the files, such as one migrated before Volcano tracked its migrations, so later runs apply only newer files. It is refused while a run is queued or running, and no run starts while it records. It does not queue: while another request is changing the database, or the database holds it up, such as with a lock on the migration history, it answers `409` with code `database_busy`. Files the history already records with the same checksum are skipped, so repeating the request changes nothing. A file recorded with a different checksum is refused, and nothing is recorded. It also rebuilds a history that was lost (`history_missing`): send exactly the files that were already applied, and later runs apply only the rest. Where migration runs are not available, answers `404` with code `feature_unavailable`. + # @param id [String] Project ID + # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) + # @param database_migration_files_request [DatabaseMigrationFilesRequest] + # @param [Hash] opts the optional parameters + # @return [DatabaseMigrationBaseline] + def baseline_database_migrations(id, database_name, database_migration_files_request, opts = {}) + data, _status_code, _headers = baseline_database_migrations_with_http_info(id, database_name, database_migration_files_request, opts) + data + end + + # Record migrations as applied without running them + # Records each file in the database's migration history as applied, without running it. Use it once for a database whose schema already reflects the files, such as one migrated before Volcano tracked its migrations, so later runs apply only newer files. It is refused while a run is queued or running, and no run starts while it records. It does not queue: while another request is changing the database, or the database holds it up, such as with a lock on the migration history, it answers `409` with code `database_busy`. Files the history already records with the same checksum are skipped, so repeating the request changes nothing. A file recorded with a different checksum is refused, and nothing is recorded. It also rebuilds a history that was lost (`history_missing`): send exactly the files that were already applied, and later runs apply only the rest. Where migration runs are not available, answers `404` with code `feature_unavailable`. + # @param id [String] Project ID + # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) + # @param database_migration_files_request [DatabaseMigrationFilesRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(DatabaseMigrationBaseline, Integer, Hash)>] DatabaseMigrationBaseline data, response status code and response headers + def baseline_database_migrations_with_http_info(id, database_name, database_migration_files_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DatabaseMigrationsApi.baseline_database_migrations ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseMigrationsApi.baseline_database_migrations" + end + # verify the required parameter 'database_name' is set + if @api_client.config.client_side_validation && database_name.nil? + fail ArgumentError, "Missing the required parameter 'database_name' when calling DatabaseMigrationsApi.baseline_database_migrations" + end + if @api_client.config.client_side_validation && database_name.to_s.length > 64 + fail ArgumentError, 'invalid value for "database_name" when calling DatabaseMigrationsApi.baseline_database_migrations, the character length must be smaller than or equal to 64.' + end + + pattern = Regexp.new(/^[a-z0-9_]+$/) + if @api_client.config.client_side_validation && database_name !~ pattern + fail ArgumentError, "invalid value for 'database_name' when calling DatabaseMigrationsApi.baseline_database_migrations, must conform to the pattern #{pattern}." + end + + # verify the required parameter 'database_migration_files_request' is set + if @api_client.config.client_side_validation && database_migration_files_request.nil? + fail ArgumentError, "Missing the required parameter 'database_migration_files_request' when calling DatabaseMigrationsApi.baseline_database_migrations" + end + # resource path + local_var_path = '/projects/{id}/databases/{databaseName}/migrations/baseline'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'databaseName' + '}', CGI.escape(database_name.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(database_migration_files_request) + + # return_type + return_type = opts[:debug_return_type] || 'DatabaseMigrationBaseline' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"DatabaseMigrationsApi.baseline_database_migrations", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DatabaseMigrationsApi#baseline_database_migrations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Apply migrations to a database + # Starts a migration run: Volcano compares the files with the database's history, rehearses the pending ones on a short-lived branch of the database, takes a backup, and applies them in name order. Files the history already records with the same checksum are skipped. Asynchronous: the response is `202` with the run `queued`. Poll the run until its `status` is `succeeded` or `failed`. Send `Idempotency-Key` to make a retry safe: a repeat with a key this database has seen returns that run with `200` and starts nothing. A database runs one migration run at a time. Where migration runs are not available, answers `404` with code `feature_unavailable`. + # @param id [String] Project ID + # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) + # @param database_migration_files_request [DatabaseMigrationFilesRequest] + # @param [Hash] opts the optional parameters + # @option opts [String] :idempotency_key Makes the request safe to retry. A repeat with a key this database has seen returns the run it started. Reusing a key for different files answers `409`. Up to 255 printable ASCII characters. + # @return [DatabaseMigrationRun] + def create_database_migration_run(id, database_name, database_migration_files_request, opts = {}) + data, _status_code, _headers = create_database_migration_run_with_http_info(id, database_name, database_migration_files_request, opts) + data + end + + # Apply migrations to a database + # Starts a migration run: Volcano compares the files with the database's history, rehearses the pending ones on a short-lived branch of the database, takes a backup, and applies them in name order. Files the history already records with the same checksum are skipped. Asynchronous: the response is `202` with the run `queued`. Poll the run until its `status` is `succeeded` or `failed`. Send `Idempotency-Key` to make a retry safe: a repeat with a key this database has seen returns that run with `200` and starts nothing. A database runs one migration run at a time. Where migration runs are not available, answers `404` with code `feature_unavailable`. + # @param id [String] Project ID + # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) + # @param database_migration_files_request [DatabaseMigrationFilesRequest] + # @param [Hash] opts the optional parameters + # @option opts [String] :idempotency_key Makes the request safe to retry. A repeat with a key this database has seen returns the run it started. Reusing a key for different files answers `409`. Up to 255 printable ASCII characters. + # @return [Array<(DatabaseMigrationRun, Integer, Hash)>] DatabaseMigrationRun data, response status code and response headers + def create_database_migration_run_with_http_info(id, database_name, database_migration_files_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DatabaseMigrationsApi.create_database_migration_run ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseMigrationsApi.create_database_migration_run" + end + # verify the required parameter 'database_name' is set + if @api_client.config.client_side_validation && database_name.nil? + fail ArgumentError, "Missing the required parameter 'database_name' when calling DatabaseMigrationsApi.create_database_migration_run" + end + if @api_client.config.client_side_validation && database_name.to_s.length > 64 + fail ArgumentError, 'invalid value for "database_name" when calling DatabaseMigrationsApi.create_database_migration_run, the character length must be smaller than or equal to 64.' + end + + pattern = Regexp.new(/^[a-z0-9_]+$/) + if @api_client.config.client_side_validation && database_name !~ pattern + fail ArgumentError, "invalid value for 'database_name' when calling DatabaseMigrationsApi.create_database_migration_run, must conform to the pattern #{pattern}." + end + + # verify the required parameter 'database_migration_files_request' is set + if @api_client.config.client_side_validation && database_migration_files_request.nil? + fail ArgumentError, "Missing the required parameter 'database_migration_files_request' when calling DatabaseMigrationsApi.create_database_migration_run" + end + if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255 + fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling DatabaseMigrationsApi.create_database_migration_run, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling DatabaseMigrationsApi.create_database_migration_run, the character length must be greater than or equal to 1.' + end + + pattern = Regexp.new(/^[!-~]+$/) + if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'] !~ pattern + fail ArgumentError, "invalid value for 'opts[:\"idempotency_key\"]' when calling DatabaseMigrationsApi.create_database_migration_run, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/projects/{id}/databases/{databaseName}/migration-runs'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'databaseName' + '}', CGI.escape(database_name.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(database_migration_files_request) + + # return_type + return_type = opts[:debug_return_type] || 'DatabaseMigrationRun' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"DatabaseMigrationsApi.create_database_migration_run", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DatabaseMigrationsApi#create_database_migration_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a migration run + # Returns the run with each file's outcome. Poll this after starting a run. Available whether or not migration runs are. + # @param id [String] Project ID + # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) + # @param run_id [String] Database migration run ID + # @param [Hash] opts the optional parameters + # @return [DatabaseMigrationRun] + def get_database_migration_run(id, database_name, run_id, opts = {}) + data, _status_code, _headers = get_database_migration_run_with_http_info(id, database_name, run_id, opts) + data + end + + # Get a migration run + # Returns the run with each file's outcome. Poll this after starting a run. Available whether or not migration runs are. + # @param id [String] Project ID + # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) + # @param run_id [String] Database migration run ID + # @param [Hash] opts the optional parameters + # @return [Array<(DatabaseMigrationRun, Integer, Hash)>] DatabaseMigrationRun data, response status code and response headers + def get_database_migration_run_with_http_info(id, database_name, run_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DatabaseMigrationsApi.get_database_migration_run ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseMigrationsApi.get_database_migration_run" + end + # verify the required parameter 'database_name' is set + if @api_client.config.client_side_validation && database_name.nil? + fail ArgumentError, "Missing the required parameter 'database_name' when calling DatabaseMigrationsApi.get_database_migration_run" + end + if @api_client.config.client_side_validation && database_name.to_s.length > 64 + fail ArgumentError, 'invalid value for "database_name" when calling DatabaseMigrationsApi.get_database_migration_run, the character length must be smaller than or equal to 64.' + end + + pattern = Regexp.new(/^[a-z0-9_]+$/) + if @api_client.config.client_side_validation && database_name !~ pattern + fail ArgumentError, "invalid value for 'database_name' when calling DatabaseMigrationsApi.get_database_migration_run, must conform to the pattern #{pattern}." + end + + # verify the required parameter 'run_id' is set + if @api_client.config.client_side_validation && run_id.nil? + fail ArgumentError, "Missing the required parameter 'run_id' when calling DatabaseMigrationsApi.get_database_migration_run" + end + # resource path + local_var_path = '/projects/{id}/databases/{databaseName}/migration-runs/{runId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'databaseName' + '}', CGI.escape(database_name.to_s)).sub('{' + 'runId' + '}', CGI.escape(run_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DatabaseMigrationRun' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"DatabaseMigrationsApi.get_database_migration_run", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DatabaseMigrationsApi#get_database_migration_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a database's migration history + # Returns the migrations the database has recorded, in name order, read from the database's own `_volcano_migrations.history` table. The history is empty until a migration run or a baseline first records a file. `active_run_id` is the run that is queued or running, if any. If the history table is gone from a database where migrations ran, answers `409` with code `history_missing`, and every run fails with that code, rather than running files again. Record a baseline of the files that were already applied to rebuild it. Dropping the whole `_volcano_migrations` schema is not supported: the database then reads as new, and the next run applies every file again. Volcano reads at most 1,000 history entries, as many files as one run may carry. A history with more answers `409` with code `history_too_large`. A baseline is refused with that code, and a run fails with it. Deleting the entries of files no longer among your migrations brings the history back under the bound. Available whether or not migration runs are. + # @param id [String] Project ID + # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) + # @param [Hash] opts the optional parameters + # @return [DatabaseMigrations] + def get_database_migrations(id, database_name, opts = {}) + data, _status_code, _headers = get_database_migrations_with_http_info(id, database_name, opts) + data + end + + # Get a database's migration history + # Returns the migrations the database has recorded, in name order, read from the database's own `_volcano_migrations.history` table. The history is empty until a migration run or a baseline first records a file. `active_run_id` is the run that is queued or running, if any. If the history table is gone from a database where migrations ran, answers `409` with code `history_missing`, and every run fails with that code, rather than running files again. Record a baseline of the files that were already applied to rebuild it. Dropping the whole `_volcano_migrations` schema is not supported: the database then reads as new, and the next run applies every file again. Volcano reads at most 1,000 history entries, as many files as one run may carry. A history with more answers `409` with code `history_too_large`. A baseline is refused with that code, and a run fails with it. Deleting the entries of files no longer among your migrations brings the history back under the bound. Available whether or not migration runs are. + # @param id [String] Project ID + # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) + # @param [Hash] opts the optional parameters + # @return [Array<(DatabaseMigrations, Integer, Hash)>] DatabaseMigrations data, response status code and response headers + def get_database_migrations_with_http_info(id, database_name, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DatabaseMigrationsApi.get_database_migrations ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseMigrationsApi.get_database_migrations" + end + # verify the required parameter 'database_name' is set + if @api_client.config.client_side_validation && database_name.nil? + fail ArgumentError, "Missing the required parameter 'database_name' when calling DatabaseMigrationsApi.get_database_migrations" + end + if @api_client.config.client_side_validation && database_name.to_s.length > 64 + fail ArgumentError, 'invalid value for "database_name" when calling DatabaseMigrationsApi.get_database_migrations, the character length must be smaller than or equal to 64.' + end + + pattern = Regexp.new(/^[a-z0-9_]+$/) + if @api_client.config.client_side_validation && database_name !~ pattern + fail ArgumentError, "invalid value for 'database_name' when calling DatabaseMigrationsApi.get_database_migrations, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/projects/{id}/databases/{databaseName}/migrations'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'databaseName' + '}', CGI.escape(database_name.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DatabaseMigrations' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"DatabaseMigrationsApi.get_database_migrations", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DatabaseMigrationsApi#get_database_migrations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List a database's migration runs + # Returns the database's 50 most recent migration runs, newest first, without their files; get a run for its files. There is no pagination. Available whether or not migration runs are. + # @param id [String] Project ID + # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) + # @param [Hash] opts the optional parameters + # @return [DatabaseMigrationRunList] + def list_database_migration_runs(id, database_name, opts = {}) + data, _status_code, _headers = list_database_migration_runs_with_http_info(id, database_name, opts) + data + end + + # List a database's migration runs + # Returns the database's 50 most recent migration runs, newest first, without their files; get a run for its files. There is no pagination. Available whether or not migration runs are. + # @param id [String] Project ID + # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) + # @param [Hash] opts the optional parameters + # @return [Array<(DatabaseMigrationRunList, Integer, Hash)>] DatabaseMigrationRunList data, response status code and response headers + def list_database_migration_runs_with_http_info(id, database_name, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DatabaseMigrationsApi.list_database_migration_runs ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseMigrationsApi.list_database_migration_runs" + end + # verify the required parameter 'database_name' is set + if @api_client.config.client_side_validation && database_name.nil? + fail ArgumentError, "Missing the required parameter 'database_name' when calling DatabaseMigrationsApi.list_database_migration_runs" + end + if @api_client.config.client_side_validation && database_name.to_s.length > 64 + fail ArgumentError, 'invalid value for "database_name" when calling DatabaseMigrationsApi.list_database_migration_runs, the character length must be smaller than or equal to 64.' + end + + pattern = Regexp.new(/^[a-z0-9_]+$/) + if @api_client.config.client_side_validation && database_name !~ pattern + fail ArgumentError, "invalid value for 'database_name' when calling DatabaseMigrationsApi.list_database_migration_runs, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/projects/{id}/databases/{databaseName}/migration-runs'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'databaseName' + '}', CGI.escape(database_name.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DatabaseMigrationRunList' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"DatabaseMigrationsApi.list_database_migration_runs", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DatabaseMigrationsApi#list_database_migration_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/api/database_queries_api.rb b/lib/volcano/generated/lib/volcano-generated/api/database_queries_api.rb index 75d21d86..636d7234 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/database_queries_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/database_queries_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -303,7 +303,7 @@ def query_database_branch_ping_with_http_info(database_name, branch_name, opts = end # Query database with SELECT (REST API) - # Query your database using a simple REST API - no SQL required! **Authentication:** Requires auth user access token (from signup/signin) **Row-Level Security:** Automatically enforced - you see only data you have access to **Use Cases:** - Query from browser/mobile apps - Simple data retrieval - Filtered searches with sorting and pagination **Note:** For complex queries (JOINs, CTEs), use a function with direct SQL **Branch-targeted.** Runs against the named branch instead of the parent database, using the branch's own credentials. The branch must be `active` and unexpired. Nothing about this request can reach the parent's data. + # Query your database using a simple REST API - no SQL required! **Authentication:** Requires auth user access token (from signup/signin) **Row-Level Security:** Applied on tables with RLS enabled. A table without RLS returns every row your role is granted **Use Cases:** - Query from browser/mobile apps - Simple data retrieval - Filtered searches with sorting and pagination **Note:** For complex queries (JOINs, CTEs), use a function with direct SQL **Branch-targeted.** Runs against the named branch instead of the parent database, using the branch's own credentials. The branch must be `active` and unexpired. Nothing about this request can reach the parent's data. # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) # @param branch_name [String] Branch name (unique within the parent database, lowercase letters, numbers, and underscores only) # @param database_select_request [DatabaseSelectRequest] @@ -315,7 +315,7 @@ def query_database_branch_select(database_name, branch_name, database_select_req end # Query database with SELECT (REST API) - # Query your database using a simple REST API - no SQL required! **Authentication:** Requires auth user access token (from signup/signin) **Row-Level Security:** Automatically enforced - you see only data you have access to **Use Cases:** - Query from browser/mobile apps - Simple data retrieval - Filtered searches with sorting and pagination **Note:** For complex queries (JOINs, CTEs), use a function with direct SQL **Branch-targeted.** Runs against the named branch instead of the parent database, using the branch's own credentials. The branch must be `active` and unexpired. Nothing about this request can reach the parent's data. + # Query your database using a simple REST API - no SQL required! **Authentication:** Requires auth user access token (from signup/signin) **Row-Level Security:** Applied on tables with RLS enabled. A table without RLS returns every row your role is granted **Use Cases:** - Query from browser/mobile apps - Simple data retrieval - Filtered searches with sorting and pagination **Note:** For complex queries (JOINs, CTEs), use a function with direct SQL **Branch-targeted.** Runs against the named branch instead of the parent database, using the branch's own credentials. The branch must be `active` and unexpired. Nothing about this request can reach the parent's data. # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) # @param branch_name [String] Branch name (unique within the parent database, lowercase letters, numbers, and underscores only) # @param database_select_request [DatabaseSelectRequest] @@ -737,7 +737,7 @@ def query_database_ping_with_http_info(database_name, opts = {}) end # Query database with SELECT (REST API) - # Query your database using a simple REST API - no SQL required! **Authentication:** Requires auth user access token (from signup/signin) **Row-Level Security:** Automatically enforced - you see only data you have access to **Use Cases:** - Query from browser/mobile apps - Simple data retrieval - Filtered searches with sorting and pagination **Note:** For complex queries (JOINs, CTEs), use functions with direct SQL + # Query your database using a simple REST API - no SQL required! **Authentication:** Requires auth user access token (from signup/signin) **Row-Level Security:** Applied on tables with RLS enabled. A table without RLS returns every row your role is granted **Use Cases:** - Query from browser/mobile apps - Simple data retrieval - Filtered searches with sorting and pagination **Note:** For complex queries (JOINs, CTEs), use functions with direct SQL # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) # @param database_select_request [DatabaseSelectRequest] # @param [Hash] opts the optional parameters @@ -748,7 +748,7 @@ def query_database_select(database_name, database_select_request, opts = {}) end # Query database with SELECT (REST API) - # Query your database using a simple REST API - no SQL required! **Authentication:** Requires auth user access token (from signup/signin) **Row-Level Security:** Automatically enforced - you see only data you have access to **Use Cases:** - Query from browser/mobile apps - Simple data retrieval - Filtered searches with sorting and pagination **Note:** For complex queries (JOINs, CTEs), use functions with direct SQL + # Query your database using a simple REST API - no SQL required! **Authentication:** Requires auth user access token (from signup/signin) **Row-Level Security:** Applied on tables with RLS enabled. A table without RLS returns every row your role is granted **Use Cases:** - Query from browser/mobile apps - Simple data retrieval - Filtered searches with sorting and pagination **Note:** For complex queries (JOINs, CTEs), use functions with direct SQL # @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only) # @param database_select_request [DatabaseSelectRequest] # @param [Hash] opts the optional parameters diff --git a/lib/volcano/generated/lib/volcano-generated/api/databases_api.rb b/lib/volcano/generated/lib/volcano-generated/api/databases_api.rb index 4cfe1568..047b0437 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/databases_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/databases_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/api/durable_functions_api.rb b/lib/volcano/generated/lib/volcano-generated/api/durable_functions_api.rb index 4d8ba3d3..5fc1e941 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/durable_functions_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/durable_functions_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -107,6 +107,7 @@ def approve_durable_approval_with_http_info(id, approval_id, opts = {}) # @option opts [Boolean] :is_public Deprecated alias for `visibility`: `true` means `public` and `false` means `authenticated`. Sending both with different meanings returns 400. # @option opts [String] :variable_scope Which project variables this function receives. `all` (the default) gives it every project variable; `scoped` gives it only the variables it selects. Omitting this leaves an existing function's scope unchanged. # @option opts [String] :variables JSON-encoded array of project variable names this function requires, on top of the ones detected in its source. A declared name the project does not define is rejected with 400; a detected name it does not define is ignored. Only used when `variable_scope` is `scoped`. Omitting this leaves an existing function's declared names unchanged. + # @option opts [String] :commit JSON-encoded commit the uploaded source came from: `{\\\"repository\\\": \\\"acme/app\\\", \\\"sha\\\": \\\"<40-character commit ID>\\\", \\\"dirty\\\": false}`. `repository` is `owner/name` or a github.com remote URL (`https://github.com/acme/app.git`, `git@github.com:acme/app.git`, or `ssh://git@github.com/acme/app.git`); Volcano drops any credentials in the URL and records `owner/name`. `dirty` is `true` when the uploaded files differ from the commit. All three fields are required, and fields Volcano does not know are ignored. An empty value, `null`, or `\\\"\\\"` reports no commit. A malformed commit, or a repository not on GitHub, returns 400 before anything is deployed. Volcano records a function's commit with `commit.verified: false`; a clean commit of the project's connected repository that its production branch holds gets `commit.verification: repository`. # @return [DurableFunction] def create_durable_function(id, name, code, runtime, opts = {}) data, _status_code, _headers = create_durable_function_with_http_info(id, name, code, runtime, opts) @@ -125,6 +126,7 @@ def create_durable_function(id, name, code, runtime, opts = {}) # @option opts [Boolean] :is_public Deprecated alias for `visibility`: `true` means `public` and `false` means `authenticated`. Sending both with different meanings returns 400. # @option opts [String] :variable_scope Which project variables this function receives. `all` (the default) gives it every project variable; `scoped` gives it only the variables it selects. Omitting this leaves an existing function's scope unchanged. # @option opts [String] :variables JSON-encoded array of project variable names this function requires, on top of the ones detected in its source. A declared name the project does not define is rejected with 400; a detected name it does not define is ignored. Only used when `variable_scope` is `scoped`. Omitting this leaves an existing function's declared names unchanged. + # @option opts [String] :commit JSON-encoded commit the uploaded source came from: `{\\\"repository\\\": \\\"acme/app\\\", \\\"sha\\\": \\\"<40-character commit ID>\\\", \\\"dirty\\\": false}`. `repository` is `owner/name` or a github.com remote URL (`https://github.com/acme/app.git`, `git@github.com:acme/app.git`, or `ssh://git@github.com/acme/app.git`); Volcano drops any credentials in the URL and records `owner/name`. `dirty` is `true` when the uploaded files differ from the commit. All three fields are required, and fields Volcano does not know are ignored. An empty value, `null`, or `\\\"\\\"` reports no commit. A malformed commit, or a repository not on GitHub, returns 400 before anything is deployed. Volcano records a function's commit with `commit.verified: false`; a clean commit of the project's connected repository that its production branch holds gets `commit.verification: repository`. # @return [Array<(DurableFunction, Integer, Hash)>] DurableFunction data, response status code and response headers def create_durable_function_with_http_info(id, name, code, runtime, opts = {}) if @api_client.config.debugging @@ -190,6 +192,7 @@ def create_durable_function_with_http_info(id, name, code, runtime, opts = {}) form_params['is_public'] = opts[:'is_public'] if !opts[:'is_public'].nil? form_params['variable_scope'] = opts[:'variable_scope'] if !opts[:'variable_scope'].nil? form_params['variables'] = opts[:'variables'] if !opts[:'variables'].nil? + form_params['commit'] = opts[:'commit'] if !opts[:'commit'].nil? # http body (model) post_body = opts[:debug_body] @@ -198,7 +201,7 @@ def create_durable_function_with_http_info(id, name, code, runtime, opts = {}) return_type = opts[:debug_return_type] || 'DurableFunction' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.create_durable_function", @@ -278,7 +281,7 @@ def create_durable_function_scheduler_with_http_info(id, function_id, create_fun return_type = opts[:debug_return_type] || 'FunctionScheduler' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.create_durable_function_scheduler", @@ -347,7 +350,7 @@ def delete_durable_function_with_http_info(id, function_id, opts = {}) return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.delete_durable_function", @@ -420,7 +423,7 @@ def delete_durable_function_scheduler_with_http_info(id, function_id, scheduler_ return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.delete_durable_function_scheduler", @@ -515,6 +518,74 @@ def deny_durable_approval_with_http_info(id, approval_id, opts = {}) return data, status_code, headers end + # Fail a waiting step + # Resumes the workflow step waiting on the token by raising `error`. The SDKs raise it as `CallbackFailedError`, carrying its `type` and `message`. The token is the only credential, and takes one outcome, as for succeeding it. + # @param fail_durable_callback_request [FailDurableCallbackRequest] + # @param [Hash] opts the optional parameters + # @return [DurableCallbackOutcome] + def fail_durable_callback(fail_durable_callback_request, opts = {}) + data, _status_code, _headers = fail_durable_callback_with_http_info(fail_durable_callback_request, opts) + data + end + + # Fail a waiting step + # Resumes the workflow step waiting on the token by raising `error`. The SDKs raise it as `CallbackFailedError`, carrying its `type` and `message`. The token is the only credential, and takes one outcome, as for succeeding it. + # @param fail_durable_callback_request [FailDurableCallbackRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(DurableCallbackOutcome, Integer, Hash)>] DurableCallbackOutcome data, response status code and response headers + def fail_durable_callback_with_http_info(fail_durable_callback_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DurableFunctionsApi.fail_durable_callback ...' + end + # verify the required parameter 'fail_durable_callback_request' is set + if @api_client.config.client_side_validation && fail_durable_callback_request.nil? + fail ArgumentError, "Missing the required parameter 'fail_durable_callback_request' when calling DurableFunctionsApi.fail_durable_callback" + end + # resource path + local_var_path = '/durable-callbacks/fail' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(fail_durable_callback_request) + + # return_type + return_type = opts[:debug_return_type] || 'DurableCallbackOutcome' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DurableFunctionsApi.fail_durable_callback", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DurableFunctionsApi#fail_durable_callback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a durable approval # Returns one approval: what the workflow asked, the durable function and execution that asked it, its deadline, and the decision once one is made. Project access tokens can read approvals, including read-only ones. # @param id [String] Project ID @@ -720,7 +791,7 @@ def get_durable_execution_with_http_info(id, function_id, execution_id, opts = { return_type = opts[:debug_return_type] || 'DurableExecution' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.get_durable_execution", @@ -744,7 +815,7 @@ def get_durable_execution_with_http_info(id, function_id, execution_id, opts = { # @param function_id [String] Durable function ID, or its name within the project # @param execution_id [String] Durable execution ID # @param [Hash] opts the optional parameters - # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, or a user who did not start the execution, reach it, and a service key scoped to a list without `*` read and stop it. + # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, a service key scoped to a list without `*`, or a user who did not start the execution, reach it. # @return [DurableExecution] def get_durable_execution_from_application(function_id, execution_id, opts = {}) data, _status_code, _headers = get_durable_execution_from_application_with_http_info(function_id, execution_id, opts) @@ -756,7 +827,7 @@ def get_durable_execution_from_application(function_id, execution_id, opts = {}) # @param function_id [String] Durable function ID, or its name within the project # @param execution_id [String] Durable execution ID # @param [Hash] opts the optional parameters - # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, or a user who did not start the execution, reach it, and a service key scoped to a list without `*` read and stop it. + # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, a service key scoped to a list without `*`, or a user who did not start the execution, reach it. # @return [Array<(DurableExecution, Integer, Hash)>] DurableExecution data, response status code and response headers def get_durable_execution_from_application_with_http_info(function_id, execution_id, opts = {}) if @api_client.config.debugging @@ -863,7 +934,7 @@ def get_durable_function_with_http_info(id, function_id, opts = {}) return_type = opts[:debug_return_type] || 'DurableFunction' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.get_durable_function", @@ -936,7 +1007,7 @@ def get_durable_function_scheduler_with_http_info(id, function_id, scheduler_id, return_type = opts[:debug_return_type] || 'FunctionScheduler' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.get_durable_function_scheduler", @@ -955,6 +1026,74 @@ def get_durable_function_scheduler_with_http_info(id, function_id, scheduler_id, return data, status_code, headers end + # Keep a waiting step alive + # Tells the workflow step waiting on the token that the work is still going on, restarting its heartbeat timeout. A heartbeat never extends the step's own timeout, and a step without a heartbeat timeout needs none. + # @param heartbeat_durable_callback_request [HeartbeatDurableCallbackRequest] + # @param [Hash] opts the optional parameters + # @return [DurableCallbackOutcome] + def heartbeat_durable_callback(heartbeat_durable_callback_request, opts = {}) + data, _status_code, _headers = heartbeat_durable_callback_with_http_info(heartbeat_durable_callback_request, opts) + data + end + + # Keep a waiting step alive + # Tells the workflow step waiting on the token that the work is still going on, restarting its heartbeat timeout. A heartbeat never extends the step's own timeout, and a step without a heartbeat timeout needs none. + # @param heartbeat_durable_callback_request [HeartbeatDurableCallbackRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(DurableCallbackOutcome, Integer, Hash)>] DurableCallbackOutcome data, response status code and response headers + def heartbeat_durable_callback_with_http_info(heartbeat_durable_callback_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DurableFunctionsApi.heartbeat_durable_callback ...' + end + # verify the required parameter 'heartbeat_durable_callback_request' is set + if @api_client.config.client_side_validation && heartbeat_durable_callback_request.nil? + fail ArgumentError, "Missing the required parameter 'heartbeat_durable_callback_request' when calling DurableFunctionsApi.heartbeat_durable_callback" + end + # resource path + local_var_path = '/durable-callbacks/heartbeat' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(heartbeat_durable_callback_request) + + # return_type + return_type = opts[:debug_return_type] || 'DurableCallbackOutcome' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DurableFunctionsApi.heartbeat_durable_callback", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DurableFunctionsApi#heartbeat_durable_callback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List durable approvals # Lists the approvals durable workflows in the project have requested, newest first. Pending approvals are the ones a workflow is waiting on; decided, expired, and cancelled ones are kept for a year. Project access tokens can list approvals, including read-only ones. # @param id [String] Project ID @@ -1115,7 +1254,7 @@ def list_durable_execution_operations_with_http_info(id, function_id, execution_ return_type = opts[:debug_return_type] || 'DurableExecutionOperationList' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.list_durable_execution_operations", @@ -1205,7 +1344,7 @@ def list_durable_executions_with_http_info(id, function_id, opts = {}) return_type = opts[:debug_return_type] || 'PaginatedDurableExecutions' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.list_durable_executions", @@ -1290,7 +1429,7 @@ def list_durable_function_deployments_with_http_info(id, function_id, opts = {}) return_type = opts[:debug_return_type] || 'PaginatedFunctionDeployments' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.list_durable_function_deployments", @@ -1359,7 +1498,7 @@ def list_durable_function_schedulers_with_http_info(id, function_id, opts = {}) return_type = opts[:debug_return_type] || 'FunctionSchedulerListResponse' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.list_durable_function_schedulers", @@ -1447,7 +1586,7 @@ def list_durable_functions_with_http_info(id, opts = {}) return_type = opts[:debug_return_type] || 'PaginatedDurableFunctions' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.list_durable_functions", @@ -1658,7 +1797,7 @@ def list_durable_messages_with_http_info(id, function_id, execution_id, opts = { # @param function_id [String] Durable function ID, or its name within the project # @param execution_id [String] Durable execution ID # @param [Hash] opts the optional parameters - # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, or a user who did not start the execution, reach it, and a service key scoped to a list without `*` read and stop it. + # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, a service key scoped to a list without `*`, or a user who did not start the execution, reach it. # @option opts [DurableMessageDirection] :direction Return only messages travelling this way. # @option opts [String] :name Return only messages with this name. # @option opts [Integer] :after Return only messages whose `seq` is greater than this. (default to 0) @@ -1674,7 +1813,7 @@ def list_durable_messages_from_application(function_id, execution_id, opts = {}) # @param function_id [String] Durable function ID, or its name within the project # @param execution_id [String] Durable execution ID # @param [Hash] opts the optional parameters - # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, or a user who did not start the execution, reach it, and a service key scoped to a list without `*` read and stop it. + # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, a service key scoped to a list without `*`, or a user who did not start the execution, reach it. # @option opts [DurableMessageDirection] :direction Return only messages travelling this way. # @option opts [String] :name Return only messages with this name. # @option opts [Integer] :after Return only messages whose `seq` is greater than this. (default to 0) @@ -1835,11 +1974,11 @@ def open_durable_message_session_with_http_info(open_durable_message_session_req end # Publish a message from inside a workflow - # Publishes a named message from a running workflow. The Volcano SDK calls this from `ctx.publish`; applications do not call it directly. The message is stored, listed with the execution's messages, and delivered live to clients subscribed to the execution. Live delivery counts against the project's Realtime messages. The SDK sends an `Idempotency-Key` that a rerun of the publishing step repeats, so a step that runs again returns the first message with `200` and publishes nothing. + # Publishes a named message from a running workflow. The Volcano SDK calls this from `ctx.publish`; applications do not call it directly. The message is stored, listed with the execution's messages, and delivered live to clients subscribed to the execution. Live delivery counts against the project's Realtime messages. The SDK sends an `Idempotency-Key` that a rerun of the publishing step repeats, so a step that runs again returns the first message with `200` and stores nothing new. That message is delivered live again, and counts again, because the first run may have stopped before subscribers got it. The SDKs deliver it to a subscriber once. # @param x_volcano_durable_session [String] The session token the workflow received when its session opened. # @param publish_durable_message_request [PublishDurableMessageRequest] # @param [Hash] opts the optional parameters - # @option opts [String] :idempotency_key Makes a send safe to retry. A repeat with a key the same sender has used on the execution returns the first message and sends nothing. Keys of different senders never collide. Up to 255 characters. + # @option opts [String] :idempotency_key Makes a send safe to retry. A repeat with a key the same sender has used on the execution returns the first message and sends nothing. Keys of different senders never collide. Up to 255 printable ASCII characters. # @return [DurableMessage] def publish_durable_message(x_volcano_durable_session, publish_durable_message_request, opts = {}) data, _status_code, _headers = publish_durable_message_with_http_info(x_volcano_durable_session, publish_durable_message_request, opts) @@ -1847,11 +1986,11 @@ def publish_durable_message(x_volcano_durable_session, publish_durable_message_r end # Publish a message from inside a workflow - # Publishes a named message from a running workflow. The Volcano SDK calls this from `ctx.publish`; applications do not call it directly. The message is stored, listed with the execution's messages, and delivered live to clients subscribed to the execution. Live delivery counts against the project's Realtime messages. The SDK sends an `Idempotency-Key` that a rerun of the publishing step repeats, so a step that runs again returns the first message with `200` and publishes nothing. + # Publishes a named message from a running workflow. The Volcano SDK calls this from `ctx.publish`; applications do not call it directly. The message is stored, listed with the execution's messages, and delivered live to clients subscribed to the execution. Live delivery counts against the project's Realtime messages. The SDK sends an `Idempotency-Key` that a rerun of the publishing step repeats, so a step that runs again returns the first message with `200` and stores nothing new. That message is delivered live again, and counts again, because the first run may have stopped before subscribers got it. The SDKs deliver it to a subscriber once. # @param x_volcano_durable_session [String] The session token the workflow received when its session opened. # @param publish_durable_message_request [PublishDurableMessageRequest] # @param [Hash] opts the optional parameters - # @option opts [String] :idempotency_key Makes a send safe to retry. A repeat with a key the same sender has used on the execution returns the first message and sends nothing. Keys of different senders never collide. Up to 255 characters. + # @option opts [String] :idempotency_key Makes a send safe to retry. A repeat with a key the same sender has used on the execution returns the first message and sends nothing. Keys of different senders never collide. Up to 255 printable ASCII characters. # @return [Array<(DurableMessage, Integer, Hash)>] DurableMessage data, response status code and response headers def publish_durable_message_with_http_info(x_volcano_durable_session, publish_durable_message_request, opts = {}) if @api_client.config.debugging @@ -1881,6 +2020,11 @@ def publish_durable_message_with_http_info(x_volcano_durable_session, publish_du fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling DurableFunctionsApi.publish_durable_message, the character length must be greater than or equal to 1.' end + pattern = Regexp.new(/^[ -~]+$/) + if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'] !~ pattern + fail ArgumentError, "invalid value for 'opts[:\"idempotency_key\"]' when calling DurableFunctionsApi.publish_durable_message, must conform to the pattern #{pattern}." + end + # resource path local_var_path = '/durable-messages/publish' @@ -1928,6 +2072,74 @@ def publish_durable_message_with_http_info(x_volcano_durable_session, publish_du return data, status_code, headers end + # Get a callback token from inside a workflow + # Registers a waiting step and returns its callback token. The Volcano SDK calls this from `ctx.waitForCallback`; applications do not call it directly. `execution_ref` and `callback_id` are opaque values the SDK reads from the running workflow. Together they are the request's credential, so the operation takes no other authentication. The token works until the step's own timeout, and only for that step. Retrying is safe: a request for a step that is already registered returns the same token with `200` while the step still waits. Once the token is answered, or the step times out or ends, a retry answers `409` with `callback_closed`. + # @param register_durable_callback_request [RegisterDurableCallbackRequest] + # @param [Hash] opts the optional parameters + # @return [DurableCallbackRegistration] + def register_durable_callback(register_durable_callback_request, opts = {}) + data, _status_code, _headers = register_durable_callback_with_http_info(register_durable_callback_request, opts) + data + end + + # Get a callback token from inside a workflow + # Registers a waiting step and returns its callback token. The Volcano SDK calls this from `ctx.waitForCallback`; applications do not call it directly. `execution_ref` and `callback_id` are opaque values the SDK reads from the running workflow. Together they are the request's credential, so the operation takes no other authentication. The token works until the step's own timeout, and only for that step. Retrying is safe: a request for a step that is already registered returns the same token with `200` while the step still waits. Once the token is answered, or the step times out or ends, a retry answers `409` with `callback_closed`. + # @param register_durable_callback_request [RegisterDurableCallbackRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(DurableCallbackRegistration, Integer, Hash)>] DurableCallbackRegistration data, response status code and response headers + def register_durable_callback_with_http_info(register_durable_callback_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DurableFunctionsApi.register_durable_callback ...' + end + # verify the required parameter 'register_durable_callback_request' is set + if @api_client.config.client_side_validation && register_durable_callback_request.nil? + fail ArgumentError, "Missing the required parameter 'register_durable_callback_request' when calling DurableFunctionsApi.register_durable_callback" + end + # resource path + local_var_path = '/durable-callbacks' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(register_durable_callback_request) + + # return_type + return_type = opts[:debug_return_type] || 'DurableCallbackRegistration' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DurableFunctionsApi.register_durable_callback", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DurableFunctionsApi#register_durable_callback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Wait for a message from inside a workflow # Registers a wait for a named message. The Volcano SDK calls this from `ctx.waitForMessage`; applications do not call it directly. `execution_ref` and `callback_id` are opaque values the SDK reads from the running workflow. Together they are the request's credential, so the operation takes no other authentication. When a message for the name is already queued, the wait takes the oldest one at once. Retrying is safe: a request for a wait that is already registered returns it with `200`. # @param register_durable_message_wait_request [RegisterDurableMessageWaitRequest] @@ -2071,7 +2283,7 @@ def request_durable_approval_with_http_info(request_durable_approval_request, op # @param execution_id [String] Durable execution ID # @param send_durable_message_request [SendDurableMessageRequest] # @param [Hash] opts the optional parameters - # @option opts [String] :idempotency_key Makes a send safe to retry. A repeat with a key the same sender has used on the execution returns the first message and sends nothing. Keys of different senders never collide. Up to 255 characters. + # @option opts [String] :idempotency_key Makes a send safe to retry. A repeat with a key the same sender has used on the execution returns the first message and sends nothing. Keys of different senders never collide. Up to 255 printable ASCII characters. # @return [DurableMessage] def send_durable_message(id, function_id, execution_id, send_durable_message_request, opts = {}) data, _status_code, _headers = send_durable_message_with_http_info(id, function_id, execution_id, send_durable_message_request, opts) @@ -2085,7 +2297,7 @@ def send_durable_message(id, function_id, execution_id, send_durable_message_req # @param execution_id [String] Durable execution ID # @param send_durable_message_request [SendDurableMessageRequest] # @param [Hash] opts the optional parameters - # @option opts [String] :idempotency_key Makes a send safe to retry. A repeat with a key the same sender has used on the execution returns the first message and sends nothing. Keys of different senders never collide. Up to 255 characters. + # @option opts [String] :idempotency_key Makes a send safe to retry. A repeat with a key the same sender has used on the execution returns the first message and sends nothing. Keys of different senders never collide. Up to 255 printable ASCII characters. # @return [Array<(DurableMessage, Integer, Hash)>] DurableMessage data, response status code and response headers def send_durable_message_with_http_info(id, function_id, execution_id, send_durable_message_request, opts = {}) if @api_client.config.debugging @@ -2115,6 +2327,11 @@ def send_durable_message_with_http_info(id, function_id, execution_id, send_dura fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling DurableFunctionsApi.send_durable_message, the character length must be greater than or equal to 1.' end + pattern = Regexp.new(/^[ -~]+$/) + if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'] !~ pattern + fail ArgumentError, "invalid value for 'opts[:\"idempotency_key\"]' when calling DurableFunctionsApi.send_durable_message, must conform to the pattern #{pattern}." + end + # resource path local_var_path = '/projects/{id}/durable-functions/{functionId}/executions/{executionId}/messages'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)).sub('{' + 'executionId' + '}', CGI.escape(execution_id.to_s)) @@ -2162,13 +2379,13 @@ def send_durable_message_with_http_info(id, function_id, execution_id, send_dura end # Send a message to a durable execution from an application - # Sends a named message to a running execution. The workflow receives it from `ctx.waitForMessage` with the same name. A message sent before anything waits for its name is kept, and each wait takes the oldest one, so messages arrive in the order they were sent. Messages never decide an approval: a workflow waiting in `ctx.waitForApproval` is not resumed by one. **With a service key:** any execution in the project. **With an auth user token:** an execution the user started, or one whose `X-Volcano-Client-Token` the request carries, of a durable function whose `visibility` is `authenticated` or `public`. **With an anon key:** an execution whose `X-Volcano-Client-Token` the request carries, of a function with `visibility: public`. Any other execution answers `404`, as a missing one does. Send `Idempotency-Key` to make a retry safe: a repeat with a key the same sender has used on the execution returns the first message with `200` and sends nothing. + # Sends a named message to a running execution. The workflow receives it from `ctx.waitForMessage` with the same name. A message sent before anything waits for its name is kept, and each wait takes the oldest one, so messages arrive in the order they were sent. Messages never decide an approval: a workflow waiting in `ctx.waitForApproval` is not resumed by one. **With a service key:** any execution in the project when the key holds `*`, the default. A key scoped to a list without `*`, such as `[\"functions.invoke\"]`, reaches an execution whose `X-Volcano-Client-Token` the request carries, as an anon key does; the start returns that token. **With an auth user token:** an execution the user started, or one whose `X-Volcano-Client-Token` the request carries, of a durable function whose `visibility` is `authenticated` or `public`. **With an anon key:** an execution whose `X-Volcano-Client-Token` the request carries, of a function with `visibility: public`. Any other execution answers `404`, as a missing one does. Send `Idempotency-Key` to make a retry safe: a repeat with a key the same sender has used on the execution returns the first message with `200` and sends nothing. # @param function_id [String] Durable function ID, or its name within the project # @param execution_id [String] Durable execution ID # @param send_durable_message_request [SendDurableMessageRequest] # @param [Hash] opts the optional parameters - # @option opts [String] :idempotency_key Makes a send safe to retry. A repeat with a key the same sender has used on the execution returns the first message and sends nothing. Keys of different senders never collide. Up to 255 characters. - # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, or a user who did not start the execution, reach it, and a service key scoped to a list without `*` read and stop it. + # @option opts [String] :idempotency_key Makes a send safe to retry. A repeat with a key the same sender has used on the execution returns the first message and sends nothing. Keys of different senders never collide. Up to 255 printable ASCII characters. + # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, a service key scoped to a list without `*`, or a user who did not start the execution, reach it. # @return [DurableMessage] def send_durable_message_from_application(function_id, execution_id, send_durable_message_request, opts = {}) data, _status_code, _headers = send_durable_message_from_application_with_http_info(function_id, execution_id, send_durable_message_request, opts) @@ -2176,13 +2393,13 @@ def send_durable_message_from_application(function_id, execution_id, send_durabl end # Send a message to a durable execution from an application - # Sends a named message to a running execution. The workflow receives it from `ctx.waitForMessage` with the same name. A message sent before anything waits for its name is kept, and each wait takes the oldest one, so messages arrive in the order they were sent. Messages never decide an approval: a workflow waiting in `ctx.waitForApproval` is not resumed by one. **With a service key:** any execution in the project. **With an auth user token:** an execution the user started, or one whose `X-Volcano-Client-Token` the request carries, of a durable function whose `visibility` is `authenticated` or `public`. **With an anon key:** an execution whose `X-Volcano-Client-Token` the request carries, of a function with `visibility: public`. Any other execution answers `404`, as a missing one does. Send `Idempotency-Key` to make a retry safe: a repeat with a key the same sender has used on the execution returns the first message with `200` and sends nothing. + # Sends a named message to a running execution. The workflow receives it from `ctx.waitForMessage` with the same name. A message sent before anything waits for its name is kept, and each wait takes the oldest one, so messages arrive in the order they were sent. Messages never decide an approval: a workflow waiting in `ctx.waitForApproval` is not resumed by one. **With a service key:** any execution in the project when the key holds `*`, the default. A key scoped to a list without `*`, such as `[\"functions.invoke\"]`, reaches an execution whose `X-Volcano-Client-Token` the request carries, as an anon key does; the start returns that token. **With an auth user token:** an execution the user started, or one whose `X-Volcano-Client-Token` the request carries, of a durable function whose `visibility` is `authenticated` or `public`. **With an anon key:** an execution whose `X-Volcano-Client-Token` the request carries, of a function with `visibility: public`. Any other execution answers `404`, as a missing one does. Send `Idempotency-Key` to make a retry safe: a repeat with a key the same sender has used on the execution returns the first message with `200` and sends nothing. # @param function_id [String] Durable function ID, or its name within the project # @param execution_id [String] Durable execution ID # @param send_durable_message_request [SendDurableMessageRequest] # @param [Hash] opts the optional parameters - # @option opts [String] :idempotency_key Makes a send safe to retry. A repeat with a key the same sender has used on the execution returns the first message and sends nothing. Keys of different senders never collide. Up to 255 characters. - # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, or a user who did not start the execution, reach it, and a service key scoped to a list without `*` read and stop it. + # @option opts [String] :idempotency_key Makes a send safe to retry. A repeat with a key the same sender has used on the execution returns the first message and sends nothing. Keys of different senders never collide. Up to 255 printable ASCII characters. + # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, a service key scoped to a list without `*`, or a user who did not start the execution, reach it. # @return [Array<(DurableMessage, Integer, Hash)>] DurableMessage data, response status code and response headers def send_durable_message_from_application_with_http_info(function_id, execution_id, send_durable_message_request, opts = {}) if @api_client.config.debugging @@ -2208,6 +2425,11 @@ def send_durable_message_from_application_with_http_info(function_id, execution_ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling DurableFunctionsApi.send_durable_message_from_application, the character length must be greater than or equal to 1.' end + pattern = Regexp.new(/^[ -~]+$/) + if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'] !~ pattern + fail ArgumentError, "invalid value for 'opts[:\"idempotency_key\"]' when calling DurableFunctionsApi.send_durable_message_from_application, must conform to the pattern #{pattern}." + end + if @api_client.config.client_side_validation && !opts[:'x_volcano_client_token'].nil? && opts[:'x_volcano_client_token'].to_s.length > 128 fail ArgumentError, 'invalid value for "opts[:"x_volcano_client_token"]" when calling DurableFunctionsApi.send_durable_message_from_application, the character length must be smaller than or equal to 128.' end @@ -2328,7 +2550,7 @@ def start_durable_execution_with_http_info(id, function_id, opts = {}) return_type = opts[:debug_return_type] || 'DurableExecution' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.start_durable_execution", @@ -2348,7 +2570,7 @@ def start_durable_execution_with_http_info(id, function_id, opts = {}) end # Start a durable execution from an application - # Starts an execution of a durable function using an application credential, and returns its handle. This is the durable counterpart of `POST /functions/{functionId}/invoke`, and it is the endpoint an application calls. Like that one, it is not project-scoped: an anon key, a service key and an auth user token each carry their own project. The project-scoped collection under `/projects/{id}/durable-functions/...` remains the owner's management surface. **With a service key:** any durable function in the project. **With an auth user token:** a durable function whose `visibility` is `authenticated` or `public`. **With an anon key:** requires the `functions.invoke` permission, and the function must have `visibility: public`. A `private` durable function answers every credential but a service key exactly as a missing one, with 404. The start returns a `client_token`. An anon key, or a user who did not start the execution, sends it as `X-Volcano-Client-Token` to read the execution, stop it, and reach its messages. A service key scoped to a list without `*` sends it to read and stop the execution. An anon key is shared by everyone who loads the page, so the id alone never reaches an execution. Listing executions takes the project owner's token or a project access token. Send `X-Volcano-Execution-Name` to make the start idempotent: repeating a start with the same name returns the existing execution instead of beginning a second one. Each execution counts once against the project's durable execution allowance, however many times the start is retried under the same execution name, and the number in flight at once is capped by the plan. The operations the execution performs are counted against the durable operations allowance when it finishes. + # Starts an execution of a durable function using an application credential, and returns its handle. This is the durable counterpart of `POST /functions/{functionId}/invoke`, and it is the endpoint an application calls. Like that one, it is not project-scoped: an anon key, a service key and an auth user token each carry their own project. The project-scoped collection under `/projects/{id}/durable-functions/...` remains the owner's management surface. **With a service key:** any durable function in the project. **With an auth user token:** a durable function whose `visibility` is `authenticated` or `public`. **With an anon key:** requires the `functions.invoke` permission, and the function must have `visibility: public`. A `private` durable function answers every credential but a service key exactly as a missing one, with 404. The start returns a `client_token`. An anon key, a service key scoped to a list without `*`, or a user who did not start the execution, sends it as `X-Volcano-Client-Token` to read the execution, stop it, and reach its messages. An anon key is shared by everyone who loads the page, so the id alone never reaches an execution. Listing executions takes the project owner's token or a project access token. Send `X-Volcano-Execution-Name` to make the start idempotent: repeating a start with the same name returns the existing execution instead of beginning a second one. Each execution counts once against the project's durable execution allowance, however many times the start is retried under the same execution name, and the number in flight at once is capped by the plan. The operations the execution performs are counted against the durable operations allowance when it finishes. # @param function_id [String] Durable function ID, or its name within the project # @param [Hash] opts the optional parameters # @option opts [String] :x_volcano_execution_name Idempotency key for this execution. Generated when omitted. A repeat under a name that already names a running execution returns that execution and is not charged again. Letters, digits, `-`, `_` and `.`, up to 255 characters. Anything else is rejected with `400`. @@ -2360,7 +2582,7 @@ def start_durable_execution_from_application(function_id, opts = {}) end # Start a durable execution from an application - # Starts an execution of a durable function using an application credential, and returns its handle. This is the durable counterpart of `POST /functions/{functionId}/invoke`, and it is the endpoint an application calls. Like that one, it is not project-scoped: an anon key, a service key and an auth user token each carry their own project. The project-scoped collection under `/projects/{id}/durable-functions/...` remains the owner's management surface. **With a service key:** any durable function in the project. **With an auth user token:** a durable function whose `visibility` is `authenticated` or `public`. **With an anon key:** requires the `functions.invoke` permission, and the function must have `visibility: public`. A `private` durable function answers every credential but a service key exactly as a missing one, with 404. The start returns a `client_token`. An anon key, or a user who did not start the execution, sends it as `X-Volcano-Client-Token` to read the execution, stop it, and reach its messages. A service key scoped to a list without `*` sends it to read and stop the execution. An anon key is shared by everyone who loads the page, so the id alone never reaches an execution. Listing executions takes the project owner's token or a project access token. Send `X-Volcano-Execution-Name` to make the start idempotent: repeating a start with the same name returns the existing execution instead of beginning a second one. Each execution counts once against the project's durable execution allowance, however many times the start is retried under the same execution name, and the number in flight at once is capped by the plan. The operations the execution performs are counted against the durable operations allowance when it finishes. + # Starts an execution of a durable function using an application credential, and returns its handle. This is the durable counterpart of `POST /functions/{functionId}/invoke`, and it is the endpoint an application calls. Like that one, it is not project-scoped: an anon key, a service key and an auth user token each carry their own project. The project-scoped collection under `/projects/{id}/durable-functions/...` remains the owner's management surface. **With a service key:** any durable function in the project. **With an auth user token:** a durable function whose `visibility` is `authenticated` or `public`. **With an anon key:** requires the `functions.invoke` permission, and the function must have `visibility: public`. A `private` durable function answers every credential but a service key exactly as a missing one, with 404. The start returns a `client_token`. An anon key, a service key scoped to a list without `*`, or a user who did not start the execution, sends it as `X-Volcano-Client-Token` to read the execution, stop it, and reach its messages. An anon key is shared by everyone who loads the page, so the id alone never reaches an execution. Listing executions takes the project owner's token or a project access token. Send `X-Volcano-Execution-Name` to make the start idempotent: repeating a start with the same name returns the existing execution instead of beginning a second one. Each execution counts once against the project's durable execution allowance, however many times the start is retried under the same execution name, and the number in flight at once is capped by the plan. The operations the execution performs are counted against the durable operations allowance when it finishes. # @param function_id [String] Durable function ID, or its name within the project # @param [Hash] opts the optional parameters # @option opts [String] :x_volcano_execution_name Idempotency key for this execution. Generated when omitted. A repeat under a name that already names a running execution returns that execution and is not charged again. Letters, digits, `-`, `_` and `.`, up to 255 characters. Anything else is rejected with `400`. @@ -2485,7 +2707,7 @@ def stop_durable_execution_with_http_info(id, function_id, execution_id, opts = return_type = opts[:debug_return_type] || 'DurableExecution' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.stop_durable_execution", @@ -2509,7 +2731,7 @@ def stop_durable_execution_with_http_info(id, function_id, execution_id, opts = # @param function_id [String] Durable function ID, or its name within the project # @param execution_id [String] Durable execution ID # @param [Hash] opts the optional parameters - # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, or a user who did not start the execution, reach it, and a service key scoped to a list without `*` read and stop it. + # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, a service key scoped to a list without `*`, or a user who did not start the execution, reach it. # @return [DurableExecution] def stop_durable_execution_from_application(function_id, execution_id, opts = {}) data, _status_code, _headers = stop_durable_execution_from_application_with_http_info(function_id, execution_id, opts) @@ -2521,7 +2743,7 @@ def stop_durable_execution_from_application(function_id, execution_id, opts = {} # @param function_id [String] Durable function ID, or its name within the project # @param execution_id [String] Durable execution ID # @param [Hash] opts the optional parameters - # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, or a user who did not start the execution, reach it, and a service key scoped to a list without `*` read and stop it. + # @option opts [String] :x_volcano_client_token The `client_token` the execution's start returned. Lets an anon key, a service key scoped to a list without `*`, or a user who did not start the execution, reach it. # @return [Array<(DurableExecution, Integer, Hash)>] DurableExecution data, response status code and response headers def stop_durable_execution_from_application_with_http_info(function_id, execution_id, opts = {}) if @api_client.config.debugging @@ -2580,6 +2802,74 @@ def stop_durable_execution_from_application_with_http_info(function_id, executio return data, status_code, headers end + # Complete a waiting step with a result + # Resumes the workflow step waiting on the token with `result`. Call it from the system the workflow handed the token to. The token is the only credential. A token takes one outcome: once it has succeeded or failed, every later request is refused with `409 callback_completed`, including a retry of the request that succeeded it. + # @param succeed_durable_callback_request [SucceedDurableCallbackRequest] + # @param [Hash] opts the optional parameters + # @return [DurableCallbackOutcome] + def succeed_durable_callback(succeed_durable_callback_request, opts = {}) + data, _status_code, _headers = succeed_durable_callback_with_http_info(succeed_durable_callback_request, opts) + data + end + + # Complete a waiting step with a result + # Resumes the workflow step waiting on the token with `result`. Call it from the system the workflow handed the token to. The token is the only credential. A token takes one outcome: once it has succeeded or failed, every later request is refused with `409 callback_completed`, including a retry of the request that succeeded it. + # @param succeed_durable_callback_request [SucceedDurableCallbackRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(DurableCallbackOutcome, Integer, Hash)>] DurableCallbackOutcome data, response status code and response headers + def succeed_durable_callback_with_http_info(succeed_durable_callback_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DurableFunctionsApi.succeed_durable_callback ...' + end + # verify the required parameter 'succeed_durable_callback_request' is set + if @api_client.config.client_side_validation && succeed_durable_callback_request.nil? + fail ArgumentError, "Missing the required parameter 'succeed_durable_callback_request' when calling DurableFunctionsApi.succeed_durable_callback" + end + # resource path + local_var_path = '/durable-callbacks/succeed' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(succeed_durable_callback_request) + + # return_type + return_type = opts[:debug_return_type] || 'DurableCallbackOutcome' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DurableFunctionsApi.succeed_durable_callback", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DurableFunctionsApi#succeed_durable_callback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update a durable function scheduler # @param id [String] Project ID # @param function_id [String] Durable function ID, or its name within the project @@ -2645,7 +2935,7 @@ def update_durable_function_scheduler_with_http_info(id, function_id, scheduler_ return_type = opts[:debug_return_type] || 'FunctionScheduler' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( :operation => :"DurableFunctionsApi.update_durable_function_scheduler", diff --git a/lib/volcano/generated/lib/volcano-generated/api/forks_api.rb b/lib/volcano/generated/lib/volcano-generated/api/forks_api.rb new file mode 100644 index 00000000..6fcc3eb5 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/api/forks_api.rb @@ -0,0 +1,106 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'cgi' + +module Volcano::Generated + class ForksApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Fork a share into a project of your own + # Creates a project in the caller's account from the release a share offers, and queues its install: the release's functions and frontends, never the owner's data, variable values, keys or sign-in settings. Every variable the release declares is created; one the visitor gives no value for is created empty. Installation is asynchronous: poll the project until `template_installation.status` is `ready`. A `201` without `template_installation` means nothing is being installed. The fork is checked against what the release recorded when it was published (its functions, frontends and variables, and the plan's room for them); the release's archive is read and checked by the install. A stored archive that fails those checks fails the install with `failure_code` `source_invalid` rather than refusing the request. Send the `release_id` that `GET /share-previews/{share_id}` returned. If the share moved to a new release since, nothing is created and the answer is `409` with code `release_changed`. + # @param fork_create_request [ForkCreateRequest] + # @param [Hash] opts the optional parameters + # @option opts [String] :idempotency_key Makes a fork safe to retry. A repeat with the same key from the same account answers `201` with the project the first request created, without confirming, counting or creating anything again. Reusing a key for a different request (another name, share, release or set of variable names with a value) answers `409` with code `idempotency_key_reused`. Variable values are not compared. The key is kept as long as the project exists. + # @return [Project] + def create_fork(fork_create_request, opts = {}) + data, _status_code, _headers = create_fork_with_http_info(fork_create_request, opts) + data + end + + # Fork a share into a project of your own + # Creates a project in the caller's account from the release a share offers, and queues its install: the release's functions and frontends, never the owner's data, variable values, keys or sign-in settings. Every variable the release declares is created; one the visitor gives no value for is created empty. Installation is asynchronous: poll the project until `template_installation.status` is `ready`. A `201` without `template_installation` means nothing is being installed. The fork is checked against what the release recorded when it was published (its functions, frontends and variables, and the plan's room for them); the release's archive is read and checked by the install. A stored archive that fails those checks fails the install with `failure_code` `source_invalid` rather than refusing the request. Send the `release_id` that `GET /share-previews/{share_id}` returned. If the share moved to a new release since, nothing is created and the answer is `409` with code `release_changed`. + # @param fork_create_request [ForkCreateRequest] + # @param [Hash] opts the optional parameters + # @option opts [String] :idempotency_key Makes a fork safe to retry. A repeat with the same key from the same account answers `201` with the project the first request created, without confirming, counting or creating anything again. Reusing a key for a different request (another name, share, release or set of variable names with a value) answers `409` with code `idempotency_key_reused`. Variable values are not compared. The key is kept as long as the project exists. + # @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers + def create_fork_with_http_info(fork_create_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ForksApi.create_fork ...' + end + # verify the required parameter 'fork_create_request' is set + if @api_client.config.client_side_validation && fork_create_request.nil? + fail ArgumentError, "Missing the required parameter 'fork_create_request' when calling ForksApi.create_fork" + end + if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255 + fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ForksApi.create_fork, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ForksApi.create_fork, the character length must be greater than or equal to 1.' + end + + pattern = Regexp.new(/^[!-~]+$/) + if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'] !~ pattern + fail ArgumentError, "invalid value for 'opts[:\"idempotency_key\"]' when calling ForksApi.create_fork, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/forks' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(fork_create_request) + + # return_type + return_type = opts[:debug_return_type] || 'Project' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken'] + + new_options = opts.merge( + :operation => :"ForksApi.create_fork", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ForksApi#create_fork\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb b/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb index c0d1f095..2b5c5db3 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -20,7 +20,7 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end # Create a new frontend deployment - # Creates and deploys a frontend for the project. If a frontend with the same name already exists in the project, this operation updates that frontend using the uploaded archive and starts a new deployment. A deployment that starts immediately returns `status: provisioning`, then transitions to `active`, `degraded`, or `failed`. If another deployment is running, the response preserves the frontend's current status and exposes the queued deployment through `pending_deployment_id`. Existing frontend traffic continues to use an available runtime while the new deployment builds and provisions. Each deployment publishes its own static assets before the runtimes switch to its build, and the live build's assets keep serving until the new deployment is live, so a page loaded mid-deployment resolves its assets whichever build served it. A failed redeploy puts the runtimes back on the build they were running, leaves the frontend `active` on the previous deployment, and records the attempted deployment as failed. `degraded` means the runtime remains available but edge synchronization requires recovery; Volcano retries the edge step without rebuilding. Only one deployment may run for a given frontend, while independent frontends and projects can deploy concurrently. For monorepos, provide `app_root` as a relative path from the uploaded archive root to the Next.js app that should be built. Omit it for single-app archives. Supported frontend environments are Next.js 15.x and 16.x with Node.js 22.x or 24.x. The Node.js runtime is inferred from `package.json` `engines.node`; if omitted, Volcano uses Node.js 22.x. The selected Node.js family must also satisfy the installed Next.js package's `engines.node` constraint. Volcano tests Next 15.5.27 (`^18.18.0 || ^19.8.0 || >=20.0.0`) and Next 16.4.0 (`>=20.9.0`). Source archive size is enforced by the API with `SOURCE_ARCHIVE_SIZE_LIMIT_MB`; the CLI does not apply its own source archive size limit. After the final container images are built, the publish build enforces `LAMBDA_TARGET_CONTAINER_SIZE_LIMIT_MB` before pushing. This operation is limited by plan-based frontend deployment quotas (`FREE_FRONTEND_DEPLOYMENTS`, `PRO_FRONTEND_DEPLOYMENTS`). Each project can contain up to 10,000 frontends regardless of plan. + # Creates and deploys a frontend for the project. If a frontend with the same name already exists in the project, this operation updates that frontend using the uploaded archive and starts a new deployment. A deployment that starts immediately returns `status: provisioning`, then transitions to `active`, `degraded`, or `failed`. If another deployment is running, the response preserves the frontend's current status and exposes the queued deployment through `pending_deployment_id`. Existing frontend traffic continues to use an available runtime while the new deployment builds and provisions. Each deployment publishes its own static assets before the runtimes switch to its build, and the live build's assets keep serving until the new deployment is live, so a page loaded mid-deployment resolves its assets whichever build served it. A failed redeploy puts the runtimes back on the build they were running, leaves the frontend `active` on the previous deployment, and records the attempted deployment as failed. `degraded` means the runtime remains available but edge synchronization requires recovery; Volcano retries the edge step without rebuilding. Only one deployment may run for a given frontend, while independent frontends and projects can deploy concurrently. For monorepos, provide `app_root` as a relative path from the uploaded archive root to the Next.js app that should be built. Omit it for single-app archives. Supported frontend environments are Next.js 15.x and 16.x with Node.js 22.x or 24.x. The Node.js runtime is inferred from `package.json` `engines.node`; if omitted, Volcano uses Node.js 22.x. The selected Node.js family must also satisfy the installed Next.js package's `engines.node` constraint. Volcano tests Next 15.5.29 (`^18.18.0 || ^19.8.0 || >=20.0.0`) and Next 16.4.5 (`>=20.9.0`). Source archive size is enforced by the API with `SOURCE_ARCHIVE_SIZE_LIMIT_MB`; the CLI does not apply its own source archive size limit. After the final container images are built, the publish build enforces `LAMBDA_TARGET_CONTAINER_SIZE_LIMIT_MB` before pushing. Plans do not limit how many frontends a project has; usage allowances apply across all of a user's frontends. Each project can contain up to 10,000 frontends regardless of plan. # @param id [String] Project ID # @param name [String] DNS-safe frontend name # @param archive [File] ZIP or tar.gz archive of the frontend project directory or monorepo workspace root. The API enforces SOURCE_ARCHIVE_SIZE_LIMIT_MB and stores a normalized tar.gz archive. @@ -29,6 +29,7 @@ def initialize(api_client = ApiClient.default) # @option opts [String] :app_root Optional relative POSIX path from the uploaded archive root to the Next.js app to build, for example `apps/web`. # @option opts [String] :variable_scope Variable selection for this deployment. New frontends default to `scoped`; omitting this field for an existing frontend preserves its current selection. # @option opts [Array] :variables Project variable names selected when `variable_scope` is `scoped`. Submit each name as a repeated multipart field. + # @option opts [String] :commit JSON-encoded commit the uploaded source came from: `{\\\"repository\\\": \\\"acme/app\\\", \\\"sha\\\": \\\"<40-character commit ID>\\\", \\\"dirty\\\": false, \\\"root\\\": \\\"apps/web\\\"}`. `repository` is `owner/name` or a github.com remote URL (`https://github.com/acme/app.git`, `git@github.com:acme/app.git`, or `ssh://git@github.com/acme/app.git`); Volcano drops any credentials in the URL and records `owner/name`. `dirty` is `true` when the uploaded files differ from the commit. `root` is the uploaded directory's path from the repository root, `\\\"\\\"` for the root itself. `repository`, `sha`, and `dirty` are required, and fields Volcano does not know are ignored. An empty value, `null`, or `\\\"\\\"` reports no commit. A malformed commit, or a repository not on GitHub, returns 400 before anything is deployed. Volcano checks the commit against the project's connected repository and each uploaded file against the commit's file at `root`, and returns the result in the deployment's `commit.verified`; an uploaded file in the project's root directory that the commit does not hold sets `commit.dirty`, and one outside it leaves the commit unverified. A commit it cannot verify is still recorded and never fails the deploy. # @return [Frontend] def create_frontend(id, name, archive, opts = {}) data, _status_code, _headers = create_frontend_with_http_info(id, name, archive, opts) @@ -36,7 +37,7 @@ def create_frontend(id, name, archive, opts = {}) end # Create a new frontend deployment - # Creates and deploys a frontend for the project. If a frontend with the same name already exists in the project, this operation updates that frontend using the uploaded archive and starts a new deployment. A deployment that starts immediately returns `status: provisioning`, then transitions to `active`, `degraded`, or `failed`. If another deployment is running, the response preserves the frontend's current status and exposes the queued deployment through `pending_deployment_id`. Existing frontend traffic continues to use an available runtime while the new deployment builds and provisions. Each deployment publishes its own static assets before the runtimes switch to its build, and the live build's assets keep serving until the new deployment is live, so a page loaded mid-deployment resolves its assets whichever build served it. A failed redeploy puts the runtimes back on the build they were running, leaves the frontend `active` on the previous deployment, and records the attempted deployment as failed. `degraded` means the runtime remains available but edge synchronization requires recovery; Volcano retries the edge step without rebuilding. Only one deployment may run for a given frontend, while independent frontends and projects can deploy concurrently. For monorepos, provide `app_root` as a relative path from the uploaded archive root to the Next.js app that should be built. Omit it for single-app archives. Supported frontend environments are Next.js 15.x and 16.x with Node.js 22.x or 24.x. The Node.js runtime is inferred from `package.json` `engines.node`; if omitted, Volcano uses Node.js 22.x. The selected Node.js family must also satisfy the installed Next.js package's `engines.node` constraint. Volcano tests Next 15.5.27 (`^18.18.0 || ^19.8.0 || >=20.0.0`) and Next 16.4.0 (`>=20.9.0`). Source archive size is enforced by the API with `SOURCE_ARCHIVE_SIZE_LIMIT_MB`; the CLI does not apply its own source archive size limit. After the final container images are built, the publish build enforces `LAMBDA_TARGET_CONTAINER_SIZE_LIMIT_MB` before pushing. This operation is limited by plan-based frontend deployment quotas (`FREE_FRONTEND_DEPLOYMENTS`, `PRO_FRONTEND_DEPLOYMENTS`). Each project can contain up to 10,000 frontends regardless of plan. + # Creates and deploys a frontend for the project. If a frontend with the same name already exists in the project, this operation updates that frontend using the uploaded archive and starts a new deployment. A deployment that starts immediately returns `status: provisioning`, then transitions to `active`, `degraded`, or `failed`. If another deployment is running, the response preserves the frontend's current status and exposes the queued deployment through `pending_deployment_id`. Existing frontend traffic continues to use an available runtime while the new deployment builds and provisions. Each deployment publishes its own static assets before the runtimes switch to its build, and the live build's assets keep serving until the new deployment is live, so a page loaded mid-deployment resolves its assets whichever build served it. A failed redeploy puts the runtimes back on the build they were running, leaves the frontend `active` on the previous deployment, and records the attempted deployment as failed. `degraded` means the runtime remains available but edge synchronization requires recovery; Volcano retries the edge step without rebuilding. Only one deployment may run for a given frontend, while independent frontends and projects can deploy concurrently. For monorepos, provide `app_root` as a relative path from the uploaded archive root to the Next.js app that should be built. Omit it for single-app archives. Supported frontend environments are Next.js 15.x and 16.x with Node.js 22.x or 24.x. The Node.js runtime is inferred from `package.json` `engines.node`; if omitted, Volcano uses Node.js 22.x. The selected Node.js family must also satisfy the installed Next.js package's `engines.node` constraint. Volcano tests Next 15.5.29 (`^18.18.0 || ^19.8.0 || >=20.0.0`) and Next 16.4.5 (`>=20.9.0`). Source archive size is enforced by the API with `SOURCE_ARCHIVE_SIZE_LIMIT_MB`; the CLI does not apply its own source archive size limit. After the final container images are built, the publish build enforces `LAMBDA_TARGET_CONTAINER_SIZE_LIMIT_MB` before pushing. Plans do not limit how many frontends a project has; usage allowances apply across all of a user's frontends. Each project can contain up to 10,000 frontends regardless of plan. # @param id [String] Project ID # @param name [String] DNS-safe frontend name # @param archive [File] ZIP or tar.gz archive of the frontend project directory or monorepo workspace root. The API enforces SOURCE_ARCHIVE_SIZE_LIMIT_MB and stores a normalized tar.gz archive. @@ -45,6 +46,7 @@ def create_frontend(id, name, archive, opts = {}) # @option opts [String] :app_root Optional relative POSIX path from the uploaded archive root to the Next.js app to build, for example `apps/web`. # @option opts [String] :variable_scope Variable selection for this deployment. New frontends default to `scoped`; omitting this field for an existing frontend preserves its current selection. # @option opts [Array] :variables Project variable names selected when `variable_scope` is `scoped`. Submit each name as a repeated multipart field. + # @option opts [String] :commit JSON-encoded commit the uploaded source came from: `{\\\"repository\\\": \\\"acme/app\\\", \\\"sha\\\": \\\"<40-character commit ID>\\\", \\\"dirty\\\": false, \\\"root\\\": \\\"apps/web\\\"}`. `repository` is `owner/name` or a github.com remote URL (`https://github.com/acme/app.git`, `git@github.com:acme/app.git`, or `ssh://git@github.com/acme/app.git`); Volcano drops any credentials in the URL and records `owner/name`. `dirty` is `true` when the uploaded files differ from the commit. `root` is the uploaded directory's path from the repository root, `\\\"\\\"` for the root itself. `repository`, `sha`, and `dirty` are required, and fields Volcano does not know are ignored. An empty value, `null`, or `\\\"\\\"` reports no commit. A malformed commit, or a repository not on GitHub, returns 400 before anything is deployed. Volcano checks the commit against the project's connected repository and each uploaded file against the commit's file at `root`, and returns the result in the deployment's `commit.verified`; an uploaded file in the project's root directory that the commit does not hold sets `commit.dirty`, and one outside it leaves the commit unverified. A commit it cannot verify is still recorded and never fails the deploy. # @return [Array<(Frontend, Integer, Hash)>] Frontend data, response status code and response headers def create_frontend_with_http_info(id, name, archive, opts = {}) if @api_client.config.debugging @@ -107,6 +109,7 @@ def create_frontend_with_http_info(id, name, archive, opts = {}) form_params['app_root'] = opts[:'app_root'] if !opts[:'app_root'].nil? form_params['variable_scope'] = opts[:'variable_scope'] if !opts[:'variable_scope'].nil? form_params['variables'] = @api_client.build_collection_param(opts[:'variables'], :csv) if !opts[:'variables'].nil? + form_params['commit'] = opts[:'commit'] if !opts[:'commit'].nil? # http body (model) post_body = opts[:debug_body] @@ -134,8 +137,115 @@ def create_frontend_with_http_info(id, name, archive, opts = {}) return data, status_code, headers end + # Create a frontend Candidate + # Builds a copy of the frontend from the uploaded archive, with the frontend's own variable selection, and deploys it to one region: the first region the frontend deploys to, or the project's first region by name if it has not deployed yet. The Candidate is served at its own URL, so it can be checked without changing what the frontend serves. The URL is reachable by anyone who holds it and is not indexed; a Candidate is never public and does not claim to be private. The response is `202` while the first deployment runs; read the Candidate for its `status` and `url`. Creating a Candidate is available while the `frontends.candidates` capability is. While it is not, this operation, redeploying, promoting and rolling back to a Candidate answer `404` with code `feature_unavailable`; reading and deleting existing Candidates, and rolling back to the frontend's own runtime, keep working. A Candidate builds like any deploy and spends the project's build minutes. A frontend has at most 20 live Candidates, and each name is unique within the frontend. Without `ttl_seconds` a Candidate is kept until it is deleted. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param name [String] Names the Candidate within the frontend. Cannot be `production`. + # @param archive [File] ZIP or tar.gz archive of the frontend project, as for creating a frontend. The API enforces SOURCE_ARCHIVE_SIZE_LIMIT_MB. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :ttl_seconds Deletes the Candidate this many seconds after it is created, at most 30 days. Omit to keep it until deleted. + # @return [FrontendCandidate] + def create_frontend_candidate(id, frontend_id, name, archive, opts = {}) + data, _status_code, _headers = create_frontend_candidate_with_http_info(id, frontend_id, name, archive, opts) + data + end + + # Create a frontend Candidate + # Builds a copy of the frontend from the uploaded archive, with the frontend's own variable selection, and deploys it to one region: the first region the frontend deploys to, or the project's first region by name if it has not deployed yet. The Candidate is served at its own URL, so it can be checked without changing what the frontend serves. The URL is reachable by anyone who holds it and is not indexed; a Candidate is never public and does not claim to be private. The response is `202` while the first deployment runs; read the Candidate for its `status` and `url`. Creating a Candidate is available while the `frontends.candidates` capability is. While it is not, this operation, redeploying, promoting and rolling back to a Candidate answer `404` with code `feature_unavailable`; reading and deleting existing Candidates, and rolling back to the frontend's own runtime, keep working. A Candidate builds like any deploy and spends the project's build minutes. A frontend has at most 20 live Candidates, and each name is unique within the frontend. Without `ttl_seconds` a Candidate is kept until it is deleted. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param name [String] Names the Candidate within the frontend. Cannot be `production`. + # @param archive [File] ZIP or tar.gz archive of the frontend project, as for creating a frontend. The API enforces SOURCE_ARCHIVE_SIZE_LIMIT_MB. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :ttl_seconds Deletes the Candidate this many seconds after it is created, at most 30 days. Omit to keep it until deleted. + # @return [Array<(FrontendCandidate, Integer, Hash)>] FrontendCandidate data, response status code and response headers + def create_frontend_candidate_with_http_info(id, frontend_id, name, archive, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.create_frontend_candidate ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.create_frontend_candidate" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.create_frontend_candidate" + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling FrontendsApi.create_frontend_candidate" + end + if @api_client.config.client_side_validation && name.to_s.length > 128 + fail ArgumentError, 'invalid value for "name" when calling FrontendsApi.create_frontend_candidate, the character length must be smaller than or equal to 128.' + end + + if @api_client.config.client_side_validation && name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name" when calling FrontendsApi.create_frontend_candidate, the character length must be greater than or equal to 1.' + end + + # verify the required parameter 'archive' is set + if @api_client.config.client_side_validation && archive.nil? + fail ArgumentError, "Missing the required parameter 'archive' when calling FrontendsApi.create_frontend_candidate" + end + if @api_client.config.client_side_validation && !opts[:'ttl_seconds'].nil? && opts[:'ttl_seconds'] > 2592000 + fail ArgumentError, 'invalid value for "opts[:"ttl_seconds"]" when calling FrontendsApi.create_frontend_candidate, must be smaller than or equal to 2592000.' + end + + if @api_client.config.client_side_validation && !opts[:'ttl_seconds'].nil? && opts[:'ttl_seconds'] < 1 + fail ArgumentError, 'invalid value for "opts[:"ttl_seconds"]" when calling FrontendsApi.create_frontend_candidate, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/candidates'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + form_params['name'] = name + form_params['archive'] = archive + form_params['ttl_seconds'] = opts[:'ttl_seconds'] if !opts[:'ttl_seconds'].nil? + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FrontendCandidate' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.create_frontend_candidate", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#create_frontend_candidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Configure frontend custom domain - # Configures one custom domain for a frontend. The default Volcano-generated frontend URL remains active. Wildcard Volcano frontend TLS remains valid and isolated from custom-domain certificate changes. The account must own the hostname: it must have verified the hostname or a domain above it (see `POST /user/domains`). A certificate does not prove ownership. When the account owns no domain covering the hostname, Volcano asks for a TXT record at `_volcano.`, such as `_volcano.example.com`. Publishing it verifies the whole domain, so later subdomains need no record. A managed TLS request reserves the hostname and returns that record in `verification_records`; the reservation expires after 72 hours unless the record is published. A BYOC request gets `409` with `code: ownership_verification_required` and the record in `required_record`; publish it and send the same request again. Managed TLS then returns the CNAME that authorizes certificate issuance and renewal. To move an active BYOC domain to managed TLS without downtime, send `tls.mode: managed` for the same hostname. The response is `200` with the CNAME to publish; the uploaded certificate keeps serving until Volcano issues the managed one, and `serving_certificate` changes from `uploaded` to `managed`. To move an active managed domain to BYOC without downtime, send `tls.mode: byoc` with the certificate for the same hostname. The response is `200`; the uploaded certificate replaces the managed one at once, and Volcano stops renewing the managed certificate. An unverified reservation does not block an account that proves ownership. When another account holds one, a request gets `409` with `code: ownership_verification_required` and the caller's own `required_record`; after publishing it, the same request takes over the reservation. When another account verified the domain, the same `409` names the record that moves the domain to the caller once the other account's record is no longer published. A hostname below a domain another account owns otherwise returns `409` without `code`. + # Deprecated: use `POST /projects/{id}/frontends/{frontendId}/domains`, which adds a domain beside the frontend's others. Configures one custom domain for a frontend. When the frontend already has a domain, a request for another hostname returns `409`. The default Volcano-generated frontend URL remains active. Wildcard Volcano frontend TLS remains valid and isolated from custom-domain certificate changes. The account must own the hostname: it must have verified the hostname or a domain above it (see `POST /user/domains`). A certificate does not prove ownership. When the account owns no domain covering the hostname, Volcano asks for a TXT record at `_volcano.`, such as `_volcano.example.com`. Publishing it verifies the whole domain, so later subdomains need no record. A managed TLS request reserves the hostname and returns that record in `verification_records`; the reservation expires after 72 hours unless the record is published. A BYOC request gets `409` with `code: ownership_verification_required` and the record in `required_record`; publish it and send the same request again. Managed TLS then returns the CNAME that authorizes certificate issuance and renewal. To move an active BYOC domain to managed TLS without downtime, send `tls.mode: managed` for the same hostname. The response is `200` with the CNAME to publish; the uploaded certificate keeps serving until Volcano issues the managed one, and `serving_certificate` changes from `uploaded` to `managed`. To move an active managed domain to BYOC without downtime, send `tls.mode: byoc` with the certificate for the same hostname. The response is `200`; the uploaded certificate replaces the managed one at once, and Volcano stops renewing the managed certificate. An unverified reservation does not block an account that proves ownership. When another account holds one, a request gets `409` with `code: ownership_verification_required` and the caller's own `required_record`; after publishing it, the same request takes over the reservation. When another account verified the domain, the same `409` names the record that moves the domain to the caller once the other account's record is no longer published. A hostname below a domain another account owns otherwise returns `409` without `code`. # @param id [String] Project ID # @param frontend_id [String] Frontend ID # @param create_frontend_custom_domain_request [CreateFrontendCustomDomainRequest] @@ -147,7 +257,7 @@ def create_frontend_custom_domain(id, frontend_id, create_frontend_custom_domain end # Configure frontend custom domain - # Configures one custom domain for a frontend. The default Volcano-generated frontend URL remains active. Wildcard Volcano frontend TLS remains valid and isolated from custom-domain certificate changes. The account must own the hostname: it must have verified the hostname or a domain above it (see `POST /user/domains`). A certificate does not prove ownership. When the account owns no domain covering the hostname, Volcano asks for a TXT record at `_volcano.<registrable domain>`, such as `_volcano.example.com`. Publishing it verifies the whole domain, so later subdomains need no record. A managed TLS request reserves the hostname and returns that record in `verification_records`; the reservation expires after 72 hours unless the record is published. A BYOC request gets `409` with `code: ownership_verification_required` and the record in `required_record`; publish it and send the same request again. Managed TLS then returns the CNAME that authorizes certificate issuance and renewal. To move an active BYOC domain to managed TLS without downtime, send `tls.mode: managed` for the same hostname. The response is `200` with the CNAME to publish; the uploaded certificate keeps serving until Volcano issues the managed one, and `serving_certificate` changes from `uploaded` to `managed`. To move an active managed domain to BYOC without downtime, send `tls.mode: byoc` with the certificate for the same hostname. The response is `200`; the uploaded certificate replaces the managed one at once, and Volcano stops renewing the managed certificate. An unverified reservation does not block an account that proves ownership. When another account holds one, a request gets `409` with `code: ownership_verification_required` and the caller's own `required_record`; after publishing it, the same request takes over the reservation. When another account verified the domain, the same `409` names the record that moves the domain to the caller once the other account's record is no longer published. A hostname below a domain another account owns otherwise returns `409` without `code`. + # Deprecated: use `POST /projects/{id}/frontends/{frontendId}/domains`, which adds a domain beside the frontend's others. Configures one custom domain for a frontend. When the frontend already has a domain, a request for another hostname returns `409`. The default Volcano-generated frontend URL remains active. Wildcard Volcano frontend TLS remains valid and isolated from custom-domain certificate changes. The account must own the hostname: it must have verified the hostname or a domain above it (see `POST /user/domains`). A certificate does not prove ownership. When the account owns no domain covering the hostname, Volcano asks for a TXT record at `_volcano.<registrable domain>`, such as `_volcano.example.com`. Publishing it verifies the whole domain, so later subdomains need no record. A managed TLS request reserves the hostname and returns that record in `verification_records`; the reservation expires after 72 hours unless the record is published. A BYOC request gets `409` with `code: ownership_verification_required` and the record in `required_record`; publish it and send the same request again. Managed TLS then returns the CNAME that authorizes certificate issuance and renewal. To move an active BYOC domain to managed TLS without downtime, send `tls.mode: managed` for the same hostname. The response is `200` with the CNAME to publish; the uploaded certificate keeps serving until Volcano issues the managed one, and `serving_certificate` changes from `uploaded` to `managed`. To move an active managed domain to BYOC without downtime, send `tls.mode: byoc` with the certificate for the same hostname. The response is `200`; the uploaded certificate replaces the managed one at once, and Volcano stops renewing the managed certificate. An unverified reservation does not block an account that proves ownership. When another account holds one, a request gets `409` with `code: ownership_verification_required` and the caller's own `required_record`; after publishing it, the same request takes over the reservation. When another account verified the domain, the same `409` names the record that moves the domain to the caller once the other account's record is no longer published. A hostname below a domain another account owns otherwise returns `409` without `code`. # @param id [String] Project ID # @param frontend_id [String] Frontend ID # @param create_frontend_custom_domain_request [CreateFrontendCustomDomainRequest] @@ -214,43 +324,43 @@ def create_frontend_custom_domain_with_http_info(id, frontend_id, create_fronten return data, status_code, headers end - # Route a Frontend path to an HTTP Function - # The Frontend and Function must belong to this Project. The Function must be a standard Function with `visibility: public` and HTTP invocation mode, because requests through the route carry no credential: Volcano does not check a token sent to a route path or add `__volcano_auth`, so the Function authenticates its callers itself. A Function cannot leave `public` while a route targets it. The route applies to every hostname that resolves to the Frontend, including generated, custom-domain, preview, and local hostnames. + # Deploy an existing build to a frontend + # Deploys the build of another frontend's deployment in the same project to this frontend, without compiling it again. Use it to serve one build from several frontends, such as one per region or brand. This frontend gets its own copy of the source archive and the build, so later changes to the source frontend do not reach it, and a later redeploy of this frontend compiles that copied source. The build-time variables this frontend would build with must equal those the source build read, compared by name and value. Volcano records a keyed digest of each value, unique to the build, and never stores the values. A mismatch returns `409` with `code: build_variables_differ` and the differing names in `error`. The source deployment must be `active` or `degraded`, and both frontends must use the same framework and app root. Admission is the redeploy's: the deployment starts with `status: provisioning`, or, while another deployment is in progress, is exposed through `pending_deployment_id` and supersedes any older queued deployment. Nothing is compiled: the deployment's build minutes cover publishing the build alone. The checks run again when a queued deployment starts. A refusal then fails the deployment without a retry, its `error_message` starting with the refusal's code. # @param id [String] Project ID # @param frontend_id [String] Frontend ID - # @param create_frontend_function_route_request [CreateFrontendFunctionRouteRequest] + # @param create_frontend_deployment_request [CreateFrontendDeploymentRequest] # @param [Hash] opts the optional parameters - # @return [FrontendFunctionRoute] - def create_frontend_function_route(id, frontend_id, create_frontend_function_route_request, opts = {}) - data, _status_code, _headers = create_frontend_function_route_with_http_info(id, frontend_id, create_frontend_function_route_request, opts) + # @return [Frontend] + def create_frontend_deployment(id, frontend_id, create_frontend_deployment_request, opts = {}) + data, _status_code, _headers = create_frontend_deployment_with_http_info(id, frontend_id, create_frontend_deployment_request, opts) data end - # Route a Frontend path to an HTTP Function - # The Frontend and Function must belong to this Project. The Function must be a standard Function with `visibility: public` and HTTP invocation mode, because requests through the route carry no credential: Volcano does not check a token sent to a route path or add `__volcano_auth`, so the Function authenticates its callers itself. A Function cannot leave `public` while a route targets it. The route applies to every hostname that resolves to the Frontend, including generated, custom-domain, preview, and local hostnames. + # Deploy an existing build to a frontend + # Deploys the build of another frontend's deployment in the same project to this frontend, without compiling it again. Use it to serve one build from several frontends, such as one per region or brand. This frontend gets its own copy of the source archive and the build, so later changes to the source frontend do not reach it, and a later redeploy of this frontend compiles that copied source. The build-time variables this frontend would build with must equal those the source build read, compared by name and value. Volcano records a keyed digest of each value, unique to the build, and never stores the values. A mismatch returns `409` with `code: build_variables_differ` and the differing names in `error`. The source deployment must be `active` or `degraded`, and both frontends must use the same framework and app root. Admission is the redeploy's: the deployment starts with `status: provisioning`, or, while another deployment is in progress, is exposed through `pending_deployment_id` and supersedes any older queued deployment. Nothing is compiled: the deployment's build minutes cover publishing the build alone. The checks run again when a queued deployment starts. A refusal then fails the deployment without a retry, its `error_message` starting with the refusal's code. # @param id [String] Project ID # @param frontend_id [String] Frontend ID - # @param create_frontend_function_route_request [CreateFrontendFunctionRouteRequest] + # @param create_frontend_deployment_request [CreateFrontendDeploymentRequest] # @param [Hash] opts the optional parameters - # @return [Array<(FrontendFunctionRoute, Integer, Hash)>] FrontendFunctionRoute data, response status code and response headers - def create_frontend_function_route_with_http_info(id, frontend_id, create_frontend_function_route_request, opts = {}) + # @return [Array<(Frontend, Integer, Hash)>] Frontend data, response status code and response headers + def create_frontend_deployment_with_http_info(id, frontend_id, create_frontend_deployment_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FrontendsApi.create_frontend_function_route ...' + @api_client.config.logger.debug 'Calling API: FrontendsApi.create_frontend_deployment ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.create_frontend_function_route" + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.create_frontend_deployment" end # verify the required parameter 'frontend_id' is set if @api_client.config.client_side_validation && frontend_id.nil? - fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.create_frontend_function_route" + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.create_frontend_deployment" end - # verify the required parameter 'create_frontend_function_route_request' is set - if @api_client.config.client_side_validation && create_frontend_function_route_request.nil? - fail ArgumentError, "Missing the required parameter 'create_frontend_function_route_request' when calling FrontendsApi.create_frontend_function_route" + # verify the required parameter 'create_frontend_deployment_request' is set + if @api_client.config.client_side_validation && create_frontend_deployment_request.nil? + fail ArgumentError, "Missing the required parameter 'create_frontend_deployment_request' when calling FrontendsApi.create_frontend_deployment" end # resource path - local_var_path = '/projects/{id}/frontends/{frontendId}/function-routes'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + local_var_path = '/projects/{id}/frontends/{frontendId}/deployments'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -269,16 +379,16 @@ def create_frontend_function_route_with_http_info(id, frontend_id, create_fronte form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(create_frontend_function_route_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_frontend_deployment_request) # return_type - return_type = opts[:debug_return_type] || 'FrontendFunctionRoute' + return_type = opts[:debug_return_type] || 'Frontend' # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( - :operation => :"FrontendsApi.create_frontend_function_route", + :operation => :"FrontendsApi.create_frontend_deployment", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -289,42 +399,48 @@ def create_frontend_function_route_with_http_info(id, frontend_id, create_fronte data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FrontendsApi#create_frontend_function_route\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FrontendsApi#create_frontend_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete a frontend - # Schedules asynchronous frontend deletion. If another deployment is running, the frontend preserves its current status and exposes the queued deletion through `pending_deployment_id`. Its status changes to `deleting` when cleanup starts. After cleanup, it returns 404 and no longer appears in frontend lists. + # Add a custom domain to a frontend + # Adds a custom domain beside the frontend's others, up to the plan's custom domains per frontend. The domain serves the frontend, or, with `redirect`, redirects every request to `redirect.to`, another active domain of the same frontend that serves it, keeping the path and query string. A redirecting domain still needs TLS, so it takes `tls` like any other. Ownership, verification records, TLS mode switches, and the `409` codes work as on `POST /projects/{id}/frontends/{frontendId}/domain`. A request for a hostname the frontend already has returns it with `200`, or switches its TLS mode in place. When the request's redirect differs from the domain's, it returns `409`; change a redirect with `PATCH`. # @param id [String] Project ID # @param frontend_id [String] Frontend ID + # @param create_frontend_domain_request [CreateFrontendDomainRequest] # @param [Hash] opts the optional parameters - # @return [nil] - def delete_frontend(id, frontend_id, opts = {}) - delete_frontend_with_http_info(id, frontend_id, opts) - nil + # @return [FrontendCustomDomainResponse] + def create_frontend_domain(id, frontend_id, create_frontend_domain_request, opts = {}) + data, _status_code, _headers = create_frontend_domain_with_http_info(id, frontend_id, create_frontend_domain_request, opts) + data end - # Delete a frontend - # Schedules asynchronous frontend deletion. If another deployment is running, the frontend preserves its current status and exposes the queued deletion through `pending_deployment_id`. Its status changes to `deleting` when cleanup starts. After cleanup, it returns 404 and no longer appears in frontend lists. + # Add a custom domain to a frontend + # Adds a custom domain beside the frontend's others, up to the plan's custom domains per frontend. The domain serves the frontend, or, with `redirect`, redirects every request to `redirect.to`, another active domain of the same frontend that serves it, keeping the path and query string. A redirecting domain still needs TLS, so it takes `tls` like any other. Ownership, verification records, TLS mode switches, and the `409` codes work as on `POST /projects/{id}/frontends/{frontendId}/domain`. A request for a hostname the frontend already has returns it with `200`, or switches its TLS mode in place. When the request's redirect differs from the domain's, it returns `409`; change a redirect with `PATCH`. # @param id [String] Project ID # @param frontend_id [String] Frontend ID + # @param create_frontend_domain_request [CreateFrontendDomainRequest] # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_frontend_with_http_info(id, frontend_id, opts = {}) + # @return [Array<(FrontendCustomDomainResponse, Integer, Hash)>] FrontendCustomDomainResponse data, response status code and response headers + def create_frontend_domain_with_http_info(id, frontend_id, create_frontend_domain_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FrontendsApi.delete_frontend ...' + @api_client.config.logger.debug 'Calling API: FrontendsApi.create_frontend_domain ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.delete_frontend" + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.create_frontend_domain" end # verify the required parameter 'frontend_id' is set if @api_client.config.client_side_validation && frontend_id.nil? - fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.delete_frontend" + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.create_frontend_domain" + end + # verify the required parameter 'create_frontend_domain_request' is set + if @api_client.config.client_side_validation && create_frontend_domain_request.nil? + fail ArgumentError, "Missing the required parameter 'create_frontend_domain_request' when calling FrontendsApi.create_frontend_domain" end # resource path - local_var_path = '/projects/{id}/frontends/{frontendId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + local_var_path = '/projects/{id}/frontends/{frontendId}/domains'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -333,21 +449,26 @@ def delete_frontend_with_http_info(id, frontend_id, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_frontend_domain_request) # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'FrontendCustomDomainResponse' # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( - :operation => :"FrontendsApi.delete_frontend", + :operation => :"FrontendsApi.create_frontend_domain", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -356,42 +477,50 @@ def delete_frontend_with_http_info(id, frontend_id, opts = {}) :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FrontendsApi#delete_frontend\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FrontendsApi#create_frontend_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete frontend custom domain + # Route a Frontend path to an HTTP Function + # The Frontend and Function must belong to this Project. The Function must be a standard Function with `visibility: public` and HTTP invocation mode, because requests through the route carry no credential: Volcano does not check a token sent to a route path or add `__volcano_auth`, so the Function authenticates its callers itself. A Function cannot leave `public` while a route targets it. The route applies to every hostname that resolves to the Frontend, including generated, custom-domain, preview, and local hostnames. # @param id [String] Project ID # @param frontend_id [String] Frontend ID + # @param create_frontend_function_route_request [CreateFrontendFunctionRouteRequest] # @param [Hash] opts the optional parameters - # @return [nil] - def delete_frontend_custom_domain(id, frontend_id, opts = {}) - delete_frontend_custom_domain_with_http_info(id, frontend_id, opts) - nil + # @return [FrontendFunctionRoute] + def create_frontend_function_route(id, frontend_id, create_frontend_function_route_request, opts = {}) + data, _status_code, _headers = create_frontend_function_route_with_http_info(id, frontend_id, create_frontend_function_route_request, opts) + data end - # Delete frontend custom domain + # Route a Frontend path to an HTTP Function + # The Frontend and Function must belong to this Project. The Function must be a standard Function with `visibility: public` and HTTP invocation mode, because requests through the route carry no credential: Volcano does not check a token sent to a route path or add `__volcano_auth`, so the Function authenticates its callers itself. A Function cannot leave `public` while a route targets it. The route applies to every hostname that resolves to the Frontend, including generated, custom-domain, preview, and local hostnames. # @param id [String] Project ID # @param frontend_id [String] Frontend ID + # @param create_frontend_function_route_request [CreateFrontendFunctionRouteRequest] # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_frontend_custom_domain_with_http_info(id, frontend_id, opts = {}) + # @return [Array<(FrontendFunctionRoute, Integer, Hash)>] FrontendFunctionRoute data, response status code and response headers + def create_frontend_function_route_with_http_info(id, frontend_id, create_frontend_function_route_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FrontendsApi.delete_frontend_custom_domain ...' + @api_client.config.logger.debug 'Calling API: FrontendsApi.create_frontend_function_route ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.delete_frontend_custom_domain" + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.create_frontend_function_route" end # verify the required parameter 'frontend_id' is set if @api_client.config.client_side_validation && frontend_id.nil? - fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.delete_frontend_custom_domain" + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.create_frontend_function_route" + end + # verify the required parameter 'create_frontend_function_route_request' is set + if @api_client.config.client_side_validation && create_frontend_function_route_request.nil? + fail ArgumentError, "Missing the required parameter 'create_frontend_function_route_request' when calling FrontendsApi.create_frontend_function_route" end # resource path - local_var_path = '/projects/{id}/frontends/{frontendId}/domain'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + local_var_path = '/projects/{id}/frontends/{frontendId}/function-routes'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -400,21 +529,26 @@ def delete_frontend_custom_domain_with_http_info(id, frontend_id, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_frontend_function_route_request) # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'FrontendFunctionRoute' # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( - :operation => :"FrontendsApi.delete_frontend_custom_domain", + :operation => :"FrontendsApi.create_frontend_function_route", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -423,48 +557,50 @@ def delete_frontend_custom_domain_with_http_info(id, frontend_id, opts = {}) :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FrontendsApi#delete_frontend_custom_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FrontendsApi#create_frontend_function_route\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete a Frontend Function route + # Mount another Frontend at a path + # Serves `path_prefix` and everything under it on this Frontend's hostnames from another Frontend in the same Project. The path is forwarded unchanged, so the mounted Frontend must serve its pages under the prefix (page directories or a matching `basePath`). Its root `/_next/static` files and `/_next/image` requests are sent to it too. A Frontend may be mounted at several prefixes. Function and Frontend routes share one path namespace and the 64-route limit; the most specific prefix wins. A mounted Frontend's own routes do not apply to requests it receives through a route. The route applies to every hostname that resolves to this Frontend, including generated, custom-domain, and local hostnames. While the mounted Frontend has no active deployment, its paths answer 502, as its own hostname does. # @param id [String] Project ID # @param frontend_id [String] Frontend ID - # @param route_id [String] Frontend Function route ID + # @param create_frontend_route_request [CreateFrontendRouteRequest] # @param [Hash] opts the optional parameters - # @return [nil] - def delete_frontend_function_route(id, frontend_id, route_id, opts = {}) - delete_frontend_function_route_with_http_info(id, frontend_id, route_id, opts) - nil + # @return [FrontendRoute] + def create_frontend_route(id, frontend_id, create_frontend_route_request, opts = {}) + data, _status_code, _headers = create_frontend_route_with_http_info(id, frontend_id, create_frontend_route_request, opts) + data end - # Delete a Frontend Function route + # Mount another Frontend at a path + # Serves `path_prefix` and everything under it on this Frontend's hostnames from another Frontend in the same Project. The path is forwarded unchanged, so the mounted Frontend must serve its pages under the prefix (page directories or a matching `basePath`). Its root `/_next/static` files and `/_next/image` requests are sent to it too. A Frontend may be mounted at several prefixes. Function and Frontend routes share one path namespace and the 64-route limit; the most specific prefix wins. A mounted Frontend's own routes do not apply to requests it receives through a route. The route applies to every hostname that resolves to this Frontend, including generated, custom-domain, and local hostnames. While the mounted Frontend has no active deployment, its paths answer 502, as its own hostname does. # @param id [String] Project ID # @param frontend_id [String] Frontend ID - # @param route_id [String] Frontend Function route ID + # @param create_frontend_route_request [CreateFrontendRouteRequest] # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_frontend_function_route_with_http_info(id, frontend_id, route_id, opts = {}) + # @return [Array<(FrontendRoute, Integer, Hash)>] FrontendRoute data, response status code and response headers + def create_frontend_route_with_http_info(id, frontend_id, create_frontend_route_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FrontendsApi.delete_frontend_function_route ...' + @api_client.config.logger.debug 'Calling API: FrontendsApi.create_frontend_route ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.delete_frontend_function_route" + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.create_frontend_route" end # verify the required parameter 'frontend_id' is set if @api_client.config.client_side_validation && frontend_id.nil? - fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.delete_frontend_function_route" + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.create_frontend_route" end - # verify the required parameter 'route_id' is set - if @api_client.config.client_side_validation && route_id.nil? - fail ArgumentError, "Missing the required parameter 'route_id' when calling FrontendsApi.delete_frontend_function_route" + # verify the required parameter 'create_frontend_route_request' is set + if @api_client.config.client_side_validation && create_frontend_route_request.nil? + fail ArgumentError, "Missing the required parameter 'create_frontend_route_request' when calling FrontendsApi.create_frontend_route" end # resource path - local_var_path = '/projects/{id}/frontends/{frontendId}/function-routes/{routeId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)).sub('{' + 'routeId' + '}', CGI.escape(route_id.to_s)) + local_var_path = '/projects/{id}/frontends/{frontendId}/frontend-routes'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -473,21 +609,26 @@ def delete_frontend_function_route_with_http_info(id, frontend_id, route_id, opt header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_frontend_route_request) # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'FrontendRoute' # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( - :operation => :"FrontendsApi.delete_frontend_function_route", + :operation => :"FrontendsApi.create_frontend_route", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -496,39 +637,41 @@ def delete_frontend_function_route_with_http_info(id, frontend_id, route_id, opt :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FrontendsApi#delete_frontend_function_route\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FrontendsApi#create_frontend_route\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get frontend details + # Delete a frontend + # Schedules asynchronous frontend deletion. If another deployment is running, the frontend preserves its current status and exposes the queued deletion through `pending_deployment_id`. Its status changes to `deleting` when cleanup starts. After cleanup, it returns 404 and no longer appears in frontend lists. # @param id [String] Project ID # @param frontend_id [String] Frontend ID # @param [Hash] opts the optional parameters - # @return [Frontend] - def get_frontend(id, frontend_id, opts = {}) - data, _status_code, _headers = get_frontend_with_http_info(id, frontend_id, opts) - data + # @return [nil] + def delete_frontend(id, frontend_id, opts = {}) + delete_frontend_with_http_info(id, frontend_id, opts) + nil end - # Get frontend details + # Delete a frontend + # Schedules asynchronous frontend deletion. If another deployment is running, the frontend preserves its current status and exposes the queued deletion through `pending_deployment_id`. Its status changes to `deleting` when cleanup starts. After cleanup, it returns 404 and no longer appears in frontend lists. # @param id [String] Project ID # @param frontend_id [String] Frontend ID # @param [Hash] opts the optional parameters - # @return [Array<(Frontend, Integer, Hash)>] Frontend data, response status code and response headers - def get_frontend_with_http_info(id, frontend_id, opts = {}) + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_frontend_with_http_info(id, frontend_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FrontendsApi.get_frontend ...' + @api_client.config.logger.debug 'Calling API: FrontendsApi.delete_frontend ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.get_frontend" + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.delete_frontend" end # verify the required parameter 'frontend_id' is set if @api_client.config.client_side_validation && frontend_id.nil? - fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.get_frontend" + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.delete_frontend" end # resource path local_var_path = '/projects/{id}/frontends/{frontendId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) @@ -548,13 +691,13 @@ def get_frontend_with_http_info(id, frontend_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'Frontend' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( - :operation => :"FrontendsApi.get_frontend", + :operation => :"FrontendsApi.delete_frontend", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -563,42 +706,50 @@ def get_frontend_with_http_info(id, frontend_id, opts = {}) :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FrontendsApi#get_frontend\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FrontendsApi#delete_frontend\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get frontend custom domain status + # Delete a frontend Candidate + # Starts deleting the Candidate: its regional runtime, images, edge state and stored source are removed once any running deployment finishes. Asking again for a Candidate that is already being deleted is the same request. The Candidate answers `404` once it is gone. A Candidate the frontend serves cannot be deleted: roll back first. A Candidate the frontend only keeps as the runtime a rollback returns to can be deleted, and doing so gives up that rollback; rolling back to the frontend's own runtime stays possible. # @param id [String] Project ID # @param frontend_id [String] Frontend ID + # @param candidate_id [String] Frontend Candidate ID # @param [Hash] opts the optional parameters - # @return [FrontendCustomDomainResponse] - def get_frontend_custom_domain(id, frontend_id, opts = {}) - data, _status_code, _headers = get_frontend_custom_domain_with_http_info(id, frontend_id, opts) - data + # @return [nil] + def delete_frontend_candidate(id, frontend_id, candidate_id, opts = {}) + delete_frontend_candidate_with_http_info(id, frontend_id, candidate_id, opts) + nil end - # Get frontend custom domain status + # Delete a frontend Candidate + # Starts deleting the Candidate: its regional runtime, images, edge state and stored source are removed once any running deployment finishes. Asking again for a Candidate that is already being deleted is the same request. The Candidate answers `404` once it is gone. A Candidate the frontend serves cannot be deleted: roll back first. A Candidate the frontend only keeps as the runtime a rollback returns to can be deleted, and doing so gives up that rollback; rolling back to the frontend's own runtime stays possible. # @param id [String] Project ID # @param frontend_id [String] Frontend ID + # @param candidate_id [String] Frontend Candidate ID # @param [Hash] opts the optional parameters - # @return [Array<(FrontendCustomDomainResponse, Integer, Hash)>] FrontendCustomDomainResponse data, response status code and response headers - def get_frontend_custom_domain_with_http_info(id, frontend_id, opts = {}) + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_frontend_candidate_with_http_info(id, frontend_id, candidate_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FrontendsApi.get_frontend_custom_domain ...' + @api_client.config.logger.debug 'Calling API: FrontendsApi.delete_frontend_candidate ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.get_frontend_custom_domain" + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.delete_frontend_candidate" end # verify the required parameter 'frontend_id' is set if @api_client.config.client_side_validation && frontend_id.nil? - fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.get_frontend_custom_domain" + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.delete_frontend_candidate" + end + # verify the required parameter 'candidate_id' is set + if @api_client.config.client_side_validation && candidate_id.nil? + fail ArgumentError, "Missing the required parameter 'candidate_id' when calling FrontendsApi.delete_frontend_candidate" end # resource path - local_var_path = '/projects/{id}/frontends/{frontendId}/domain'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + local_var_path = '/projects/{id}/frontends/{frontendId}/candidates/{candidateId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)).sub('{' + 'candidateId' + '}', CGI.escape(candidate_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -615,7 +766,514 @@ def get_frontend_custom_domain_with_http_info(id, frontend_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FrontendCustomDomainResponse' + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.delete_frontend_candidate", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#delete_frontend_candidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete frontend custom domain + # Deprecated: use `DELETE /projects/{id}/frontends/{frontendId}/domains/{domain}`. Deletes the frontend's custom domain. A frontend with several domains returns `409`; name the one to delete on the collection route. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_frontend_custom_domain(id, frontend_id, opts = {}) + delete_frontend_custom_domain_with_http_info(id, frontend_id, opts) + nil + end + + # Delete frontend custom domain + # Deprecated: use `DELETE /projects/{id}/frontends/{frontendId}/domains/{domain}`. Deletes the frontend's custom domain. A frontend with several domains returns `409`; name the one to delete on the collection route. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_frontend_custom_domain_with_http_info(id, frontend_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.delete_frontend_custom_domain ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.delete_frontend_custom_domain" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.delete_frontend_custom_domain" + end + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/domain'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.delete_frontend_custom_domain", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#delete_frontend_custom_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Remove a custom domain from a frontend + # Detaches the domain. A domain other domains redirect to cannot be removed until those redirects are removed or retargeted. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param domain [String] The custom domain's hostname, such as `www.example.com` + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_frontend_domain(id, frontend_id, domain, opts = {}) + delete_frontend_domain_with_http_info(id, frontend_id, domain, opts) + nil + end + + # Remove a custom domain from a frontend + # Detaches the domain. A domain other domains redirect to cannot be removed until those redirects are removed or retargeted. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param domain [String] The custom domain's hostname, such as `www.example.com` + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_frontend_domain_with_http_info(id, frontend_id, domain, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.delete_frontend_domain ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.delete_frontend_domain" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.delete_frontend_domain" + end + # verify the required parameter 'domain' is set + if @api_client.config.client_side_validation && domain.nil? + fail ArgumentError, "Missing the required parameter 'domain' when calling FrontendsApi.delete_frontend_domain" + end + if @api_client.config.client_side_validation && domain.to_s.length > 253 + fail ArgumentError, 'invalid value for "domain" when calling FrontendsApi.delete_frontend_domain, the character length must be smaller than or equal to 253.' + end + + if @api_client.config.client_side_validation && domain.to_s.length < 1 + fail ArgumentError, 'invalid value for "domain" when calling FrontendsApi.delete_frontend_domain, the character length must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/domains/{domain}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)).sub('{' + 'domain' + '}', CGI.escape(domain.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.delete_frontend_domain", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#delete_frontend_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete a Frontend Function route + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param route_id [String] Frontend Function route ID + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_frontend_function_route(id, frontend_id, route_id, opts = {}) + delete_frontend_function_route_with_http_info(id, frontend_id, route_id, opts) + nil + end + + # Delete a Frontend Function route + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param route_id [String] Frontend Function route ID + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_frontend_function_route_with_http_info(id, frontend_id, route_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.delete_frontend_function_route ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.delete_frontend_function_route" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.delete_frontend_function_route" + end + # verify the required parameter 'route_id' is set + if @api_client.config.client_side_validation && route_id.nil? + fail ArgumentError, "Missing the required parameter 'route_id' when calling FrontendsApi.delete_frontend_function_route" + end + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/function-routes/{routeId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)).sub('{' + 'routeId' + '}', CGI.escape(route_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.delete_frontend_function_route", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#delete_frontend_function_route\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete a Frontend route + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param route_id [String] Frontend route ID + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_frontend_route(id, frontend_id, route_id, opts = {}) + delete_frontend_route_with_http_info(id, frontend_id, route_id, opts) + nil + end + + # Delete a Frontend route + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param route_id [String] Frontend route ID + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_frontend_route_with_http_info(id, frontend_id, route_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.delete_frontend_route ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.delete_frontend_route" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.delete_frontend_route" + end + # verify the required parameter 'route_id' is set + if @api_client.config.client_side_validation && route_id.nil? + fail ArgumentError, "Missing the required parameter 'route_id' when calling FrontendsApi.delete_frontend_route" + end + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/frontend-routes/{routeId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)).sub('{' + 'routeId' + '}', CGI.escape(route_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.delete_frontend_route", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#delete_frontend_route\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get frontend details + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [Frontend] + def get_frontend(id, frontend_id, opts = {}) + data, _status_code, _headers = get_frontend_with_http_info(id, frontend_id, opts) + data + end + + # Get frontend details + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [Array<(Frontend, Integer, Hash)>] Frontend data, response status code and response headers + def get_frontend_with_http_info(id, frontend_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.get_frontend ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.get_frontend" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.get_frontend" + end + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Frontend' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.get_frontend", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#get_frontend\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a frontend Candidate + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param candidate_id [String] Frontend Candidate ID + # @param [Hash] opts the optional parameters + # @return [FrontendCandidate] + def get_frontend_candidate(id, frontend_id, candidate_id, opts = {}) + data, _status_code, _headers = get_frontend_candidate_with_http_info(id, frontend_id, candidate_id, opts) + data + end + + # Get a frontend Candidate + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param candidate_id [String] Frontend Candidate ID + # @param [Hash] opts the optional parameters + # @return [Array<(FrontendCandidate, Integer, Hash)>] FrontendCandidate data, response status code and response headers + def get_frontend_candidate_with_http_info(id, frontend_id, candidate_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.get_frontend_candidate ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.get_frontend_candidate" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.get_frontend_candidate" + end + # verify the required parameter 'candidate_id' is set + if @api_client.config.client_side_validation && candidate_id.nil? + fail ArgumentError, "Missing the required parameter 'candidate_id' when calling FrontendsApi.get_frontend_candidate" + end + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/candidates/{candidateId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)).sub('{' + 'candidateId' + '}', CGI.escape(candidate_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FrontendCandidate' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.get_frontend_candidate", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#get_frontend_candidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get frontend custom domain status + # Deprecated: use `GET /projects/{id}/frontends/{frontendId}/domains`. Returns the frontend's oldest domain that serves it rather than redirecting. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [FrontendCustomDomainResponse] + def get_frontend_custom_domain(id, frontend_id, opts = {}) + data, _status_code, _headers = get_frontend_custom_domain_with_http_info(id, frontend_id, opts) + data + end + + # Get frontend custom domain status + # Deprecated: use `GET /projects/{id}/frontends/{frontendId}/domains`. Returns the frontend's oldest domain that serves it rather than redirecting. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [Array<(FrontendCustomDomainResponse, Integer, Hash)>] FrontendCustomDomainResponse data, response status code and response headers + def get_frontend_custom_domain_with_http_info(id, frontend_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.get_frontend_custom_domain ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.get_frontend_custom_domain" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.get_frontend_custom_domain" + end + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/domain'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FrontendCustomDomainResponse' # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] @@ -632,56 +1290,664 @@ def get_frontend_custom_domain_with_http_info(id, frontend_id, opts = {}) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FrontendsApi#get_frontend_custom_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FrontendsApi#get_frontend_custom_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a frontend custom domain + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param domain [String] The custom domain's hostname, such as `www.example.com` + # @param [Hash] opts the optional parameters + # @return [FrontendCustomDomainResponse] + def get_frontend_domain(id, frontend_id, domain, opts = {}) + data, _status_code, _headers = get_frontend_domain_with_http_info(id, frontend_id, domain, opts) + data + end + + # Get a frontend custom domain + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param domain [String] The custom domain's hostname, such as `www.example.com` + # @param [Hash] opts the optional parameters + # @return [Array<(FrontendCustomDomainResponse, Integer, Hash)>] FrontendCustomDomainResponse data, response status code and response headers + def get_frontend_domain_with_http_info(id, frontend_id, domain, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.get_frontend_domain ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.get_frontend_domain" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.get_frontend_domain" + end + # verify the required parameter 'domain' is set + if @api_client.config.client_side_validation && domain.nil? + fail ArgumentError, "Missing the required parameter 'domain' when calling FrontendsApi.get_frontend_domain" + end + if @api_client.config.client_side_validation && domain.to_s.length > 253 + fail ArgumentError, 'invalid value for "domain" when calling FrontendsApi.get_frontend_domain, the character length must be smaller than or equal to 253.' + end + + if @api_client.config.client_side_validation && domain.to_s.length < 1 + fail ArgumentError, 'invalid value for "domain" when calling FrontendsApi.get_frontend_domain, the character length must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/domains/{domain}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)).sub('{' + 'domain' + '}', CGI.escape(domain.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FrontendCustomDomainResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.get_frontend_domain", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#get_frontend_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get what a frontend serves + # Reports whether the frontend serves its own runtime or a promoted Candidate's, and the revision a promotion or rollback must name. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [FrontendServing] + def get_frontend_serving(id, frontend_id, opts = {}) + data, _status_code, _headers = get_frontend_serving_with_http_info(id, frontend_id, opts) + data + end + + # Get what a frontend serves + # Reports whether the frontend serves its own runtime or a promoted Candidate's, and the revision a promotion or rollback must name. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [Array<(FrontendServing, Integer, Hash)>] FrontendServing data, response status code and response headers + def get_frontend_serving_with_http_info(id, frontend_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.get_frontend_serving ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.get_frontend_serving" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.get_frontend_serving" + end + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/serving'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FrontendServing' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.get_frontend_serving", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#get_frontend_serving\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Per-day request and error counts for a single frontend + # Returns a zero-filled daily series of request counts and 5xx error counts for one frontend, oldest first. Each entry is one UTC day; missing days (no traffic recorded) come back as `requests: 0, errors: 0` so the response always has exactly `days` entries. Backs the Monitoring section on the frontend detail page in the Volcano dashboard. `days` defaults to 30 and is capped at 90 to keep the (frontend_id, day) index scan bounded. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @option opts [Integer] :days Number of trailing days to return (1–90, default 30). (default to 30) + # @return [FrontendUsageHistoryResponse] + def get_frontend_usage_history(id, frontend_id, opts = {}) + data, _status_code, _headers = get_frontend_usage_history_with_http_info(id, frontend_id, opts) + data + end + + # Per-day request and error counts for a single frontend + # Returns a zero-filled daily series of request counts and 5xx error counts for one frontend, oldest first. Each entry is one UTC day; missing days (no traffic recorded) come back as `requests: 0, errors: 0` so the response always has exactly `days` entries. Backs the Monitoring section on the frontend detail page in the Volcano dashboard. `days` defaults to 30 and is capped at 90 to keep the (frontend_id, day) index scan bounded. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @option opts [Integer] :days Number of trailing days to return (1–90, default 30). (default to 30) + # @return [Array<(FrontendUsageHistoryResponse, Integer, Hash)>] FrontendUsageHistoryResponse data, response status code and response headers + def get_frontend_usage_history_with_http_info(id, frontend_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.get_frontend_usage_history ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.get_frontend_usage_history" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.get_frontend_usage_history" + end + if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] > 90 + fail ArgumentError, 'invalid value for "opts[:"days"]" when calling FrontendsApi.get_frontend_usage_history, must be smaller than or equal to 90.' + end + + if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] < 1 + fail ArgumentError, 'invalid value for "opts[:"days"]" when calling FrontendsApi.get_frontend_usage_history, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/usage'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FrontendUsageHistoryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.get_frontend_usage_history", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#get_frontend_usage_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List a frontend's Candidates + # Returns the frontend's Candidates, oldest first, each with its latest deployment. A frontend has at most 20 live Candidates. Reading never depends on the `frontends.candidates` capability. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [FrontendCandidateList] + def list_frontend_candidates(id, frontend_id, opts = {}) + data, _status_code, _headers = list_frontend_candidates_with_http_info(id, frontend_id, opts) + data + end + + # List a frontend's Candidates + # Returns the frontend's Candidates, oldest first, each with its latest deployment. A frontend has at most 20 live Candidates. Reading never depends on the `frontends.candidates` capability. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [Array<(FrontendCandidateList, Integer, Hash)>] FrontendCandidateList data, response status code and response headers + def list_frontend_candidates_with_http_info(id, frontend_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.list_frontend_candidates ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.list_frontend_candidates" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.list_frontend_candidates" + end + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/candidates'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FrontendCandidateList' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.list_frontend_candidates", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#list_frontend_candidates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List frontend deployments + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination. + # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) + # @return [PaginatedFrontendDeployments] + def list_frontend_deployments(id, frontend_id, opts = {}) + data, _status_code, _headers = list_frontend_deployments_with_http_info(id, frontend_id, opts) + data + end + + # List frontend deployments + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination. + # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) + # @return [Array<(PaginatedFrontendDeployments, Integer, Hash)>] PaginatedFrontendDeployments data, response status code and response headers + def list_frontend_deployments_with_http_info(id, frontend_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.list_frontend_deployments ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.list_frontend_deployments" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.list_frontend_deployments" + end + if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page"]" when calling FrontendsApi.list_frontend_deployments, must be greater than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FrontendsApi.list_frontend_deployments, must be smaller than or equal to 100.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FrontendsApi.list_frontend_deployments, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/deployments'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PaginatedFrontendDeployments' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.list_frontend_deployments", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#list_frontend_deployments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List a frontend's custom domains + # Lists the frontend's custom domains, oldest first. Each domain either serves the frontend or, with `redirect` set, redirects every request to another domain of the frontend. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [FrontendCustomDomainList] + def list_frontend_domains(id, frontend_id, opts = {}) + data, _status_code, _headers = list_frontend_domains_with_http_info(id, frontend_id, opts) + data + end + + # List a frontend's custom domains + # Lists the frontend's custom domains, oldest first. Each domain either serves the frontend or, with `redirect` set, redirects every request to another domain of the frontend. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [Array<(FrontendCustomDomainList, Integer, Hash)>] FrontendCustomDomainList data, response status code and response headers + def list_frontend_domains_with_http_info(id, frontend_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.list_frontend_domains ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.list_frontend_domains" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.list_frontend_domains" + end + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/domains'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FrontendCustomDomainList' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.list_frontend_domains", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#list_frontend_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List a Frontend's Function routes + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [FrontendFunctionRouteList] + def list_frontend_function_routes(id, frontend_id, opts = {}) + data, _status_code, _headers = list_frontend_function_routes_with_http_info(id, frontend_id, opts) + data + end + + # List a Frontend's Function routes + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [Array<(FrontendFunctionRouteList, Integer, Hash)>] FrontendFunctionRouteList data, response status code and response headers + def list_frontend_function_routes_with_http_info(id, frontend_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.list_frontend_function_routes ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.list_frontend_function_routes" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.list_frontend_function_routes" + end + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/function-routes'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FrontendFunctionRouteList' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.list_frontend_function_routes", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#list_frontend_function_routes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List a Frontend's Frontend routes + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [FrontendRouteList] + def list_frontend_routes(id, frontend_id, opts = {}) + data, _status_code, _headers = list_frontend_routes_with_http_info(id, frontend_id, opts) + data + end + + # List a Frontend's Frontend routes + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [Array<(FrontendRouteList, Integer, Hash)>] FrontendRouteList data, response status code and response headers + def list_frontend_routes_with_http_info(id, frontend_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.list_frontend_routes ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.list_frontend_routes" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.list_frontend_routes" + end + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/frontend-routes'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FrontendRouteList' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.list_frontend_routes", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#list_frontend_routes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Per-day request and error counts for a single frontend - # Returns a zero-filled daily series of request counts and 5xx error counts for one frontend, oldest first. Each entry is one UTC day; missing days (no traffic recorded) come back as `requests: 0, errors: 0` so the response always has exactly `days` entries. Backs the Monitoring section on the frontend detail page in the Volcano dashboard. `days` defaults to 30 and is capped at 90 to keep the (frontend_id, day) index scan bounded. + # List all frontends in a project + # Supports two mutually exclusive pagination modes. Offset mode uses `page` and `limit` and returns `next` (URL). Cursor mode uses `cursor` and `limit`, supports `search` (case-insensitive name match), and returns `next_cursor`. Sending both `page` and `cursor` (or `page` and `search`) returns 400. # @param id [String] Project ID - # @param frontend_id [String] Frontend ID # @param [Hash] opts the optional parameters - # @option opts [Integer] :days Number of trailing days to return (1–90, default 30). (default to 30) - # @return [FrontendUsageHistoryResponse] - def get_frontend_usage_history(id, frontend_id, opts = {}) - data, _status_code, _headers = get_frontend_usage_history_with_http_info(id, frontend_id, opts) + # @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination. + # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) + # @option opts [String] :cursor Opaque keyset pagination cursor from a previous response's `next_cursor` — pages forward. Mutually exclusive with `page` and `ending_before`; combining them returns 400. When supplied, the request's `search` and `limit` must match the values bound to the cursor or the request returns 400. + # @option opts [String] :ending_before Opaque keyset pagination cursor from a previous response's `prev_cursor` — pages backward (the page immediately preceding this cursor). Mutually exclusive with `page` and `cursor`; combining them returns 400. `search` and `limit` must match the values bound to the cursor or the request returns 400. + # @option opts [Integer] :offset Bounded row offset past the keyset anchor named by `cursor` (forward) or `ending_before` (backward) — the hybrid jump. Seek to the anchor, then skip this many rows within. Used for numbered jump-to-page: from the current page, seek to its next/prev cursor and offset the remaining pages. Only honored on the cursor pagination path; ignored otherwise. (default to 0) + # @option opts [String] :search Case-insensitive substring match on the resource `name`. See the endpoint description for supported pagination modes. + # @return [PaginatedFrontends] + def list_frontends(id, opts = {}) + data, _status_code, _headers = list_frontends_with_http_info(id, opts) data end - # Per-day request and error counts for a single frontend - # Returns a zero-filled daily series of request counts and 5xx error counts for one frontend, oldest first. Each entry is one UTC day; missing days (no traffic recorded) come back as `requests: 0, errors: 0` so the response always has exactly `days` entries. Backs the Monitoring section on the frontend detail page in the Volcano dashboard. `days` defaults to 30 and is capped at 90 to keep the (frontend_id, day) index scan bounded. + # List all frontends in a project + # Supports two mutually exclusive pagination modes. Offset mode uses `page` and `limit` and returns `next` (URL). Cursor mode uses `cursor` and `limit`, supports `search` (case-insensitive name match), and returns `next_cursor`. Sending both `page` and `cursor` (or `page` and `search`) returns 400. # @param id [String] Project ID - # @param frontend_id [String] Frontend ID # @param [Hash] opts the optional parameters - # @option opts [Integer] :days Number of trailing days to return (1–90, default 30). (default to 30) - # @return [Array<(FrontendUsageHistoryResponse, Integer, Hash)>] FrontendUsageHistoryResponse data, response status code and response headers - def get_frontend_usage_history_with_http_info(id, frontend_id, opts = {}) + # @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination. + # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) + # @option opts [String] :cursor Opaque keyset pagination cursor from a previous response's `next_cursor` — pages forward. Mutually exclusive with `page` and `ending_before`; combining them returns 400. When supplied, the request's `search` and `limit` must match the values bound to the cursor or the request returns 400. + # @option opts [String] :ending_before Opaque keyset pagination cursor from a previous response's `prev_cursor` — pages backward (the page immediately preceding this cursor). Mutually exclusive with `page` and `cursor`; combining them returns 400. `search` and `limit` must match the values bound to the cursor or the request returns 400. + # @option opts [Integer] :offset Bounded row offset past the keyset anchor named by `cursor` (forward) or `ending_before` (backward) — the hybrid jump. Seek to the anchor, then skip this many rows within. Used for numbered jump-to-page: from the current page, seek to its next/prev cursor and offset the remaining pages. Only honored on the cursor pagination path; ignored otherwise. (default to 0) + # @option opts [String] :search Case-insensitive substring match on the resource `name`. See the endpoint description for supported pagination modes. + # @return [Array<(PaginatedFrontends, Integer, Hash)>] PaginatedFrontends data, response status code and response headers + def list_frontends_with_http_info(id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FrontendsApi.get_frontend_usage_history ...' + @api_client.config.logger.debug 'Calling API: FrontendsApi.list_frontends ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.get_frontend_usage_history" + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.list_frontends" end - # verify the required parameter 'frontend_id' is set - if @api_client.config.client_side_validation && frontend_id.nil? - fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.get_frontend_usage_history" + if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page"]" when calling FrontendsApi.list_frontends, must be greater than or equal to 1.' end - if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] > 90 - fail ArgumentError, 'invalid value for "opts[:"days"]" when calling FrontendsApi.get_frontend_usage_history, must be smaller than or equal to 90.' + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FrontendsApi.list_frontends, must be smaller than or equal to 100.' end - if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] < 1 - fail ArgumentError, 'invalid value for "opts[:"days"]" when calling FrontendsApi.get_frontend_usage_history, must be greater than or equal to 1.' + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FrontendsApi.list_frontends, must be greater than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling FrontendsApi.list_frontends, must be greater than or equal to 0.' + end + + if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 256 + fail ArgumentError, 'invalid value for "opts[:"search"]" when calling FrontendsApi.list_frontends, the character length must be smaller than or equal to 256.' end # resource path - local_var_path = '/projects/{id}/frontends/{frontendId}/usage'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + local_var_path = '/projects/{id}/frontends'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? # header parameters header_params = opts[:header_params] || {} @@ -695,13 +1961,13 @@ def get_frontend_usage_history_with_http_info(id, frontend_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FrontendUsageHistoryResponse' + return_type = opts[:debug_return_type] || 'PaginatedFrontends' # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( - :operation => :"FrontendsApi.get_frontend_usage_history", + :operation => :"FrontendsApi.list_frontends", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -712,61 +1978,232 @@ def get_frontend_usage_history_with_http_info(id, frontend_id, opts = {}) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FrontendsApi#get_frontend_usage_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FrontendsApi#list_frontends\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List frontend deployments + # List all custom domains in a project + # Project-scoped custom-domain list. Returns every active custom domain across every frontend in the project (excludes soft-deleted rows). Each item inlines the linked frontend's id and name so the UI does not need a second fetch to render the \"Linked to\" column. # @param id [String] Project ID - # @param frontend_id [String] Frontend ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination. # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) - # @return [PaginatedFrontendDeployments] - def list_frontend_deployments(id, frontend_id, opts = {}) - data, _status_code, _headers = list_frontend_deployments_with_http_info(id, frontend_id, opts) + # @option opts [String] :cursor Opaque keyset pagination cursor from a previous response's `next_cursor` — pages forward. Mutually exclusive with `page` and `ending_before`; combining them returns 400. When supplied, the request's `search` and `limit` must match the values bound to the cursor or the request returns 400. + # @option opts [String] :ending_before Opaque keyset pagination cursor from a previous response's `prev_cursor` — pages backward (the page immediately preceding this cursor). Mutually exclusive with `page` and `cursor`; combining them returns 400. `search` and `limit` must match the values bound to the cursor or the request returns 400. + # @option opts [Integer] :offset Bounded row offset past the keyset anchor named by `cursor` (forward) or `ending_before` (backward) — the hybrid jump. Seek to the anchor, then skip this many rows within. Used for numbered jump-to-page: from the current page, seek to its next/prev cursor and offset the remaining pages. Only honored on the cursor pagination path; ignored otherwise. (default to 0) + # @option opts [String] :search Case-insensitive substring match on the resource `name`. See the endpoint description for supported pagination modes. + # @return [PaginatedProjectCustomDomains] + def list_project_custom_domains(id, opts = {}) + data, _status_code, _headers = list_project_custom_domains_with_http_info(id, opts) data end - # List frontend deployments + # List all custom domains in a project + # Project-scoped custom-domain list. Returns every active custom domain across every frontend in the project (excludes soft-deleted rows). Each item inlines the linked frontend's id and name so the UI does not need a second fetch to render the \"Linked to\" column. # @param id [String] Project ID - # @param frontend_id [String] Frontend ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination. # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) - # @return [Array<(PaginatedFrontendDeployments, Integer, Hash)>] PaginatedFrontendDeployments data, response status code and response headers - def list_frontend_deployments_with_http_info(id, frontend_id, opts = {}) + # @option opts [String] :cursor Opaque keyset pagination cursor from a previous response's `next_cursor` — pages forward. Mutually exclusive with `page` and `ending_before`; combining them returns 400. When supplied, the request's `search` and `limit` must match the values bound to the cursor or the request returns 400. + # @option opts [String] :ending_before Opaque keyset pagination cursor from a previous response's `prev_cursor` — pages backward (the page immediately preceding this cursor). Mutually exclusive with `page` and `cursor`; combining them returns 400. `search` and `limit` must match the values bound to the cursor or the request returns 400. + # @option opts [Integer] :offset Bounded row offset past the keyset anchor named by `cursor` (forward) or `ending_before` (backward) — the hybrid jump. Seek to the anchor, then skip this many rows within. Used for numbered jump-to-page: from the current page, seek to its next/prev cursor and offset the remaining pages. Only honored on the cursor pagination path; ignored otherwise. (default to 0) + # @option opts [String] :search Case-insensitive substring match on the resource `name`. See the endpoint description for supported pagination modes. + # @return [Array<(PaginatedProjectCustomDomains, Integer, Hash)>] PaginatedProjectCustomDomains data, response status code and response headers + def list_project_custom_domains_with_http_info(id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FrontendsApi.list_frontend_deployments ...' + @api_client.config.logger.debug 'Calling API: FrontendsApi.list_project_custom_domains ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.list_project_custom_domains" + end + if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page"]" when calling FrontendsApi.list_project_custom_domains, must be greater than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FrontendsApi.list_project_custom_domains, must be smaller than or equal to 100.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FrontendsApi.list_project_custom_domains, must be greater than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling FrontendsApi.list_project_custom_domains, must be greater than or equal to 0.' + end + + if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 256 + fail ArgumentError, 'invalid value for "opts[:"search"]" when calling FrontendsApi.list_project_custom_domains, the character length must be smaller than or equal to 256.' + end + + # resource path + local_var_path = '/projects/{id}/domains'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PaginatedProjectCustomDomains' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.list_project_custom_domains", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#list_project_custom_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Promote a frontend Candidate + # Makes the Candidate what the frontend serves. Nothing is rebuilt or copied: the frontend's traffic is routed to the Candidate's runtime, its own custom domains and metering are unchanged, and what it served becomes the runtime a rollback returns to. The Candidate must be ready and serving an active deployment, and that deployment must have been built with the variables the frontend selects now. A Candidate that serves stops expiring and cannot be deleted. While one serves, deploying the frontend itself answers `409`; roll back to the frontend's own runtime first. Promotion names the revision the caller read from `serving`; a competing activation makes it fail with `409`. Once the project's repository is the source of truth, promotion is refused with `409`, as a direct deploy is, and so is rolling back to a Candidate; rolling back to the frontend's own runtime is not. While the `frontends.candidates` capability is unavailable, promotion and rolling back to a Candidate answer `404` with code `feature_unavailable`; rolling back to the frontend's own runtime does not. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param candidate_id [String] Frontend Candidate ID + # @param promote_frontend_candidate_request [PromoteFrontendCandidateRequest] + # @param [Hash] opts the optional parameters + # @return [FrontendServing] + def promote_frontend_candidate(id, frontend_id, candidate_id, promote_frontend_candidate_request, opts = {}) + data, _status_code, _headers = promote_frontend_candidate_with_http_info(id, frontend_id, candidate_id, promote_frontend_candidate_request, opts) + data + end + + # Promote a frontend Candidate + # Makes the Candidate what the frontend serves. Nothing is rebuilt or copied: the frontend's traffic is routed to the Candidate's runtime, its own custom domains and metering are unchanged, and what it served becomes the runtime a rollback returns to. The Candidate must be ready and serving an active deployment, and that deployment must have been built with the variables the frontend selects now. A Candidate that serves stops expiring and cannot be deleted. While one serves, deploying the frontend itself answers `409`; roll back to the frontend's own runtime first. Promotion names the revision the caller read from `serving`; a competing activation makes it fail with `409`. Once the project's repository is the source of truth, promotion is refused with `409`, as a direct deploy is, and so is rolling back to a Candidate; rolling back to the frontend's own runtime is not. While the `frontends.candidates` capability is unavailable, promotion and rolling back to a Candidate answer `404` with code `feature_unavailable`; rolling back to the frontend's own runtime does not. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param candidate_id [String] Frontend Candidate ID + # @param promote_frontend_candidate_request [PromoteFrontendCandidateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FrontendServing, Integer, Hash)>] FrontendServing data, response status code and response headers + def promote_frontend_candidate_with_http_info(id, frontend_id, candidate_id, promote_frontend_candidate_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.promote_frontend_candidate ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.promote_frontend_candidate" + end + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.promote_frontend_candidate" + end + # verify the required parameter 'candidate_id' is set + if @api_client.config.client_side_validation && candidate_id.nil? + fail ArgumentError, "Missing the required parameter 'candidate_id' when calling FrontendsApi.promote_frontend_candidate" + end + # verify the required parameter 'promote_frontend_candidate_request' is set + if @api_client.config.client_side_validation && promote_frontend_candidate_request.nil? + fail ArgumentError, "Missing the required parameter 'promote_frontend_candidate_request' when calling FrontendsApi.promote_frontend_candidate" + end + # resource path + local_var_path = '/projects/{id}/frontends/{frontendId}/candidates/{candidateId}/promote'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)).sub('{' + 'candidateId' + '}', CGI.escape(candidate_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(promote_frontend_candidate_request) + + # return_type + return_type = opts[:debug_return_type] || 'FrontendServing' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FrontendsApi.promote_frontend_candidate", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FrontendsApi#promote_frontend_candidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Redeploy frontend using latest uploaded artifact + # Starts a new frontend workflow using the latest stored artifact. A deployment that starts immediately returns `status: provisioning`, then transitions to `active`, `degraded`, or `failed`. An overlapping deployment preserves the frontend's current status, is exposed through `pending_deployment_id`, and supersedes any older queued deployment. The previous runtime and its published static assets remain available during provisioning, and a failed redeploy restores the regional runtimes to that build and keeps it serving while the attempted deployment is recorded as failed. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [Frontend] + def redeploy_frontend(id, frontend_id, opts = {}) + data, _status_code, _headers = redeploy_frontend_with_http_info(id, frontend_id, opts) + data + end + + # Redeploy frontend using latest uploaded artifact + # Starts a new frontend workflow using the latest stored artifact. A deployment that starts immediately returns `status: provisioning`, then transitions to `active`, `degraded`, or `failed`. An overlapping deployment preserves the frontend's current status, is exposed through `pending_deployment_id`, and supersedes any older queued deployment. The previous runtime and its published static assets remain available during provisioning, and a failed redeploy restores the regional runtimes to that build and keeps it serving while the attempted deployment is recorded as failed. + # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param [Hash] opts the optional parameters + # @return [Array<(Frontend, Integer, Hash)>] Frontend data, response status code and response headers + def redeploy_frontend_with_http_info(id, frontend_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FrontendsApi.redeploy_frontend ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.list_frontend_deployments" + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.redeploy_frontend" end # verify the required parameter 'frontend_id' is set if @api_client.config.client_side_validation && frontend_id.nil? - fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.list_frontend_deployments" - end - if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 - fail ArgumentError, 'invalid value for "opts[:"page"]" when calling FrontendsApi.list_frontend_deployments, must be greater than or equal to 1.' - end - - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FrontendsApi.list_frontend_deployments, must be smaller than or equal to 100.' - end - - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FrontendsApi.list_frontend_deployments, must be greater than or equal to 1.' + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.redeploy_frontend" end - # resource path - local_var_path = '/projects/{id}/frontends/{frontendId}/deployments'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + local_var_path = '/projects/{id}/frontends/{frontendId}/redeploy'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? - query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} @@ -780,13 +2217,13 @@ def list_frontend_deployments_with_http_info(id, frontend_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'PaginatedFrontendDeployments' + return_type = opts[:debug_return_type] || 'Frontend' # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( - :operation => :"FrontendsApi.list_frontend_deployments", + :operation => :"FrontendsApi.redeploy_frontend", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -795,42 +2232,56 @@ def list_frontend_deployments_with_http_info(id, frontend_id, opts = {}) :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FrontendsApi#list_frontend_deployments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FrontendsApi#redeploy_frontend\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List a Frontend's Function routes + # Deploy a new archive to a frontend Candidate + # Builds the uploaded archive with the frontend's own variable selection and deploys it to the Candidate. The Candidate keeps serving its previous deployment until this one succeeds, and a failed deployment leaves it on the previous one. A Candidate takes one deployment at a time. While the `frontends.candidates` capability is unavailable, it answers `404` with code `feature_unavailable`. # @param id [String] Project ID # @param frontend_id [String] Frontend ID + # @param candidate_id [String] Frontend Candidate ID + # @param archive [File] ZIP or tar.gz archive of the frontend project, as for creating a frontend. # @param [Hash] opts the optional parameters - # @return [FrontendFunctionRouteList] - def list_frontend_function_routes(id, frontend_id, opts = {}) - data, _status_code, _headers = list_frontend_function_routes_with_http_info(id, frontend_id, opts) + # @return [FrontendCandidateDeployment] + def redeploy_frontend_candidate(id, frontend_id, candidate_id, archive, opts = {}) + data, _status_code, _headers = redeploy_frontend_candidate_with_http_info(id, frontend_id, candidate_id, archive, opts) data end - # List a Frontend's Function routes + # Deploy a new archive to a frontend Candidate + # Builds the uploaded archive with the frontend's own variable selection and deploys it to the Candidate. The Candidate keeps serving its previous deployment until this one succeeds, and a failed deployment leaves it on the previous one. A Candidate takes one deployment at a time. While the `frontends.candidates` capability is unavailable, it answers `404` with code `feature_unavailable`. # @param id [String] Project ID # @param frontend_id [String] Frontend ID + # @param candidate_id [String] Frontend Candidate ID + # @param archive [File] ZIP or tar.gz archive of the frontend project, as for creating a frontend. # @param [Hash] opts the optional parameters - # @return [Array<(FrontendFunctionRouteList, Integer, Hash)>] FrontendFunctionRouteList data, response status code and response headers - def list_frontend_function_routes_with_http_info(id, frontend_id, opts = {}) + # @return [Array<(FrontendCandidateDeployment, Integer, Hash)>] FrontendCandidateDeployment data, response status code and response headers + def redeploy_frontend_candidate_with_http_info(id, frontend_id, candidate_id, archive, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FrontendsApi.list_frontend_function_routes ...' + @api_client.config.logger.debug 'Calling API: FrontendsApi.redeploy_frontend_candidate ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.list_frontend_function_routes" + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.redeploy_frontend_candidate" end # verify the required parameter 'frontend_id' is set if @api_client.config.client_side_validation && frontend_id.nil? - fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.list_frontend_function_routes" + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.redeploy_frontend_candidate" + end + # verify the required parameter 'candidate_id' is set + if @api_client.config.client_side_validation && candidate_id.nil? + fail ArgumentError, "Missing the required parameter 'candidate_id' when calling FrontendsApi.redeploy_frontend_candidate" + end + # verify the required parameter 'archive' is set + if @api_client.config.client_side_validation && archive.nil? + fail ArgumentError, "Missing the required parameter 'archive' when calling FrontendsApi.redeploy_frontend_candidate" end # resource path - local_var_path = '/projects/{id}/frontends/{frontendId}/function-routes'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + local_var_path = '/projects/{id}/frontends/{frontendId}/candidates/{candidateId}/deployments'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)).sub('{' + 'candidateId' + '}', CGI.escape(candidate_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -839,21 +2290,27 @@ def list_frontend_function_routes_with_http_info(id, frontend_id, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} + form_params['archive'] = archive # http body (model) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FrontendFunctionRouteList' + return_type = opts[:debug_return_type] || 'FrontendCandidateDeployment' # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( - :operation => :"FrontendsApi.list_frontend_function_routes", + :operation => :"FrontendsApi.redeploy_frontend_candidate", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -862,99 +2319,78 @@ def list_frontend_function_routes_with_http_info(id, frontend_id, opts = {}) :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FrontendsApi#list_frontend_function_routes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FrontendsApi#redeploy_frontend_candidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List all frontends in a project - # Supports two mutually exclusive pagination modes. Offset mode uses `page` and `limit` and returns `next` (URL). Cursor mode uses `cursor` and `limit`, supports `search` (case-insensitive name match), and returns `next_cursor`. Sending both `page` and `cursor` (or `page` and `search`) returns 400. + # Roll a frontend back to the runtime it served before + # Returns the frontend's traffic to the runtime it served before the last activation, or to its own runtime with `to_production`. A rollback is a new activation, so what it leaves becomes the runtime a further rollback returns to, and it can itself be undone. It names the revision the caller read; a competing activation makes it fail with `409`. Rolling back to a Candidate promotes it again and is refused with `409` when promoting it would be. Rolling back to the frontend's own runtime is not. # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param rollback_frontend_serving_request [RollbackFrontendServingRequest] # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination. - # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) - # @option opts [String] :cursor Opaque keyset pagination cursor from a previous response's `next_cursor` — pages forward. Mutually exclusive with `page` and `ending_before`; combining them returns 400. When supplied, the request's `search` and `limit` must match the values bound to the cursor or the request returns 400. - # @option opts [String] :ending_before Opaque keyset pagination cursor from a previous response's `prev_cursor` — pages backward (the page immediately preceding this cursor). Mutually exclusive with `page` and `cursor`; combining them returns 400. `search` and `limit` must match the values bound to the cursor or the request returns 400. - # @option opts [Integer] :offset Bounded row offset past the keyset anchor named by `cursor` (forward) or `ending_before` (backward) — the hybrid jump. Seek to the anchor, then skip this many rows within. Used for numbered jump-to-page: from the current page, seek to its next/prev cursor and offset the remaining pages. Only honored on the cursor pagination path; ignored otherwise. (default to 0) - # @option opts [String] :search Case-insensitive substring match on the resource `name`. See the endpoint description for supported pagination modes. - # @return [PaginatedFrontends] - def list_frontends(id, opts = {}) - data, _status_code, _headers = list_frontends_with_http_info(id, opts) + # @return [FrontendServing] + def rollback_frontend_serving(id, frontend_id, rollback_frontend_serving_request, opts = {}) + data, _status_code, _headers = rollback_frontend_serving_with_http_info(id, frontend_id, rollback_frontend_serving_request, opts) data end - # List all frontends in a project - # Supports two mutually exclusive pagination modes. Offset mode uses `page` and `limit` and returns `next` (URL). Cursor mode uses `cursor` and `limit`, supports `search` (case-insensitive name match), and returns `next_cursor`. Sending both `page` and `cursor` (or `page` and `search`) returns 400. + # Roll a frontend back to the runtime it served before + # Returns the frontend's traffic to the runtime it served before the last activation, or to its own runtime with `to_production`. A rollback is a new activation, so what it leaves becomes the runtime a further rollback returns to, and it can itself be undone. It names the revision the caller read; a competing activation makes it fail with `409`. Rolling back to a Candidate promotes it again and is refused with `409` when promoting it would be. Rolling back to the frontend's own runtime is not. # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param rollback_frontend_serving_request [RollbackFrontendServingRequest] # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination. - # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) - # @option opts [String] :cursor Opaque keyset pagination cursor from a previous response's `next_cursor` — pages forward. Mutually exclusive with `page` and `ending_before`; combining them returns 400. When supplied, the request's `search` and `limit` must match the values bound to the cursor or the request returns 400. - # @option opts [String] :ending_before Opaque keyset pagination cursor from a previous response's `prev_cursor` — pages backward (the page immediately preceding this cursor). Mutually exclusive with `page` and `cursor`; combining them returns 400. `search` and `limit` must match the values bound to the cursor or the request returns 400. - # @option opts [Integer] :offset Bounded row offset past the keyset anchor named by `cursor` (forward) or `ending_before` (backward) — the hybrid jump. Seek to the anchor, then skip this many rows within. Used for numbered jump-to-page: from the current page, seek to its next/prev cursor and offset the remaining pages. Only honored on the cursor pagination path; ignored otherwise. (default to 0) - # @option opts [String] :search Case-insensitive substring match on the resource `name`. See the endpoint description for supported pagination modes. - # @return [Array<(PaginatedFrontends, Integer, Hash)>] PaginatedFrontends data, response status code and response headers - def list_frontends_with_http_info(id, opts = {}) + # @return [Array<(FrontendServing, Integer, Hash)>] FrontendServing data, response status code and response headers + def rollback_frontend_serving_with_http_info(id, frontend_id, rollback_frontend_serving_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FrontendsApi.list_frontends ...' + @api_client.config.logger.debug 'Calling API: FrontendsApi.rollback_frontend_serving ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.list_frontends" + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.rollback_frontend_serving" end - if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 - fail ArgumentError, 'invalid value for "opts[:"page"]" when calling FrontendsApi.list_frontends, must be greater than or equal to 1.' - end - - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FrontendsApi.list_frontends, must be smaller than or equal to 100.' - end - - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FrontendsApi.list_frontends, must be greater than or equal to 1.' - end - - if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 - fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling FrontendsApi.list_frontends, must be greater than or equal to 0.' + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.rollback_frontend_serving" end - - if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 256 - fail ArgumentError, 'invalid value for "opts[:"search"]" when calling FrontendsApi.list_frontends, the character length must be smaller than or equal to 256.' + # verify the required parameter 'rollback_frontend_serving_request' is set + if @api_client.config.client_side_validation && rollback_frontend_serving_request.nil? + fail ArgumentError, "Missing the required parameter 'rollback_frontend_serving_request' when calling FrontendsApi.rollback_frontend_serving" end - # resource path - local_var_path = '/projects/{id}/frontends'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + local_var_path = '/projects/{id}/frontends/{frontendId}/serving/rollback'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? - query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? - query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? - query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? - query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(rollback_frontend_serving_request) # return_type - return_type = opts[:debug_return_type] || 'PaginatedFrontends' + return_type = opts[:debug_return_type] || 'FrontendServing' # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( - :operation => :"FrontendsApi.list_frontends", + :operation => :"FrontendsApi.rollback_frontend_serving", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -963,99 +2399,92 @@ def list_frontends_with_http_info(id, opts = {}) :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FrontendsApi#list_frontends\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FrontendsApi#rollback_frontend_serving\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List all custom domains in a project - # Project-scoped custom-domain list. Returns every active custom domain across every frontend in the project (excludes soft-deleted rows). Each item inlines the linked frontend's id and name so the UI does not need a second fetch to render the \"Linked to\" column. + # Set or clear a custom domain's redirect + # `{\"redirect\": {\"to\": \"www.example.com\", \"status\": 308}}` makes the domain redirect to another active domain of the frontend that serves it. `{\"redirect\": null}` makes it serve the frontend again. A domain other domains redirect to cannot become a redirect itself. `status` defaults to `308`. Proxies apply the change within seconds. # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param domain [String] The custom domain's hostname, such as `www.example.com` + # @param update_frontend_custom_domain_request [UpdateFrontendCustomDomainRequest] # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination. - # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) - # @option opts [String] :cursor Opaque keyset pagination cursor from a previous response's `next_cursor` — pages forward. Mutually exclusive with `page` and `ending_before`; combining them returns 400. When supplied, the request's `search` and `limit` must match the values bound to the cursor or the request returns 400. - # @option opts [String] :ending_before Opaque keyset pagination cursor from a previous response's `prev_cursor` — pages backward (the page immediately preceding this cursor). Mutually exclusive with `page` and `cursor`; combining them returns 400. `search` and `limit` must match the values bound to the cursor or the request returns 400. - # @option opts [Integer] :offset Bounded row offset past the keyset anchor named by `cursor` (forward) or `ending_before` (backward) — the hybrid jump. Seek to the anchor, then skip this many rows within. Used for numbered jump-to-page: from the current page, seek to its next/prev cursor and offset the remaining pages. Only honored on the cursor pagination path; ignored otherwise. (default to 0) - # @option opts [String] :search Case-insensitive substring match on the resource `name`. See the endpoint description for supported pagination modes. - # @return [PaginatedProjectCustomDomains] - def list_project_custom_domains(id, opts = {}) - data, _status_code, _headers = list_project_custom_domains_with_http_info(id, opts) + # @return [FrontendCustomDomainResponse] + def update_frontend_domain(id, frontend_id, domain, update_frontend_custom_domain_request, opts = {}) + data, _status_code, _headers = update_frontend_domain_with_http_info(id, frontend_id, domain, update_frontend_custom_domain_request, opts) data end - # List all custom domains in a project - # Project-scoped custom-domain list. Returns every active custom domain across every frontend in the project (excludes soft-deleted rows). Each item inlines the linked frontend's id and name so the UI does not need a second fetch to render the \"Linked to\" column. + # Set or clear a custom domain's redirect + # `{\"redirect\": {\"to\": \"www.example.com\", \"status\": 308}}` makes the domain redirect to another active domain of the frontend that serves it. `{\"redirect\": null}` makes it serve the frontend again. A domain other domains redirect to cannot become a redirect itself. `status` defaults to `308`. Proxies apply the change within seconds. # @param id [String] Project ID + # @param frontend_id [String] Frontend ID + # @param domain [String] The custom domain's hostname, such as `www.example.com` + # @param update_frontend_custom_domain_request [UpdateFrontendCustomDomainRequest] # @param [Hash] opts the optional parameters - # @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination. - # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) - # @option opts [String] :cursor Opaque keyset pagination cursor from a previous response's `next_cursor` — pages forward. Mutually exclusive with `page` and `ending_before`; combining them returns 400. When supplied, the request's `search` and `limit` must match the values bound to the cursor or the request returns 400. - # @option opts [String] :ending_before Opaque keyset pagination cursor from a previous response's `prev_cursor` — pages backward (the page immediately preceding this cursor). Mutually exclusive with `page` and `cursor`; combining them returns 400. `search` and `limit` must match the values bound to the cursor or the request returns 400. - # @option opts [Integer] :offset Bounded row offset past the keyset anchor named by `cursor` (forward) or `ending_before` (backward) — the hybrid jump. Seek to the anchor, then skip this many rows within. Used for numbered jump-to-page: from the current page, seek to its next/prev cursor and offset the remaining pages. Only honored on the cursor pagination path; ignored otherwise. (default to 0) - # @option opts [String] :search Case-insensitive substring match on the resource `name`. See the endpoint description for supported pagination modes. - # @return [Array<(PaginatedProjectCustomDomains, Integer, Hash)>] PaginatedProjectCustomDomains data, response status code and response headers - def list_project_custom_domains_with_http_info(id, opts = {}) + # @return [Array<(FrontendCustomDomainResponse, Integer, Hash)>] FrontendCustomDomainResponse data, response status code and response headers + def update_frontend_domain_with_http_info(id, frontend_id, domain, update_frontend_custom_domain_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FrontendsApi.list_project_custom_domains ...' + @api_client.config.logger.debug 'Calling API: FrontendsApi.update_frontend_domain ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.list_project_custom_domains" + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.update_frontend_domain" end - if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 - fail ArgumentError, 'invalid value for "opts[:"page"]" when calling FrontendsApi.list_project_custom_domains, must be greater than or equal to 1.' + # verify the required parameter 'frontend_id' is set + if @api_client.config.client_side_validation && frontend_id.nil? + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.update_frontend_domain" end - - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FrontendsApi.list_project_custom_domains, must be smaller than or equal to 100.' + # verify the required parameter 'domain' is set + if @api_client.config.client_side_validation && domain.nil? + fail ArgumentError, "Missing the required parameter 'domain' when calling FrontendsApi.update_frontend_domain" end - - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FrontendsApi.list_project_custom_domains, must be greater than or equal to 1.' + if @api_client.config.client_side_validation && domain.to_s.length > 253 + fail ArgumentError, 'invalid value for "domain" when calling FrontendsApi.update_frontend_domain, the character length must be smaller than or equal to 253.' end - if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 - fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling FrontendsApi.list_project_custom_domains, must be greater than or equal to 0.' + if @api_client.config.client_side_validation && domain.to_s.length < 1 + fail ArgumentError, 'invalid value for "domain" when calling FrontendsApi.update_frontend_domain, the character length must be greater than or equal to 1.' end - if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 256 - fail ArgumentError, 'invalid value for "opts[:"search"]" when calling FrontendsApi.list_project_custom_domains, the character length must be smaller than or equal to 256.' + # verify the required parameter 'update_frontend_custom_domain_request' is set + if @api_client.config.client_side_validation && update_frontend_custom_domain_request.nil? + fail ArgumentError, "Missing the required parameter 'update_frontend_custom_domain_request' when calling FrontendsApi.update_frontend_domain" end - # resource path - local_var_path = '/projects/{id}/domains'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + local_var_path = '/projects/{id}/frontends/{frontendId}/domains/{domain}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)).sub('{' + 'domain' + '}', CGI.escape(domain.to_s)) # query parameters query_params = opts[:query_params] || {} - query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? - query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? - query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? - query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? - query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(update_frontend_custom_domain_request) # return_type - return_type = opts[:debug_return_type] || 'PaginatedProjectCustomDomains' + return_type = opts[:debug_return_type] || 'FrontendCustomDomainResponse' # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( - :operation => :"FrontendsApi.list_project_custom_domains", + :operation => :"FrontendsApi.update_frontend_domain", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1064,44 +2493,56 @@ def list_project_custom_domains_with_http_info(id, opts = {}) :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FrontendsApi#list_project_custom_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FrontendsApi#update_frontend_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Redeploy frontend using latest uploaded artifact - # Starts a new frontend workflow using the latest stored artifact. A deployment that starts immediately returns `status: provisioning`, then transitions to `active`, `degraded`, or `failed`. An overlapping deployment preserves the frontend's current status, is exposed through `pending_deployment_id`, and supersedes any older queued deployment. The previous runtime and its published static assets remain available during provisioning, and a failed redeploy restores the regional runtimes to that build and keeps it serving while the attempted deployment is recorded as failed. + # Replace a Frontend Function route + # Replaces the route's target, path, and prefix handling. The new target must meet the same rules as on create, including `visibility: public`. # @param id [String] Project ID # @param frontend_id [String] Frontend ID + # @param route_id [String] Frontend Function route ID + # @param create_frontend_function_route_request [CreateFrontendFunctionRouteRequest] # @param [Hash] opts the optional parameters - # @return [Frontend] - def redeploy_frontend(id, frontend_id, opts = {}) - data, _status_code, _headers = redeploy_frontend_with_http_info(id, frontend_id, opts) + # @return [FrontendFunctionRoute] + def update_frontend_function_route(id, frontend_id, route_id, create_frontend_function_route_request, opts = {}) + data, _status_code, _headers = update_frontend_function_route_with_http_info(id, frontend_id, route_id, create_frontend_function_route_request, opts) data end - # Redeploy frontend using latest uploaded artifact - # Starts a new frontend workflow using the latest stored artifact. A deployment that starts immediately returns `status: provisioning`, then transitions to `active`, `degraded`, or `failed`. An overlapping deployment preserves the frontend's current status, is exposed through `pending_deployment_id`, and supersedes any older queued deployment. The previous runtime and its published static assets remain available during provisioning, and a failed redeploy restores the regional runtimes to that build and keeps it serving while the attempted deployment is recorded as failed. + # Replace a Frontend Function route + # Replaces the route's target, path, and prefix handling. The new target must meet the same rules as on create, including `visibility: public`. # @param id [String] Project ID # @param frontend_id [String] Frontend ID + # @param route_id [String] Frontend Function route ID + # @param create_frontend_function_route_request [CreateFrontendFunctionRouteRequest] # @param [Hash] opts the optional parameters - # @return [Array<(Frontend, Integer, Hash)>] Frontend data, response status code and response headers - def redeploy_frontend_with_http_info(id, frontend_id, opts = {}) + # @return [Array<(FrontendFunctionRoute, Integer, Hash)>] FrontendFunctionRoute data, response status code and response headers + def update_frontend_function_route_with_http_info(id, frontend_id, route_id, create_frontend_function_route_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FrontendsApi.redeploy_frontend ...' + @api_client.config.logger.debug 'Calling API: FrontendsApi.update_frontend_function_route ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.redeploy_frontend" + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.update_frontend_function_route" end # verify the required parameter 'frontend_id' is set if @api_client.config.client_side_validation && frontend_id.nil? - fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.redeploy_frontend" + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.update_frontend_function_route" + end + # verify the required parameter 'route_id' is set + if @api_client.config.client_side_validation && route_id.nil? + fail ArgumentError, "Missing the required parameter 'route_id' when calling FrontendsApi.update_frontend_function_route" + end + # verify the required parameter 'create_frontend_function_route_request' is set + if @api_client.config.client_side_validation && create_frontend_function_route_request.nil? + fail ArgumentError, "Missing the required parameter 'create_frontend_function_route_request' when calling FrontendsApi.update_frontend_function_route" end # resource path - local_var_path = '/projects/{id}/frontends/{frontendId}/redeploy'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)) + local_var_path = '/projects/{id}/frontends/{frontendId}/function-routes/{routeId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)).sub('{' + 'routeId' + '}', CGI.escape(route_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1110,21 +2551,26 @@ def redeploy_frontend_with_http_info(id, frontend_id, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_frontend_function_route_request) # return_type - return_type = opts[:debug_return_type] || 'Frontend' + return_type = opts[:debug_return_type] || 'FrontendFunctionRoute' # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( - :operation => :"FrontendsApi.redeploy_frontend", + :operation => :"FrontendsApi.update_frontend_function_route", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1133,56 +2579,56 @@ def redeploy_frontend_with_http_info(id, frontend_id, opts = {}) :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FrontendsApi#redeploy_frontend\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FrontendsApi#update_frontend_function_route\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Replace a Frontend Function route - # Replaces the route's target, path, and prefix handling. The new target must meet the same rules as on create, including `visibility: public`. + # Replace a Frontend route + # Replaces the route's mounted Frontend and path. The new values must meet the same rules as on create. # @param id [String] Project ID # @param frontend_id [String] Frontend ID - # @param route_id [String] Frontend Function route ID - # @param create_frontend_function_route_request [CreateFrontendFunctionRouteRequest] + # @param route_id [String] Frontend route ID + # @param create_frontend_route_request [CreateFrontendRouteRequest] # @param [Hash] opts the optional parameters - # @return [FrontendFunctionRoute] - def update_frontend_function_route(id, frontend_id, route_id, create_frontend_function_route_request, opts = {}) - data, _status_code, _headers = update_frontend_function_route_with_http_info(id, frontend_id, route_id, create_frontend_function_route_request, opts) + # @return [FrontendRoute] + def update_frontend_route(id, frontend_id, route_id, create_frontend_route_request, opts = {}) + data, _status_code, _headers = update_frontend_route_with_http_info(id, frontend_id, route_id, create_frontend_route_request, opts) data end - # Replace a Frontend Function route - # Replaces the route's target, path, and prefix handling. The new target must meet the same rules as on create, including `visibility: public`. + # Replace a Frontend route + # Replaces the route's mounted Frontend and path. The new values must meet the same rules as on create. # @param id [String] Project ID # @param frontend_id [String] Frontend ID - # @param route_id [String] Frontend Function route ID - # @param create_frontend_function_route_request [CreateFrontendFunctionRouteRequest] + # @param route_id [String] Frontend route ID + # @param create_frontend_route_request [CreateFrontendRouteRequest] # @param [Hash] opts the optional parameters - # @return [Array<(FrontendFunctionRoute, Integer, Hash)>] FrontendFunctionRoute data, response status code and response headers - def update_frontend_function_route_with_http_info(id, frontend_id, route_id, create_frontend_function_route_request, opts = {}) + # @return [Array<(FrontendRoute, Integer, Hash)>] FrontendRoute data, response status code and response headers + def update_frontend_route_with_http_info(id, frontend_id, route_id, create_frontend_route_request, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FrontendsApi.update_frontend_function_route ...' + @api_client.config.logger.debug 'Calling API: FrontendsApi.update_frontend_route ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.update_frontend_function_route" + fail ArgumentError, "Missing the required parameter 'id' when calling FrontendsApi.update_frontend_route" end # verify the required parameter 'frontend_id' is set if @api_client.config.client_side_validation && frontend_id.nil? - fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.update_frontend_function_route" + fail ArgumentError, "Missing the required parameter 'frontend_id' when calling FrontendsApi.update_frontend_route" end # verify the required parameter 'route_id' is set if @api_client.config.client_side_validation && route_id.nil? - fail ArgumentError, "Missing the required parameter 'route_id' when calling FrontendsApi.update_frontend_function_route" + fail ArgumentError, "Missing the required parameter 'route_id' when calling FrontendsApi.update_frontend_route" end - # verify the required parameter 'create_frontend_function_route_request' is set - if @api_client.config.client_side_validation && create_frontend_function_route_request.nil? - fail ArgumentError, "Missing the required parameter 'create_frontend_function_route_request' when calling FrontendsApi.update_frontend_function_route" + # verify the required parameter 'create_frontend_route_request' is set + if @api_client.config.client_side_validation && create_frontend_route_request.nil? + fail ArgumentError, "Missing the required parameter 'create_frontend_route_request' when calling FrontendsApi.update_frontend_route" end # resource path - local_var_path = '/projects/{id}/frontends/{frontendId}/function-routes/{routeId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)).sub('{' + 'routeId' + '}', CGI.escape(route_id.to_s)) + local_var_path = '/projects/{id}/frontends/{frontendId}/frontend-routes/{routeId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'frontendId' + '}', CGI.escape(frontend_id.to_s)).sub('{' + 'routeId' + '}', CGI.escape(route_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -1201,16 +2647,16 @@ def update_frontend_function_route_with_http_info(id, frontend_id, route_id, cre form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(create_frontend_function_route_request) + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_frontend_route_request) # return_type - return_type = opts[:debug_return_type] || 'FrontendFunctionRoute' + return_type = opts[:debug_return_type] || 'FrontendRoute' # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( - :operation => :"FrontendsApi.update_frontend_function_route", + :operation => :"FrontendsApi.update_frontend_route", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1221,7 +2667,7 @@ def update_frontend_function_route_with_http_info(id, frontend_id, route_id, cre data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FrontendsApi#update_frontend_function_route\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FrontendsApi#update_frontend_route\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/volcano/generated/lib/volcano-generated/api/functions_api.rb b/lib/volcano/generated/lib/volcano-generated/api/functions_api.rb index 49cd7c2a..86ed6582 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/functions_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/functions_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -24,9 +24,9 @@ def initialize(api_client = ApiClient.default) # @param id [String] Project ID # @param name [String] DNS-safe function name (lowercase letters, numbers, hyphens; cannot start or end with hyphen) # @param code [File] ZIP or tar.gz archive containing function source code plus dependency manifests/lockfiles. The API enforces SOURCE_ARCHIVE_SIZE_LIMIT_MB and stores a normalized tar.gz source archive. - # @param runtime [String] Runtime environment. Required. - Node.js: nodejs22.x, nodejs24.x - Python: python3.10, python3.11, python3.12, python3.13, python3.14 - Ruby: ruby3.3, ruby3.4, ruby4.0 + # @param runtime [String] Runtime environment. Required. - Node.js: nodejs22.x, nodejs24.x - Python: python3.10, python3.11, python3.12, python3.13, python3.14 - Ruby: ruby3.3, ruby3.4, ruby4.0 python3.10 is deprecated: it still deploys, and Volcano will remove it before 2027-08-31. # @param [Hash] opts the optional parameters - # @option opts [String] :handler The name of the function to invoke. Defaults to \\\"handler\\\" if not specified. Your code must export/define a function with this name: - Node.js: exports.handler (in index.js) - Python: def handler() (in main.py) - Ruby: def handler() (in main.rb) (default to 'handler') + # @option opts [String] :handler The name of the function to invoke. Defaults to \\\"handler\\\" if not specified. Your code must export/define a function with this name: - Node.js: exports.handler (in index.js, index.mjs or index.cjs, or in TypeScript in index.ts, index.mts, index.cts or index.tsx, which the build compiles without type-checking) - Python: def handler() (in main.py) - Ruby: def handler() (in main.rb) (default to 'handler') # @option opts [FunctionVisibility] :visibility Who can invoke the function. Omit it to keep the function's current visibility; a new function starts `private`. # @option opts [Boolean] :is_public Deprecated alias for `visibility`: `true` means `public` and `false` means `authenticated`. Sending both with different meanings returns 400. # @option opts [FunctionInvocationMode] :invocation_mode @@ -34,6 +34,7 @@ def initialize(api_client = ApiClient.default) # @option opts [String] :openapi_spec JSON-encoded OpenAPI 3.0 or 3.1 metadata for an HTTP-mode function. # @option opts [String] :variable_scope Which project variables this function receives. `all` (the default) gives it only project variables marked `shared: true`; `scoped` gives it only the variables it selects. Omitting this leaves an existing function's scope unchanged. # @option opts [String] :variables JSON-encoded array of project variable names this function requires, on top of the ones detected in its source. A declared name the project does not define is rejected with 400; a detected name it does not define is ignored. Only used when `variable_scope` is `scoped`. Omitting this leaves an existing function's declared names unchanged. + # @option opts [String] :commit JSON-encoded commit the uploaded source came from: `{\\\"repository\\\": \\\"acme/app\\\", \\\"sha\\\": \\\"<40-character commit ID>\\\", \\\"dirty\\\": false}`. `repository` is `owner/name` or a github.com remote URL (`https://github.com/acme/app.git`, `git@github.com:acme/app.git`, or `ssh://git@github.com/acme/app.git`); Volcano drops any credentials in the URL and records `owner/name`. `dirty` is `true` when the uploaded files differ from the commit. All three fields are required, and fields Volcano does not know are ignored. An empty value, `null`, or `\\\"\\\"` reports no commit. A malformed commit, or a repository not on GitHub, returns 400 before anything is deployed. Volcano records a function's commit with `commit.verified: false`; a clean commit of the project's connected repository that its production branch holds gets `commit.verification: repository`. # @return [Function] def create_function(id, name, code, runtime, opts = {}) data, _status_code, _headers = create_function_with_http_info(id, name, code, runtime, opts) @@ -45,9 +46,9 @@ def create_function(id, name, code, runtime, opts = {}) # @param id [String] Project ID # @param name [String] DNS-safe function name (lowercase letters, numbers, hyphens; cannot start or end with hyphen) # @param code [File] ZIP or tar.gz archive containing function source code plus dependency manifests/lockfiles. The API enforces SOURCE_ARCHIVE_SIZE_LIMIT_MB and stores a normalized tar.gz source archive. - # @param runtime [String] Runtime environment. Required. - Node.js: nodejs22.x, nodejs24.x - Python: python3.10, python3.11, python3.12, python3.13, python3.14 - Ruby: ruby3.3, ruby3.4, ruby4.0 + # @param runtime [String] Runtime environment. Required. - Node.js: nodejs22.x, nodejs24.x - Python: python3.10, python3.11, python3.12, python3.13, python3.14 - Ruby: ruby3.3, ruby3.4, ruby4.0 python3.10 is deprecated: it still deploys, and Volcano will remove it before 2027-08-31. # @param [Hash] opts the optional parameters - # @option opts [String] :handler The name of the function to invoke. Defaults to \\\"handler\\\" if not specified. Your code must export/define a function with this name: - Node.js: exports.handler (in index.js) - Python: def handler() (in main.py) - Ruby: def handler() (in main.rb) (default to 'handler') + # @option opts [String] :handler The name of the function to invoke. Defaults to \\\"handler\\\" if not specified. Your code must export/define a function with this name: - Node.js: exports.handler (in index.js, index.mjs or index.cjs, or in TypeScript in index.ts, index.mts, index.cts or index.tsx, which the build compiles without type-checking) - Python: def handler() (in main.py) - Ruby: def handler() (in main.rb) (default to 'handler') # @option opts [FunctionVisibility] :visibility Who can invoke the function. Omit it to keep the function's current visibility; a new function starts `private`. # @option opts [Boolean] :is_public Deprecated alias for `visibility`: `true` means `public` and `false` means `authenticated`. Sending both with different meanings returns 400. # @option opts [FunctionInvocationMode] :invocation_mode @@ -55,6 +56,7 @@ def create_function(id, name, code, runtime, opts = {}) # @option opts [String] :openapi_spec JSON-encoded OpenAPI 3.0 or 3.1 metadata for an HTTP-mode function. # @option opts [String] :variable_scope Which project variables this function receives. `all` (the default) gives it only project variables marked `shared: true`; `scoped` gives it only the variables it selects. Omitting this leaves an existing function's scope unchanged. # @option opts [String] :variables JSON-encoded array of project variable names this function requires, on top of the ones detected in its source. A declared name the project does not define is rejected with 400; a detected name it does not define is ignored. Only used when `variable_scope` is `scoped`. Omitting this leaves an existing function's declared names unchanged. + # @option opts [String] :commit JSON-encoded commit the uploaded source came from: `{\\\"repository\\\": \\\"acme/app\\\", \\\"sha\\\": \\\"<40-character commit ID>\\\", \\\"dirty\\\": false}`. `repository` is `owner/name` or a github.com remote URL (`https://github.com/acme/app.git`, `git@github.com:acme/app.git`, or `ssh://git@github.com/acme/app.git`); Volcano drops any credentials in the URL and records `owner/name`. `dirty` is `true` when the uploaded files differ from the commit. All three fields are required, and fields Volcano does not know are ignored. An empty value, `null`, or `\\\"\\\"` reports no commit. A malformed commit, or a repository not on GitHub, returns 400 before anything is deployed. Volcano records a function's commit with `commit.verified: false`; a clean commit of the project's connected repository that its production branch holds gets `commit.verification: repository`. # @return [Array<(Function, Integer, Hash)>] Function data, response status code and response headers def create_function_with_http_info(id, name, code, runtime, opts = {}) if @api_client.config.debugging @@ -123,6 +125,7 @@ def create_function_with_http_info(id, name, code, runtime, opts = {}) form_params['openapi_spec'] = opts[:'openapi_spec'] if !opts[:'openapi_spec'].nil? form_params['variable_scope'] = opts[:'variable_scope'] if !opts[:'variable_scope'].nil? form_params['variables'] = opts[:'variables'] if !opts[:'variables'].nil? + form_params['commit'] = opts[:'commit'] if !opts[:'commit'].nil? # http body (model) post_body = opts[:debug_body] @@ -150,6 +153,113 @@ def create_function_with_http_info(id, name, code, runtime, opts = {}) return data, status_code, headers end + # Create a function preview + # Builds the uploaded source with the function's runtime, handler and variables, and deploys it to a runtime of its own in every region the function deploys to. The preview is invoked at `https://.` and is always private, whatever the function's own visibility: only the project's service key, with `functions.invoke`, can invoke it, and signed-in users, anon keys and access tokens are refused. It gets none of the function's schedules or warmers. The response is `202` while the first deployment runs; read the preview for its `status` and `url`. While the `functions.candidates` capability is unavailable, including on the local development server, it answers `404` with code `feature_unavailable`. Reading and deleting existing previews, and rolling the function back to its own build, keep working. A preview builds like any deploy and spends the project's build minutes. A function has at most 20 live previews, and each name is unique within the function. Without `ttl_seconds` a preview is kept until it is deleted. Durable functions have no previews. + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param name [String] Names the preview within the function. Cannot be `production`. + # @param code [File] The function's source archive, as for deploying the function. Built with the function's runtime and handler. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :ttl_seconds Deletes the preview this many seconds after it is created, at most 30 days. Omit to keep it until deleted. + # @return [FunctionCandidate] + def create_function_candidate(id, function_id, name, code, opts = {}) + data, _status_code, _headers = create_function_candidate_with_http_info(id, function_id, name, code, opts) + data + end + + # Create a function preview + # Builds the uploaded source with the function's runtime, handler and variables, and deploys it to a runtime of its own in every region the function deploys to. The preview is invoked at `https://<preview id>.<functions domain>` and is always private, whatever the function's own visibility: only the project's service key, with `functions.invoke`, can invoke it, and signed-in users, anon keys and access tokens are refused. It gets none of the function's schedules or warmers. The response is `202` while the first deployment runs; read the preview for its `status` and `url`. While the `functions.candidates` capability is unavailable, including on the local development server, it answers `404` with code `feature_unavailable`. Reading and deleting existing previews, and rolling the function back to its own build, keep working. A preview builds like any deploy and spends the project's build minutes. A function has at most 20 live previews, and each name is unique within the function. Without `ttl_seconds` a preview is kept until it is deleted. Durable functions have no previews. + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param name [String] Names the preview within the function. Cannot be `production`. + # @param code [File] The function's source archive, as for deploying the function. Built with the function's runtime and handler. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :ttl_seconds Deletes the preview this many seconds after it is created, at most 30 days. Omit to keep it until deleted. + # @return [Array<(FunctionCandidate, Integer, Hash)>] FunctionCandidate data, response status code and response headers + def create_function_candidate_with_http_info(id, function_id, name, code, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FunctionsApi.create_function_candidate ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FunctionsApi.create_function_candidate" + end + # verify the required parameter 'function_id' is set + if @api_client.config.client_side_validation && function_id.nil? + fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.create_function_candidate" + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling FunctionsApi.create_function_candidate" + end + if @api_client.config.client_side_validation && name.to_s.length > 128 + fail ArgumentError, 'invalid value for "name" when calling FunctionsApi.create_function_candidate, the character length must be smaller than or equal to 128.' + end + + if @api_client.config.client_side_validation && name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name" when calling FunctionsApi.create_function_candidate, the character length must be greater than or equal to 1.' + end + + # verify the required parameter 'code' is set + if @api_client.config.client_side_validation && code.nil? + fail ArgumentError, "Missing the required parameter 'code' when calling FunctionsApi.create_function_candidate" + end + if @api_client.config.client_side_validation && !opts[:'ttl_seconds'].nil? && opts[:'ttl_seconds'] > 2592000 + fail ArgumentError, 'invalid value for "opts[:"ttl_seconds"]" when calling FunctionsApi.create_function_candidate, must be smaller than or equal to 2592000.' + end + + if @api_client.config.client_side_validation && !opts[:'ttl_seconds'].nil? && opts[:'ttl_seconds'] < 1 + fail ArgumentError, 'invalid value for "opts[:"ttl_seconds"]" when calling FunctionsApi.create_function_candidate, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/projects/{id}/functions/{functionId}/candidates'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + form_params['name'] = name + form_params['code'] = code + form_params['ttl_seconds'] = opts[:'ttl_seconds'] if !opts[:'ttl_seconds'].nil? + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FunctionCandidate' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FunctionsApi.create_function_candidate", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FunctionsApi#create_function_candidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create a scheduler for a function # Creates regional scheduled invocation jobs. Requested regions must be a subset of the function's deployed regions. # @param id [String] Project ID @@ -233,7 +343,7 @@ def create_function_scheduler_with_http_info(id, function_id, create_function_sc # Deploy multiple functions in one request # Upload multiple function source archives in one multipart request. Each archive should contain source files plus dependency manifests/lockfiles, not installed dependency directories. ZIP and tar.gz uploads are accepted and normalized to tar.gz before storage. The API enforces `SOURCE_ARCHIVE_SIZE_LIMIT_MB` for each uploaded and normalized source archive. The server records a shared deployment batch ID for the resulting function deployments. Each function deployment runs its own compile/publish workflow concurrently, and each publish build enforces `LAMBDA_TARGET_CONTAINER_SIZE_LIMIT_MB` for the final container image. One batch request can include up to 100 functions. Submit multiple batch requests for larger projects. If one function fails before its workflow starts, already-started function deployments are left running and the failed function is reported in the `failed` array. Failed new functions are deleted; failed updates are rolled back to their previous metadata/status where possible. # @param id [String] Project ID - # @param functions [String] JSON array of functions with `name`, `runtime`, optional `handler`, and `file_field`. Each `file_field` must name a multipart file field containing that function's ZIP or tar.gz source bundle. Each entry may also declare `variable_scope` (`all` or `scoped`) and `variables` (an array of project variable names). Omitting them leaves the function's stored declaration unchanged. Volcano detects direct environment references in the uploaded source code and keeps them separate from the declared names: detected names are not written back to the declaration and do not appear in a config export. A scoped function receives its declared names plus the detected ones the project defines; a detected name the project does not define is ignored, since such a reference is often optional. Detection reads code only, so a name appearing solely in a comment or in an unrelated string is not a reference. Declare a name when the function reads it through a computed key, or when it must not deploy without the variable. The request is rejected with 400 before anything is deployed if a scoped function declares a variable the project does not define, or if the resulting environment exceeds 4096 bytes. + # @param functions [String] JSON array of functions with `name`, `runtime`, optional `handler`, and `file_field`. Each `file_field` must name a multipart file field containing that function's ZIP or tar.gz source bundle. Each entry may also declare `variable_scope` (`all` or `scoped`) and `variables` (an array of project variable names). Omitting them leaves the function's stored declaration unchanged. Volcano detects direct environment references in the uploaded source code and keeps them separate from the declared names: detected names are not written back to the declaration and do not appear in a config export. A scoped function receives its declared names plus the detected ones the project defines; a detected name the project does not define is ignored, since such a reference is often optional. Detection reads code only, so a name appearing solely in a comment or in an unrelated string is not a reference. Declare a name when the function reads it through a computed key, or when it must not deploy without the variable. The request is rejected with 400 before anything is deployed if a scoped function declares a variable the project does not define, or if the resulting environment exceeds 4096 bytes. Each entry may also carry `commit`, the commit its source came from, as an object: `{\\\"repository\\\": \\\"acme/app\\\", \\\"sha\\\": \\\"<40-character commit ID>\\\", \\\"dirty\\\": false}`. It takes the same values as the `commit` field of a single function upload; `null` or `\\\"\\\"` reports no commit. The request is rejected with 400 before anything is deployed if an entry's commit is malformed or names a repository not on GitHub. # @param [Hash] opts the optional parameters # @option opts [File] :code_0 Function ZIP or tar.gz archive referenced by the first manifest entry's `file_field`; additional code_N file fields may be included. Each archive is subject to SOURCE_ARCHIVE_SIZE_LIMIT_MB. # @return [BatchFunctionDeployResponse] @@ -245,7 +355,7 @@ def create_functions_batch(id, functions, opts = {}) # Deploy multiple functions in one request # Upload multiple function source archives in one multipart request. Each archive should contain source files plus dependency manifests/lockfiles, not installed dependency directories. ZIP and tar.gz uploads are accepted and normalized to tar.gz before storage. The API enforces `SOURCE_ARCHIVE_SIZE_LIMIT_MB` for each uploaded and normalized source archive. The server records a shared deployment batch ID for the resulting function deployments. Each function deployment runs its own compile/publish workflow concurrently, and each publish build enforces `LAMBDA_TARGET_CONTAINER_SIZE_LIMIT_MB` for the final container image. One batch request can include up to 100 functions. Submit multiple batch requests for larger projects. If one function fails before its workflow starts, already-started function deployments are left running and the failed function is reported in the `failed` array. Failed new functions are deleted; failed updates are rolled back to their previous metadata/status where possible. # @param id [String] Project ID - # @param functions [String] JSON array of functions with `name`, `runtime`, optional `handler`, and `file_field`. Each `file_field` must name a multipart file field containing that function's ZIP or tar.gz source bundle. Each entry may also declare `variable_scope` (`all` or `scoped`) and `variables` (an array of project variable names). Omitting them leaves the function's stored declaration unchanged. Volcano detects direct environment references in the uploaded source code and keeps them separate from the declared names: detected names are not written back to the declaration and do not appear in a config export. A scoped function receives its declared names plus the detected ones the project defines; a detected name the project does not define is ignored, since such a reference is often optional. Detection reads code only, so a name appearing solely in a comment or in an unrelated string is not a reference. Declare a name when the function reads it through a computed key, or when it must not deploy without the variable. The request is rejected with 400 before anything is deployed if a scoped function declares a variable the project does not define, or if the resulting environment exceeds 4096 bytes. + # @param functions [String] JSON array of functions with `name`, `runtime`, optional `handler`, and `file_field`. Each `file_field` must name a multipart file field containing that function's ZIP or tar.gz source bundle. Each entry may also declare `variable_scope` (`all` or `scoped`) and `variables` (an array of project variable names). Omitting them leaves the function's stored declaration unchanged. Volcano detects direct environment references in the uploaded source code and keeps them separate from the declared names: detected names are not written back to the declaration and do not appear in a config export. A scoped function receives its declared names plus the detected ones the project defines; a detected name the project does not define is ignored, since such a reference is often optional. Detection reads code only, so a name appearing solely in a comment or in an unrelated string is not a reference. Declare a name when the function reads it through a computed key, or when it must not deploy without the variable. The request is rejected with 400 before anything is deployed if a scoped function declares a variable the project does not define, or if the resulting environment exceeds 4096 bytes. Each entry may also carry `commit`, the commit its source came from, as an object: `{\\\"repository\\\": \\\"acme/app\\\", \\\"sha\\\": \\\"<40-character commit ID>\\\", \\\"dirty\\\": false}`. It takes the same values as the `commit` field of a single function upload; `null` or `\\\"\\\"` reports no commit. The request is rejected with 400 before anything is deployed if an entry's commit is malformed or names a repository not on GitHub. # @param [Hash] opts the optional parameters # @option opts [File] :code_0 Function ZIP or tar.gz archive referenced by the first manifest entry's `file_field`; additional code_N file fields may be included. Each archive is subject to SOURCE_ARCHIVE_SIZE_LIMIT_MB. # @return [Array<(BatchFunctionDeployResponse, Integer, Hash)>] BatchFunctionDeployResponse data, response status code and response headers @@ -377,6 +487,81 @@ def delete_function_with_http_info(id, function_id, opts = {}) return data, status_code, headers end + # Delete a function preview + # Starts removing the preview's runtime, URL, builds and stored source once any running deployment finishes; the preview reads `deleting` until that is done, and answers `404` once it is gone. Asking again for a preview that is already being deleted is the same request. A preview the function runs cannot be deleted: roll back first. Deleting one the function only keeps for a rollback gives that rollback up; the function's own build stays one `to_production` rollback away. Never depends on the `functions.candidates` capability. + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param candidate_id [String] Function preview (Candidate) ID + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_function_candidate(id, function_id, candidate_id, opts = {}) + delete_function_candidate_with_http_info(id, function_id, candidate_id, opts) + nil + end + + # Delete a function preview + # Starts removing the preview's runtime, URL, builds and stored source once any running deployment finishes; the preview reads `deleting` until that is done, and answers `404` once it is gone. Asking again for a preview that is already being deleted is the same request. A preview the function runs cannot be deleted: roll back first. Deleting one the function only keeps for a rollback gives that rollback up; the function's own build stays one `to_production` rollback away. Never depends on the `functions.candidates` capability. + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param candidate_id [String] Function preview (Candidate) ID + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_function_candidate_with_http_info(id, function_id, candidate_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FunctionsApi.delete_function_candidate ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FunctionsApi.delete_function_candidate" + end + # verify the required parameter 'function_id' is set + if @api_client.config.client_side_validation && function_id.nil? + fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.delete_function_candidate" + end + # verify the required parameter 'candidate_id' is set + if @api_client.config.client_side_validation && candidate_id.nil? + fail ArgumentError, "Missing the required parameter 'candidate_id' when calling FunctionsApi.delete_function_candidate" + end + # resource path + local_var_path = '/projects/{id}/functions/{functionId}/candidates/{candidateId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)).sub('{' + 'candidateId' + '}', CGI.escape(candidate_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FunctionsApi.delete_function_candidate", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FunctionsApi#delete_function_candidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete a function scheduler # @param id [String] Project ID # @param function_id [String] Function ID @@ -478,7 +663,293 @@ def get_function_with_http_info(id, function_id, opts = {}) fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.get_function" end # resource path - local_var_path = '/projects/{id}/functions/{functionId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)) + local_var_path = '/projects/{id}/functions/{functionId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Function' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FunctionsApi.get_function", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FunctionsApi#get_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a function preview + # Returns the preview with its latest deployment. Never depends on the `functions.candidates` capability. + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param candidate_id [String] Function preview (Candidate) ID + # @param [Hash] opts the optional parameters + # @return [FunctionCandidate] + def get_function_candidate(id, function_id, candidate_id, opts = {}) + data, _status_code, _headers = get_function_candidate_with_http_info(id, function_id, candidate_id, opts) + data + end + + # Get a function preview + # Returns the preview with its latest deployment. Never depends on the `functions.candidates` capability. + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param candidate_id [String] Function preview (Candidate) ID + # @param [Hash] opts the optional parameters + # @return [Array<(FunctionCandidate, Integer, Hash)>] FunctionCandidate data, response status code and response headers + def get_function_candidate_with_http_info(id, function_id, candidate_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FunctionsApi.get_function_candidate ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FunctionsApi.get_function_candidate" + end + # verify the required parameter 'function_id' is set + if @api_client.config.client_side_validation && function_id.nil? + fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.get_function_candidate" + end + # verify the required parameter 'candidate_id' is set + if @api_client.config.client_side_validation && candidate_id.nil? + fail ArgumentError, "Missing the required parameter 'candidate_id' when calling FunctionsApi.get_function_candidate" + end + # resource path + local_var_path = '/projects/{id}/functions/{functionId}/candidates/{candidateId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)).sub('{' + 'candidateId' + '}', CGI.escape(candidate_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FunctionCandidate' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FunctionsApi.get_function_candidate", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FunctionsApi#get_function_candidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a function scheduler + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param scheduler_id [String] Function scheduler ID + # @param [Hash] opts the optional parameters + # @return [FunctionScheduler] + def get_function_scheduler(id, function_id, scheduler_id, opts = {}) + data, _status_code, _headers = get_function_scheduler_with_http_info(id, function_id, scheduler_id, opts) + data + end + + # Get a function scheduler + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param scheduler_id [String] Function scheduler ID + # @param [Hash] opts the optional parameters + # @return [Array<(FunctionScheduler, Integer, Hash)>] FunctionScheduler data, response status code and response headers + def get_function_scheduler_with_http_info(id, function_id, scheduler_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FunctionsApi.get_function_scheduler ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FunctionsApi.get_function_scheduler" + end + # verify the required parameter 'function_id' is set + if @api_client.config.client_side_validation && function_id.nil? + fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.get_function_scheduler" + end + # verify the required parameter 'scheduler_id' is set + if @api_client.config.client_side_validation && scheduler_id.nil? + fail ArgumentError, "Missing the required parameter 'scheduler_id' when calling FunctionsApi.get_function_scheduler" + end + # resource path + local_var_path = '/projects/{id}/functions/{functionId}/schedulers/{schedulerId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)).sub('{' + 'schedulerId' + '}', CGI.escape(scheduler_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FunctionScheduler' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FunctionsApi.get_function_scheduler", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FunctionsApi#get_function_scheduler\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get what a function runs + # Returns whether the function runs its own build or a promoted preview's, what a rollback returns to, and its latest promotion or rollback. Never depends on the `functions.candidates` capability. A durable function always runs its own build. + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param [Hash] opts the optional parameters + # @return [FunctionServing] + def get_function_serving(id, function_id, opts = {}) + data, _status_code, _headers = get_function_serving_with_http_info(id, function_id, opts) + data + end + + # Get what a function runs + # Returns whether the function runs its own build or a promoted preview's, what a rollback returns to, and its latest promotion or rollback. Never depends on the `functions.candidates` capability. A durable function always runs its own build. + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param [Hash] opts the optional parameters + # @return [Array<(FunctionServing, Integer, Hash)>] FunctionServing data, response status code and response headers + def get_function_serving_with_http_info(id, function_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FunctionsApi.get_function_serving ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FunctionsApi.get_function_serving" + end + # verify the required parameter 'function_id' is set + if @api_client.config.client_side_validation && function_id.nil? + fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.get_function_serving" + end + # resource path + local_var_path = '/projects/{id}/functions/{functionId}/serving'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FunctionServing' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FunctionsApi.get_function_serving", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FunctionsApi#get_function_serving\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Invoke a function + # Invoke a function. The function's `visibility` decides which credentials may call it, and the function does not run for any other. A `private` function answers every credential but a service key exactly as a missing one, with 404, so its name and id cannot be discovered; an anon key on an `authenticated` function gets 403. An SDK calling by name resolves it first through `GET /functions/resolve`, which answers that anon key with 404 instead. **With Service Key** (admin/background operations, every visibility): - Use for background jobs, webhooks, cron, admin operations - Function receives payload only (no user context) - Database queries bypass RLS (admin access) **With Auth User Token** (user-facing, `authenticated` or `public` functions): - Use for user-initiated actions - Includes users from anonymous sign-ins - Function receives payload + `__volcano_auth` context: ```javascript { user_id: \"uuid\", email: \"user@example.com\", project_id: \"uuid\", role: \"authenticated\" or \"anonymous\" } ``` - Database queries enforce RLS (user-scoped data) **With Anon Key** (`public` functions only): - Requires anon key permission: `functions.invoke` - Function must have `visibility: public` - Function receives payload only (no `__volcano_auth`) **Reserved payload keys:** the top-level `__volcano_auth`, `__volcano_http` and `__volcano_mount` keys are reserved. Volcano removes caller-supplied values for all three before the function runs; only an auth user token adds a server-built `__volcano_auth`, and only HTTP-mode ingress sets `__volcano_http: true`. `__volcano_mount` is set only by Volcano's first-party app mounts. **Transport and CORS:** - This operation is the authenticated direct RPC endpoint and always uses the POST `{payload: ...}` contract, including for functions whose DNS ingress is configured in HTTP mode. - The geo-routed DNS ingress is the function's `invoke_url`. It is on a different domain from this API, so it cannot be derived from the API host. - RPC-mode DNS ingress accepts POST at `/`. HTTP-mode DNS ingress accepts GET, HEAD, POST, PUT, PATCH, and DELETE at `/` and nested paths. - Direct and RPC-mode CORS preflight advertises `POST, OPTIONS`. HTTP-mode DNS preflight advertises `GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS`. - `http_auth_mode: none` applies only to public HTTP-mode DNS ingress; this direct operation always requires a Volcano credential. **Durable functions are not invocable here.** A durable function's id answers 404, whatever its visibility, because a synchronous call would run it with no execution record, no idempotency and no concurrency accounting. Start one with `POST /durable-functions/{functionId}/executions`. + # @param function_id [String] Function ID + # @param function_invocation_request [FunctionInvocationRequest] + # @param [Hash] opts the optional parameters + # @return [Hash] + def invoke_function(function_id, function_invocation_request, opts = {}) + data, _status_code, _headers = invoke_function_with_http_info(function_id, function_invocation_request, opts) + data + end + + # Invoke a function + # Invoke a function. The function's `visibility` decides which credentials may call it, and the function does not run for any other. A `private` function answers every credential but a service key exactly as a missing one, with 404, so its name and id cannot be discovered; an anon key on an `authenticated` function gets 403. An SDK calling by name resolves it first through `GET /functions/resolve`, which answers that anon key with 404 instead. **With Service Key** (admin/background operations, every visibility): - Use for background jobs, webhooks, cron, admin operations - Function receives payload only (no user context) - Database queries bypass RLS (admin access) **With Auth User Token** (user-facing, `authenticated` or `public` functions): - Use for user-initiated actions - Includes users from anonymous sign-ins - Function receives payload + `__volcano_auth` context: ```javascript { user_id: \"uuid\", email: \"user@example.com\", project_id: \"uuid\", role: \"authenticated\" or \"anonymous\" } ``` - Database queries enforce RLS (user-scoped data) **With Anon Key** (`public` functions only): - Requires anon key permission: `functions.invoke` - Function must have `visibility: public` - Function receives payload only (no `__volcano_auth`) **Reserved payload keys:** the top-level `__volcano_auth`, `__volcano_http` and `__volcano_mount` keys are reserved. Volcano removes caller-supplied values for all three before the function runs; only an auth user token adds a server-built `__volcano_auth`, and only HTTP-mode ingress sets `__volcano_http: true`. `__volcano_mount` is set only by Volcano's first-party app mounts. **Transport and CORS:** - This operation is the authenticated direct RPC endpoint and always uses the POST `{payload: ...}` contract, including for functions whose DNS ingress is configured in HTTP mode. - The geo-routed DNS ingress is the function's `invoke_url`. It is on a different domain from this API, so it cannot be derived from the API host. - RPC-mode DNS ingress accepts POST at `/`. HTTP-mode DNS ingress accepts GET, HEAD, POST, PUT, PATCH, and DELETE at `/` and nested paths. - Direct and RPC-mode CORS preflight advertises `POST, OPTIONS`. HTTP-mode DNS preflight advertises `GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS`. - `http_auth_mode: none` applies only to public HTTP-mode DNS ingress; this direct operation always requires a Volcano credential. **Durable functions are not invocable here.** A durable function's id answers 404, whatever its visibility, because a synchronous call would run it with no execution record, no idempotency and no concurrency accounting. Start one with `POST /durable-functions/{functionId}/executions`. + # @param function_id [String] Function ID + # @param function_invocation_request [FunctionInvocationRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers + def invoke_function_with_http_info(function_id, function_invocation_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FunctionsApi.invoke_function ...' + end + # verify the required parameter 'function_id' is set + if @api_client.config.client_side_validation && function_id.nil? + fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.invoke_function" + end + # verify the required parameter 'function_invocation_request' is set + if @api_client.config.client_side_validation && function_invocation_request.nil? + fail ArgumentError, "Missing the required parameter 'function_invocation_request' when calling FunctionsApi.invoke_function" + end + # resource path + local_var_path = '/functions/{functionId}/invoke'.sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -487,21 +958,26 @@ def get_function_with_http_info(id, function_id, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(function_invocation_request) # return_type - return_type = opts[:debug_return_type] || 'Function' + return_type = opts[:debug_return_type] || 'Hash' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'AuthUserAccessToken', 'AnonKey'] new_options = opts.merge( - :operation => :"FunctionsApi.get_function", + :operation => :"FunctionsApi.invoke_function", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -510,48 +986,50 @@ def get_function_with_http_info(id, function_id, opts = {}) :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FunctionsApi#get_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FunctionsApi#invoke_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get a function scheduler + # List a function preview's deployments + # Returns the preview's deployments, newest first, at most 100. Never depends on the `functions.candidates` capability. # @param id [String] Project ID # @param function_id [String] Function ID - # @param scheduler_id [String] Function scheduler ID + # @param candidate_id [String] Function preview (Candidate) ID # @param [Hash] opts the optional parameters - # @return [FunctionScheduler] - def get_function_scheduler(id, function_id, scheduler_id, opts = {}) - data, _status_code, _headers = get_function_scheduler_with_http_info(id, function_id, scheduler_id, opts) + # @return [FunctionCandidateDeploymentList] + def list_function_candidate_deployments(id, function_id, candidate_id, opts = {}) + data, _status_code, _headers = list_function_candidate_deployments_with_http_info(id, function_id, candidate_id, opts) data end - # Get a function scheduler + # List a function preview's deployments + # Returns the preview's deployments, newest first, at most 100. Never depends on the `functions.candidates` capability. # @param id [String] Project ID # @param function_id [String] Function ID - # @param scheduler_id [String] Function scheduler ID + # @param candidate_id [String] Function preview (Candidate) ID # @param [Hash] opts the optional parameters - # @return [Array<(FunctionScheduler, Integer, Hash)>] FunctionScheduler data, response status code and response headers - def get_function_scheduler_with_http_info(id, function_id, scheduler_id, opts = {}) + # @return [Array<(FunctionCandidateDeploymentList, Integer, Hash)>] FunctionCandidateDeploymentList data, response status code and response headers + def list_function_candidate_deployments_with_http_info(id, function_id, candidate_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FunctionsApi.get_function_scheduler ...' + @api_client.config.logger.debug 'Calling API: FunctionsApi.list_function_candidate_deployments ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling FunctionsApi.get_function_scheduler" + fail ArgumentError, "Missing the required parameter 'id' when calling FunctionsApi.list_function_candidate_deployments" end # verify the required parameter 'function_id' is set if @api_client.config.client_side_validation && function_id.nil? - fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.get_function_scheduler" + fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.list_function_candidate_deployments" end - # verify the required parameter 'scheduler_id' is set - if @api_client.config.client_side_validation && scheduler_id.nil? - fail ArgumentError, "Missing the required parameter 'scheduler_id' when calling FunctionsApi.get_function_scheduler" + # verify the required parameter 'candidate_id' is set + if @api_client.config.client_side_validation && candidate_id.nil? + fail ArgumentError, "Missing the required parameter 'candidate_id' when calling FunctionsApi.list_function_candidate_deployments" end # resource path - local_var_path = '/projects/{id}/functions/{functionId}/schedulers/{schedulerId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)).sub('{' + 'schedulerId' + '}', CGI.escape(scheduler_id.to_s)) + local_var_path = '/projects/{id}/functions/{functionId}/candidates/{candidateId}/deployments'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)).sub('{' + 'candidateId' + '}', CGI.escape(candidate_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -568,13 +1046,13 @@ def get_function_scheduler_with_http_info(id, function_id, scheduler_id, opts = post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'FunctionScheduler' + return_type = opts[:debug_return_type] || 'FunctionCandidateDeploymentList' # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( - :operation => :"FunctionsApi.get_function_scheduler", + :operation => :"FunctionsApi.list_function_candidate_deployments", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -585,42 +1063,42 @@ def get_function_scheduler_with_http_info(id, function_id, scheduler_id, opts = data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FunctionsApi#get_function_scheduler\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FunctionsApi#list_function_candidate_deployments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Invoke a function - # Invoke a function. The function's `visibility` decides which credentials may call it, and the function does not run for any other. A `private` function answers every credential but a service key exactly as a missing one, with 404, so its name and id cannot be discovered; an anon key on an `authenticated` function gets 403. An SDK calling by name resolves it first through `GET /functions/resolve`, which answers that anon key with 404 instead. **With Service Key** (admin/background operations, every visibility): - Use for background jobs, webhooks, cron, admin operations - Function receives payload only (no user context) - Database queries bypass RLS (admin access) **With Auth User Token** (user-facing, `authenticated` or `public` functions): - Use for user-initiated actions - Includes users from anonymous sign-ins - Function receives payload + `__volcano_auth` context: ```javascript { user_id: \"uuid\", email: \"user@example.com\", project_id: \"uuid\", role: \"authenticated\" or \"anonymous\" } ``` - Database queries enforce RLS (user-scoped data) **With Anon Key** (`public` functions only): - Requires anon key permission: `functions.invoke` - Function must have `visibility: public` - Function receives payload only (no `__volcano_auth`) **Transport and CORS:** - This operation is the authenticated direct RPC endpoint and always uses the POST `{payload: ...}` contract, including for functions whose DNS ingress is configured in HTTP mode. - The geo-routed DNS ingress is the function's `invoke_url`. It is on a different domain from this API, so it cannot be derived from the API host. - RPC-mode DNS ingress accepts POST at `/`. HTTP-mode DNS ingress accepts GET, HEAD, POST, PUT, PATCH, and DELETE at `/` and nested paths. - Direct and RPC-mode CORS preflight advertises `POST, OPTIONS`. HTTP-mode DNS preflight advertises `GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS`. - `http_auth_mode: none` applies only to public HTTP-mode DNS ingress; this direct operation always requires a Volcano credential. **Durable functions are not invocable here.** A durable function's id answers 404, whatever its visibility, because a synchronous call would run it with no execution record, no idempotency and no concurrency accounting. Start one with `POST /durable-functions/{functionId}/executions`. + # List a function's previews + # Returns the function's previews, oldest first, each with its latest deployment. A function has at most 20 live previews. Reading never depends on the `functions.candidates` capability. A durable function has no previews: reading its previews answers an empty list, and reading its serving state answers its own build. + # @param id [String] Project ID # @param function_id [String] Function ID - # @param function_invocation_request [FunctionInvocationRequest] # @param [Hash] opts the optional parameters - # @return [Hash] - def invoke_function(function_id, function_invocation_request, opts = {}) - data, _status_code, _headers = invoke_function_with_http_info(function_id, function_invocation_request, opts) + # @return [FunctionCandidateList] + def list_function_candidates(id, function_id, opts = {}) + data, _status_code, _headers = list_function_candidates_with_http_info(id, function_id, opts) data end - # Invoke a function - # Invoke a function. The function's `visibility` decides which credentials may call it, and the function does not run for any other. A `private` function answers every credential but a service key exactly as a missing one, with 404, so its name and id cannot be discovered; an anon key on an `authenticated` function gets 403. An SDK calling by name resolves it first through `GET /functions/resolve`, which answers that anon key with 404 instead. **With Service Key** (admin/background operations, every visibility): - Use for background jobs, webhooks, cron, admin operations - Function receives payload only (no user context) - Database queries bypass RLS (admin access) **With Auth User Token** (user-facing, `authenticated` or `public` functions): - Use for user-initiated actions - Includes users from anonymous sign-ins - Function receives payload + `__volcano_auth` context: ```javascript { user_id: \"uuid\", email: \"user@example.com\", project_id: \"uuid\", role: \"authenticated\" or \"anonymous\" } ``` - Database queries enforce RLS (user-scoped data) **With Anon Key** (`public` functions only): - Requires anon key permission: `functions.invoke` - Function must have `visibility: public` - Function receives payload only (no `__volcano_auth`) **Transport and CORS:** - This operation is the authenticated direct RPC endpoint and always uses the POST `{payload: ...}` contract, including for functions whose DNS ingress is configured in HTTP mode. - The geo-routed DNS ingress is the function's `invoke_url`. It is on a different domain from this API, so it cannot be derived from the API host. - RPC-mode DNS ingress accepts POST at `/`. HTTP-mode DNS ingress accepts GET, HEAD, POST, PUT, PATCH, and DELETE at `/` and nested paths. - Direct and RPC-mode CORS preflight advertises `POST, OPTIONS`. HTTP-mode DNS preflight advertises `GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS`. - `http_auth_mode: none` applies only to public HTTP-mode DNS ingress; this direct operation always requires a Volcano credential. **Durable functions are not invocable here.** A durable function's id answers 404, whatever its visibility, because a synchronous call would run it with no execution record, no idempotency and no concurrency accounting. Start one with `POST /durable-functions/{functionId}/executions`. + # List a function's previews + # Returns the function's previews, oldest first, each with its latest deployment. A function has at most 20 live previews. Reading never depends on the `functions.candidates` capability. A durable function has no previews: reading its previews answers an empty list, and reading its serving state answers its own build. + # @param id [String] Project ID # @param function_id [String] Function ID - # @param function_invocation_request [FunctionInvocationRequest] # @param [Hash] opts the optional parameters - # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers - def invoke_function_with_http_info(function_id, function_invocation_request, opts = {}) + # @return [Array<(FunctionCandidateList, Integer, Hash)>] FunctionCandidateList data, response status code and response headers + def list_function_candidates_with_http_info(id, function_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FunctionsApi.invoke_function ...' + @api_client.config.logger.debug 'Calling API: FunctionsApi.list_function_candidates ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FunctionsApi.list_function_candidates" end # verify the required parameter 'function_id' is set if @api_client.config.client_side_validation && function_id.nil? - fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.invoke_function" - end - # verify the required parameter 'function_invocation_request' is set - if @api_client.config.client_side_validation && function_invocation_request.nil? - fail ArgumentError, "Missing the required parameter 'function_invocation_request' when calling FunctionsApi.invoke_function" + fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.list_function_candidates" end # resource path - local_var_path = '/functions/{functionId}/invoke'.sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)) + local_var_path = '/projects/{id}/functions/{functionId}/candidates'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -629,26 +1107,21 @@ def invoke_function_with_http_info(function_id, function_invocation_request, opt header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(function_invocation_request) + post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'Hash' + return_type = opts[:debug_return_type] || 'FunctionCandidateList' # auth_names - auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'AuthUserAccessToken', 'AnonKey'] + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] new_options = opts.merge( - :operation => :"FunctionsApi.invoke_function", + :operation => :"FunctionsApi.list_function_candidates", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -657,9 +1130,9 @@ def invoke_function_with_http_info(function_id, function_invocation_request, opt :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FunctionsApi#invoke_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FunctionsApi#list_function_candidates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -1135,8 +1608,181 @@ def list_project_schedulers_with_http_info(id, opts = {}) return data, status_code, headers end + # Promote a function preview + # Points the function's traffic at the preview's runtime. Nothing is deployed or rebuilt, so it takes effect at once: every call to the function, through its own URL, the invoke route, a schedule or a frontend route, runs the preview's code, while the function keeps its ID, URL, visibility, schedules, metering and logs. The function's own build is kept as it is for a rollback, and what the function ran becomes what a rollback returns to. The preview must be serving a successful deployment built with the variables, runtime and handler the function has now, in every region the function deploys to, and the function must have a successful deployment of its own. It is refused while a deployment of the function, or a synchronization of its variables, runs. Promotion names the `revision` the caller read from `serving`; a competing promotion or rollback makes it fail with `409`. Once the project's repository is the source of truth, promotion is refused with `409`, as a direct deploy is. While the `functions.candidates` capability is unavailable, including on the local development server, it answers `404` with code `feature_unavailable`. + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param candidate_id [String] Function preview (Candidate) ID + # @param function_promotion_request [FunctionPromotionRequest] + # @param [Hash] opts the optional parameters + # @return [FunctionServing] + def promote_function_candidate(id, function_id, candidate_id, function_promotion_request, opts = {}) + data, _status_code, _headers = promote_function_candidate_with_http_info(id, function_id, candidate_id, function_promotion_request, opts) + data + end + + # Promote a function preview + # Points the function's traffic at the preview's runtime. Nothing is deployed or rebuilt, so it takes effect at once: every call to the function, through its own URL, the invoke route, a schedule or a frontend route, runs the preview's code, while the function keeps its ID, URL, visibility, schedules, metering and logs. The function's own build is kept as it is for a rollback, and what the function ran becomes what a rollback returns to. The preview must be serving a successful deployment built with the variables, runtime and handler the function has now, in every region the function deploys to, and the function must have a successful deployment of its own. It is refused while a deployment of the function, or a synchronization of its variables, runs. Promotion names the `revision` the caller read from `serving`; a competing promotion or rollback makes it fail with `409`. Once the project's repository is the source of truth, promotion is refused with `409`, as a direct deploy is. While the `functions.candidates` capability is unavailable, including on the local development server, it answers `404` with code `feature_unavailable`. + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param candidate_id [String] Function preview (Candidate) ID + # @param function_promotion_request [FunctionPromotionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FunctionServing, Integer, Hash)>] FunctionServing data, response status code and response headers + def promote_function_candidate_with_http_info(id, function_id, candidate_id, function_promotion_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FunctionsApi.promote_function_candidate ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FunctionsApi.promote_function_candidate" + end + # verify the required parameter 'function_id' is set + if @api_client.config.client_side_validation && function_id.nil? + fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.promote_function_candidate" + end + # verify the required parameter 'candidate_id' is set + if @api_client.config.client_side_validation && candidate_id.nil? + fail ArgumentError, "Missing the required parameter 'candidate_id' when calling FunctionsApi.promote_function_candidate" + end + # verify the required parameter 'function_promotion_request' is set + if @api_client.config.client_side_validation && function_promotion_request.nil? + fail ArgumentError, "Missing the required parameter 'function_promotion_request' when calling FunctionsApi.promote_function_candidate" + end + # resource path + local_var_path = '/projects/{id}/functions/{functionId}/candidates/{candidateId}/promote'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)).sub('{' + 'candidateId' + '}', CGI.escape(candidate_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(function_promotion_request) + + # return_type + return_type = opts[:debug_return_type] || 'FunctionServing' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FunctionsApi.promote_function_candidate", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FunctionsApi#promote_function_candidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Deploy new source to a function preview + # Builds the uploaded source and deploys it to the preview, which keeps serving its previous deployment until this one succeeds. A preview takes one deployment at a time, and one the function runs, or keeps for a rollback, takes none. While the `functions.candidates` capability is unavailable, including on the local development server, it answers `404` with code `feature_unavailable`. A deployment builds like any deploy and spends the project's build minutes. + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param candidate_id [String] Function preview (Candidate) ID + # @param code [File] The function's source archive, as for deploying the function. Built with the function's runtime and handler. + # @param [Hash] opts the optional parameters + # @return [FunctionCandidateDeployment] + def redeploy_function_candidate(id, function_id, candidate_id, code, opts = {}) + data, _status_code, _headers = redeploy_function_candidate_with_http_info(id, function_id, candidate_id, code, opts) + data + end + + # Deploy new source to a function preview + # Builds the uploaded source and deploys it to the preview, which keeps serving its previous deployment until this one succeeds. A preview takes one deployment at a time, and one the function runs, or keeps for a rollback, takes none. While the `functions.candidates` capability is unavailable, including on the local development server, it answers `404` with code `feature_unavailable`. A deployment builds like any deploy and spends the project's build minutes. + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param candidate_id [String] Function preview (Candidate) ID + # @param code [File] The function's source archive, as for deploying the function. Built with the function's runtime and handler. + # @param [Hash] opts the optional parameters + # @return [Array<(FunctionCandidateDeployment, Integer, Hash)>] FunctionCandidateDeployment data, response status code and response headers + def redeploy_function_candidate_with_http_info(id, function_id, candidate_id, code, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FunctionsApi.redeploy_function_candidate ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FunctionsApi.redeploy_function_candidate" + end + # verify the required parameter 'function_id' is set + if @api_client.config.client_side_validation && function_id.nil? + fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.redeploy_function_candidate" + end + # verify the required parameter 'candidate_id' is set + if @api_client.config.client_side_validation && candidate_id.nil? + fail ArgumentError, "Missing the required parameter 'candidate_id' when calling FunctionsApi.redeploy_function_candidate" + end + # verify the required parameter 'code' is set + if @api_client.config.client_side_validation && code.nil? + fail ArgumentError, "Missing the required parameter 'code' when calling FunctionsApi.redeploy_function_candidate" + end + # resource path + local_var_path = '/projects/{id}/functions/{functionId}/candidates/{candidateId}/deployments'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)).sub('{' + 'candidateId' + '}', CGI.escape(candidate_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + form_params['code'] = code + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'FunctionCandidateDeployment' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FunctionsApi.redeploy_function_candidate", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FunctionsApi#redeploy_function_candidate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Resolve function name for invocation - # Resolves a DNS-safe function name to its function ID and invocation URL within the caller's project. SDKs use this endpoint internally to invoke by function name while routing by function ID. Invoke the returned `invoke_url` as-is. It does not share a domain with the API, so a host built from the API URL will not reach the function. When the deployment serves no public invocation domain, as in local development, `invoke_url` is omitted and callers invoke through `POST /functions/{functionId}/invoke`. **With Service Key**: - Allowed **With Auth User Token**: - Allowed for `authenticated` and `public` functions - A `private` function answers 404, exactly as a missing one **With Anon Key**: - Requires anon key permission: `functions.invoke` - Function must have `visibility: public`; any other answers 404 + # Resolves a DNS-safe function name to its function ID and invocation URL within the caller's project. SDKs use this endpoint internally to invoke by function name while routing by function ID. Invoke the returned `invoke_url` as-is. It does not share a domain with the API, so a host built from the API URL will not reach the function. In local development, and when the deployment serves no public invocation domain, `invoke_url` is omitted and callers invoke through `POST /functions/{functionId}/invoke`. A local function's own `invoke_url`, for webhook testing, is on the function resource. **With Service Key**: - Allowed **With Auth User Token**: - Allowed for `authenticated` and `public` functions - A `private` function answers 404, exactly as a missing one **With Anon Key**: - Requires anon key permission: `functions.invoke` - Function must have `visibility: public`; any other answers 404 # @param name [String] DNS-safe function name (lowercase letters, numbers, hyphens; cannot start or end with hyphen) # @param [Hash] opts the optional parameters # @return [ResolveFunctionResponse] @@ -1146,7 +1792,7 @@ def resolve_function_for_invocation(name, opts = {}) end # Resolve function name for invocation - # Resolves a DNS-safe function name to its function ID and invocation URL within the caller's project. SDKs use this endpoint internally to invoke by function name while routing by function ID. Invoke the returned `invoke_url` as-is. It does not share a domain with the API, so a host built from the API URL will not reach the function. When the deployment serves no public invocation domain, as in local development, `invoke_url` is omitted and callers invoke through `POST /functions/{functionId}/invoke`. **With Service Key**: - Allowed **With Auth User Token**: - Allowed for `authenticated` and `public` functions - A `private` function answers 404, exactly as a missing one **With Anon Key**: - Requires anon key permission: `functions.invoke` - Function must have `visibility: public`; any other answers 404 + # Resolves a DNS-safe function name to its function ID and invocation URL within the caller's project. SDKs use this endpoint internally to invoke by function name while routing by function ID. Invoke the returned `invoke_url` as-is. It does not share a domain with the API, so a host built from the API URL will not reach the function. In local development, and when the deployment serves no public invocation domain, `invoke_url` is omitted and callers invoke through `POST /functions/{functionId}/invoke`. A local function's own `invoke_url`, for webhook testing, is on the function resource. **With Service Key**: - Allowed **With Auth User Token**: - Allowed for `authenticated` and `public` functions - A `private` function answers 404, exactly as a missing one **With Anon Key**: - Requires anon key permission: `functions.invoke` - Function must have `visibility: public`; any other answers 404 # @param name [String] DNS-safe function name (lowercase letters, numbers, hyphens; cannot start or end with hyphen) # @param [Hash] opts the optional parameters # @return [Array<(ResolveFunctionResponse, Integer, Hash)>] ResolveFunctionResponse data, response status code and response headers @@ -1208,6 +1854,86 @@ def resolve_function_for_invocation_with_http_info(name, opts = {}) return data, status_code, headers end + # Roll back what a function runs + # Points the function's traffic back at what served it before its last promotion or rollback, or at its own build with `to_production`. A rollback is a new activation, so what it leaves becomes what a further rollback returns to, and it can itself be undone. Nothing is deployed, so it takes effect at once. It names the `revision` the caller read; a competing activation makes it fail with `409`. Rolling back to a preview promotes it again and is refused with `409` when promoting it would be, and with `404` code `feature_unavailable` while the capability is unavailable. Rolling back to the function's own build is not: it never depends on the capability, the project's source mode, or a running deployment of the function. + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param function_rollback_request [FunctionRollbackRequest] + # @param [Hash] opts the optional parameters + # @return [FunctionServing] + def rollback_function_serving(id, function_id, function_rollback_request, opts = {}) + data, _status_code, _headers = rollback_function_serving_with_http_info(id, function_id, function_rollback_request, opts) + data + end + + # Roll back what a function runs + # Points the function's traffic back at what served it before its last promotion or rollback, or at its own build with `to_production`. A rollback is a new activation, so what it leaves becomes what a further rollback returns to, and it can itself be undone. Nothing is deployed, so it takes effect at once. It names the `revision` the caller read; a competing activation makes it fail with `409`. Rolling back to a preview promotes it again and is refused with `409` when promoting it would be, and with `404` code `feature_unavailable` while the capability is unavailable. Rolling back to the function's own build is not: it never depends on the capability, the project's source mode, or a running deployment of the function. + # @param id [String] Project ID + # @param function_id [String] Function ID + # @param function_rollback_request [FunctionRollbackRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(FunctionServing, Integer, Hash)>] FunctionServing data, response status code and response headers + def rollback_function_serving_with_http_info(id, function_id, function_rollback_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FunctionsApi.rollback_function_serving ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FunctionsApi.rollback_function_serving" + end + # verify the required parameter 'function_id' is set + if @api_client.config.client_side_validation && function_id.nil? + fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.rollback_function_serving" + end + # verify the required parameter 'function_rollback_request' is set + if @api_client.config.client_side_validation && function_rollback_request.nil? + fail ArgumentError, "Missing the required parameter 'function_rollback_request' when calling FunctionsApi.rollback_function_serving" + end + # resource path + local_var_path = '/projects/{id}/functions/{functionId}/serving/rollback'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(function_rollback_request) + + # return_type + return_type = opts[:debug_return_type] || 'FunctionServing' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"FunctionsApi.rollback_function_serving", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FunctionsApi#rollback_function_serving\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update function settings # @param id [String] Project ID # @param function_id [String] Function ID diff --git a/lib/volcano/generated/lib/volcano-generated/api/git_connections_api.rb b/lib/volcano/generated/lib/volcano-generated/api/git_connections_api.rb index 4a5ea0b3..a9c58b08 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/git_connections_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/git_connections_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -83,7 +83,7 @@ def cancel_project_source_export_with_http_info(id, opts = {}) end # Connect or update a project's repo connection - # Full replace, following Vercel's model: many projects may point at the same repo, so this only binds the project — it never creates or deletes git-provider state. Used for both the initial connect and later edits (repo change, root directory, production branch). Resolves the repository_id or repo_full_name selector against the repos accessible through installation_id via connection_id's stored GitHub user token, then persists repository metadata only from that validated GitHub response. + # Full replace, following Vercel's model: many projects may point at the same repo, so this only binds the project — it never creates or deletes git-provider state. Used for both the initial connect and later edits (repo change, root directory, production branch). Resolves the repository_id or repo_full_name selector against the repos accessible through installation_id via connection_id's stored GitHub user token, then persists repository metadata only from that validated GitHub response. Omitting production_branch follows the repository's default and discards a pinned branch. To keep a pin when rebinding the same repository, read the connection first and send production_branch back when `production_branch_follows_default` is false. The response reports the result in the same field. Project access tokens are refused. Which repository a project deploys from is a person's decision, made with a platform token or in the dashboard. A project access token can still change the root directory and production branch through PUT /projects/{id}/git-connection/root-directory and PUT /projects/{id}/git-connection/production-branch. Connecting a repository to a project with none, while LavaFlow is on and was turned on with no repository, makes it the one LavaFlow works in, unless the LavaFlow settings' `fix_blocker` asks to turn it on again after the link. Any later change of repository pauses LavaFlow until the owner turns it on again; binding the repository LavaFlow works in again resumes it with no new turn-on. # @param id [String] Project ID # @param connect_project_git_request [ConnectProjectGitRequest] # @param [Hash] opts the optional parameters @@ -94,7 +94,7 @@ def connect_project_git(id, connect_project_git_request, opts = {}) end # Connect or update a project's repo connection - # Full replace, following Vercel's model: many projects may point at the same repo, so this only binds the project — it never creates or deletes git-provider state. Used for both the initial connect and later edits (repo change, root directory, production branch). Resolves the repository_id or repo_full_name selector against the repos accessible through installation_id via connection_id's stored GitHub user token, then persists repository metadata only from that validated GitHub response. + # Full replace, following Vercel's model: many projects may point at the same repo, so this only binds the project — it never creates or deletes git-provider state. Used for both the initial connect and later edits (repo change, root directory, production branch). Resolves the repository_id or repo_full_name selector against the repos accessible through installation_id via connection_id's stored GitHub user token, then persists repository metadata only from that validated GitHub response. Omitting production_branch follows the repository's default and discards a pinned branch. To keep a pin when rebinding the same repository, read the connection first and send production_branch back when `production_branch_follows_default` is false. The response reports the result in the same field. Project access tokens are refused. Which repository a project deploys from is a person's decision, made with a platform token or in the dashboard. A project access token can still change the root directory and production branch through PUT /projects/{id}/git-connection/root-directory and PUT /projects/{id}/git-connection/production-branch. Connecting a repository to a project with none, while LavaFlow is on and was turned on with no repository, makes it the one LavaFlow works in, unless the LavaFlow settings' `fix_blocker` asks to turn it on again after the link. Any later change of repository pauses LavaFlow until the owner turns it on again; binding the repository LavaFlow works in again resumes it with no new turn-on. # @param id [String] Project ID # @param connect_project_git_request [ConnectProjectGitRequest] # @param [Hash] opts the optional parameters @@ -137,7 +137,7 @@ def connect_project_git_with_http_info(id, connect_project_git_request, opts = { return_type = opts[:debug_return_type] || 'ProjectGitConnection' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + auth_names = opts[:debug_auth_names] || ['UserToken'] new_options = opts.merge( :operation => :"GitConnectionsApi.connect_project_git", @@ -279,7 +279,7 @@ def disconnect_project_git_with_http_info(id, opts = {}) end # Initialize an empty repository with a project's stored source - # Creates the first commit in the connected repository and pushes it directly to the configured production branch. The push enters the ordinary Git auto-deploy flow. Direct source writes remain frozen until that deployment succeeds and the repository becomes the source of truth. The caller confirms the production branch shown before export. Starting export pins that branch: later GitHub default-branch changes do not repoint the project. If the configured branch changed after the caller read it, the request fails without exporting so the caller can show and confirm the new value. The response lists what the export could not carry: resources with no successful deployment to take source from (`skipped`), and things no export can hand back (`omitted`) — migrations, which Volcano stores no copy of, and credential-shaped files, which are left for their owner to add. Requires a connected repository with no commits or branches, and runs once. Volcano never creates the repository. If GitHub did not confirm the push, retrying creates the same commit and adopts it when it already reached the repository. + # Creates the first commit in the connected repository and pushes it directly to the configured production branch. The push enters the ordinary Git auto-deploy flow. Direct source writes remain frozen until that deployment succeeds and the repository becomes the source of truth. The caller confirms the production branch shown before export, and optionally the repository by its `repo_id`. Starting export pins that branch: later GitHub default-branch changes do not repoint the project. If the connected repository or the configured branch changed after the caller read it, the request fails without exporting so the caller can show and confirm the new value. The response lists what the export could not carry: resources with no successful deployment to take source from (`skipped`), and things no export can hand back (`omitted`) — migrations, which Volcano stores no copy of, and credential-shaped files, which are left for their owner to add. Requires a connected repository with no commits or branches, and runs once. Volcano never creates the repository. If GitHub did not confirm the push, retrying creates the same commit and adopts it when it already reached the repository. # @param id [String] Project ID # @param export_project_source_request [ExportProjectSourceRequest] # @param [Hash] opts the optional parameters @@ -290,7 +290,7 @@ def export_project_source(id, export_project_source_request, opts = {}) end # Initialize an empty repository with a project's stored source - # Creates the first commit in the connected repository and pushes it directly to the configured production branch. The push enters the ordinary Git auto-deploy flow. Direct source writes remain frozen until that deployment succeeds and the repository becomes the source of truth. The caller confirms the production branch shown before export. Starting export pins that branch: later GitHub default-branch changes do not repoint the project. If the configured branch changed after the caller read it, the request fails without exporting so the caller can show and confirm the new value. The response lists what the export could not carry: resources with no successful deployment to take source from (`skipped`), and things no export can hand back (`omitted`) — migrations, which Volcano stores no copy of, and credential-shaped files, which are left for their owner to add. Requires a connected repository with no commits or branches, and runs once. Volcano never creates the repository. If GitHub did not confirm the push, retrying creates the same commit and adopts it when it already reached the repository. + # Creates the first commit in the connected repository and pushes it directly to the configured production branch. The push enters the ordinary Git auto-deploy flow. Direct source writes remain frozen until that deployment succeeds and the repository becomes the source of truth. The caller confirms the production branch shown before export, and optionally the repository by its `repo_id`. Starting export pins that branch: later GitHub default-branch changes do not repoint the project. If the connected repository or the configured branch changed after the caller read it, the request fails without exporting so the caller can show and confirm the new value. The response lists what the export could not carry: resources with no successful deployment to take source from (`skipped`), and things no export can hand back (`omitted`) — migrations, which Volcano stores no copy of, and credential-shaped files, which are left for their owner to add. Requires a connected repository with no commits or branches, and runs once. Volcano never creates the repository. If GitHub did not confirm the push, retrying creates the same commit and adopts it when it already reached the repository. # @param id [String] Project ID # @param export_project_source_request [ExportProjectSourceRequest] # @param [Hash] opts the optional parameters @@ -352,7 +352,77 @@ def export_project_source_with_http_info(id, export_project_source_request, opts return data, status_code, headers end + # Get a Git deployment run + # Returns one deployment run: the commit it deployed, its status, the migration runs it started, and why it failed or was skipped. Project access tokens can read runs, including read-only ones. + # @param id [String] Project ID + # @param run_id [String] Deployment run ID + # @param [Hash] opts the optional parameters + # @return [GitDeploymentRun] + def get_git_deployment_run(id, run_id, opts = {}) + data, _status_code, _headers = get_git_deployment_run_with_http_info(id, run_id, opts) + data + end + + # Get a Git deployment run + # Returns one deployment run: the commit it deployed, its status, the migration runs it started, and why it failed or was skipped. Project access tokens can read runs, including read-only ones. + # @param id [String] Project ID + # @param run_id [String] Deployment run ID + # @param [Hash] opts the optional parameters + # @return [Array<(GitDeploymentRun, Integer, Hash)>] GitDeploymentRun data, response status code and response headers + def get_git_deployment_run_with_http_info(id, run_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GitConnectionsApi.get_git_deployment_run ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling GitConnectionsApi.get_git_deployment_run" + end + # verify the required parameter 'run_id' is set + if @api_client.config.client_side_validation && run_id.nil? + fail ArgumentError, "Missing the required parameter 'run_id' when calling GitConnectionsApi.get_git_deployment_run" + end + # resource path + local_var_path = '/projects/{id}/git-deployment-runs/{runId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'runId' + '}', CGI.escape(run_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GitDeploymentRun' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"GitConnectionsApi.get_git_deployment_run", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GitConnectionsApi#get_git_deployment_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a project's repo connection + # Returns the repository binding. `production_branch_follows_default` tells a branch that tracks the repository's default from one the project pinned: a client rebinding the same repository sends a pinned branch back to keep it. # @param id [String] Project ID # @param [Hash] opts the optional parameters # @return [ProjectGitConnection] @@ -362,6 +432,7 @@ def get_project_git_connection(id, opts = {}) end # Get a project's repo connection + # Returns the repository binding. `production_branch_follows_default` tells a branch that tracks the repository's default from one the project pinned: a client rebinding the same repository sends a pinned branch back to keep it. # @param id [String] Project ID # @param [Hash] opts the optional parameters # @return [Array<(ProjectGitConnection, Integer, Hash)>] ProjectGitConnection data, response status code and response headers @@ -474,6 +545,69 @@ def get_project_git_deploy_settings_with_http_info(id, opts = {}) return data, status_code, headers end + # Check whether the project owner can push to the connected repository + # Answers whether the project owner's GitHub account can push to the repository the project is connected to. Volcano makes the same check before it writes to that repository for the project. The repository is always the project's connected one; the route takes no repository. When `can_push` is false, `reason` says why. The answer can be a few seconds old: repeated checks within that time are answered without asking GitHub again. Checks that ask GitHub draw on an hourly budget for the project and another for its owner, shared by all of the owner's projects. Over either, the route answers `429` with `Retry-After`. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @return [ProjectGitOwnerPush] + def get_project_git_owner_push(id, opts = {}) + data, _status_code, _headers = get_project_git_owner_push_with_http_info(id, opts) + data + end + + # Check whether the project owner can push to the connected repository + # Answers whether the project owner's GitHub account can push to the repository the project is connected to. Volcano makes the same check before it writes to that repository for the project. The repository is always the project's connected one; the route takes no repository. When `can_push` is false, `reason` says why. The answer can be a few seconds old: repeated checks within that time are answered without asking GitHub again. Checks that ask GitHub draw on an hourly budget for the project and another for its owner, shared by all of the owner's projects. Over either, the route answers `429` with `Retry-After`. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @return [Array<(ProjectGitOwnerPush, Integer, Hash)>] ProjectGitOwnerPush data, response status code and response headers + def get_project_git_owner_push_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GitConnectionsApi.get_project_git_owner_push ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling GitConnectionsApi.get_project_git_owner_push" + end + # resource path + local_var_path = '/projects/{id}/git-connection/owner-push'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ProjectGitOwnerPush' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"GitConnectionsApi.get_project_git_owner_push", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GitConnectionsApi#get_project_git_owner_push\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Report the project's source-of-truth state # Volcano stores the source of the functions and frontend it runs for a project. This reports whether that source has been written to the connected repository, and whether the repository has taken over as the project's source of truth. `mode` is `platform`, `git_exporting`, `git_pending`, or `git`. Export enters `git_exporting` before reading stored source. GitHub's signed push event confirms that the initial commit reached the production branch. That push or a newer production push changes the mode to `git_pending` when it starts a deployment. `exported_at` records that transition. A successful Git run completes the transition when it matches the recorded repository, production branch, and root directory and actually dispatches every recorded resource. Ordinary production-branch pushes deploy without changing a platform-managed project's source ownership. # @param id [String] Project ID @@ -538,40 +672,42 @@ def get_project_source_export_with_http_info(id, opts = {}) end # Complete a GitHub App connection callback - # Public GitHub App callback. The signed state and callback binding cookie bind the provider authorization to the browser that started the flow. - # @param state [String] Signed connect state generated by startGitConnect. + # Public GitHub App callback. The signed state and callback binding cookie bind the provider authorization to the browser that started the flow. GitHub also sends a browser here without `state` when someone installs the App, changes its repository access, or asks an organization owner to install it, on GitHub itself. That request connects nothing: Volcano ignores `code` and `installation_id`, and redirects to the dashboard's Git settings page when `setup_action` is `install`, `update`, or `request`. Any other request without `state` returns 400. An empty or invalid `state` is refused as before and never redirects there. # @param [Hash] opts the optional parameters - # @option opts [String] :code GitHub user authorization code. + # @option opts [String] :code GitHub user authorization code. Ignored when `state` is absent. + # @option opts [String] :state Signed connect state generated by startGitConnect. Absent when the install started on GitHub rather than in Volcano. # @option opts [String] :error Provider error returned by GitHub. + # @option opts [String] :installation_id The GitHub App installation ID GitHub adds to the redirect. Volcano does not read it; a repository is connected through startGitConnect. + # @option opts [String] :setup_action What happened on GitHub: `install`, `update`, or `request`. Without `state`, one of these values redirects to the dashboard; any other value, or none, returns 400. With `state`, it is ignored. # @return [nil] - def git_connect_callback(state, opts = {}) - git_connect_callback_with_http_info(state, opts) + def git_connect_callback(opts = {}) + git_connect_callback_with_http_info(opts) nil end # Complete a GitHub App connection callback - # Public GitHub App callback. The signed state and callback binding cookie bind the provider authorization to the browser that started the flow. - # @param state [String] Signed connect state generated by startGitConnect. + # Public GitHub App callback. The signed state and callback binding cookie bind the provider authorization to the browser that started the flow. GitHub also sends a browser here without `state` when someone installs the App, changes its repository access, or asks an organization owner to install it, on GitHub itself. That request connects nothing: Volcano ignores `code` and `installation_id`, and redirects to the dashboard's Git settings page when `setup_action` is `install`, `update`, or `request`. Any other request without `state` returns 400. An empty or invalid `state` is refused as before and never redirects there. # @param [Hash] opts the optional parameters - # @option opts [String] :code GitHub user authorization code. + # @option opts [String] :code GitHub user authorization code. Ignored when `state` is absent. + # @option opts [String] :state Signed connect state generated by startGitConnect. Absent when the install started on GitHub rather than in Volcano. # @option opts [String] :error Provider error returned by GitHub. + # @option opts [String] :installation_id The GitHub App installation ID GitHub adds to the redirect. Volcano does not read it; a repository is connected through startGitConnect. + # @option opts [String] :setup_action What happened on GitHub: `install`, `update`, or `request`. Without `state`, one of these values redirects to the dashboard; any other value, or none, returns 400. With `state`, it is ignored. # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def git_connect_callback_with_http_info(state, opts = {}) + def git_connect_callback_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: GitConnectionsApi.git_connect_callback ...' end - # verify the required parameter 'state' is set - if @api_client.config.client_side_validation && state.nil? - fail ArgumentError, "Missing the required parameter 'state' when calling GitConnectionsApi.git_connect_callback" - end # resource path local_var_path = '/github/callback' # query parameters query_params = opts[:query_params] || {} - query_params[:'state'] = state query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil? + query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil? query_params[:'error'] = opts[:'error'] if !opts[:'error'].nil? + query_params[:'installation_id'] = opts[:'installation_id'] if !opts[:'installation_id'].nil? + query_params[:'setup_action'] = opts[:'setup_action'] if !opts[:'setup_action'].nil? # header parameters header_params = opts[:header_params] || {} @@ -662,6 +798,97 @@ def list_git_connections_with_http_info(opts = {}) return data, status_code, headers end + # List a project's Git deployment runs + # Lists the deployment runs Git auto deploy recorded for the project, newest push first. Each push to the production branch records one run, which says whether the push deployed and, when it failed or was skipped, why. A run that applied migrations names the migration run it started on each database. Get one at `GET /projects/{id}/databases/{databaseName}/migration-runs/{runId}` for its files. Project access tokens can list runs, including read-only ones. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) + # @option opts [String] :cursor Opaque cursor from a previous response's `next_cursor`. Pages forward; keep the same filters while paging. + # @option opts [GitDeploymentRunStatus] :status Return only runs in this status. + # @option opts [String] :branch Return only runs for pushes to this branch. + # @return [PaginatedGitDeploymentRuns] + def list_git_deployment_runs(id, opts = {}) + data, _status_code, _headers = list_git_deployment_runs_with_http_info(id, opts) + data + end + + # List a project's Git deployment runs + # Lists the deployment runs Git auto deploy recorded for the project, newest push first. Each push to the production branch records one run, which says whether the push deployed and, when it failed or was skipped, why. A run that applied migrations names the migration run it started on each database. Get one at `GET /projects/{id}/databases/{databaseName}/migration-runs/{runId}` for its files. Project access tokens can list runs, including read-only ones. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) + # @option opts [String] :cursor Opaque cursor from a previous response's `next_cursor`. Pages forward; keep the same filters while paging. + # @option opts [GitDeploymentRunStatus] :status Return only runs in this status. + # @option opts [String] :branch Return only runs for pushes to this branch. + # @return [Array<(PaginatedGitDeploymentRuns, Integer, Hash)>] PaginatedGitDeploymentRuns data, response status code and response headers + def list_git_deployment_runs_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GitConnectionsApi.list_git_deployment_runs ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling GitConnectionsApi.list_git_deployment_runs" + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling GitConnectionsApi.list_git_deployment_runs, must be smaller than or equal to 100.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling GitConnectionsApi.list_git_deployment_runs, must be greater than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'branch'].nil? && opts[:'branch'].to_s.length > 255 + fail ArgumentError, 'invalid value for "opts[:"branch"]" when calling GitConnectionsApi.list_git_deployment_runs, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && !opts[:'branch'].nil? && opts[:'branch'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"branch"]" when calling GitConnectionsApi.list_git_deployment_runs, the character length must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/projects/{id}/git-deployment-runs'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? + query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PaginatedGitDeploymentRuns' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"GitConnectionsApi.list_git_deployment_runs", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GitConnectionsApi#list_git_deployment_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List repos accessible to a connection through an installation # Live proxy to GitHub: lists the repos the connection's stored user token can access through installationId. Nothing is persisted by this call. # @param connection_id [String] Connection ID to browse repositories for. @@ -795,7 +1022,7 @@ def list_git_installations_with_http_info(connection_id, opts = {}) end # Set the branch a project deploys from - # Changes only the production branch, leaving the repository binding alone. PUT /projects/{id}/git-connection can also set it, but that is a full rebind: it needs connection_id, installation_id and a repository selector resent, and re-resolves the repository against GitHub for a field that does not depend on it. The branch does not have to exist. It is validated as a Git branch name and nothing more, so a project can be pointed at a branch that is about to be pushed — the case a repository created empty depends on. Setting the branch here marks it as the project's own choice, so a later default-branch rename on GitHub no longer moves it. Projects that never set one keep following the repository's default branch. + # Changes only the production branch, leaving the repository binding alone. PUT /projects/{id}/git-connection can also set it, but that is a full rebind: it needs connection_id, installation_id and a repository selector resent, and re-resolves the repository against GitHub for a field that does not depend on it. The branch does not have to exist. It is validated as a Git branch name and nothing more, so a project can be pointed at a branch that is about to be pushed — the case a repository created empty depends on. Setting the branch here marks it as the project's own choice, so a later default-branch rename on GitHub no longer moves it, and the response reports `production_branch_follows_default: false`. Projects that never set one keep following the repository's default branch. An empty string undoes that choice: the project deploys from the repository's default branch again and follows later renames. Volcano reads the default branch from GitHub through the project owner's connection, and the response carries it with `production_branch_follows_default: true`. # @param id [String] Project ID # @param set_project_git_production_branch_request [SetProjectGitProductionBranchRequest] # @param [Hash] opts the optional parameters @@ -806,7 +1033,7 @@ def set_project_git_production_branch(id, set_project_git_production_branch_requ end # Set the branch a project deploys from - # Changes only the production branch, leaving the repository binding alone. PUT /projects/{id}/git-connection can also set it, but that is a full rebind: it needs connection_id, installation_id and a repository selector resent, and re-resolves the repository against GitHub for a field that does not depend on it. The branch does not have to exist. It is validated as a Git branch name and nothing more, so a project can be pointed at a branch that is about to be pushed — the case a repository created empty depends on. Setting the branch here marks it as the project's own choice, so a later default-branch rename on GitHub no longer moves it. Projects that never set one keep following the repository's default branch. + # Changes only the production branch, leaving the repository binding alone. PUT /projects/{id}/git-connection can also set it, but that is a full rebind: it needs connection_id, installation_id and a repository selector resent, and re-resolves the repository against GitHub for a field that does not depend on it. The branch does not have to exist. It is validated as a Git branch name and nothing more, so a project can be pointed at a branch that is about to be pushed — the case a repository created empty depends on. Setting the branch here marks it as the project's own choice, so a later default-branch rename on GitHub no longer moves it, and the response reports `production_branch_follows_default: false`. Projects that never set one keep following the repository's default branch. An empty string undoes that choice: the project deploys from the repository's default branch again and follows later renames. Volcano reads the default branch from GitHub through the project owner's connection, and the response carries it with `production_branch_follows_default: true`. # @param id [String] Project ID # @param set_project_git_production_branch_request [SetProjectGitProductionBranchRequest] # @param [Hash] opts the optional parameters @@ -868,12 +1095,86 @@ def set_project_git_production_branch_with_http_info(id, set_project_git_product return data, status_code, headers end + # Set the directory a project builds from + # Changes only the root directory, leaving the repository, the production branch and `production_branch_follows_default` alone. Unlike PUT /projects/{id}/git-connection, this accepts a project access token, so CI or an agent can move a project within its repository without being able to change the repository. The directory is a path relative to the repository root. An empty string, `.` or `/` means the repository root. The response carries it in the form a deploy reads it: `./apps/web/` comes back as `apps/web`. + # @param id [String] Project ID + # @param set_project_git_root_directory_request [SetProjectGitRootDirectoryRequest] + # @param [Hash] opts the optional parameters + # @return [ProjectGitConnection] + def set_project_git_root_directory(id, set_project_git_root_directory_request, opts = {}) + data, _status_code, _headers = set_project_git_root_directory_with_http_info(id, set_project_git_root_directory_request, opts) + data + end + + # Set the directory a project builds from + # Changes only the root directory, leaving the repository, the production branch and `production_branch_follows_default` alone. Unlike PUT /projects/{id}/git-connection, this accepts a project access token, so CI or an agent can move a project within its repository without being able to change the repository. The directory is a path relative to the repository root. An empty string, `.` or `/` means the repository root. The response carries it in the form a deploy reads it: `./apps/web/` comes back as `apps/web`. + # @param id [String] Project ID + # @param set_project_git_root_directory_request [SetProjectGitRootDirectoryRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ProjectGitConnection, Integer, Hash)>] ProjectGitConnection data, response status code and response headers + def set_project_git_root_directory_with_http_info(id, set_project_git_root_directory_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: GitConnectionsApi.set_project_git_root_directory ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling GitConnectionsApi.set_project_git_root_directory" + end + # verify the required parameter 'set_project_git_root_directory_request' is set + if @api_client.config.client_side_validation && set_project_git_root_directory_request.nil? + fail ArgumentError, "Missing the required parameter 'set_project_git_root_directory_request' when calling GitConnectionsApi.set_project_git_root_directory" + end + # resource path + local_var_path = '/projects/{id}/git-connection/root-directory'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(set_project_git_root_directory_request) + + # return_type + return_type = opts[:debug_return_type] || 'ProjectGitConnection' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"GitConnectionsApi.set_project_git_root_directory", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: GitConnectionsApi#set_project_git_root_directory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Start a git provider connection # Starts a first-party dashboard user's git provider connection flow and returns the provider authorization URL. The response also sets a short-lived HttpOnly callback binding cookie tied to the authenticated user through the signed provider state. # @param [Hash] opts the optional parameters # @option opts [String] :provider Git provider to connect. Defaults to github. (default to 'github') - # @option opts [String] :redirect URL to redirect the browser to after the provider callback completes. - # @option opts [String] :callback_url Same-origin browser callback used to relay provider parameters before completing the connection. + # @option opts [String] :redirect URL to redirect the browser to after the provider callback completes. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. + # @option opts [String] :callback_url Same-origin browser callback used to relay provider parameters before completing the connection. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. # @return [GitConnectStartResponse] def start_git_connect(opts = {}) data, _status_code, _headers = start_git_connect_with_http_info(opts) @@ -884,8 +1185,8 @@ def start_git_connect(opts = {}) # Starts a first-party dashboard user's git provider connection flow and returns the provider authorization URL. The response also sets a short-lived HttpOnly callback binding cookie tied to the authenticated user through the signed provider state. # @param [Hash] opts the optional parameters # @option opts [String] :provider Git provider to connect. Defaults to github. (default to 'github') - # @option opts [String] :redirect URL to redirect the browser to after the provider callback completes. - # @option opts [String] :callback_url Same-origin browser callback used to relay provider parameters before completing the connection. + # @option opts [String] :redirect URL to redirect the browser to after the provider callback completes. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. + # @option opts [String] :callback_url Same-origin browser callback used to relay provider parameters before completing the connection. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. # @return [Array<(GitConnectStartResponse, Integer, Hash)>] GitConnectStartResponse data, response status code and response headers def start_git_connect_with_http_info(opts = {}) if @api_client.config.debugging @@ -944,7 +1245,7 @@ def start_git_connect_with_http_info(opts = {}) end # Update a project's Git auto-deploy settings - # Full replace of the project's Git auto-deploy settings: what a push to the connected repo's production branch deploys. Connecting a repository sets auto_deploy_enabled and deploy_functions to true for a project that has never called this endpoint, so a push deploys without any further setup. Once these settings have been saved here they are the project's own: connecting, rebinding, disconnecting and reconnecting all leave them untouched, including when they were saved before any repository was connected. Frontend settings are off until set here; the frontend need not exist when they are saved, since frontend_name is resolved at deploy time. + # Full replace of the project's Git auto-deploy settings: what a push to the connected repo's production branch deploys. Connecting a repository sets auto_deploy_enabled and deploy_functions to true for a project that has never called this endpoint, so a push deploys without any further setup. Once these settings have been saved here they are the project's own: connecting, rebinding, disconnecting and reconnecting all leave them untouched, including when they were saved before any repository was connected. Frontend settings are off until set here; the frontend need not exist when they are saved, since frontend_name is resolved at deploy time. apply_migrations is the exception to the full replace: omitting it leaves the saved value unchanged. It is off until set here. # @param id [String] Project ID # @param update_project_git_deploy_settings_request [UpdateProjectGitDeploySettingsRequest] # @param [Hash] opts the optional parameters @@ -955,7 +1256,7 @@ def update_project_git_deploy_settings(id, update_project_git_deploy_settings_re end # Update a project's Git auto-deploy settings - # Full replace of the project's Git auto-deploy settings: what a push to the connected repo's production branch deploys. Connecting a repository sets auto_deploy_enabled and deploy_functions to true for a project that has never called this endpoint, so a push deploys without any further setup. Once these settings have been saved here they are the project's own: connecting, rebinding, disconnecting and reconnecting all leave them untouched, including when they were saved before any repository was connected. Frontend settings are off until set here; the frontend need not exist when they are saved, since frontend_name is resolved at deploy time. + # Full replace of the project's Git auto-deploy settings: what a push to the connected repo's production branch deploys. Connecting a repository sets auto_deploy_enabled and deploy_functions to true for a project that has never called this endpoint, so a push deploys without any further setup. Once these settings have been saved here they are the project's own: connecting, rebinding, disconnecting and reconnecting all leave them untouched, including when they were saved before any repository was connected. Frontend settings are off until set here; the frontend need not exist when they are saved, since frontend_name is resolved at deploy time. apply_migrations is the exception to the full replace: omitting it leaves the saved value unchanged. It is off until set here. # @param id [String] Project ID # @param update_project_git_deploy_settings_request [UpdateProjectGitDeploySettingsRequest] # @param [Hash] opts the optional parameters diff --git a/lib/volcano/generated/lib/volcano-generated/api/issues_api.rb b/lib/volcano/generated/lib/volcano-generated/api/issues_api.rb index 33a712a5..404b12cb 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/issues_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/issues_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -19,6 +19,74 @@ class IssuesApi def initialize(api_client = ApiClient.default) @api_client = api_client end + # Create an issue + # Records an issue you write on the project `project_id` names: a description of what to fix, in your words, and optionally a title. The issue has `source` `request`, the project as its resource, and status `open`. With LavaFlow on, LavaFlow starts a run on it by itself, as on a new error: the run follows the project's LavaFlow settings and counts toward the run limits. Follow it with `GET /lavaflow/runs?project_id=…&issue_id=…`. Where none starts, as with LavaFlow off, start one with `POST /lavaflow/runs`. The issue counts toward the project's 1,000 open issues, with runtime, build and reported issues; at that limit it is refused with code `open_issue_limit_reached`. Resolve or ignore issues to make room. Only the project's owner can create an issue, as a person: with `volcano login`, a live Volcano dashboard sign-in, or a platform token that expires. A full-scope project access token, MCP and a never-expiring platform token are refused with code `person_required`, as starting a run is, and a read-only project access token or account with an uncoded `403`, because creating one starts a run, which sends the description to an AI service with the project's source. A project access token is refused before its `project_id` is looked up. List, read and update the issue under `/projects/{id}/issues`. + # @param create_issue_request [CreateIssueRequest] + # @param [Hash] opts the optional parameters + # @return [Issue] + def create_issue(create_issue_request, opts = {}) + data, _status_code, _headers = create_issue_with_http_info(create_issue_request, opts) + data + end + + # Create an issue + # Records an issue you write on the project `project_id` names: a description of what to fix, in your words, and optionally a title. The issue has `source` `request`, the project as its resource, and status `open`. With LavaFlow on, LavaFlow starts a run on it by itself, as on a new error: the run follows the project's LavaFlow settings and counts toward the run limits. Follow it with `GET /lavaflow/runs?project_id=…&issue_id=…`. Where none starts, as with LavaFlow off, start one with `POST /lavaflow/runs`. The issue counts toward the project's 1,000 open issues, with runtime, build and reported issues; at that limit it is refused with code `open_issue_limit_reached`. Resolve or ignore issues to make room. Only the project's owner can create an issue, as a person: with `volcano login`, a live Volcano dashboard sign-in, or a platform token that expires. A full-scope project access token, MCP and a never-expiring platform token are refused with code `person_required`, as starting a run is, and a read-only project access token or account with an uncoded `403`, because creating one starts a run, which sends the description to an AI service with the project's source. A project access token is refused before its `project_id` is looked up. List, read and update the issue under `/projects/{id}/issues`. + # @param create_issue_request [CreateIssueRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Issue, Integer, Hash)>] Issue data, response status code and response headers + def create_issue_with_http_info(create_issue_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IssuesApi.create_issue ...' + end + # verify the required parameter 'create_issue_request' is set + if @api_client.config.client_side_validation && create_issue_request.nil? + fail ArgumentError, "Missing the required parameter 'create_issue_request' when calling IssuesApi.create_issue" + end + # resource path + local_var_path = '/issues' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_issue_request) + + # return_type + return_type = opts[:debug_return_type] || 'Issue' + + # auth_names + auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken', 'UserToken'] + + new_options = opts.merge( + :operation => :"IssuesApi.create_issue", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: IssuesApi#create_issue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get an issue # Returns one issue: the resource that raised it, how often and when it was seen, and its status. Project access tokens can read issues, including read-only ones. # @param id [String] Project ID @@ -89,13 +157,14 @@ def get_issue_with_http_info(id, issue_id, opts = {}) end # List issues - # Lists the project's issues, most recently seen first. An issue groups the runtime errors one function or frontend raised with the same error type and stack, or the same message when there is no stack. Project access tokens can list issues, including read-only ones. + # Lists the project's issues, most recently seen first. An issue groups the runtime errors one function or frontend raised with the same error type and stack, or the same message when there is no stack; the deploys of one function or frontend whose own build failed with the same first error (`source` `build`); or one Code Quality finding or reported problem, or one issue a person wrote (`source` `request`). Project access tokens can list issues, including read-only ones. # @param id [String] Project ID # @param [Hash] opts the optional parameters # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) # @option opts [String] :cursor Opaque cursor from a previous response's `next_cursor`. Pages forward; keep the same filters while paging. # @option opts [IssueStatus] :status Return only issues in this status. # @option opts [String] :resource_id Return only issues raised by this function or frontend. + # @option opts [IssueSource] :source Return only issues from this source, such as `build` for failed builds. # @return [PaginatedIssues] def list_issues(id, opts = {}) data, _status_code, _headers = list_issues_with_http_info(id, opts) @@ -103,13 +172,14 @@ def list_issues(id, opts = {}) end # List issues - # Lists the project's issues, most recently seen first. An issue groups the runtime errors one function or frontend raised with the same error type and stack, or the same message when there is no stack. Project access tokens can list issues, including read-only ones. + # Lists the project's issues, most recently seen first. An issue groups the runtime errors one function or frontend raised with the same error type and stack, or the same message when there is no stack; the deploys of one function or frontend whose own build failed with the same first error (`source` `build`); or one Code Quality finding or reported problem, or one issue a person wrote (`source` `request`). Project access tokens can list issues, including read-only ones. # @param id [String] Project ID # @param [Hash] opts the optional parameters # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) # @option opts [String] :cursor Opaque cursor from a previous response's `next_cursor`. Pages forward; keep the same filters while paging. # @option opts [IssueStatus] :status Return only issues in this status. # @option opts [String] :resource_id Return only issues raised by this function or frontend. + # @option opts [IssueSource] :source Return only issues from this source, such as `build` for failed builds. # @return [Array<(PaginatedIssues, Integer, Hash)>] PaginatedIssues data, response status code and response headers def list_issues_with_http_info(id, opts = {}) if @api_client.config.debugging @@ -136,6 +206,7 @@ def list_issues_with_http_info(id, opts = {}) query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'resource_id'] = opts[:'resource_id'] if !opts[:'resource_id'].nil? + query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/volcano/generated/lib/volcano-generated/api/lava_flow_api.rb b/lib/volcano/generated/lib/volcano-generated/api/lava_flow_api.rb new file mode 100644 index 00000000..1aee12cb --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/api/lava_flow_api.rb @@ -0,0 +1,921 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'cgi' + +module Volcano::Generated + class LavaFlowApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Bind a connector to the project + # Binds a place in a connector to the project, so problems reported there reach LavaFlow for it, and answers `201`. Send `slack` for a `slack` connector and `aikido` for an `aikido` one. For a `slack` connector the place is a channel. Binding a channel that is already bound answers `200` with that binding, and makes the current owner the one who bound it, so a retry is safe. One of the Slack identities the caller's sign-in session signed in as must belong to the connector's workspace and be a member of the channel, so on an account several people share, each binds only channels they are in. The channel must be one the picker (`GET /user/slack/channels`) lists: one the Volcano app is in, and not archived, a Slack Connect channel, or shared across an organization. For an `aikido` connector the place is the workspace's new code (SAST) issues on the project's GitHub repository, at or above `min_severity`. The caller must have connected the workspace. Binding it again answers `200` and sets the new minimum. Each issue starts a LavaFlow run that stops at a pull request for review. Only the project's owner can bind, with a platform token or a live dashboard sign-in session. A session must come from the dashboard's own configured project; another project's session gets `403`. A project access token, or a request made through MCP, gets `403` with code `person_required`. Binding a Slack channel needs the project's `lavaflow.slack` capability, and binding Aikido its `lavaflow.aikido` capability: where it is unavailable, this answers `404` with code `feature_unavailable`, or `403` with code `plan_required` when the owner's plan does not include LavaFlow. + # @param lavaflow_connector_binding_create [LavaflowConnectorBindingCreate] + # @param [Hash] opts the optional parameters + # @return [LavaflowConnectorBinding] + def create_lavaflow_connector_binding(lavaflow_connector_binding_create, opts = {}) + data, _status_code, _headers = create_lavaflow_connector_binding_with_http_info(lavaflow_connector_binding_create, opts) + data + end + + # Bind a connector to the project + # Binds a place in a connector to the project, so problems reported there reach LavaFlow for it, and answers `201`. Send `slack` for a `slack` connector and `aikido` for an `aikido` one. For a `slack` connector the place is a channel. Binding a channel that is already bound answers `200` with that binding, and makes the current owner the one who bound it, so a retry is safe. One of the Slack identities the caller's sign-in session signed in as must belong to the connector's workspace and be a member of the channel, so on an account several people share, each binds only channels they are in. The channel must be one the picker (`GET /user/slack/channels`) lists: one the Volcano app is in, and not archived, a Slack Connect channel, or shared across an organization. For an `aikido` connector the place is the workspace's new code (SAST) issues on the project's GitHub repository, at or above `min_severity`. The caller must have connected the workspace. Binding it again answers `200` and sets the new minimum. Each issue starts a LavaFlow run that stops at a pull request for review. Only the project's owner can bind, with a platform token or a live dashboard sign-in session. A session must come from the dashboard's own configured project; another project's session gets `403`. A project access token, or a request made through MCP, gets `403` with code `person_required`. Binding a Slack channel needs the project's `lavaflow.slack` capability, and binding Aikido its `lavaflow.aikido` capability: where it is unavailable, this answers `404` with code `feature_unavailable`, or `403` with code `plan_required` when the owner's plan does not include LavaFlow. + # @param lavaflow_connector_binding_create [LavaflowConnectorBindingCreate] + # @param [Hash] opts the optional parameters + # @return [Array<(LavaflowConnectorBinding, Integer, Hash)>] LavaflowConnectorBinding data, response status code and response headers + def create_lavaflow_connector_binding_with_http_info(lavaflow_connector_binding_create, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LavaFlowApi.create_lavaflow_connector_binding ...' + end + # resource path + local_var_path = '/lavaflow/connector-bindings' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(lavaflow_connector_binding_create) + + # return_type + return_type = opts[:debug_return_type] || 'LavaflowConnectorBinding' + + # auth_names + auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken', 'UserToken'] + + new_options = opts.merge( + :operation => :"LavaFlowApi.create_lavaflow_connector_binding", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LavaFlowApi#create_lavaflow_connector_binding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Open a held LavaFlow fix + # Opens the pull request for a fix LavaFlow held because the repository's workflows could run it with the repository's secrets before a person approves it (`pull_request_skipped: ungated_workflows`). Read the run first: send its `id` as `run_id`, with the `diff_sha256` and `held_workflows.jobs_sha256` it served, to say you read that diff and that list of jobs. LavaFlow opens the fix it saved, exactly as reviewed, past those jobs only. It writes no new fix. Right before it queues the run, LavaFlow serves the diff again and reads the workflows again. A diff served differently since you read it, or a job list or a commit the workflows were read at that changed, answers `409` with code `run_changed`; read the run again, which lists what LavaFlow found. The response is the run, `202` while it is `queued`. LavaFlow reads the workflows again before it opens the pull request, and once more as it pushes the fix: a job you didn't read, a new commit on a branch the workflows were read on, even one that changes no job, or a production branch other than the one you read them on holds the fix again with a new list. Opening a fix lets its pull request open, nothing more. LavaFlow starts no CI on it and never merges it, as for every fix opened past ungated workflows; a person pushes to the branch or merges it. The pull request's description names who opened it and lists the jobs. One exception: when LavaFlow's read before the pull request opens finds no job that runs the fix before a person approves it, because the workflows were gated since you read them, the fix opens as any other fix and follows the project's merge settings. A run whose `held_workflows` lists no job opens the same way. Only the project's owner can open a fix, as a person, while their account is active: with a `volcano login` token whose sign-in is live, or a platform token that expires. Their GitHub account must be able to push to the project's repository. A project access token, a request made through MCP, a platform token that never expires, and a sign-in that ended get `403` with code `person_required`. Opening a fix uses one of the run's attempts: the attempt that opens it is one of the run's, so a run held again on its last attempt can't be opened again. It starts no new run and counts toward no run limit. + # @param lavaflow_held_fix_open [LavaflowHeldFixOpen] + # @param [Hash] opts the optional parameters + # @return [LavaflowRun] + def create_lavaflow_held_fix_open(lavaflow_held_fix_open, opts = {}) + data, _status_code, _headers = create_lavaflow_held_fix_open_with_http_info(lavaflow_held_fix_open, opts) + data + end + + # Open a held LavaFlow fix + # Opens the pull request for a fix LavaFlow held because the repository's workflows could run it with the repository's secrets before a person approves it (`pull_request_skipped: ungated_workflows`). Read the run first: send its `id` as `run_id`, with the `diff_sha256` and `held_workflows.jobs_sha256` it served, to say you read that diff and that list of jobs. LavaFlow opens the fix it saved, exactly as reviewed, past those jobs only. It writes no new fix. Right before it queues the run, LavaFlow serves the diff again and reads the workflows again. A diff served differently since you read it, or a job list or a commit the workflows were read at that changed, answers `409` with code `run_changed`; read the run again, which lists what LavaFlow found. The response is the run, `202` while it is `queued`. LavaFlow reads the workflows again before it opens the pull request, and once more as it pushes the fix: a job you didn't read, a new commit on a branch the workflows were read on, even one that changes no job, or a production branch other than the one you read them on holds the fix again with a new list. Opening a fix lets its pull request open, nothing more. LavaFlow starts no CI on it and never merges it, as for every fix opened past ungated workflows; a person pushes to the branch or merges it. The pull request's description names who opened it and lists the jobs. One exception: when LavaFlow's read before the pull request opens finds no job that runs the fix before a person approves it, because the workflows were gated since you read them, the fix opens as any other fix and follows the project's merge settings. A run whose `held_workflows` lists no job opens the same way. Only the project's owner can open a fix, as a person, while their account is active: with a `volcano login` token whose sign-in is live, or a platform token that expires. Their GitHub account must be able to push to the project's repository. A project access token, a request made through MCP, a platform token that never expires, and a sign-in that ended get `403` with code `person_required`. Opening a fix uses one of the run's attempts: the attempt that opens it is one of the run's, so a run held again on its last attempt can't be opened again. It starts no new run and counts toward no run limit. + # @param lavaflow_held_fix_open [LavaflowHeldFixOpen] + # @param [Hash] opts the optional parameters + # @return [Array<(LavaflowRun, Integer, Hash)>] LavaflowRun data, response status code and response headers + def create_lavaflow_held_fix_open_with_http_info(lavaflow_held_fix_open, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LavaFlowApi.create_lavaflow_held_fix_open ...' + end + # verify the required parameter 'lavaflow_held_fix_open' is set + if @api_client.config.client_side_validation && lavaflow_held_fix_open.nil? + fail ArgumentError, "Missing the required parameter 'lavaflow_held_fix_open' when calling LavaFlowApi.create_lavaflow_held_fix_open" + end + # resource path + local_var_path = '/lavaflow/held-fix-opens' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(lavaflow_held_fix_open) + + # return_type + return_type = opts[:debug_return_type] || 'LavaflowRun' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken'] + + new_options = opts.merge( + :operation => :"LavaFlowApi.create_lavaflow_held_fix_open", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LavaFlowApi#create_lavaflow_held_fix_open\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Start a LavaFlow run + # Starts a run on one of the project's issues. LavaFlow starts runs on its own only for issues with `exception: true`, and only while it is on. Start one here for any other issue, or for one recorded before LavaFlow was turned on. The run follows the project's settings, as one LavaFlow starts on its own does, and answers `202` while it is `queued`; read it with `GET /lavaflow/runs/{run_id}`. Only the project's owner can start a run, as a person, while their account is active: with a platform token that expires, `volcano login`, or a live Volcano dashboard sign-in. A platform token that never expires, a `volcano login` token whose sign-in ended, a full-scope project access token, and a request made through MCP get `403` with code `person_required`; a read-only project access token is refused as read-only first, without a code, and so is the owner of a read-only account. Every start counts toward the run limits: 5 runs per issue and 200 per project in any 24 hours. An issue has one run in progress at a time, so sending the request again while the first run is in progress answers `409` with code `lavaflow_run_in_progress`. A run on a Code Quality issue is a Code Quality run. It starts only while Code Quality is available to the project, as `lavaflow.code_quality` in `GET /capabilities` reports, and on for it. + # @param lavaflow_run_create [LavaflowRunCreate] + # @param [Hash] opts the optional parameters + # @return [LavaflowRun] + def create_lavaflow_run(lavaflow_run_create, opts = {}) + data, _status_code, _headers = create_lavaflow_run_with_http_info(lavaflow_run_create, opts) + data + end + + # Start a LavaFlow run + # Starts a run on one of the project's issues. LavaFlow starts runs on its own only for issues with `exception: true`, and only while it is on. Start one here for any other issue, or for one recorded before LavaFlow was turned on. The run follows the project's settings, as one LavaFlow starts on its own does, and answers `202` while it is `queued`; read it with `GET /lavaflow/runs/{run_id}`. Only the project's owner can start a run, as a person, while their account is active: with a platform token that expires, `volcano login`, or a live Volcano dashboard sign-in. A platform token that never expires, a `volcano login` token whose sign-in ended, a full-scope project access token, and a request made through MCP get `403` with code `person_required`; a read-only project access token is refused as read-only first, without a code, and so is the owner of a read-only account. Every start counts toward the run limits: 5 runs per issue and 200 per project in any 24 hours. An issue has one run in progress at a time, so sending the request again while the first run is in progress answers `409` with code `lavaflow_run_in_progress`. A run on a Code Quality issue is a Code Quality run. It starts only while Code Quality is available to the project, as `lavaflow.code_quality` in `GET /capabilities` reports, and on for it. + # @param lavaflow_run_create [LavaflowRunCreate] + # @param [Hash] opts the optional parameters + # @return [Array<(LavaflowRun, Integer, Hash)>] LavaflowRun data, response status code and response headers + def create_lavaflow_run_with_http_info(lavaflow_run_create, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LavaFlowApi.create_lavaflow_run ...' + end + # verify the required parameter 'lavaflow_run_create' is set + if @api_client.config.client_side_validation && lavaflow_run_create.nil? + fail ArgumentError, "Missing the required parameter 'lavaflow_run_create' when calling LavaFlowApi.create_lavaflow_run" + end + # resource path + local_var_path = '/lavaflow/runs' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(lavaflow_run_create) + + # return_type + return_type = opts[:debug_return_type] || 'LavaflowRun' + + # auth_names + auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken', 'UserToken'] + + new_options = opts.merge( + :operation => :"LavaFlowApi.create_lavaflow_run", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LavaFlowApi#create_lavaflow_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Remove a connector binding + # Stops a bound place, such as a Slack channel or an Aikido workspace, reporting problems for its project. Reports from it still queued are canceled at their next check. The binding's own project authorizes the request. Only the project's owner can remove one, with a platform token. A project access token or MCP gets `403` with code `person_required` for a binding of its own project, and `404` for another project's, as for an unknown one. Removing works whether or not the project's `lavaflow.slack` capability is available. + # @param binding_id [String] The binding's ID, from listing the project's connector bindings + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @return [nil] + def delete_lavaflow_connector_binding(binding_id, opts = {}) + delete_lavaflow_connector_binding_with_http_info(binding_id, opts) + nil + end + + # Remove a connector binding + # Stops a bound place, such as a Slack channel or an Aikido workspace, reporting problems for its project. Reports from it still queued are canceled at their next check. The binding's own project authorizes the request. Only the project's owner can remove one, with a platform token. A project access token or MCP gets `403` with code `person_required` for a binding of its own project, and `404` for another project's, as for an unknown one. Removing works whether or not the project's `lavaflow.slack` capability is available. + # @param binding_id [String] The binding's ID, from listing the project's connector bindings + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_lavaflow_connector_binding_with_http_info(binding_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LavaFlowApi.delete_lavaflow_connector_binding ...' + end + # verify the required parameter 'binding_id' is set + if @api_client.config.client_side_validation && binding_id.nil? + fail ArgumentError, "Missing the required parameter 'binding_id' when calling LavaFlowApi.delete_lavaflow_connector_binding" + end + # resource path + local_var_path = '/lavaflow/connector-bindings/{binding_id}'.sub('{' + 'binding_id' + '}', CGI.escape(binding_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken'] + + new_options = opts.merge( + :operation => :"LavaFlowApi.delete_lavaflow_connector_binding", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LavaFlowApi#delete_lavaflow_connector_binding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a LavaFlow run + # Returns a run, with its diagnosis, the log lines it cites, its diff, its review, including the findings the review left open and what it asks a person to decide, and whether the repository's own checks passed when LavaFlow ran them on the fix, with the commands they ran. The run's project authorizes the read, so `project_id` is optional. The text holds the project's logs and source code, so this endpoint takes the same access as the project's log endpoints. A run held because the repository's workflows could run its fix with the repository's secrets before a person approves it (`pull_request_skipped: ungated_workflows`) lists every such job in `held_workflows`, beside the fix's `diff` and `diff_sha256`. + # @param run_id [String] LavaFlow run ID + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @return [LavaflowRun] + def get_lavaflow_run(run_id, opts = {}) + data, _status_code, _headers = get_lavaflow_run_with_http_info(run_id, opts) + data + end + + # Get a LavaFlow run + # Returns a run, with its diagnosis, the log lines it cites, its diff, its review, including the findings the review left open and what it asks a person to decide, and whether the repository's own checks passed when LavaFlow ran them on the fix, with the commands they ran. The run's project authorizes the read, so `project_id` is optional. The text holds the project's logs and source code, so this endpoint takes the same access as the project's log endpoints. A run held because the repository's workflows could run its fix with the repository's secrets before a person approves it (`pull_request_skipped: ungated_workflows`) lists every such job in `held_workflows`, beside the fix's `diff` and `diff_sha256`. + # @param run_id [String] LavaFlow run ID + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @return [Array<(LavaflowRun, Integer, Hash)>] LavaflowRun data, response status code and response headers + def get_lavaflow_run_with_http_info(run_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LavaFlowApi.get_lavaflow_run ...' + end + # verify the required parameter 'run_id' is set + if @api_client.config.client_side_validation && run_id.nil? + fail ArgumentError, "Missing the required parameter 'run_id' when calling LavaFlowApi.get_lavaflow_run" + end + # resource path + local_var_path = '/lavaflow/runs/{run_id}'.sub('{' + 'run_id' + '}', CGI.escape(run_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'LavaflowRun' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"LavaFlowApi.get_lavaflow_run", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LavaFlowApi#get_lavaflow_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get LavaFlow settings + # Returns whether LavaFlow works on the project's issues and how far it goes on its own. LavaFlow takes project guidance from the repository's AGENTS.md and CLAUDE.md, not from a setting. A project that never saved settings returns the defaults, with LavaFlow off. LavaFlow sends this project's logs and source code to an AI service that Volcano operates. `can_update` says whether the caller can save the settings: only the project's owner can, with a platform token. Project access tokens can read the settings, including read-only ones. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @return [LavaflowSettings] + def get_lavaflow_settings(project_id, opts = {}) + data, _status_code, _headers = get_lavaflow_settings_with_http_info(project_id, opts) + data + end + + # Get LavaFlow settings + # Returns whether LavaFlow works on the project's issues and how far it goes on its own. LavaFlow takes project guidance from the repository's AGENTS.md and CLAUDE.md, not from a setting. A project that never saved settings returns the defaults, with LavaFlow off. LavaFlow sends this project's logs and source code to an AI service that Volcano operates. `can_update` says whether the caller can save the settings: only the project's owner can, with a platform token. Project access tokens can read the settings, including read-only ones. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @return [Array<(LavaflowSettings, Integer, Hash)>] LavaflowSettings data, response status code and response headers + def get_lavaflow_settings_with_http_info(project_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LavaFlowApi.get_lavaflow_settings ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling LavaFlowApi.get_lavaflow_settings" + end + # resource path + local_var_path = '/lavaflow/settings' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'project_id'] = project_id + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'LavaflowSettings' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"LavaFlowApi.get_lavaflow_settings", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LavaFlowApi#get_lavaflow_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get LavaFlow stats + # The activity counts report issues LavaFlow took on and pull requests it opened per UTC day, oldest first, with every day in the window present. Merges do not count toward these activity fields. The window ends today, which is partial. The activity `totals` equal the sum of the activity `days` and of the per-resource counts from `GET /lavaflow/resources` for the same project, `days` and `category`. `category` filters these activity counts to runs in that category. Activity counts measure issues taken on and pull requests opened, while `GET /lavaflow/runs` counts runs, so the two need not match. The optional `outcomes` object separately reports confirmed merges, improvements observed live and actual automatic issue-resolution episodes. `category` filters its merge and live counts; its primary issue-resolution count includes every category. Outcome counts use their own event dates and do not contribute to the activity totals. Older servers omit `outcomes`; its absence means unavailable, not zero. Null outcome counts mean unknown, not zero. Read the per-metric coverage alongside the counts: partial coverage and retained confirmations do not establish a complete total. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :days Number of UTC days in the window, ending today. (default to 30) + # @option opts [String] :category Only runs in this category; `uncategorized` for runs without one. + # @return [LavaflowStats] + def get_lavaflow_stats(project_id, opts = {}) + data, _status_code, _headers = get_lavaflow_stats_with_http_info(project_id, opts) + data + end + + # Get LavaFlow stats + # The activity counts report issues LavaFlow took on and pull requests it opened per UTC day, oldest first, with every day in the window present. Merges do not count toward these activity fields. The window ends today, which is partial. The activity `totals` equal the sum of the activity `days` and of the per-resource counts from `GET /lavaflow/resources` for the same project, `days` and `category`. `category` filters these activity counts to runs in that category. Activity counts measure issues taken on and pull requests opened, while `GET /lavaflow/runs` counts runs, so the two need not match. The optional `outcomes` object separately reports confirmed merges, improvements observed live and actual automatic issue-resolution episodes. `category` filters its merge and live counts; its primary issue-resolution count includes every category. Outcome counts use their own event dates and do not contribute to the activity totals. Older servers omit `outcomes`; its absence means unavailable, not zero. Null outcome counts mean unknown, not zero. Read the per-metric coverage alongside the counts: partial coverage and retained confirmations do not establish a complete total. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :days Number of UTC days in the window, ending today. (default to 30) + # @option opts [String] :category Only runs in this category; `uncategorized` for runs without one. + # @return [Array<(LavaflowStats, Integer, Hash)>] LavaflowStats data, response status code and response headers + def get_lavaflow_stats_with_http_info(project_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LavaFlowApi.get_lavaflow_stats ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling LavaFlowApi.get_lavaflow_stats" + end + if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] > 217 + fail ArgumentError, 'invalid value for "opts[:"days"]" when calling LavaFlowApi.get_lavaflow_stats, must be smaller than or equal to 217.' + end + + if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] < 1 + fail ArgumentError, 'invalid value for "opts[:"days"]" when calling LavaFlowApi.get_lavaflow_stats, must be greater than or equal to 1.' + end + + allowable_values = ["bug", "performance", "security", "improvement", "configuration", "dependency", "external", "uncategorized"] + if @api_client.config.client_side_validation && opts[:'category'] && !allowable_values.include?(opts[:'category']) + fail ArgumentError, "invalid value for \"category\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/lavaflow/stats' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'project_id'] = project_id + query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil? + query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'LavaflowStats' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"LavaFlowApi.get_lavaflow_stats", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LavaFlowApi#get_lavaflow_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List the project's connector bindings + # Lists where problems are reported to LavaFlow from for the project, such as Slack channels. In a bound Slack channel, someone whose Slack identity is connected to the project owner's account can mention the Volcano app to report a problem. Project access tokens can read the list, including read-only ones, and so can MCP, as `get_lavaflow_connector_bindings`. The list answers whether or not the project's `lavaflow.slack` capability is available. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @return [LavaflowConnectorBindingsResponse] + def list_lavaflow_connector_bindings(project_id, opts = {}) + data, _status_code, _headers = list_lavaflow_connector_bindings_with_http_info(project_id, opts) + data + end + + # List the project's connector bindings + # Lists where problems are reported to LavaFlow from for the project, such as Slack channels. In a bound Slack channel, someone whose Slack identity is connected to the project owner's account can mention the Volcano app to report a problem. Project access tokens can read the list, including read-only ones, and so can MCP, as `get_lavaflow_connector_bindings`. The list answers whether or not the project's `lavaflow.slack` capability is available. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @return [Array<(LavaflowConnectorBindingsResponse, Integer, Hash)>] LavaflowConnectorBindingsResponse data, response status code and response headers + def list_lavaflow_connector_bindings_with_http_info(project_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LavaFlowApi.list_lavaflow_connector_bindings ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling LavaFlowApi.list_lavaflow_connector_bindings" + end + # resource path + local_var_path = '/lavaflow/connector-bindings' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'project_id'] = project_id + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'LavaflowConnectorBindingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"LavaFlowApi.list_lavaflow_connector_bindings", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LavaFlowApi#list_lavaflow_connector_bindings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List LavaFlow's resources + # Lists every function, durable function and frontend in the project with LavaFlow's activity in the window, zeros included, sorted by name. A removed resource is listed when it has activity in the window (in that category, with `category` set), so the counts add up to `GET /lavaflow/stats`. `anomaly.flagged` is true when the last 24 hours have at least 3 issues opened for the resource and at least 3 times its daily average over the 29 days before, counting that average as at least 1. `category` counts, and flags anomalies from, only runs in that category; every current resource is still listed, and `last_analyzed_at` counts every run. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :days Number of UTC days in the window, ending today. (default to 30) + # @option opts [String] :category Only runs in this category; `uncategorized` for runs without one. + # @return [LavaflowResourceList] + def list_lavaflow_resources(project_id, opts = {}) + data, _status_code, _headers = list_lavaflow_resources_with_http_info(project_id, opts) + data + end + + # List LavaFlow's resources + # Lists every function, durable function and frontend in the project with LavaFlow's activity in the window, zeros included, sorted by name. A removed resource is listed when it has activity in the window (in that category, with `category` set), so the counts add up to `GET /lavaflow/stats`. `anomaly.flagged` is true when the last 24 hours have at least 3 issues opened for the resource and at least 3 times its daily average over the 29 days before, counting that average as at least 1. `category` counts, and flags anomalies from, only runs in that category; every current resource is still listed, and `last_analyzed_at` counts every run. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :days Number of UTC days in the window, ending today. (default to 30) + # @option opts [String] :category Only runs in this category; `uncategorized` for runs without one. + # @return [Array<(LavaflowResourceList, Integer, Hash)>] LavaflowResourceList data, response status code and response headers + def list_lavaflow_resources_with_http_info(project_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LavaFlowApi.list_lavaflow_resources ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling LavaFlowApi.list_lavaflow_resources" + end + if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] > 217 + fail ArgumentError, 'invalid value for "opts[:"days"]" when calling LavaFlowApi.list_lavaflow_resources, must be smaller than or equal to 217.' + end + + if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] < 1 + fail ArgumentError, 'invalid value for "opts[:"days"]" when calling LavaFlowApi.list_lavaflow_resources, must be greater than or equal to 1.' + end + + allowable_values = ["bug", "performance", "security", "improvement", "configuration", "dependency", "external", "uncategorized"] + if @api_client.config.client_side_validation && opts[:'category'] && !allowable_values.include?(opts[:'category']) + fail ArgumentError, "invalid value for \"category\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/lavaflow/resources' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'project_id'] = project_id + query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil? + query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'LavaflowResourceList' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"LavaFlowApi.list_lavaflow_resources", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LavaFlowApi#list_lavaflow_resources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List LavaFlow runs + # Pages the project's LavaFlow runs, newest first unless `order` says otherwise. A page carries bounded display text, including the saved proposed fix's optional `fix_summary`; read a run for its diagnosis, log lines and diff. Each run names its category, the resources it involves and its issue. A confirmed Code Quality finding can supply `issue.severity`, and a recorded pull request can supply `branch`. Unknown or withheld optional fields are omitted. Every filter narrows the list, and filters combine. `include=counts` adds `counts`, computed from the same filters: ask for them on the first page, since they don't depend on the cursor. Keep the filters and `order` while paging. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Number of runs per page (max 100) (default to 25) + # @option opts [String] :cursor Opaque cursor from a previous response's `next_cursor`. Pages forward, and works only for the same `project_id` and caller; keep the same filters while paging. + # @option opts [LavaflowRunStatus] :status Only runs in this status. + # @option opts [String] :resource_id Only runs for issues of this resource. + # @option opts [String] :category Only runs in this category; `uncategorized` for runs without one. + # @option opts [String] :involved_resource_id Only runs that involve this function, durable function or frontend in any role: the issue came from it, the diagnosis traced the cause to it, or the fix changes it. + # @option opts [String] :issue_id Only runs on this issue. An issue the project doesn't have answers `404`, like an unknown issue. + # @option opts [String] :pull_request_state Only runs whose pull request is in this state; `none` for runs without one. + # @option opts [Integer] :days Only runs created in the last `days` UTC days, today included. Omit for every run. + # @option opts [String] :order `created_at.desc` is newest first and `created_at.asc` oldest first. `issue_events.desc` orders by the issue's current `event_count`, most first, then newest first. That count grows as errors arrive or scans see a finding again, so paging this order can skip runs, not only move them between pages. To read every run, for an export say, page `created_at.desc` or `created_at.asc`. A cursor works only with the order it came from. (default to 'created_at.desc') + # @option opts [Array] :include `counts` adds `counts` to the response. Ask on the first page; the counts don't depend on the cursor. + # @return [PaginatedLavaflowRuns] + def list_lavaflow_runs(project_id, opts = {}) + data, _status_code, _headers = list_lavaflow_runs_with_http_info(project_id, opts) + data + end + + # List LavaFlow runs + # Pages the project's LavaFlow runs, newest first unless `order` says otherwise. A page carries bounded display text, including the saved proposed fix's optional `fix_summary`; read a run for its diagnosis, log lines and diff. Each run names its category, the resources it involves and its issue. A confirmed Code Quality finding can supply `issue.severity`, and a recorded pull request can supply `branch`. Unknown or withheld optional fields are omitted. Every filter narrows the list, and filters combine. `include=counts` adds `counts`, computed from the same filters: ask for them on the first page, since they don't depend on the cursor. Keep the filters and `order` while paging. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Number of runs per page (max 100) (default to 25) + # @option opts [String] :cursor Opaque cursor from a previous response's `next_cursor`. Pages forward, and works only for the same `project_id` and caller; keep the same filters while paging. + # @option opts [LavaflowRunStatus] :status Only runs in this status. + # @option opts [String] :resource_id Only runs for issues of this resource. + # @option opts [String] :category Only runs in this category; `uncategorized` for runs without one. + # @option opts [String] :involved_resource_id Only runs that involve this function, durable function or frontend in any role: the issue came from it, the diagnosis traced the cause to it, or the fix changes it. + # @option opts [String] :issue_id Only runs on this issue. An issue the project doesn't have answers `404`, like an unknown issue. + # @option opts [String] :pull_request_state Only runs whose pull request is in this state; `none` for runs without one. + # @option opts [Integer] :days Only runs created in the last `days` UTC days, today included. Omit for every run. + # @option opts [String] :order `created_at.desc` is newest first and `created_at.asc` oldest first. `issue_events.desc` orders by the issue's current `event_count`, most first, then newest first. That count grows as errors arrive or scans see a finding again, so paging this order can skip runs, not only move them between pages. To read every run, for an export say, page `created_at.desc` or `created_at.asc`. A cursor works only with the order it came from. (default to 'created_at.desc') + # @option opts [Array] :include `counts` adds `counts` to the response. Ask on the first page; the counts don't depend on the cursor. + # @return [Array<(PaginatedLavaflowRuns, Integer, Hash)>] PaginatedLavaflowRuns data, response status code and response headers + def list_lavaflow_runs_with_http_info(project_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LavaFlowApi.list_lavaflow_runs ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling LavaFlowApi.list_lavaflow_runs" + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LavaFlowApi.list_lavaflow_runs, must be smaller than or equal to 100.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LavaFlowApi.list_lavaflow_runs, must be greater than or equal to 1.' + end + + allowable_values = ["bug", "performance", "security", "improvement", "configuration", "dependency", "external", "uncategorized"] + if @api_client.config.client_side_validation && opts[:'category'] && !allowable_values.include?(opts[:'category']) + fail ArgumentError, "invalid value for \"category\", must be one of #{allowable_values}" + end + allowable_values = ["open", "merged", "closed", "none"] + if @api_client.config.client_side_validation && opts[:'pull_request_state'] && !allowable_values.include?(opts[:'pull_request_state']) + fail ArgumentError, "invalid value for \"pull_request_state\", must be one of #{allowable_values}" + end + if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] > 90 + fail ArgumentError, 'invalid value for "opts[:"days"]" when calling LavaFlowApi.list_lavaflow_runs, must be smaller than or equal to 90.' + end + + if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] < 1 + fail ArgumentError, 'invalid value for "opts[:"days"]" when calling LavaFlowApi.list_lavaflow_runs, must be greater than or equal to 1.' + end + + allowable_values = ["created_at.desc", "created_at.asc", "issue_events.desc"] + if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order']) + fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}" + end + allowable_values = ["counts"] + if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) } + fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}" + end + # resource path + local_var_path = '/lavaflow/runs' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'project_id'] = project_id + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? + query_params[:'resource_id'] = opts[:'resource_id'] if !opts[:'resource_id'].nil? + query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil? + query_params[:'involved_resource_id'] = opts[:'involved_resource_id'] if !opts[:'involved_resource_id'].nil? + query_params[:'issue_id'] = opts[:'issue_id'] if !opts[:'issue_id'].nil? + query_params[:'pull_request_state'] = opts[:'pull_request_state'] if !opts[:'pull_request_state'].nil? + query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil? + query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? + query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PaginatedLavaflowRuns' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"LavaFlowApi.list_lavaflow_runs", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LavaFlowApi#list_lavaflow_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List LavaFlow Code Quality scans + # Pages the project's Code Quality scans, newest first. The first page starts with the project's waiting scan, if it has one: the deploys that went live since the last scan, with `status: waiting` and the bound it waits at in `waiting_reason`. A bound never drops a deploy: the waiting scan covers every commit since the last one when it starts. A platform publication pause is reported as `feature_paused` and does not spend the scan's retry allowance. With publication enabled, a separate pause on starting runs is reported as `feature_unavailable`. Each scan shows the commits it compared, the resources whose deploys it covers, what it did with what it found, and the findings whose runs were billed. Scans stay readable while LavaFlow or Code Quality is off. Project access tokens can read them, including read-only ones. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Number of scans per page (max 100) (default to 25) + # @option opts [String] :cursor Opaque cursor from a previous response's `next_cursor`. Pages forward, and works only for the same `project_id` and caller; keep the same filters while paging. + # @return [PaginatedLavaflowScans] + def list_lavaflow_scans(project_id, opts = {}) + data, _status_code, _headers = list_lavaflow_scans_with_http_info(project_id, opts) + data + end + + # List LavaFlow Code Quality scans + # Pages the project's Code Quality scans, newest first. The first page starts with the project's waiting scan, if it has one: the deploys that went live since the last scan, with `status: waiting` and the bound it waits at in `waiting_reason`. A bound never drops a deploy: the waiting scan covers every commit since the last one when it starts. A platform publication pause is reported as `feature_paused` and does not spend the scan's retry allowance. With publication enabled, a separate pause on starting runs is reported as `feature_unavailable`. Each scan shows the commits it compared, the resources whose deploys it covers, what it did with what it found, and the findings whose runs were billed. Scans stay readable while LavaFlow or Code Quality is off. Project access tokens can read them, including read-only ones. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Number of scans per page (max 100) (default to 25) + # @option opts [String] :cursor Opaque cursor from a previous response's `next_cursor`. Pages forward, and works only for the same `project_id` and caller; keep the same filters while paging. + # @return [Array<(PaginatedLavaflowScans, Integer, Hash)>] PaginatedLavaflowScans data, response status code and response headers + def list_lavaflow_scans_with_http_info(project_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LavaFlowApi.list_lavaflow_scans ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling LavaFlowApi.list_lavaflow_scans" + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LavaFlowApi.list_lavaflow_scans, must be smaller than or equal to 100.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LavaFlowApi.list_lavaflow_scans, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/lavaflow/scans' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'project_id'] = project_id + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PaginatedLavaflowScans' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"LavaFlowApi.list_lavaflow_scans", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LavaFlowApi#list_lavaflow_scans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update LavaFlow settings + # Changes the fields the request names for the project `project_id` names; an omitted field keeps its saved value, or its default when nothing is saved. `{\"project_id\": \"…\", \"enabled\": true}` turns LavaFlow on for every function, frontend and durable function in the project, and records the repository the project points at as the one LavaFlow works in. A request carrying `\"enabled\": true` is a turn-on, even while LavaFlow is on. When the project points at no repository at a turn-on, the first repository it connects afterwards is recorded. A request that omits `enabled` never changes which repository is recorded. LavaFlow sends this project's logs and source code to an AI service that Volcano operates. Turning LavaFlow on, from off, also starts runs for up to 5 open issues with `exception: true` and an `event_count` of at least 2, last seen in the past 7 days, most recently seen first, leaving out any issue LavaFlow already ran; runs LavaFlow queued on its own and hasn't started count toward the 5. They start like any run LavaFlow starts on its own, up to 3 at once per project. Only the owner's save with a `volcano login` token whose sign-in is live, a live Volcano dashboard sign-in, or a platform token that expires, starts them; any other save turns LavaFlow on without them. A save while LavaFlow is on starts none, and neither does LavaFlow becoming available to the project. Only the project's owner can save, with a platform token or a live Volcano dashboard sign-in, while their account is active. A full-scope project access token can only turn settings off: a body with `project_id` and `\"code_quality\": {\"enabled\": false}`, each field spelled exactly and sent once, and nothing else. Any other body from a project access token, including one that turns a setting on, adds a field, sends `null`, or names a field the schema doesn't have, gets `403` with code `person_required`, as does a request made through MCP. A read-only project access token is refused as read-only first, without a code, and so is the owner of a read-only account. `code_quality.enabled: true` turns on LavaFlow Code Quality, which reviews the lines each production deploy of a frontend changes and turns what it confirms into issues and pull requests. Function deploys ask for no scan yet. It needs the project's `lavaflow.code_quality` capability: while Code Quality isn't released here the save answers `400` with code `feature_unavailable`, and while the owner's plan allows no Code Quality findings it answers `403` with code `plan_required`. Only the owner can turn it on, with the check below. Turning it off always works, and drops the deploys waiting to be scanned. `autonomy: merge` needs the project's `lavaflow.merge` capability. Without it, a save that sets `autonomy` to `merge`, or changes `merge_policy`, answers `400` with code `feature_unavailable`. A save that sends the saved values again passes this check, though it can still need the owner's check below, and a project at `merge` can still change to another autonomy. The save doesn't read the repository's branch rules: LavaFlow merges only into a base branch that requires at least one status check, and holds every fix with `no_required_checks` on any other. Changing `autonomy` to `merge` lets LavaFlow merge with no one else looking. So does turning `enabled` on while `autonomy` stays `merge`, and changing `merge_policy`, to any value, while `autonomy` is, or becomes, `merge`. Turning `allow_ungated_workflows` on lets LavaFlow open a fix where a workflow could run it with the repository's secrets before a person approves it. Turning `code_quality` on starts work on every frontend production deploy with no incident behind it. Only the owner can make these changes, with a credential of their own that expires: a `volcano login` token whose sign-in is live, a live Volcano dashboard sign-in, or a platform token with an expiry. The owner's GitHub account must also be able to push to the project's repository. A project access token, MCP, a platform token that never expires, a sign-in that ended, an owner who can't push, and a project with no repository get `403` with code `person_required`, and nothing is saved. Turning LavaFlow, `allow_ungated_workflows` or `code_quality` off needs no check. Nothing is saved either when the push check can't be answered (`429` or `503`, with `Retry-After`). When the project points at another repository, reaches its repository through another Volcano GitHub App installation, or points at none, `autonomy` changes from `merge` to `open_pr`; pointing back doesn't change it back. Reconnecting after a reinstall of the App counts as another installation. Turning LavaFlow on needs a plan that includes it (`403`, code `plan_required`). LavaFlow is available where the project's `lavaflow` capability is, which includes the owner's plan. Where it is not, a project with LavaFlow records can still turn LavaFlow, Code Quality or both off: a save that sends `enabled: false`, `code_quality: {enabled: false}` or both, and otherwise only `allow_ungated_workflows: false` sent with `enabled`. Any other save, and any save for a project without records, answers `404` with code `feature_unavailable` while LavaFlow is not offered to the project, and `403` with code `plan_required` when it is but the owner's plan does not include it. + # @param lavaflow_settings_update [LavaflowSettingsUpdate] + # @param [Hash] opts the optional parameters + # @return [LavaflowSettings] + def patch_lavaflow_settings(lavaflow_settings_update, opts = {}) + data, _status_code, _headers = patch_lavaflow_settings_with_http_info(lavaflow_settings_update, opts) + data + end + + # Update LavaFlow settings + # Changes the fields the request names for the project `project_id` names; an omitted field keeps its saved value, or its default when nothing is saved. `{\"project_id\": \"…\", \"enabled\": true}` turns LavaFlow on for every function, frontend and durable function in the project, and records the repository the project points at as the one LavaFlow works in. A request carrying `\"enabled\": true` is a turn-on, even while LavaFlow is on. When the project points at no repository at a turn-on, the first repository it connects afterwards is recorded. A request that omits `enabled` never changes which repository is recorded. LavaFlow sends this project's logs and source code to an AI service that Volcano operates. Turning LavaFlow on, from off, also starts runs for up to 5 open issues with `exception: true` and an `event_count` of at least 2, last seen in the past 7 days, most recently seen first, leaving out any issue LavaFlow already ran; runs LavaFlow queued on its own and hasn't started count toward the 5. They start like any run LavaFlow starts on its own, up to 3 at once per project. Only the owner's save with a `volcano login` token whose sign-in is live, a live Volcano dashboard sign-in, or a platform token that expires, starts them; any other save turns LavaFlow on without them. A save while LavaFlow is on starts none, and neither does LavaFlow becoming available to the project. Only the project's owner can save, with a platform token or a live Volcano dashboard sign-in, while their account is active. A full-scope project access token can only turn settings off: a body with `project_id` and `\"code_quality\": {\"enabled\": false}`, each field spelled exactly and sent once, and nothing else. Any other body from a project access token, including one that turns a setting on, adds a field, sends `null`, or names a field the schema doesn't have, gets `403` with code `person_required`, as does a request made through MCP. A read-only project access token is refused as read-only first, without a code, and so is the owner of a read-only account. `code_quality.enabled: true` turns on LavaFlow Code Quality, which reviews the lines each production deploy of a frontend changes and turns what it confirms into issues and pull requests. Function deploys ask for no scan yet. It needs the project's `lavaflow.code_quality` capability: while Code Quality isn't released here the save answers `400` with code `feature_unavailable`, and while the owner's plan allows no Code Quality findings it answers `403` with code `plan_required`. Only the owner can turn it on, with the check below. Turning it off always works, and drops the deploys waiting to be scanned. `autonomy: merge` needs the project's `lavaflow.merge` capability. Without it, a save that sets `autonomy` to `merge`, or changes `merge_policy`, answers `400` with code `feature_unavailable`. A save that sends the saved values again passes this check, though it can still need the owner's check below, and a project at `merge` can still change to another autonomy. The save doesn't read the repository's branch rules: LavaFlow merges only into a base branch that requires at least one status check, and holds every fix with `no_required_checks` on any other. Changing `autonomy` to `merge` lets LavaFlow merge with no one else looking. So does turning `enabled` on while `autonomy` stays `merge`, and changing `merge_policy`, to any value, while `autonomy` is, or becomes, `merge`. Turning `allow_ungated_workflows` on lets LavaFlow open a fix where a workflow could run it with the repository's secrets before a person approves it. Turning `code_quality` on starts work on every frontend production deploy with no incident behind it. Only the owner can make these changes, with a credential of their own that expires: a `volcano login` token whose sign-in is live, a live Volcano dashboard sign-in, or a platform token with an expiry. The owner's GitHub account must also be able to push to the project's repository. A project access token, MCP, a platform token that never expires, a sign-in that ended, an owner who can't push, and a project with no repository get `403` with code `person_required`, and nothing is saved. Turning LavaFlow, `allow_ungated_workflows` or `code_quality` off needs no check. Nothing is saved either when the push check can't be answered (`429` or `503`, with `Retry-After`). When the project points at another repository, reaches its repository through another Volcano GitHub App installation, or points at none, `autonomy` changes from `merge` to `open_pr`; pointing back doesn't change it back. Reconnecting after a reinstall of the App counts as another installation. Turning LavaFlow on needs a plan that includes it (`403`, code `plan_required`). LavaFlow is available where the project's `lavaflow` capability is, which includes the owner's plan. Where it is not, a project with LavaFlow records can still turn LavaFlow, Code Quality or both off: a save that sends `enabled: false`, `code_quality: {enabled: false}` or both, and otherwise only `allow_ungated_workflows: false` sent with `enabled`. Any other save, and any save for a project without records, answers `404` with code `feature_unavailable` while LavaFlow is not offered to the project, and `403` with code `plan_required` when it is but the owner's plan does not include it. + # @param lavaflow_settings_update [LavaflowSettingsUpdate] + # @param [Hash] opts the optional parameters + # @return [Array<(LavaflowSettings, Integer, Hash)>] LavaflowSettings data, response status code and response headers + def patch_lavaflow_settings_with_http_info(lavaflow_settings_update, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LavaFlowApi.patch_lavaflow_settings ...' + end + # verify the required parameter 'lavaflow_settings_update' is set + if @api_client.config.client_side_validation && lavaflow_settings_update.nil? + fail ArgumentError, "Missing the required parameter 'lavaflow_settings_update' when calling LavaFlowApi.patch_lavaflow_settings" + end + # resource path + local_var_path = '/lavaflow/settings' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(lavaflow_settings_update) + + # return_type + return_type = opts[:debug_return_type] || 'LavaflowSettings' + + # auth_names + auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken', 'UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"LavaFlowApi.patch_lavaflow_settings", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LavaFlowApi#patch_lavaflow_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/api/locks_api.rb b/lib/volcano/generated/lib/volcano-generated/api/locks_api.rb index 4feb82ae..9f60d403 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/locks_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/locks_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/api/logs_api.rb b/lib/volcano/generated/lib/volcano-generated/api/logs_api.rb index 0696208c..85aeaeaf 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/logs_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/logs_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -20,7 +20,7 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end # Get project log activity - # Retrieve bucketed log counts for one resource type in the project. Set `resource.type` to `function`, `frontend`, or `database`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to count deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases. Database logs are a SUPERAGENT feature; `resource.type=database` from a HOBBY project owner returns 403. The activity window is limited to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days); older start times are clamped to that window. Buckets are aligned to UTC clock intervals and count events in the half-open window `[start_time, end_time)`. + # Retrieve bucketed log counts for one resource type in the project. Set `resource.type` to `function`, `frontend`, `database`, or `app`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to count deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases or apps. `app` counts the entries a first-party app, such as the Builder, wrote into the project; an app's ID is UUIDv5 of its slug (see `LogResource.id`). With no entries it answers 200 with none; an unknown app in `resource.ids` answers 404 `app not found`. The `app_logs` release gate controls new writes only: entries already written stay readable when it closes. Database logs are a SUPERAGENT feature; `resource.type=database` from a HOBBY project owner returns 403. The activity window is limited to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days); older start times are clamped to that window. Buckets are aligned to UTC clock intervals and count events in the half-open window `[start_time, end_time)`. # @param id [String] Project ID # @param log_activity_request [LogActivityRequest] # @param [Hash] opts the optional parameters @@ -31,7 +31,7 @@ def get_project_log_activity(id, log_activity_request, opts = {}) end # Get project log activity - # Retrieve bucketed log counts for one resource type in the project. Set `resource.type` to `function`, `frontend`, or `database`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to count deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases. Database logs are a SUPERAGENT feature; `resource.type=database` from a HOBBY project owner returns 403. The activity window is limited to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days); older start times are clamped to that window. Buckets are aligned to UTC clock intervals and count events in the half-open window `[start_time, end_time)`. + # Retrieve bucketed log counts for one resource type in the project. Set `resource.type` to `function`, `frontend`, `database`, or `app`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to count deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases or apps. `app` counts the entries a first-party app, such as the Builder, wrote into the project; an app's ID is UUIDv5 of its slug (see `LogResource.id`). With no entries it answers 200 with none; an unknown app in `resource.ids` answers 404 `app not found`. The `app_logs` release gate controls new writes only: entries already written stay readable when it closes. Database logs are a SUPERAGENT feature; `resource.type=database` from a HOBBY project owner returns 403. The activity window is limited to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days); older start times are clamped to that window. Buckets are aligned to UTC clock intervals and count events in the half-open window `[start_time, end_time)`. # @param id [String] Project ID # @param log_activity_request [LogActivityRequest] # @param [Hash] opts the optional parameters @@ -94,7 +94,7 @@ def get_project_log_activity_with_http_info(id, log_activity_request, opts = {}) end # Search project logs - # Search or filter logs for one resource type in the project. Set `resource.type` to `function`, `frontend`, or `database`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to read deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases. Database logs are a SUPERAGENT feature; requests for `resource.type=database` from a HOBBY project owner return 403. Log history (runtime and deployment) is limited to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days); older time ranges are clamped to that window. + # Search or filter logs for one resource type in the project. Set `resource.type` to `function`, `frontend`, `database`, or `app`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to read deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases or apps. `app` reads the entries a first-party app, such as the Builder, wrote into the project; an app's ID is UUIDv5 of its slug (see `LogResource.id`). With no entries it answers 200 with none; an unknown app in `resource.ids` answers 404 `app not found`. The `app_logs` release gate controls new writes only: entries already written stay readable when it closes. Database logs are a SUPERAGENT feature; requests for `resource.type=database` from a HOBBY project owner return 403. Log history (runtime and deployment) is limited to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days); older time ranges are clamped to that window. # @param id [String] Project ID # @param log_search_request [LogSearchRequest] # @param [Hash] opts the optional parameters @@ -105,7 +105,7 @@ def search_project_logs(id, log_search_request, opts = {}) end # Search project logs - # Search or filter logs for one resource type in the project. Set `resource.type` to `function`, `frontend`, or `database`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to read deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases. Database logs are a SUPERAGENT feature; requests for `resource.type=database` from a HOBBY project owner return 403. Log history (runtime and deployment) is limited to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days); older time ranges are clamped to that window. + # Search or filter logs for one resource type in the project. Set `resource.type` to `function`, `frontend`, `database`, or `app`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to read deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases or apps. `app` reads the entries a first-party app, such as the Builder, wrote into the project; an app's ID is UUIDv5 of its slug (see `LogResource.id`). With no entries it answers 200 with none; an unknown app in `resource.ids` answers 404 `app not found`. The `app_logs` release gate controls new writes only: entries already written stay readable when it closes. Database logs are a SUPERAGENT feature; requests for `resource.type=database` from a HOBBY project owner return 403. Log history (runtime and deployment) is limited to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days); older time ranges are clamped to that window. # @param id [String] Project ID # @param log_search_request [LogSearchRequest] # @param [Hash] opts the optional parameters diff --git a/lib/volcano/generated/lib/volcano-generated/api/notifications_api.rb b/lib/volcano/generated/lib/volcano-generated/api/notifications_api.rb new file mode 100644 index 00000000..14d448af --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/api/notifications_api.rb @@ -0,0 +1,285 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'cgi' + +module Volcano::Generated + class NotificationsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Get notification settings + # Returns where the project's alerts go and when a failing scheduler is announced. A project that never saved settings returns the defaults: email to the project owner, no webhook, and an alert after 3 failed runs in a row, followed by one when the scheduler recovers. The webhook signing secret is never returned here; `secret_configured` shows whether one is set. A read-only project access token is refused with `403`, because the webhook URL can carry the receiver's token. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @return [NotificationSettings] + def get_notification_settings(id, opts = {}) + data, _status_code, _headers = get_notification_settings_with_http_info(id, opts) + data + end + + # Get notification settings + # Returns where the project's alerts go and when a failing scheduler is announced. A project that never saved settings returns the defaults: email to the project owner, no webhook, and an alert after 3 failed runs in a row, followed by one when the scheduler recovers. The webhook signing secret is never returned here; `secret_configured` shows whether one is set. A read-only project access token is refused with `403`, because the webhook URL can carry the receiver's token. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @return [Array<(NotificationSettings, Integer, Hash)>] NotificationSettings data, response status code and response headers + def get_notification_settings_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: NotificationsApi.get_notification_settings ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling NotificationsApi.get_notification_settings" + end + # resource path + local_var_path = '/projects/{id}/notifications'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'NotificationSettings' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"NotificationsApi.get_notification_settings", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: NotificationsApi#get_notification_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Rotate the webhook signing secret + # Replaces the webhook signing secret and returns the settings with the new one in `webhook.secret`, this once. Every delivery from now on is signed with the new secret, including retries of earlier alerts. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @return [NotificationSettings] + def rotate_notification_webhook_secret(id, opts = {}) + data, _status_code, _headers = rotate_notification_webhook_secret_with_http_info(id, opts) + data + end + + # Rotate the webhook signing secret + # Replaces the webhook signing secret and returns the settings with the new one in `webhook.secret`, this once. Every delivery from now on is signed with the new secret, including retries of earlier alerts. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @return [Array<(NotificationSettings, Integer, Hash)>] NotificationSettings data, response status code and response headers + def rotate_notification_webhook_secret_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: NotificationsApi.rotate_notification_webhook_secret ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling NotificationsApi.rotate_notification_webhook_secret" + end + # resource path + local_var_path = '/projects/{id}/notifications/webhook-secret'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'NotificationSettings' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"NotificationsApi.rotate_notification_webhook_secret", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: NotificationsApi#rotate_notification_webhook_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Send a test notification + # Sends a `notification.test` event on every channel that delivers right away and reports how each delivery went. A webhook delivery is signed like an alert. Enabled email is reported undelivered, without sending, while the project owner has no verified account email address. One test per project per minute. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @return [NotificationTestResult] + def send_test_notification(id, opts = {}) + data, _status_code, _headers = send_test_notification_with_http_info(id, opts) + data + end + + # Send a test notification + # Sends a `notification.test` event on every channel that delivers right away and reports how each delivery went. A webhook delivery is signed like an alert. Enabled email is reported undelivered, without sending, while the project owner has no verified account email address. One test per project per minute. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @return [Array<(NotificationTestResult, Integer, Hash)>] NotificationTestResult data, response status code and response headers + def send_test_notification_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: NotificationsApi.send_test_notification ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling NotificationsApi.send_test_notification" + end + # resource path + local_var_path = '/projects/{id}/notifications/test'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'NotificationTestResult' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"NotificationsApi.send_test_notification", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: NotificationsApi#send_test_notification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update notification settings + # Changes the project's notification settings. Omitted fields keep their current values, so `{\"email\": {\"enabled\": false}}` only turns email off. Alert emails go only to the project owner's verified account email address. `email.recipients` may be empty or name that address; any other list is refused with `400`, and so is any non-empty list while the owner has no verified address. `email.status` in the response says whether alerts are being emailed. Setting `webhook.url` on a project without a webhook generates its signing secret, returned in `webhook.secret` in this response only. Changing the URL keeps the secret. An empty `webhook.url` removes the webhook and its secret. Outside local mode the webhook must be reachable on the public internet; a URL naming a private or loopback address is refused, and so is a delivery to a host name that resolves to one. + # @param id [String] Project ID + # @param update_notification_settings_request [UpdateNotificationSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [NotificationSettings] + def update_notification_settings(id, update_notification_settings_request, opts = {}) + data, _status_code, _headers = update_notification_settings_with_http_info(id, update_notification_settings_request, opts) + data + end + + # Update notification settings + # Changes the project's notification settings. Omitted fields keep their current values, so `{\"email\": {\"enabled\": false}}` only turns email off. Alert emails go only to the project owner's verified account email address. `email.recipients` may be empty or name that address; any other list is refused with `400`, and so is any non-empty list while the owner has no verified address. `email.status` in the response says whether alerts are being emailed. Setting `webhook.url` on a project without a webhook generates its signing secret, returned in `webhook.secret` in this response only. Changing the URL keeps the secret. An empty `webhook.url` removes the webhook and its secret. Outside local mode the webhook must be reachable on the public internet; a URL naming a private or loopback address is refused, and so is a delivery to a host name that resolves to one. + # @param id [String] Project ID + # @param update_notification_settings_request [UpdateNotificationSettingsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(NotificationSettings, Integer, Hash)>] NotificationSettings data, response status code and response headers + def update_notification_settings_with_http_info(id, update_notification_settings_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: NotificationsApi.update_notification_settings ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling NotificationsApi.update_notification_settings" + end + # verify the required parameter 'update_notification_settings_request' is set + if @api_client.config.client_side_validation && update_notification_settings_request.nil? + fail ArgumentError, "Missing the required parameter 'update_notification_settings_request' when calling NotificationsApi.update_notification_settings" + end + # resource path + local_var_path = '/projects/{id}/notifications'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(update_notification_settings_request) + + # return_type + return_type = opts[:debug_return_type] || 'NotificationSettings' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"NotificationsApi.update_notification_settings", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: NotificationsApi#update_notification_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/api/o_auth_authentication_api.rb b/lib/volcano/generated/lib/volcano-generated/api/o_auth_authentication_api.rb index de3aa4b5..e7fb978e 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/o_auth_authentication_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/o_auth_authentication_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -309,7 +309,7 @@ def auth_link_o_auth_provider_with_http_info(provider, opts = {}) end # List user's linked providers - # Get list of OAuth providers linked to current user + # Lists the OAuth providers linked to the signed-in user, with the user's own account ID at each provider. Match on `provider_user_id`, which never changes, rather than on the login or email. For GitHub, it is the numeric user ID that GitHub reports elsewhere, such as a webhook's `sender.id`. # @param [Hash] opts the optional parameters # @return [AuthListOAuthProviders200Response] def auth_list_o_auth_providers(opts = {}) @@ -318,7 +318,7 @@ def auth_list_o_auth_providers(opts = {}) end # List user's linked providers - # Get list of OAuth providers linked to current user + # Lists the OAuth providers linked to the signed-in user, with the user's own account ID at each provider. Match on `provider_user_id`, which never changes, rather than on the login or email. For GitHub, it is the numeric user ID that GitHub reports elsewhere, such as a webhook's `sender.id`. # @param [Hash] opts the optional parameters # @return [Array<(AuthListOAuthProviders200Response, Integer, Hash)>] AuthListOAuthProviders200Response data, response status code and response headers def auth_list_o_auth_providers_with_http_info(opts = {}) @@ -544,6 +544,8 @@ def auth_o_auth_callback_with_http_info(provider, code, state, opts = {}) # Atomically consumes a short-lived callback code and returns the user's session. The request must use the same project anon key and exact redirect_url that initiated the flow. # @param auth_o_auth_exchange_request [AuthOAuthExchangeRequest] # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @return [AuthTokenResponse] def auth_o_auth_exchange(auth_o_auth_exchange_request, opts = {}) data, _status_code, _headers = auth_o_auth_exchange_with_http_info(auth_o_auth_exchange_request, opts) @@ -554,6 +556,8 @@ def auth_o_auth_exchange(auth_o_auth_exchange_request, opts = {}) # Atomically consumes a short-lived callback code and returns the user's session. The request must use the same project anon key and exact redirect_url that initiated the flow. # @param auth_o_auth_exchange_request [AuthOAuthExchangeRequest] # @param [Hash] opts the optional parameters + # @option opts [String] :x_volcano_proxy_authorization Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` form. When supplied, `X-Volcano-Client-IP` is also required. The service key must belong to the anon key's project and hold this operation's scope: `auth.signup` for signup and anonymous signup, `auth.signin` for signin and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for logout, and `auth.password_reset` for forgot-password and reset-password. The password policy accepts any service key for the project. Never expose a service key to browser code. + # @option opts [String] :x_volcano_client_ip Original browser IPv4 or IPv6 address supplied by a trusted server-side auth proxy. The proxy must derive this value from its platform-verified request metadata, never from a browser-supplied header. Requires a valid `X-Volcano-Proxy-Authorization` header. # @return [Array<(AuthTokenResponse, Integer, Hash)>] AuthTokenResponse data, response status code and response headers def auth_o_auth_exchange_with_http_info(auth_o_auth_exchange_request, opts = {}) if @api_client.config.debugging @@ -578,6 +582,8 @@ def auth_o_auth_exchange_with_http_info(auth_o_auth_exchange_request, opts = {}) if !content_type.nil? header_params['Content-Type'] = content_type end + header_params[:'X-Volcano-Proxy-Authorization'] = opts[:'x_volcano_proxy_authorization'] if !opts[:'x_volcano_proxy_authorization'].nil? + header_params[:'X-Volcano-Client-IP'] = opts[:'x_volcano_client_ip'] if !opts[:'x_volcano_client_ip'].nil? # form parameters form_params = opts[:form_params] || {} @@ -677,7 +683,7 @@ def auth_platform_exchange_with_http_info(auth_platform_exchange_request, opts = end # Unlink OAuth provider - # Remove OAuth provider from user's account. Cannot unlink if it's the only authentication method. + # Remove OAuth provider from user's account. Refused when the account would have no other way to sign in: another linked OAuth provider that's enabled for the project, or a password while email/password sign-in is on for the project (`enable_email_password`). # @param provider [String] # @param [Hash] opts the optional parameters # @return [nil] @@ -687,7 +693,7 @@ def auth_unlink_o_auth_provider(provider, opts = {}) end # Unlink OAuth provider - # Remove OAuth provider from user's account. Cannot unlink if it's the only authentication method. + # Remove OAuth provider from user's account. Refused when the account would have no other way to sign in: another linked OAuth provider that's enabled for the project, or a password while email/password sign-in is on for the project (`enable_email_password`). # @param provider [String] # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers diff --git a/lib/volcano/generated/lib/volcano-generated/api/o_auth_configuration_api.rb b/lib/volcano/generated/lib/volcano-generated/api/o_auth_configuration_api.rb index e7572236..f74c230c 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/o_auth_configuration_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/o_auth_configuration_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/api/project_access_tokens_api.rb b/lib/volcano/generated/lib/volcano-generated/api/project_access_tokens_api.rb index 987bf0b5..87178fdc 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/project_access_tokens_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/project_access_tokens_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -243,13 +243,14 @@ def get_project_access_token_usage_with_http_info(id, token_id, opts = {}) end # List a project's access tokens - # Lists the project's access tokens, newest first. Secrets are never returned: only a hash is stored, so a token's value exists solely in the response to the create call. Only tokens that can still authenticate are returned by default, so revoked and expired ones are hidden. Pass `include_revoked=true` to see them, which is how you find out what a key did before it stopped working. Requires a platform token. A project access token cannot manage project access tokens, so a leaked credential cannot enumerate or replace itself. + # Lists the project's access tokens, newest first. Secrets are never returned: only a hash is stored, so a token's value exists solely in the response to the create call. Only tokens that can still authenticate are returned by default, so revoked and expired ones are hidden. Pass `include_revoked=true` to see them, which is how you find out what a key did before it stopped working. Delegated grants are hidden by default too. A first-party app you have allowed to act on this project mints one every few minutes, and you revoke the app's access as a whole rather than grant by grant. Pass `include_delegated=true` to list them; they have scope `delegated`. They never count toward the project's limit of 100 live tokens. Requires a platform token. A project access token cannot manage project access tokens, so a leaked credential cannot enumerate or replace itself. # @param id [String] Project ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination. # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) # @option opts [String] :search Case-insensitive substring match on the resource `name`. See the endpoint description for supported pagination modes. # @option opts [Boolean] :include_revoked Include tokens that can no longer authenticate — both revoked and expired ones. (default to false) + # @option opts [Boolean] :include_delegated Include delegated grants: short tokens a first-party app mints for one run from the access you allowed it. (default to false) # @return [PaginatedProjectAccessTokens] def list_project_access_tokens(id, opts = {}) data, _status_code, _headers = list_project_access_tokens_with_http_info(id, opts) @@ -257,13 +258,14 @@ def list_project_access_tokens(id, opts = {}) end # List a project's access tokens - # Lists the project's access tokens, newest first. Secrets are never returned: only a hash is stored, so a token's value exists solely in the response to the create call. Only tokens that can still authenticate are returned by default, so revoked and expired ones are hidden. Pass `include_revoked=true` to see them, which is how you find out what a key did before it stopped working. Requires a platform token. A project access token cannot manage project access tokens, so a leaked credential cannot enumerate or replace itself. + # Lists the project's access tokens, newest first. Secrets are never returned: only a hash is stored, so a token's value exists solely in the response to the create call. Only tokens that can still authenticate are returned by default, so revoked and expired ones are hidden. Pass `include_revoked=true` to see them, which is how you find out what a key did before it stopped working. Delegated grants are hidden by default too. A first-party app you have allowed to act on this project mints one every few minutes, and you revoke the app's access as a whole rather than grant by grant. Pass `include_delegated=true` to list them; they have scope `delegated`. They never count toward the project's limit of 100 live tokens. Requires a platform token. A project access token cannot manage project access tokens, so a leaked credential cannot enumerate or replace itself. # @param id [String] Project ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page Page number (1-indexed) for offset pagination. Declares no schema default so the request validator does not inject one: handlers that omit `page` see it unset (nil) and default to 1 in code, while cursor-first endpoints (e.g. the project deployments feed) can detect its absence to stay in keyset/search mode. Supplying `page` selects offset pagination. # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) # @option opts [String] :search Case-insensitive substring match on the resource `name`. See the endpoint description for supported pagination modes. # @option opts [Boolean] :include_revoked Include tokens that can no longer authenticate — both revoked and expired ones. (default to false) + # @option opts [Boolean] :include_delegated Include delegated grants: short tokens a first-party app mints for one run from the access you allowed it. (default to false) # @return [Array<(PaginatedProjectAccessTokens, Integer, Hash)>] PaginatedProjectAccessTokens data, response status code and response headers def list_project_access_tokens_with_http_info(id, opts = {}) if @api_client.config.debugging @@ -298,6 +300,7 @@ def list_project_access_tokens_with_http_info(id, opts = {}) query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? query_params[:'include_revoked'] = opts[:'include_revoked'] if !opts[:'include_revoked'].nil? + query_params[:'include_delegated'] = opts[:'include_delegated'] if !opts[:'include_delegated'].nil? # header parameters header_params = opts[:header_params] || {} @@ -334,7 +337,7 @@ def list_project_access_tokens_with_http_info(id, opts = {}) end # Per-day request counts for every access token in a project - # Returns a zero-filled daily series of request counts for each of the project's access tokens, oldest first. Every day in the window is present, so a gap reads as zero rather than missing. Revoked tokens are included, because the traffic they made before revocation is usually the reason you are looking. `days` defaults to 30 and is capped at 60, which is also how long per-day counts are retained — a longer window cannot be answered. A platform token sees every token in the project. A project access token sees only its own row, so it can watch its own traffic without being able to enumerate the project's other credentials by name. + # Returns a zero-filled daily series of request counts for each of the project's access tokens, oldest first. Every day in the window is present, so a gap reads as zero rather than missing. Revoked tokens are included, because the traffic they made before revocation is usually the reason you are looking. Delegated grants are not, as the token list hides them by default; read one grant's usage by its ID. `days` defaults to 30 and is capped at 60, which is also how long per-day counts are retained — a longer window cannot be answered. A platform token sees every token in the project. A project access token sees only its own row, so it can watch its own traffic without being able to enumerate the project's other credentials by name. # @param id [String] Project ID # @param [Hash] opts the optional parameters # @option opts [Integer] :days Number of trailing days to return (1-60, default 30). (default to 30) @@ -345,7 +348,7 @@ def list_project_access_tokens_usage(id, opts = {}) end # Per-day request counts for every access token in a project - # Returns a zero-filled daily series of request counts for each of the project's access tokens, oldest first. Every day in the window is present, so a gap reads as zero rather than missing. Revoked tokens are included, because the traffic they made before revocation is usually the reason you are looking. `days` defaults to 30 and is capped at 60, which is also how long per-day counts are retained — a longer window cannot be answered. A platform token sees every token in the project. A project access token sees only its own row, so it can watch its own traffic without being able to enumerate the project's other credentials by name. + # Returns a zero-filled daily series of request counts for each of the project's access tokens, oldest first. Every day in the window is present, so a gap reads as zero rather than missing. Revoked tokens are included, because the traffic they made before revocation is usually the reason you are looking. Delegated grants are not, as the token list hides them by default; read one grant's usage by its ID. `days` defaults to 30 and is capped at 60, which is also how long per-day counts are retained — a longer window cannot be answered. A platform token sees every token in the project. A project access token sees only its own row, so it can watch its own traffic without being able to enumerate the project's other credentials by name. # @param id [String] Project ID # @param [Hash] opts the optional parameters # @option opts [Integer] :days Number of trailing days to return (1-60, default 30). (default to 30) diff --git a/lib/volcano/generated/lib/volcano-generated/api/project_imports_api.rb b/lib/volcano/generated/lib/volcano-generated/api/project_imports_api.rb index 2ed70419..3d565a6a 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/project_imports_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/project_imports_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -438,8 +438,8 @@ def preflight_project_import_with_http_info(provider, project_import_preflight_r # Starts a first-party dashboard user's provider connection flow. The response sets a short-lived HttpOnly browser-binding cookie for the public provider callback. # @param [Hash] opts the optional parameters # @option opts [ImportProvider] :provider Import provider to connect. Defaults to Vercel. (default to 'vercel') - # @option opts [String] :redirect Validated application URL used after the provider callback. - # @option opts [String] :callback_url Same-origin browser callback used to relay provider parameters before completing the connection. + # @option opts [String] :redirect Application URL used after the provider callback. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. + # @option opts [String] :callback_url Same-origin browser callback used to relay provider parameters before completing the connection. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. # @return [ImportConnectStartResponse] def start_import_connect(opts = {}) data, _status_code, _headers = start_import_connect_with_http_info(opts) @@ -450,8 +450,8 @@ def start_import_connect(opts = {}) # Starts a first-party dashboard user's provider connection flow. The response sets a short-lived HttpOnly browser-binding cookie for the public provider callback. # @param [Hash] opts the optional parameters # @option opts [ImportProvider] :provider Import provider to connect. Defaults to Vercel. (default to 'vercel') - # @option opts [String] :redirect Validated application URL used after the provider callback. - # @option opts [String] :callback_url Same-origin browser callback used to relay provider parameters before completing the connection. + # @option opts [String] :redirect Application URL used after the provider callback. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. + # @option opts [String] :callback_url Same-origin browser callback used to relay provider parameters before completing the connection. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. # @return [Array<(ImportConnectStartResponse, Integer, Hash)>] ImportConnectStartResponse data, response status code and response headers def start_import_connect_with_http_info(opts = {}) if @api_client.config.debugging diff --git a/lib/volcano/generated/lib/volcano-generated/api/projects_api.rb b/lib/volcano/generated/lib/volcano-generated/api/projects_api.rb index 659806e4..38113c75 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/projects_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/projects_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -20,7 +20,7 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end # Apply project configuration - # Validates and applies a declarative configuration manifest to the project, reconciling each declared section and returning a per-resource report. Omitted sections are untouched. Declared collection keys (`variables`, `buckets[].policies`, `auth.providers.oauth`, `auth.email.templates`, `functions[].schedulers`) are fully synced: resources absent from the manifest are deleted. Functions, frontends, databases, and buckets are never created or deleted; manifest entries for resources that do not exist are skipped and reported in `skipped`, and existing resources missing from a declared section are reported in `missing`. Validation failures (including plan-gate violations) return 422 and nothing is applied. Set `dry_run=true` to get the projected report without applying changes. Applies are serialized per project; a concurrent apply returns 409. + # Validates and applies a declarative configuration manifest to the project, reconciling each declared section and returning a per-resource report. Omitted sections are untouched. Declared collection keys (`variables`, `buckets[].policies`, `auth.providers.oauth`, `auth.email.templates`, `functions[].schedulers`) are fully synced: resources absent from the manifest are deleted. Functions, frontends, databases, and buckets are never created or deleted; manifest entries for resources that do not exist are skipped and reported in `skipped`, and existing resources missing from a declared section are reported in `missing`. Validation failures (including plan-gate violations) return 422 and nothing is applied. Set `dry_run=true` to get the projected report without applying changes. Applies are serialized per project; a concurrent apply returns 409. A function a promoted preview serves keeps the variables the preview was built with: when the apply's variable changes would reach it, it is reported as `unchanged` with `code: function_served_by_candidate` and a `notice`, while every other resource is applied and synchronized. That entry is not an error. # @param id [String] Project ID # @param project_config [ProjectConfig] # @param [Hash] opts the optional parameters @@ -32,7 +32,7 @@ def apply_project_config(id, project_config, opts = {}) end # Apply project configuration - # Validates and applies a declarative configuration manifest to the project, reconciling each declared section and returning a per-resource report. Omitted sections are untouched. Declared collection keys (`variables`, `buckets[].policies`, `auth.providers.oauth`, `auth.email.templates`, `functions[].schedulers`) are fully synced: resources absent from the manifest are deleted. Functions, frontends, databases, and buckets are never created or deleted; manifest entries for resources that do not exist are skipped and reported in `skipped`, and existing resources missing from a declared section are reported in `missing`. Validation failures (including plan-gate violations) return 422 and nothing is applied. Set `dry_run=true` to get the projected report without applying changes. Applies are serialized per project; a concurrent apply returns 409. + # Validates and applies a declarative configuration manifest to the project, reconciling each declared section and returning a per-resource report. Omitted sections are untouched. Declared collection keys (`variables`, `buckets[].policies`, `auth.providers.oauth`, `auth.email.templates`, `functions[].schedulers`) are fully synced: resources absent from the manifest are deleted. Functions, frontends, databases, and buckets are never created or deleted; manifest entries for resources that do not exist are skipped and reported in `skipped`, and existing resources missing from a declared section are reported in `missing`. Validation failures (including plan-gate violations) return 422 and nothing is applied. Set `dry_run=true` to get the projected report without applying changes. Applies are serialized per project; a concurrent apply returns 409. A function a promoted preview serves keeps the variables the preview was built with: when the apply's variable changes would reach it, it is reported as `unchanged` with `code: function_served_by_candidate` and a `notice`, while every other resource is applied and synchronized. That entry is not an error. # @param id [String] Project ID # @param project_config [ProjectConfig] # @param [Hash] opts the optional parameters @@ -160,7 +160,7 @@ def cancel_project_source_export_with_http_info(id, opts = {}) end # Connect or update a project's repo connection - # Full replace, following Vercel's model: many projects may point at the same repo, so this only binds the project — it never creates or deletes git-provider state. Used for both the initial connect and later edits (repo change, root directory, production branch). Resolves the repository_id or repo_full_name selector against the repos accessible through installation_id via connection_id's stored GitHub user token, then persists repository metadata only from that validated GitHub response. + # Full replace, following Vercel's model: many projects may point at the same repo, so this only binds the project — it never creates or deletes git-provider state. Used for both the initial connect and later edits (repo change, root directory, production branch). Resolves the repository_id or repo_full_name selector against the repos accessible through installation_id via connection_id's stored GitHub user token, then persists repository metadata only from that validated GitHub response. Omitting production_branch follows the repository's default and discards a pinned branch. To keep a pin when rebinding the same repository, read the connection first and send production_branch back when `production_branch_follows_default` is false. The response reports the result in the same field. Project access tokens are refused. Which repository a project deploys from is a person's decision, made with a platform token or in the dashboard. A project access token can still change the root directory and production branch through PUT /projects/{id}/git-connection/root-directory and PUT /projects/{id}/git-connection/production-branch. Connecting a repository to a project with none, while LavaFlow is on and was turned on with no repository, makes it the one LavaFlow works in, unless the LavaFlow settings' `fix_blocker` asks to turn it on again after the link. Any later change of repository pauses LavaFlow until the owner turns it on again; binding the repository LavaFlow works in again resumes it with no new turn-on. # @param id [String] Project ID # @param connect_project_git_request [ConnectProjectGitRequest] # @param [Hash] opts the optional parameters @@ -171,7 +171,7 @@ def connect_project_git(id, connect_project_git_request, opts = {}) end # Connect or update a project's repo connection - # Full replace, following Vercel's model: many projects may point at the same repo, so this only binds the project — it never creates or deletes git-provider state. Used for both the initial connect and later edits (repo change, root directory, production branch). Resolves the repository_id or repo_full_name selector against the repos accessible through installation_id via connection_id's stored GitHub user token, then persists repository metadata only from that validated GitHub response. + # Full replace, following Vercel's model: many projects may point at the same repo, so this only binds the project — it never creates or deletes git-provider state. Used for both the initial connect and later edits (repo change, root directory, production branch). Resolves the repository_id or repo_full_name selector against the repos accessible through installation_id via connection_id's stored GitHub user token, then persists repository metadata only from that validated GitHub response. Omitting production_branch follows the repository's default and discards a pinned branch. To keep a pin when rebinding the same repository, read the connection first and send production_branch back when `production_branch_follows_default` is false. The response reports the result in the same field. Project access tokens are refused. Which repository a project deploys from is a person's decision, made with a platform token or in the dashboard. A project access token can still change the root directory and production branch through PUT /projects/{id}/git-connection/root-directory and PUT /projects/{id}/git-connection/production-branch. Connecting a repository to a project with none, while LavaFlow is on and was turned on with no repository, makes it the one LavaFlow works in, unless the LavaFlow settings' `fix_blocker` asks to turn it on again after the link. Any later change of repository pauses LavaFlow until the owner turns it on again; binding the repository LavaFlow works in again resumes it with no new turn-on. # @param id [String] Project ID # @param connect_project_git_request [ConnectProjectGitRequest] # @param [Hash] opts the optional parameters @@ -214,7 +214,7 @@ def connect_project_git_with_http_info(id, connect_project_git_request, opts = { return_type = opts[:debug_return_type] || 'ProjectGitConnection' # auth_names - auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + auth_names = opts[:debug_auth_names] || ['UserToken'] new_options = opts.merge( :operation => :"ProjectsApi.connect_project_git", @@ -234,7 +234,7 @@ def connect_project_git_with_http_info(id, connect_project_git_request, opts = { end # Create a new project - # Creates a project for the authenticated user. Each user can create up to 1,000 projects. Requests over this cap return 403. + # Creates a project for the authenticated user. Projects have no plan limit; usage allowances apply across all of a user's projects. Accounts on an older paid pricing revision keep the project cap that revision set, and requests over it return 403. # @param create_project_request [CreateProjectRequest] # @param [Hash] opts the optional parameters # @return [Project] @@ -244,7 +244,7 @@ def create_project(create_project_request, opts = {}) end # Create a new project - # Creates a project for the authenticated user. Each user can create up to 1,000 projects. Requests over this cap return 403. + # Creates a project for the authenticated user. Projects have no plan limit; usage allowances apply across all of a user's projects. Accounts on an older paid pricing revision keep the project cap that revision set, and requests over it return 403. # @param create_project_request [CreateProjectRequest] # @param [Hash] opts the optional parameters # @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers @@ -489,7 +489,7 @@ def disconnect_project_git_with_http_info(id, opts = {}) end # Initialize an empty repository with a project's stored source - # Creates the first commit in the connected repository and pushes it directly to the configured production branch. The push enters the ordinary Git auto-deploy flow. Direct source writes remain frozen until that deployment succeeds and the repository becomes the source of truth. The caller confirms the production branch shown before export. Starting export pins that branch: later GitHub default-branch changes do not repoint the project. If the configured branch changed after the caller read it, the request fails without exporting so the caller can show and confirm the new value. The response lists what the export could not carry: resources with no successful deployment to take source from (`skipped`), and things no export can hand back (`omitted`) — migrations, which Volcano stores no copy of, and credential-shaped files, which are left for their owner to add. Requires a connected repository with no commits or branches, and runs once. Volcano never creates the repository. If GitHub did not confirm the push, retrying creates the same commit and adopts it when it already reached the repository. + # Creates the first commit in the connected repository and pushes it directly to the configured production branch. The push enters the ordinary Git auto-deploy flow. Direct source writes remain frozen until that deployment succeeds and the repository becomes the source of truth. The caller confirms the production branch shown before export, and optionally the repository by its `repo_id`. Starting export pins that branch: later GitHub default-branch changes do not repoint the project. If the connected repository or the configured branch changed after the caller read it, the request fails without exporting so the caller can show and confirm the new value. The response lists what the export could not carry: resources with no successful deployment to take source from (`skipped`), and things no export can hand back (`omitted`) — migrations, which Volcano stores no copy of, and credential-shaped files, which are left for their owner to add. Requires a connected repository with no commits or branches, and runs once. Volcano never creates the repository. If GitHub did not confirm the push, retrying creates the same commit and adopts it when it already reached the repository. # @param id [String] Project ID # @param export_project_source_request [ExportProjectSourceRequest] # @param [Hash] opts the optional parameters @@ -500,7 +500,7 @@ def export_project_source(id, export_project_source_request, opts = {}) end # Initialize an empty repository with a project's stored source - # Creates the first commit in the connected repository and pushes it directly to the configured production branch. The push enters the ordinary Git auto-deploy flow. Direct source writes remain frozen until that deployment succeeds and the repository becomes the source of truth. The caller confirms the production branch shown before export. Starting export pins that branch: later GitHub default-branch changes do not repoint the project. If the configured branch changed after the caller read it, the request fails without exporting so the caller can show and confirm the new value. The response lists what the export could not carry: resources with no successful deployment to take source from (`skipped`), and things no export can hand back (`omitted`) — migrations, which Volcano stores no copy of, and credential-shaped files, which are left for their owner to add. Requires a connected repository with no commits or branches, and runs once. Volcano never creates the repository. If GitHub did not confirm the push, retrying creates the same commit and adopts it when it already reached the repository. + # Creates the first commit in the connected repository and pushes it directly to the configured production branch. The push enters the ordinary Git auto-deploy flow. Direct source writes remain frozen until that deployment succeeds and the repository becomes the source of truth. The caller confirms the production branch shown before export, and optionally the repository by its `repo_id`. Starting export pins that branch: later GitHub default-branch changes do not repoint the project. If the connected repository or the configured branch changed after the caller read it, the request fails without exporting so the caller can show and confirm the new value. The response lists what the export could not carry: resources with no successful deployment to take source from (`skipped`), and things no export can hand back (`omitted`) — migrations, which Volcano stores no copy of, and credential-shaped files, which are left for their owner to add. Requires a connected repository with no commits or branches, and runs once. Volcano never creates the repository. If GitHub did not confirm the push, retrying creates the same commit and adopts it when it already reached the repository. # @param id [String] Project ID # @param export_project_source_request [ExportProjectSourceRequest] # @param [Hash] opts the optional parameters @@ -562,6 +562,75 @@ def export_project_source_with_http_info(id, export_project_source_request, opts return data, status_code, headers end + # Get a Git deployment run + # Returns one deployment run: the commit it deployed, its status, the migration runs it started, and why it failed or was skipped. Project access tokens can read runs, including read-only ones. + # @param id [String] Project ID + # @param run_id [String] Deployment run ID + # @param [Hash] opts the optional parameters + # @return [GitDeploymentRun] + def get_git_deployment_run(id, run_id, opts = {}) + data, _status_code, _headers = get_git_deployment_run_with_http_info(id, run_id, opts) + data + end + + # Get a Git deployment run + # Returns one deployment run: the commit it deployed, its status, the migration runs it started, and why it failed or was skipped. Project access tokens can read runs, including read-only ones. + # @param id [String] Project ID + # @param run_id [String] Deployment run ID + # @param [Hash] opts the optional parameters + # @return [Array<(GitDeploymentRun, Integer, Hash)>] GitDeploymentRun data, response status code and response headers + def get_git_deployment_run_with_http_info(id, run_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ProjectsApi.get_git_deployment_run ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.get_git_deployment_run" + end + # verify the required parameter 'run_id' is set + if @api_client.config.client_side_validation && run_id.nil? + fail ArgumentError, "Missing the required parameter 'run_id' when calling ProjectsApi.get_git_deployment_run" + end + # resource path + local_var_path = '/projects/{id}/git-deployment-runs/{runId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'runId' + '}', CGI.escape(run_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GitDeploymentRun' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"ProjectsApi.get_git_deployment_run", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ProjectsApi#get_git_deployment_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get project by ID # @param id [String] Project ID # @param [Hash] opts the optional parameters @@ -694,6 +763,7 @@ def get_project_config_with_http_info(id, opts = {}) end # Get a project's repo connection + # Returns the repository binding. `production_branch_follows_default` tells a branch that tracks the repository's default from one the project pinned: a client rebinding the same repository sends a pinned branch back to keep it. # @param id [String] Project ID # @param [Hash] opts the optional parameters # @return [ProjectGitConnection] @@ -703,6 +773,7 @@ def get_project_git_connection(id, opts = {}) end # Get a project's repo connection + # Returns the repository binding. `production_branch_follows_default` tells a branch that tracks the repository's default from one the project pinned: a client rebinding the same repository sends a pinned branch back to keep it. # @param id [String] Project ID # @param [Hash] opts the optional parameters # @return [Array<(ProjectGitConnection, Integer, Hash)>] ProjectGitConnection data, response status code and response headers @@ -815,8 +886,71 @@ def get_project_git_deploy_settings_with_http_info(id, opts = {}) return data, status_code, headers end + # Check whether the project owner can push to the connected repository + # Answers whether the project owner's GitHub account can push to the repository the project is connected to. Volcano makes the same check before it writes to that repository for the project. The repository is always the project's connected one; the route takes no repository. When `can_push` is false, `reason` says why. The answer can be a few seconds old: repeated checks within that time are answered without asking GitHub again. Checks that ask GitHub draw on an hourly budget for the project and another for its owner, shared by all of the owner's projects. Over either, the route answers `429` with `Retry-After`. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @return [ProjectGitOwnerPush] + def get_project_git_owner_push(id, opts = {}) + data, _status_code, _headers = get_project_git_owner_push_with_http_info(id, opts) + data + end + + # Check whether the project owner can push to the connected repository + # Answers whether the project owner's GitHub account can push to the repository the project is connected to. Volcano makes the same check before it writes to that repository for the project. The repository is always the project's connected one; the route takes no repository. When `can_push` is false, `reason` says why. The answer can be a few seconds old: repeated checks within that time are answered without asking GitHub again. Checks that ask GitHub draw on an hourly budget for the project and another for its owner, shared by all of the owner's projects. Over either, the route answers `429` with `Retry-After`. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @return [Array<(ProjectGitOwnerPush, Integer, Hash)>] ProjectGitOwnerPush data, response status code and response headers + def get_project_git_owner_push_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ProjectsApi.get_project_git_owner_push ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.get_project_git_owner_push" + end + # resource path + local_var_path = '/projects/{id}/git-connection/owner-push'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ProjectGitOwnerPush' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"ProjectsApi.get_project_git_owner_push", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ProjectsApi#get_project_git_owner_push\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get project health - # Returns a fast control-plane health snapshot for the project and its deployed resources. The endpoint does not run live provider probes. A successful request returns 200 even when the project status is `unhealthy`; transport and authorization failures use HTTP errors. + # Returns a fast control-plane health snapshot for the project and its deployed resources. The endpoint does not run live provider probes. A successful request returns 200 even when the project status is `degraded` or `critical`; transport and authorization failures use HTTP errors. # @param id [String] Project ID # @param [Hash] opts the optional parameters # @return [ProjectHealthResponse] @@ -826,7 +960,7 @@ def get_project_health(id, opts = {}) end # Get project health - # Returns a fast control-plane health snapshot for the project and its deployed resources. The endpoint does not run live provider probes. A successful request returns 200 even when the project status is `unhealthy`; transport and authorization failures use HTTP errors. + # Returns a fast control-plane health snapshot for the project and its deployed resources. The endpoint does not run live provider probes. A successful request returns 200 even when the project status is `degraded` or `critical`; transport and authorization failures use HTTP errors. # @param id [String] Project ID # @param [Hash] opts the optional parameters # @return [Array<(ProjectHealthResponse, Integer, Hash)>] ProjectHealthResponse data, response status code and response headers @@ -1196,6 +1330,160 @@ def list_deployments_with_http_info(opts = {}) return data, status_code, headers end + # List a project's Git deployment runs + # Lists the deployment runs Git auto deploy recorded for the project, newest push first. Each push to the production branch records one run, which says whether the push deployed and, when it failed or was skipped, why. A run that applied migrations names the migration run it started on each database. Get one at `GET /projects/{id}/databases/{databaseName}/migration-runs/{runId}` for its files. Project access tokens can list runs, including read-only ones. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) + # @option opts [String] :cursor Opaque cursor from a previous response's `next_cursor`. Pages forward; keep the same filters while paging. + # @option opts [GitDeploymentRunStatus] :status Return only runs in this status. + # @option opts [String] :branch Return only runs for pushes to this branch. + # @return [PaginatedGitDeploymentRuns] + def list_git_deployment_runs(id, opts = {}) + data, _status_code, _headers = list_git_deployment_runs_with_http_info(id, opts) + data + end + + # List a project's Git deployment runs + # Lists the deployment runs Git auto deploy recorded for the project, newest push first. Each push to the production branch records one run, which says whether the push deployed and, when it failed or was skipped, why. A run that applied migrations names the migration run it started on each database. Get one at `GET /projects/{id}/databases/{databaseName}/migration-runs/{runId}` for its files. Project access tokens can list runs, including read-only ones. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) + # @option opts [String] :cursor Opaque cursor from a previous response's `next_cursor`. Pages forward; keep the same filters while paging. + # @option opts [GitDeploymentRunStatus] :status Return only runs in this status. + # @option opts [String] :branch Return only runs for pushes to this branch. + # @return [Array<(PaginatedGitDeploymentRuns, Integer, Hash)>] PaginatedGitDeploymentRuns data, response status code and response headers + def list_git_deployment_runs_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ProjectsApi.list_git_deployment_runs ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.list_git_deployment_runs" + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProjectsApi.list_git_deployment_runs, must be smaller than or equal to 100.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProjectsApi.list_git_deployment_runs, must be greater than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'branch'].nil? && opts[:'branch'].to_s.length > 255 + fail ArgumentError, 'invalid value for "opts[:"branch"]" when calling ProjectsApi.list_git_deployment_runs, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && !opts[:'branch'].nil? && opts[:'branch'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"branch"]" when calling ProjectsApi.list_git_deployment_runs, the character length must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/projects/{id}/git-deployment-runs'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? + query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PaginatedGitDeploymentRuns' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"ProjectsApi.list_git_deployment_runs", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ProjectsApi#list_git_deployment_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List a project's capabilities + # Lists which product capabilities accept new work for this project. It has the same entries as `GET /capabilities`, and answers each one as it does, except for capabilities a project can have when another can't: | ID | Available for this project when | | --- | --- | | `lavaflow` | LavaFlow is released, offered to the project's owner, and included in the owner's plan | | `lavaflow.merge` | `lavaflow` is, and LavaFlow's merging is released in this environment | | `lavaflow.lineage` | `lavaflow` is, and fix lineage is released in this environment | | `lavaflow.open_pr_ci_start` | `lavaflow` is, and LavaFlow's one CI start for fixes a person merges is released in this environment | | `lavaflow.code_quality` | `lavaflow` is, Code Quality is released in this environment, and the owner's plan allows Code Quality findings; with an allowance of 0 it is `unavailable` with `code` `plan_required` | | `lavaflow.slack` | `lavaflow` is, the Volcano Slack app is set up in this environment, and Slack reports have launched in it | | `lavaflow.aikido` | `lavaflow` is, and Aikido reports have launched in this environment | Where `lavaflow` isn't available, a project with LavaFlow settings, runs, or bound Slack channels lists it `read_only`: its LavaFlow reads answer, and its owner can turn LavaFlow off or remove channel bindings. A project without them lists it `unavailable`, with `code` `plan_required` when the owner's plan leaves LavaFlow out. Check it to decide what to offer for a project, instead of calling a route to see whether it fails. Project access tokens can read it, including read-only ones. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @return [CapabilityList] + def list_project_capabilities(id, opts = {}) + data, _status_code, _headers = list_project_capabilities_with_http_info(id, opts) + data + end + + # List a project's capabilities + # Lists which product capabilities accept new work for this project. It has the same entries as `GET /capabilities`, and answers each one as it does, except for capabilities a project can have when another can't: | ID | Available for this project when | | --- | --- | | `lavaflow` | LavaFlow is released, offered to the project's owner, and included in the owner's plan | | `lavaflow.merge` | `lavaflow` is, and LavaFlow's merging is released in this environment | | `lavaflow.lineage` | `lavaflow` is, and fix lineage is released in this environment | | `lavaflow.open_pr_ci_start` | `lavaflow` is, and LavaFlow's one CI start for fixes a person merges is released in this environment | | `lavaflow.code_quality` | `lavaflow` is, Code Quality is released in this environment, and the owner's plan allows Code Quality findings; with an allowance of 0 it is `unavailable` with `code` `plan_required` | | `lavaflow.slack` | `lavaflow` is, the Volcano Slack app is set up in this environment, and Slack reports have launched in it | | `lavaflow.aikido` | `lavaflow` is, and Aikido reports have launched in this environment | Where `lavaflow` isn't available, a project with LavaFlow settings, runs, or bound Slack channels lists it `read_only`: its LavaFlow reads answer, and its owner can turn LavaFlow off or remove channel bindings. A project without them lists it `unavailable`, with `code` `plan_required` when the owner's plan leaves LavaFlow out. Check it to decide what to offer for a project, instead of calling a route to see whether it fails. Project access tokens can read it, including read-only ones. + # @param id [String] Project ID + # @param [Hash] opts the optional parameters + # @return [Array<(CapabilityList, Integer, Hash)>] CapabilityList data, response status code and response headers + def list_project_capabilities_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ProjectsApi.list_project_capabilities ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.list_project_capabilities" + end + # resource path + local_var_path = '/projects/{id}/capabilities'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CapabilityList' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"ProjectsApi.list_project_capabilities", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ProjectsApi#list_project_capabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List deployments in a project # Lists Function and Frontend deployment attempts across the project, ordered most-recent first. Each item includes a normalized resource reference so clients can render both resource types without extra fetches. Standard and durable function deployments both appear under `resource.type: function`, and `resource.kind` tells them apart. Pass `function_kind` to list one kind only; frontends are then excluded. Combining `function_kind` with `resource_type=frontend` is rejected. # @param id [String] Project ID @@ -1565,10 +1853,10 @@ def replace_frontend_shared_variables_with_http_info(id, replace_frontend_shared # @param id [String] Project ID # @param replace_shared_variables_request [ReplaceSharedVariablesRequest] # @param [Hash] opts the optional parameters - # @return [nil] + # @return [SharedVariablesReplaceResult] def replace_shared_variables(id, replace_shared_variables_request, opts = {}) - replace_shared_variables_with_http_info(id, replace_shared_variables_request, opts) - nil + data, _status_code, _headers = replace_shared_variables_with_http_info(id, replace_shared_variables_request, opts) + data end # Replace shared variable names @@ -1576,7 +1864,7 @@ def replace_shared_variables(id, replace_shared_variables_request, opts = {}) # @param id [String] Project ID # @param replace_shared_variables_request [ReplaceSharedVariablesRequest] # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + # @return [Array<(SharedVariablesReplaceResult, Integer, Hash)>] SharedVariablesReplaceResult data, response status code and response headers def replace_shared_variables_with_http_info(id, replace_shared_variables_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectsApi.replace_shared_variables ...' @@ -1612,7 +1900,7 @@ def replace_shared_variables_with_http_info(id, replace_shared_variables_request post_body = opts[:debug_body] || @api_client.object_to_http_body(replace_shared_variables_request) # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'SharedVariablesReplaceResult' # auth_names auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] @@ -1635,7 +1923,7 @@ def replace_shared_variables_with_http_info(id, replace_shared_variables_request end # Set the branch a project deploys from - # Changes only the production branch, leaving the repository binding alone. PUT /projects/{id}/git-connection can also set it, but that is a full rebind: it needs connection_id, installation_id and a repository selector resent, and re-resolves the repository against GitHub for a field that does not depend on it. The branch does not have to exist. It is validated as a Git branch name and nothing more, so a project can be pointed at a branch that is about to be pushed — the case a repository created empty depends on. Setting the branch here marks it as the project's own choice, so a later default-branch rename on GitHub no longer moves it. Projects that never set one keep following the repository's default branch. + # Changes only the production branch, leaving the repository binding alone. PUT /projects/{id}/git-connection can also set it, but that is a full rebind: it needs connection_id, installation_id and a repository selector resent, and re-resolves the repository against GitHub for a field that does not depend on it. The branch does not have to exist. It is validated as a Git branch name and nothing more, so a project can be pointed at a branch that is about to be pushed — the case a repository created empty depends on. Setting the branch here marks it as the project's own choice, so a later default-branch rename on GitHub no longer moves it, and the response reports `production_branch_follows_default: false`. Projects that never set one keep following the repository's default branch. An empty string undoes that choice: the project deploys from the repository's default branch again and follows later renames. Volcano reads the default branch from GitHub through the project owner's connection, and the response carries it with `production_branch_follows_default: true`. # @param id [String] Project ID # @param set_project_git_production_branch_request [SetProjectGitProductionBranchRequest] # @param [Hash] opts the optional parameters @@ -1646,7 +1934,7 @@ def set_project_git_production_branch(id, set_project_git_production_branch_requ end # Set the branch a project deploys from - # Changes only the production branch, leaving the repository binding alone. PUT /projects/{id}/git-connection can also set it, but that is a full rebind: it needs connection_id, installation_id and a repository selector resent, and re-resolves the repository against GitHub for a field that does not depend on it. The branch does not have to exist. It is validated as a Git branch name and nothing more, so a project can be pointed at a branch that is about to be pushed — the case a repository created empty depends on. Setting the branch here marks it as the project's own choice, so a later default-branch rename on GitHub no longer moves it. Projects that never set one keep following the repository's default branch. + # Changes only the production branch, leaving the repository binding alone. PUT /projects/{id}/git-connection can also set it, but that is a full rebind: it needs connection_id, installation_id and a repository selector resent, and re-resolves the repository against GitHub for a field that does not depend on it. The branch does not have to exist. It is validated as a Git branch name and nothing more, so a project can be pointed at a branch that is about to be pushed — the case a repository created empty depends on. Setting the branch here marks it as the project's own choice, so a later default-branch rename on GitHub no longer moves it, and the response reports `production_branch_follows_default: false`. Projects that never set one keep following the repository's default branch. An empty string undoes that choice: the project deploys from the repository's default branch again and follows later renames. Volcano reads the default branch from GitHub through the project owner's connection, and the response carries it with `production_branch_follows_default: true`. # @param id [String] Project ID # @param set_project_git_production_branch_request [SetProjectGitProductionBranchRequest] # @param [Hash] opts the optional parameters @@ -1708,6 +1996,80 @@ def set_project_git_production_branch_with_http_info(id, set_project_git_product return data, status_code, headers end + # Set the directory a project builds from + # Changes only the root directory, leaving the repository, the production branch and `production_branch_follows_default` alone. Unlike PUT /projects/{id}/git-connection, this accepts a project access token, so CI or an agent can move a project within its repository without being able to change the repository. The directory is a path relative to the repository root. An empty string, `.` or `/` means the repository root. The response carries it in the form a deploy reads it: `./apps/web/` comes back as `apps/web`. + # @param id [String] Project ID + # @param set_project_git_root_directory_request [SetProjectGitRootDirectoryRequest] + # @param [Hash] opts the optional parameters + # @return [ProjectGitConnection] + def set_project_git_root_directory(id, set_project_git_root_directory_request, opts = {}) + data, _status_code, _headers = set_project_git_root_directory_with_http_info(id, set_project_git_root_directory_request, opts) + data + end + + # Set the directory a project builds from + # Changes only the root directory, leaving the repository, the production branch and `production_branch_follows_default` alone. Unlike PUT /projects/{id}/git-connection, this accepts a project access token, so CI or an agent can move a project within its repository without being able to change the repository. The directory is a path relative to the repository root. An empty string, `.` or `/` means the repository root. The response carries it in the form a deploy reads it: `./apps/web/` comes back as `apps/web`. + # @param id [String] Project ID + # @param set_project_git_root_directory_request [SetProjectGitRootDirectoryRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ProjectGitConnection, Integer, Hash)>] ProjectGitConnection data, response status code and response headers + def set_project_git_root_directory_with_http_info(id, set_project_git_root_directory_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ProjectsApi.set_project_git_root_directory ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.set_project_git_root_directory" + end + # verify the required parameter 'set_project_git_root_directory_request' is set + if @api_client.config.client_side_validation && set_project_git_root_directory_request.nil? + fail ArgumentError, "Missing the required parameter 'set_project_git_root_directory_request' when calling ProjectsApi.set_project_git_root_directory" + end + # resource path + local_var_path = '/projects/{id}/git-connection/root-directory'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(set_project_git_root_directory_request) + + # return_type + return_type = opts[:debug_return_type] || 'ProjectGitConnection' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"ProjectsApi.set_project_git_root_directory", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ProjectsApi#set_project_git_root_directory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Summarize deployments in a project # Summarizes deployment attempts for one comparable resource pipeline. Success rate uses conclusive outcomes only: active and deleted attempts are successful; failed and degraded attempts are failures; in-progress and superseded attempts are excluded. Median build duration includes completed, non-superseded attempts with recorded build work, including failed builds. With `resource_type=function`, pass `function_kind` to summarize one kind of function only. It is rejected with `resource_type=frontend`. # @param id [String] Project ID @@ -1865,7 +2227,7 @@ def update_project_with_http_info(id, update_project_request, opts = {}) end # Update a project's Git auto-deploy settings - # Full replace of the project's Git auto-deploy settings: what a push to the connected repo's production branch deploys. Connecting a repository sets auto_deploy_enabled and deploy_functions to true for a project that has never called this endpoint, so a push deploys without any further setup. Once these settings have been saved here they are the project's own: connecting, rebinding, disconnecting and reconnecting all leave them untouched, including when they were saved before any repository was connected. Frontend settings are off until set here; the frontend need not exist when they are saved, since frontend_name is resolved at deploy time. + # Full replace of the project's Git auto-deploy settings: what a push to the connected repo's production branch deploys. Connecting a repository sets auto_deploy_enabled and deploy_functions to true for a project that has never called this endpoint, so a push deploys without any further setup. Once these settings have been saved here they are the project's own: connecting, rebinding, disconnecting and reconnecting all leave them untouched, including when they were saved before any repository was connected. Frontend settings are off until set here; the frontend need not exist when they are saved, since frontend_name is resolved at deploy time. apply_migrations is the exception to the full replace: omitting it leaves the saved value unchanged. It is off until set here. # @param id [String] Project ID # @param update_project_git_deploy_settings_request [UpdateProjectGitDeploySettingsRequest] # @param [Hash] opts the optional parameters @@ -1876,7 +2238,7 @@ def update_project_git_deploy_settings(id, update_project_git_deploy_settings_re end # Update a project's Git auto-deploy settings - # Full replace of the project's Git auto-deploy settings: what a push to the connected repo's production branch deploys. Connecting a repository sets auto_deploy_enabled and deploy_functions to true for a project that has never called this endpoint, so a push deploys without any further setup. Once these settings have been saved here they are the project's own: connecting, rebinding, disconnecting and reconnecting all leave them untouched, including when they were saved before any repository was connected. Frontend settings are off until set here; the frontend need not exist when they are saved, since frontend_name is resolved at deploy time. + # Full replace of the project's Git auto-deploy settings: what a push to the connected repo's production branch deploys. Connecting a repository sets auto_deploy_enabled and deploy_functions to true for a project that has never called this endpoint, so a push deploys without any further setup. Once these settings have been saved here they are the project's own: connecting, rebinding, disconnecting and reconnecting all leave them untouched, including when they were saved before any repository was connected. Frontend settings are off until set here; the frontend need not exist when they are saved, since frontend_name is resolved at deploy time. apply_migrations is the exception to the full replace: omitting it leaves the saved value unchanged. It is off until set here. # @param id [String] Project ID # @param update_project_git_deploy_settings_request [UpdateProjectGitDeploySettingsRequest] # @param [Hash] opts the optional parameters diff --git a/lib/volcano/generated/lib/volcano-generated/api/realtime_api.rb b/lib/volcano/generated/lib/volcano-generated/api/realtime_api.rb index bd87a920..3144e388 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/realtime_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/realtime_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -145,6 +145,74 @@ def get_realtime_stats_with_http_info(id, opts = {}) return data, status_code, headers end + # Publish a message to a Realtime channel + # Sends one message to a broadcast or grant channel of the project embedded in the service-role key, for a backend that holds no WebSocket, such as a function. The key needs `realtime.publish`. `channel` is a client channel: `broadcast:`, or `grant:` for a channel only Realtime grant holders watch. Every subscriber receives `{\"type\": , \"payload\": }` as the message data, the shape `channel.on(, ...)` matches. The publish is metered like any server publish: the publish plus one per subscriber it reaches. Messages are not stored; a subscriber that was not connected misses it. A project's publishes share the rate a WebSocket client publishes at; over it the answer is 429 `realtime_publish_rate_limited`. + # @param realtime_publish_request [RealtimePublishRequest] + # @param [Hash] opts the optional parameters + # @return [RealtimePublishResult] + def publish_realtime_message(realtime_publish_request, opts = {}) + data, _status_code, _headers = publish_realtime_message_with_http_info(realtime_publish_request, opts) + data + end + + # Publish a message to a Realtime channel + # Sends one message to a broadcast or grant channel of the project embedded in the service-role key, for a backend that holds no WebSocket, such as a function. The key needs `realtime.publish`. `channel` is a client channel: `broadcast:<name>`, or `grant:<name>` for a channel only Realtime grant holders watch. Every subscriber receives `{\"type\": <event>, \"payload\": <payload>}` as the message data, the shape `channel.on(<event>, ...)` matches. The publish is metered like any server publish: the publish plus one per subscriber it reaches. Messages are not stored; a subscriber that was not connected misses it. A project's publishes share the rate a WebSocket client publishes at; over it the answer is 429 `realtime_publish_rate_limited`. + # @param realtime_publish_request [RealtimePublishRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(RealtimePublishResult, Integer, Hash)>] RealtimePublishResult data, response status code and response headers + def publish_realtime_message_with_http_info(realtime_publish_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RealtimeApi.publish_realtime_message ...' + end + # verify the required parameter 'realtime_publish_request' is set + if @api_client.config.client_side_validation && realtime_publish_request.nil? + fail ArgumentError, "Missing the required parameter 'realtime_publish_request' when calling RealtimeApi.publish_realtime_message" + end + # resource path + local_var_path = '/realtime/v1/publish' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(realtime_publish_request) + + # return_type + return_type = opts[:debug_return_type] || 'RealtimePublishResult' + + # auth_names + auth_names = opts[:debug_auth_names] || ['ServiceRoleKey'] + + new_options = opts.merge( + :operation => :"RealtimeApi.publish_realtime_message", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RealtimeApi#publish_realtime_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update realtime configuration for a project # Updates realtime settings including feature toggles and limits. # @param id [String] Project ID diff --git a/lib/volcano/generated/lib/volcano-generated/api/sandboxes_api.rb b/lib/volcano/generated/lib/volcano-generated/api/sandboxes_api.rb index bec88b98..bee52042 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/sandboxes_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/sandboxes_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -98,6 +98,172 @@ def create_sandbox_with_http_info(id, idempotency_key, create_sandbox_template_r return data, status_code, headers end + # Extract a tar archive into a session's workspace + # Extracts a tar archive into a directory of a session's workspace. Send `multipart/form-data` with `project_id`, `session_id` and `path`, in any order, then the archive as the file part `archive`. The archive may be gzip-compressed; Volcano detects compression from its first bytes. The request streams to the session, so the archive is never held whole in memory. Each call accepts at most 32 MiB of archive, 10,000 files and directories, and 256 MiB of uncompressed archive, counting tar headers, and has 2 minutes to send its archive; a slower call fails and writes nothing. Split larger trees into several archives and create one after another. For a single file larger than 8 MiB, use `POST /sandbox-file-parts`. `path` must name a directory below the workspace root; a path that resolves to the root or to `/`, such as `.`, `./`, `/`, `/workspace` or `/workspace/.`, is refused with `sandbox_archive_invalid`. The archive may contain only regular files and directories. Entry names are relative to `path`, which is created when missing; an absolute name, a `..` component, a symbolic link, a hard link, a sparse file, or a device refuses the whole archive. File and directory modes keep their permission bits; setuid, setgid and sticky bits are dropped. A file replaces an existing file or symbolic link at its path. Existing directories keep their modes. A symbolic link in the destination is never followed. The archive is checked and staged before the workspace changes, so a refused archive writes nothing, and one that fails part way is undone. If a session process moves or removes a directory while the archive is written, the call answers `409`, a file the archive replaced there is kept in a `.sandbox-archive-*` directory at the workspace root, and files the archive already placed can stay. Read-only directories the session user owns still take new entries and keep their modes. Code `sandbox_archive_invalid` (400) means the archive or form is malformed or holds an entry that is not allowed. Code `sandbox_archive_too_large` (413) means it exceeds a limit above. Code `sandbox_path_conflict` (409) means the destination has a symbolic link or a file where the archive needs a directory, a directory where it has a file, or a directory the session user cannot write. Code `sandbox_disk_full` (409) means the session's disk has no room for it; free space and retry. Code `sandbox_image_outdated` (409) means the session started from an image that predates archive writes; start a new session from a current preset, or redeploy the template. A session outside `project_id`, or a project the caller cannot reach, answers 404 like an unknown session. + # @param project_id [String] + # @param session_id [String] + # @param path [String] Workspace directory to extract into, relative to `/workspace`. It must name a directory below the workspace root; a path that resolves to the root or to `/`, such as `.`, `./`, `/`, `/workspace` or `/workspace/.`, is refused. + # @param archive [File] A tar archive, optionally gzip-compressed. + # @param [Hash] opts the optional parameters + # @return [SandboxFileArchive] + def create_sandbox_file_archive(project_id, session_id, path, archive, opts = {}) + data, _status_code, _headers = create_sandbox_file_archive_with_http_info(project_id, session_id, path, archive, opts) + data + end + + # Extract a tar archive into a session's workspace + # Extracts a tar archive into a directory of a session's workspace. Send `multipart/form-data` with `project_id`, `session_id` and `path`, in any order, then the archive as the file part `archive`. The archive may be gzip-compressed; Volcano detects compression from its first bytes. The request streams to the session, so the archive is never held whole in memory. Each call accepts at most 32 MiB of archive, 10,000 files and directories, and 256 MiB of uncompressed archive, counting tar headers, and has 2 minutes to send its archive; a slower call fails and writes nothing. Split larger trees into several archives and create one after another. For a single file larger than 8 MiB, use `POST /sandbox-file-parts`. `path` must name a directory below the workspace root; a path that resolves to the root or to `/`, such as `.`, `./`, `/`, `/workspace` or `/workspace/.`, is refused with `sandbox_archive_invalid`. The archive may contain only regular files and directories. Entry names are relative to `path`, which is created when missing; an absolute name, a `..` component, a symbolic link, a hard link, a sparse file, or a device refuses the whole archive. File and directory modes keep their permission bits; setuid, setgid and sticky bits are dropped. A file replaces an existing file or symbolic link at its path. Existing directories keep their modes. A symbolic link in the destination is never followed. The archive is checked and staged before the workspace changes, so a refused archive writes nothing, and one that fails part way is undone. If a session process moves or removes a directory while the archive is written, the call answers `409`, a file the archive replaced there is kept in a `.sandbox-archive-*` directory at the workspace root, and files the archive already placed can stay. Read-only directories the session user owns still take new entries and keep their modes. Code `sandbox_archive_invalid` (400) means the archive or form is malformed or holds an entry that is not allowed. Code `sandbox_archive_too_large` (413) means it exceeds a limit above. Code `sandbox_path_conflict` (409) means the destination has a symbolic link or a file where the archive needs a directory, a directory where it has a file, or a directory the session user cannot write. Code `sandbox_disk_full` (409) means the session's disk has no room for it; free space and retry. Code `sandbox_image_outdated` (409) means the session started from an image that predates archive writes; start a new session from a current preset, or redeploy the template. A session outside `project_id`, or a project the caller cannot reach, answers 404 like an unknown session. + # @param project_id [String] + # @param session_id [String] + # @param path [String] Workspace directory to extract into, relative to `/workspace`. It must name a directory below the workspace root; a path that resolves to the root or to `/`, such as `.`, `./`, `/`, `/workspace` or `/workspace/.`, is refused. + # @param archive [File] A tar archive, optionally gzip-compressed. + # @param [Hash] opts the optional parameters + # @return [Array<(SandboxFileArchive, Integer, Hash)>] SandboxFileArchive data, response status code and response headers + def create_sandbox_file_archive_with_http_info(project_id, session_id, path, archive, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SandboxesApi.create_sandbox_file_archive ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling SandboxesApi.create_sandbox_file_archive" + end + # verify the required parameter 'session_id' is set + if @api_client.config.client_side_validation && session_id.nil? + fail ArgumentError, "Missing the required parameter 'session_id' when calling SandboxesApi.create_sandbox_file_archive" + end + # verify the required parameter 'path' is set + if @api_client.config.client_side_validation && path.nil? + fail ArgumentError, "Missing the required parameter 'path' when calling SandboxesApi.create_sandbox_file_archive" + end + if @api_client.config.client_side_validation && path.to_s.length > 4096 + fail ArgumentError, 'invalid value for "path" when calling SandboxesApi.create_sandbox_file_archive, the character length must be smaller than or equal to 4096.' + end + + if @api_client.config.client_side_validation && path.to_s.length < 1 + fail ArgumentError, 'invalid value for "path" when calling SandboxesApi.create_sandbox_file_archive, the character length must be greater than or equal to 1.' + end + + # verify the required parameter 'archive' is set + if @api_client.config.client_side_validation && archive.nil? + fail ArgumentError, "Missing the required parameter 'archive' when calling SandboxesApi.create_sandbox_file_archive" + end + # resource path + local_var_path = '/sandbox-file-archives' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + form_params['project_id'] = project_id + form_params['session_id'] = session_id + form_params['path'] = path + form_params['archive'] = archive + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SandboxFileArchive' + + # auth_names + auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'AuthUserAccessToken', 'UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"SandboxesApi.create_sandbox_file_archive", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SandboxesApi#create_sandbox_file_archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Write one part of a large workspace file + # Writes a file of up to 1 GiB into a session's workspace in parts of at most 8 MiB. Each part names its `offset` in the file, the whole file's `size`, and the whole file's lowercase hex `sha256`. Parts collect in a hidden staging file beside `path`; nothing appears at `path` until the part that ends at `size` arrives. That part checks the whole file's size and SHA-256, then moves the file into place in one step, so a partial file is never visible at `path`. The response's `complete` says which part finished the file. Missing parent directories are created, and a symbolic link among them is never followed. The finished file is readable and writable only by the session user. A part may start anywhere up to the bytes already received, so a failed part can be resent. A part at offset 0 starts the file again. Resending the part that finished the file answers the same completion while the file at `path` still matches `size` and `sha256`. Code `sandbox_file_part_out_of_order` (409) means the part starts past the bytes received; resend from the last part that succeeded. Code `sandbox_file_part_mismatch` (409) means the finished file differs from `size` or `sha256`; its parts are discarded, so start again at offset 0. Code `sandbox_path_conflict` (409) means a directory is at `path`, a file or symbolic link is where a parent directory belongs, or the session user cannot write the parent directory, or, when parents are missing, the nearest one that exists. Read-only directories the session user owns still take new entries and keep their modes. Code `sandbox_disk_full` (409) means the session's disk has no room; free space and retry. Code `sandbox_image_outdated` (409) means the session started from an image that predates parted writes. A staging file stays until its file completes, a part at offset 0 restarts it, or the session ends. A session outside `project_id`, or a project the caller cannot reach, answers 404 like an unknown session. + # @param sandbox_file_part_request [SandboxFilePartRequest] + # @param [Hash] opts the optional parameters + # @return [SandboxFilePart] + def create_sandbox_file_part(sandbox_file_part_request, opts = {}) + data, _status_code, _headers = create_sandbox_file_part_with_http_info(sandbox_file_part_request, opts) + data + end + + # Write one part of a large workspace file + # Writes a file of up to 1 GiB into a session's workspace in parts of at most 8 MiB. Each part names its `offset` in the file, the whole file's `size`, and the whole file's lowercase hex `sha256`. Parts collect in a hidden staging file beside `path`; nothing appears at `path` until the part that ends at `size` arrives. That part checks the whole file's size and SHA-256, then moves the file into place in one step, so a partial file is never visible at `path`. The response's `complete` says which part finished the file. Missing parent directories are created, and a symbolic link among them is never followed. The finished file is readable and writable only by the session user. A part may start anywhere up to the bytes already received, so a failed part can be resent. A part at offset 0 starts the file again. Resending the part that finished the file answers the same completion while the file at `path` still matches `size` and `sha256`. Code `sandbox_file_part_out_of_order` (409) means the part starts past the bytes received; resend from the last part that succeeded. Code `sandbox_file_part_mismatch` (409) means the finished file differs from `size` or `sha256`; its parts are discarded, so start again at offset 0. Code `sandbox_path_conflict` (409) means a directory is at `path`, a file or symbolic link is where a parent directory belongs, or the session user cannot write the parent directory, or, when parents are missing, the nearest one that exists. Read-only directories the session user owns still take new entries and keep their modes. Code `sandbox_disk_full` (409) means the session's disk has no room; free space and retry. Code `sandbox_image_outdated` (409) means the session started from an image that predates parted writes. A staging file stays until its file completes, a part at offset 0 restarts it, or the session ends. A session outside `project_id`, or a project the caller cannot reach, answers 404 like an unknown session. + # @param sandbox_file_part_request [SandboxFilePartRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(SandboxFilePart, Integer, Hash)>] SandboxFilePart data, response status code and response headers + def create_sandbox_file_part_with_http_info(sandbox_file_part_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SandboxesApi.create_sandbox_file_part ...' + end + # verify the required parameter 'sandbox_file_part_request' is set + if @api_client.config.client_side_validation && sandbox_file_part_request.nil? + fail ArgumentError, "Missing the required parameter 'sandbox_file_part_request' when calling SandboxesApi.create_sandbox_file_part" + end + # resource path + local_var_path = '/sandbox-file-parts' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_file_part_request) + + # return_type + return_type = opts[:debug_return_type] || 'SandboxFilePart' + + # auth_names + auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'AuthUserAccessToken', 'UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"SandboxesApi.create_sandbox_file_part", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SandboxesApi#create_sandbox_file_part\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Start a sandbox session # @param id [String] # @param idempotency_key [String] @@ -1167,6 +1333,116 @@ def list_sandbox_presets_with_http_info(opts = {}) return data, status_code, headers end + # List workspace files + # Lists a directory in a Sandbox session's workspace, one page at a time. The listing never follows a symlink and never leaves the workspace. It is not a snapshot: a file that changes while it runs can appear before or after the change. Sessions started on an image built before file listing answer 409 with code `sandbox_image_outdated`; start a new session, after redeploying a custom template. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param session_id [String] The session to list. A session outside `project_id` answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [String] :path Workspace directory to list, such as `src` or `/workspace/src`. Omit it, or pass `.` or `/workspace`, to list the workspace root. The path must be a directory; it is never reached through a symlink. + # @option opts [Boolean] :recursive List every entry below the directory. When false, list only its direct entries. (default to true) + # @option opts [Boolean] :include_sha256 Add the SHA-256 digest of each regular file's content. A call reads at most 256 MiB to hash; a page ends early, with `next_cursor`, before a file that would pass that budget. A file without a digest says why in `sha256_skipped`. (default to false) + # @option opts [Integer] :limit Most entries to return. A page can hold fewer, so continue while `next_cursor` is present. (default to 10000) + # @option opts [String] :cursor Opaque cursor from the previous page's `next_cursor`. It is valid only for the same project and session; send the same `path` and `recursive` with it. + # @return [SandboxFileListResult] + def list_sandbox_session_files(project_id, session_id, opts = {}) + data, _status_code, _headers = list_sandbox_session_files_with_http_info(project_id, session_id, opts) + data + end + + # List workspace files + # Lists a directory in a Sandbox session's workspace, one page at a time. The listing never follows a symlink and never leaves the workspace. It is not a snapshot: a file that changes while it runs can appear before or after the change. Sessions started on an image built before file listing answer 409 with code `sandbox_image_outdated`; start a new session, after redeploying a custom template. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param session_id [String] The session to list. A session outside `project_id` answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [String] :path Workspace directory to list, such as `src` or `/workspace/src`. Omit it, or pass `.` or `/workspace`, to list the workspace root. The path must be a directory; it is never reached through a symlink. + # @option opts [Boolean] :recursive List every entry below the directory. When false, list only its direct entries. (default to true) + # @option opts [Boolean] :include_sha256 Add the SHA-256 digest of each regular file's content. A call reads at most 256 MiB to hash; a page ends early, with `next_cursor`, before a file that would pass that budget. A file without a digest says why in `sha256_skipped`. (default to false) + # @option opts [Integer] :limit Most entries to return. A page can hold fewer, so continue while `next_cursor` is present. (default to 10000) + # @option opts [String] :cursor Opaque cursor from the previous page's `next_cursor`. It is valid only for the same project and session; send the same `path` and `recursive` with it. + # @return [Array<(SandboxFileListResult, Integer, Hash)>] SandboxFileListResult data, response status code and response headers + def list_sandbox_session_files_with_http_info(project_id, session_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SandboxesApi.list_sandbox_session_files ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling SandboxesApi.list_sandbox_session_files" + end + # verify the required parameter 'session_id' is set + if @api_client.config.client_side_validation && session_id.nil? + fail ArgumentError, "Missing the required parameter 'session_id' when calling SandboxesApi.list_sandbox_session_files" + end + if @api_client.config.client_side_validation && !opts[:'path'].nil? && opts[:'path'].to_s.length > 4096 + fail ArgumentError, 'invalid value for "opts[:"path"]" when calling SandboxesApi.list_sandbox_session_files, the character length must be smaller than or equal to 4096.' + end + + if @api_client.config.client_side_validation && !opts[:'path'].nil? && opts[:'path'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"path"]" when calling SandboxesApi.list_sandbox_session_files, the character length must be greater than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxesApi.list_sandbox_session_files, must be smaller than or equal to 10000.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxesApi.list_sandbox_session_files, must be greater than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length > 8192 + fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling SandboxesApi.list_sandbox_session_files, the character length must be smaller than or equal to 8192.' + end + + if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling SandboxesApi.list_sandbox_session_files, the character length must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/sandbox-session-files' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'project_id'] = project_id + query_params[:'session_id'] = session_id + query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil? + query_params[:'recursive'] = opts[:'recursive'] if !opts[:'recursive'].nil? + query_params[:'include_sha256'] = opts[:'include_sha256'] if !opts[:'include_sha256'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SandboxFileListResult' + + # auth_names + auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'AuthUserAccessToken', 'UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"SandboxesApi.list_sandbox_session_files", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SandboxesApi#list_sandbox_session_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List project sandbox sessions # @param id [String] # @param [Hash] opts the optional parameters diff --git a/lib/volcano/generated/lib/volcano-generated/api/service_keys_api.rb b/lib/volcano/generated/lib/volcano-generated/api/service_keys_api.rb index 5fed328f..396e1d6d 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/service_keys_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/service_keys_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -20,7 +20,7 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end # Create service key - # Create a new service role key for admin operations. **WARNING:** Service keys bypass all RLS policies! Store securely and NEVER expose in frontend code. + # Create a new service role key for admin operations. **WARNING:** Service keys bypass all RLS policies! Store securely and NEVER expose in frontend code. A key that holds `ai.invoke` is an AI key for the Volcano AI gateway, which calls models on the project's behalf. Volcano pays the model provider for those calls; the project is not billed for them. It holds `ai.invoke` and nothing else, and is marked as created by a person, so the gateway can tell it from every other key: a key that holds `\"*\"`, and a key created before AI keys existed, never count. Only a person creates one: signed in to the dashboard, or with a `volcano login` token whose sign-in is live. A project access token, a request made through MCP, a platform token created through the token API, and a sign-in that ended get `403` with code `person_required`. On a local server, the local platform token counts as the person. Reading or regenerating an AI key takes the same person as creating it, and lists leave its value out. An AI key only mints run tokens: the database API and realtime refuse it, whether or not service key scopes apply to them yet. While the `ai_gateway` capability is unavailable, asking for `ai.invoke` answers `404` with code `feature_unavailable`; existing keys keep working with the other service key routes. A key that holds `grants.mint` lets a first-party app, such as the Builder, mint delegated grants. It too holds that permission alone and takes a person, as an AI key does. Only a registered first-party app's project may hold one, and only its owner creates it: another project gets `403` with code `first_party_app_required`. The `ai_gateway` capability doesn't apply to it, and it carries no AI marker. # @param id [String] Project ID # @param create_service_key_request [CreateServiceKeyRequest] # @param [Hash] opts the optional parameters @@ -31,7 +31,7 @@ def create_service_key(id, create_service_key_request, opts = {}) end # Create service key - # Create a new service role key for admin operations. **WARNING:** Service keys bypass all RLS policies! Store securely and NEVER expose in frontend code. + # Create a new service role key for admin operations. **WARNING:** Service keys bypass all RLS policies! Store securely and NEVER expose in frontend code. A key that holds `ai.invoke` is an AI key for the Volcano AI gateway, which calls models on the project's behalf. Volcano pays the model provider for those calls; the project is not billed for them. It holds `ai.invoke` and nothing else, and is marked as created by a person, so the gateway can tell it from every other key: a key that holds `\"*\"`, and a key created before AI keys existed, never count. Only a person creates one: signed in to the dashboard, or with a `volcano login` token whose sign-in is live. A project access token, a request made through MCP, a platform token created through the token API, and a sign-in that ended get `403` with code `person_required`. On a local server, the local platform token counts as the person. Reading or regenerating an AI key takes the same person as creating it, and lists leave its value out. An AI key only mints run tokens: the database API and realtime refuse it, whether or not service key scopes apply to them yet. While the `ai_gateway` capability is unavailable, asking for `ai.invoke` answers `404` with code `feature_unavailable`; existing keys keep working with the other service key routes. A key that holds `grants.mint` lets a first-party app, such as the Builder, mint delegated grants. It too holds that permission alone and takes a person, as an AI key does. Only a registered first-party app's project may hold one, and only its owner creates it: another project gets `403` with code `first_party_app_required`. The `ai_gateway` capability doesn't apply to it, and it carries no AI marker. # @param id [String] Project ID # @param create_service_key_request [CreateServiceKeyRequest] # @param [Hash] opts the optional parameters diff --git a/lib/volcano/generated/lib/volcano-generated/api/shares_api.rb b/lib/volcano/generated/lib/volcano-generated/api/shares_api.rb new file mode 100644 index 00000000..35e9ae79 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/api/shares_api.rb @@ -0,0 +1,753 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'cgi' + +module Volcano::Generated + class SharesApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Create a deploy link + # Creates a draft link for the project. It offers nothing to visitors, and its preview answers `404`, until its owner publishes a release to it with `POST /share-releases`. Any project can have links, whether it deploys from the CLI, the dashboard or Git. + # @param share_create_request [ShareCreateRequest] + # @param [Hash] opts the optional parameters + # @return [Share] + def create_share(share_create_request, opts = {}) + data, _status_code, _headers = create_share_with_http_info(share_create_request, opts) + data + end + + # Create a deploy link + # Creates a draft link for the project. It offers nothing to visitors, and its preview answers `404`, until its owner publishes a release to it with `POST /share-releases`. Any project can have links, whether it deploys from the CLI, the dashboard or Git. + # @param share_create_request [ShareCreateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(Share, Integer, Hash)>] Share data, response status code and response headers + def create_share_with_http_info(share_create_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SharesApi.create_share ...' + end + # verify the required parameter 'share_create_request' is set + if @api_client.config.client_side_validation && share_create_request.nil? + fail ArgumentError, "Missing the required parameter 'share_create_request' when calling SharesApi.create_share" + end + # resource path + local_var_path = '/shares' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(share_create_request) + + # return_type + return_type = opts[:debug_return_type] || 'Share' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken'] + + new_options = opts.merge( + :operation => :"SharesApi.create_share", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SharesApi#create_share\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete a deploy link + # Deletes the link, its releases and its recorded events. The address stops working. Installs the link started that have not finished, including ones still queued, fail at their next step. The visitor keeps the project, with its installation failed. A link Volcano took down (`disabled_reason` `operator`) cannot be deleted until that is lifted; deleting its project still removes it. + # @param share_id [String] Share ID, the 12 characters at the end of the share's deploy URL + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @return [nil] + def delete_share(share_id, opts = {}) + delete_share_with_http_info(share_id, opts) + nil + end + + # Delete a deploy link + # Deletes the link, its releases and its recorded events. The address stops working. Installs the link started that have not finished, including ones still queued, fail at their next step. The visitor keeps the project, with its installation failed. A link Volcano took down (`disabled_reason` `operator`) cannot be deleted until that is lifted; deleting its project still removes it. + # @param share_id [String] Share ID, the 12 characters at the end of the share's deploy URL + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_share_with_http_info(share_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SharesApi.delete_share ...' + end + # verify the required parameter 'share_id' is set + if @api_client.config.client_side_validation && share_id.nil? + fail ArgumentError, "Missing the required parameter 'share_id' when calling SharesApi.delete_share" + end + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if @api_client.config.client_side_validation && share_id !~ pattern + fail ArgumentError, "invalid value for 'share_id' when calling SharesApi.delete_share, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/shares/{share_id}'.sub('{' + 'share_id' + '}', CGI.escape(share_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken'] + + new_options = opts.merge( + :operation => :"SharesApi.delete_share", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SharesApi#delete_share\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a deploy link + # @param share_id [String] Share ID, the 12 characters at the end of the share's deploy URL + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @return [Share] + def get_share(share_id, opts = {}) + data, _status_code, _headers = get_share_with_http_info(share_id, opts) + data + end + + # Get a deploy link + # @param share_id [String] Share ID, the 12 characters at the end of the share's deploy URL + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @return [Array<(Share, Integer, Hash)>] Share data, response status code and response headers + def get_share_with_http_info(share_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SharesApi.get_share ...' + end + # verify the required parameter 'share_id' is set + if @api_client.config.client_side_validation && share_id.nil? + fail ArgumentError, "Missing the required parameter 'share_id' when calling SharesApi.get_share" + end + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if @api_client.config.client_side_validation && share_id !~ pattern + fail ArgumentError, "invalid value for 'share_id' when calling SharesApi.get_share, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/shares/{share_id}'.sub('{' + 'share_id' + '}', CGI.escape(share_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Share' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"SharesApi.get_share", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SharesApi#get_share\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Preview what a deploy link deploys + # Public: needs no credential, because the link id is the credential. Answers the link's current release: when it was published, its digest, the functions and frontends installing it creates, the variables the visitor supplies, and the functions that receive the new project's service key. Show it to a visitor before they confirm, and send its `release.id` when creating the project. Counts the visit for the link's owner, unless the request comes from a crawler or link preview. A link that does not exist, was switched off, or has not been published yet all answer the same `404`. + # @param share_id [String] Share ID, the 12 characters at the end of the share's deploy URL + # @param [Hash] opts the optional parameters + # @return [SharePreview] + def get_share_preview(share_id, opts = {}) + data, _status_code, _headers = get_share_preview_with_http_info(share_id, opts) + data + end + + # Preview what a deploy link deploys + # Public: needs no credential, because the link id is the credential. Answers the link's current release: when it was published, its digest, the functions and frontends installing it creates, the variables the visitor supplies, and the functions that receive the new project's service key. Show it to a visitor before they confirm, and send its `release.id` when creating the project. Counts the visit for the link's owner, unless the request comes from a crawler or link preview. A link that does not exist, was switched off, or has not been published yet all answer the same `404`. + # @param share_id [String] Share ID, the 12 characters at the end of the share's deploy URL + # @param [Hash] opts the optional parameters + # @return [Array<(SharePreview, Integer, Hash)>] SharePreview data, response status code and response headers + def get_share_preview_with_http_info(share_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SharesApi.get_share_preview ...' + end + # verify the required parameter 'share_id' is set + if @api_client.config.client_side_validation && share_id.nil? + fail ArgumentError, "Missing the required parameter 'share_id' when calling SharesApi.get_share_preview" + end + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if @api_client.config.client_side_validation && share_id !~ pattern + fail ArgumentError, "invalid value for 'share_id' when calling SharesApi.get_share_preview, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/share-previews/{share_id}'.sub('{' + 'share_id' + '}', CGI.escape(share_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SharePreview' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"SharesApi.get_share_preview", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SharesApi#get_share_preview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Show what publishing a deploy link would release + # Builds the project's deployed functions and frontends the way a release would, without storing anything, and reports what it would carry: the functions and frontends, the project variables every project created from the release gets (empty unless the visitor gives a value), the functions whose code reads `VOLCANO_SERVICE_KEY`, and what is left out (resources with no stored source, databases, sandboxes, dotenv and key files). Review it, then publish with its `draft_id`, and its variables and service key functions confirmed. Every call runs a full build and counts against the account's hourly release build budget, which drafts and publishes share. Fetch it when the owner opens the publish step, not on every focus or poll. + # @param share_id [String] The share to read. The share's own project authorizes the read; a share the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @return [ShareReleaseDraft] + def get_share_release_draft(share_id, opts = {}) + data, _status_code, _headers = get_share_release_draft_with_http_info(share_id, opts) + data + end + + # Show what publishing a deploy link would release + # Builds the project's deployed functions and frontends the way a release would, without storing anything, and reports what it would carry: the functions and frontends, the project variables every project created from the release gets (empty unless the visitor gives a value), the functions whose code reads `VOLCANO_SERVICE_KEY`, and what is left out (resources with no stored source, databases, sandboxes, dotenv and key files). Review it, then publish with its `draft_id`, and its variables and service key functions confirmed. Every call runs a full build and counts against the account's hourly release build budget, which drafts and publishes share. Fetch it when the owner opens the publish step, not on every focus or poll. + # @param share_id [String] The share to read. The share's own project authorizes the read; a share the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @return [Array<(ShareReleaseDraft, Integer, Hash)>] ShareReleaseDraft data, response status code and response headers + def get_share_release_draft_with_http_info(share_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SharesApi.get_share_release_draft ...' + end + # verify the required parameter 'share_id' is set + if @api_client.config.client_side_validation && share_id.nil? + fail ArgumentError, "Missing the required parameter 'share_id' when calling SharesApi.get_share_release_draft" + end + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if @api_client.config.client_side_validation && share_id !~ pattern + fail ArgumentError, "invalid value for 'share_id' when calling SharesApi.get_share_release_draft, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/share-release-drafts' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'share_id'] = share_id + query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ShareReleaseDraft' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken'] + + new_options = opts.merge( + :operation => :"SharesApi.get_share_release_draft", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SharesApi#get_share_release_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a deploy link's click and deploy counts + # Counts what happened at the link: clicks, previews, confirmations, projects created, and how many became ready or failed. Informational only. Visitors are counted from a salted hash and no address is stored. Events are kept for 90 days, so a `days` above 90 is rejected with `400`. + # @param share_id [String] The share to read. The share's own project authorizes the read; a share the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @option opts [Integer] :days How many days back to count. Defaults to 30. (default to 30) + # @return [ShareStats] + def get_share_stats(share_id, opts = {}) + data, _status_code, _headers = get_share_stats_with_http_info(share_id, opts) + data + end + + # Get a deploy link's click and deploy counts + # Counts what happened at the link: clicks, previews, confirmations, projects created, and how many became ready or failed. Informational only. Visitors are counted from a salted hash and no address is stored. Events are kept for 90 days, so a `days` above 90 is rejected with `400`. + # @param share_id [String] The share to read. The share's own project authorizes the read; a share the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @option opts [Integer] :days How many days back to count. Defaults to 30. (default to 30) + # @return [Array<(ShareStats, Integer, Hash)>] ShareStats data, response status code and response headers + def get_share_stats_with_http_info(share_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SharesApi.get_share_stats ...' + end + # verify the required parameter 'share_id' is set + if @api_client.config.client_side_validation && share_id.nil? + fail ArgumentError, "Missing the required parameter 'share_id' when calling SharesApi.get_share_stats" + end + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if @api_client.config.client_side_validation && share_id !~ pattern + fail ArgumentError, "invalid value for 'share_id' when calling SharesApi.get_share_stats, must conform to the pattern #{pattern}." + end + + if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] > 90 + fail ArgumentError, 'invalid value for "opts[:"days"]" when calling SharesApi.get_share_stats, must be smaller than or equal to 90.' + end + + if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] < 1 + fail ArgumentError, 'invalid value for "opts[:"days"]" when calling SharesApi.get_share_stats, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/share-stats' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'share_id'] = share_id + query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil? + query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ShareStats' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"SharesApi.get_share_stats", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SharesApi#get_share_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List a deploy link's releases + # Pages the link's releases, newest first. Follow `next_cursor` while `has_more` is true. + # @param share_id [String] The share to read. The share's own project authorizes the read; a share the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) + # @option opts [String] :cursor Opaque cursor from a previous response's `next_cursor`. Pages forward, and works only for the same `share_id` and `limit`. + # @return [PaginatedShareReleases] + def list_share_releases(share_id, opts = {}) + data, _status_code, _headers = list_share_releases_with_http_info(share_id, opts) + data + end + + # List a deploy link's releases + # Pages the link's releases, newest first. Follow `next_cursor` while `has_more` is true. + # @param share_id [String] The share to read. The share's own project authorizes the read; a share the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @option opts [Integer] :limit Number of items per page (max 100) (default to 10) + # @option opts [String] :cursor Opaque cursor from a previous response's `next_cursor`. Pages forward, and works only for the same `share_id` and `limit`. + # @return [Array<(PaginatedShareReleases, Integer, Hash)>] PaginatedShareReleases data, response status code and response headers + def list_share_releases_with_http_info(share_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SharesApi.list_share_releases ...' + end + # verify the required parameter 'share_id' is set + if @api_client.config.client_side_validation && share_id.nil? + fail ArgumentError, "Missing the required parameter 'share_id' when calling SharesApi.list_share_releases" + end + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if @api_client.config.client_side_validation && share_id !~ pattern + fail ArgumentError, "invalid value for 'share_id' when calling SharesApi.list_share_releases, must conform to the pattern #{pattern}." + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SharesApi.list_share_releases, must be smaller than or equal to 100.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SharesApi.list_share_releases, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/share-releases' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'share_id'] = share_id + query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PaginatedShareReleases' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"SharesApi.list_share_releases", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SharesApi#list_share_releases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List a project's deploy links + # Deploy links let anyone deploy a release the project's owner published as their own new project. A link's public address is `https://volcano.dev/deploy/`; the address carries no release, so it cannot be edited to point at other code. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @return [SharesResponse] + def list_shares(project_id, opts = {}) + data, _status_code, _headers = list_shares_with_http_info(project_id, opts) + data + end + + # List a project's deploy links + # Deploy links let anyone deploy a release the project's owner published as their own new project. A link's public address is `https://volcano.dev/deploy/<id>`; the address carries no release, so it cannot be edited to point at other code. + # @param project_id [String] The project to read. A project the caller can't read answers like one that doesn't exist. + # @param [Hash] opts the optional parameters + # @return [Array<(SharesResponse, Integer, Hash)>] SharesResponse data, response status code and response headers + def list_shares_with_http_info(project_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SharesApi.list_shares ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling SharesApi.list_shares" + end + # resource path + local_var_path = '/shares' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'project_id'] = project_id + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SharesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"SharesApi.list_shares", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SharesApi#list_shares\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Publish a deploy link release + # Snapshots the project's deployed functions and frontends into an immutable release and makes it the link's current release in one step, so visitors see either the previous release or this one. Visitors install exactly the stored release; later deploys to the project change nothing until the owner publishes again. Send the reviewed draft's `draft_id`, its variables and the functions that receive the new project's `VOLCANO_SERVICE_KEY`, as confirmed from the draft. Both lists must be exactly the draft's: a release carries every variable, since leaving one out would only break the code that reads it. If a fresh build is not the reviewed draft, because the project was redeployed or changed since, or the lists differ from it, nothing is published and the answer is `409` with code `draft_changed` and the new draft. A release carries variable names, never values, and no database. A publish is a full build and counts against the account's hourly release build budget, which it shares with the draft. + # @param share_release_create_request [ShareReleaseCreateRequest] + # @param [Hash] opts the optional parameters + # @return [ShareRelease] + def publish_share_release(share_release_create_request, opts = {}) + data, _status_code, _headers = publish_share_release_with_http_info(share_release_create_request, opts) + data + end + + # Publish a deploy link release + # Snapshots the project's deployed functions and frontends into an immutable release and makes it the link's current release in one step, so visitors see either the previous release or this one. Visitors install exactly the stored release; later deploys to the project change nothing until the owner publishes again. Send the reviewed draft's `draft_id`, its variables and the functions that receive the new project's `VOLCANO_SERVICE_KEY`, as confirmed from the draft. Both lists must be exactly the draft's: a release carries every variable, since leaving one out would only break the code that reads it. If a fresh build is not the reviewed draft, because the project was redeployed or changed since, or the lists differ from it, nothing is published and the answer is `409` with code `draft_changed` and the new draft. A release carries variable names, never values, and no database. A publish is a full build and counts against the account's hourly release build budget, which it shares with the draft. + # @param share_release_create_request [ShareReleaseCreateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ShareRelease, Integer, Hash)>] ShareRelease data, response status code and response headers + def publish_share_release_with_http_info(share_release_create_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SharesApi.publish_share_release ...' + end + # verify the required parameter 'share_release_create_request' is set + if @api_client.config.client_side_validation && share_release_create_request.nil? + fail ArgumentError, "Missing the required parameter 'share_release_create_request' when calling SharesApi.publish_share_release" + end + # resource path + local_var_path = '/share-releases' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(share_release_create_request) + + # return_type + return_type = opts[:debug_return_type] || 'ShareRelease' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken'] + + new_options = opts.merge( + :operation => :"SharesApi.publish_share_release", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SharesApi#publish_share_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Edit or switch a deploy link on or off + # Changes the suggested name, the status, or both. An owner can always switch a link off: it works even while deploy links are not available in this environment, and while the owner's account is read-only. Setting `allow_reshare` to false also works in both cases, alone or with a switch-off, since like a switch-off it only shares less; for a read-only account these are the only changes allowed. While deploy links are not available, a request that sends back the values the link already has, including `status` `active` on an active link, changes nothing and answers `200`. Switching a link off also stops the installs it started that have not finished, including ones still queued: each fails at its next step. The visitor keeps the project, with its installation failed. Switching the link back on lets only installs that have not failed yet go ahead. A link Volcano took down (`disabled_reason` `operator`) cannot be switched back on; other edits still work, and it stays down. While any of the project's links is taken down, no link of the project can be switched on or allowed to be re-shared. A request that switches the link off together with an edit while deploy links are not available, or that also allows re-sharing on a copy whose source does not allow it, still switches the link off, but answers `400` with code `edit_dropped`: the link is off and the edit was not applied. While the account is read-only, a request that switches the link off or sets `allow_reshare` to false together with another edit is answered the same way: the switch-off and the re-sharing change are saved, and the other edit is not. A `status` the link already has is no edit, so sending the fetched link back with `allow_reshare` false answers `200`; a switch-on is such another edit. + # @param share_id [String] Share ID, the 12 characters at the end of the share's deploy URL + # @param share_update_request [ShareUpdateRequest] + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @return [Share] + def update_share(share_id, share_update_request, opts = {}) + data, _status_code, _headers = update_share_with_http_info(share_id, share_update_request, opts) + data + end + + # Edit or switch a deploy link on or off + # Changes the suggested name, the status, or both. An owner can always switch a link off: it works even while deploy links are not available in this environment, and while the owner's account is read-only. Setting `allow_reshare` to false also works in both cases, alone or with a switch-off, since like a switch-off it only shares less; for a read-only account these are the only changes allowed. While deploy links are not available, a request that sends back the values the link already has, including `status` `active` on an active link, changes nothing and answers `200`. Switching a link off also stops the installs it started that have not finished, including ones still queued: each fails at its next step. The visitor keeps the project, with its installation failed. Switching the link back on lets only installs that have not failed yet go ahead. A link Volcano took down (`disabled_reason` `operator`) cannot be switched back on; other edits still work, and it stays down. While any of the project's links is taken down, no link of the project can be switched on or allowed to be re-shared. A request that switches the link off together with an edit while deploy links are not available, or that also allows re-sharing on a copy whose source does not allow it, still switches the link off, but answers `400` with code `edit_dropped`: the link is off and the edit was not applied. While the account is read-only, a request that switches the link off or sets `allow_reshare` to false together with another edit is answered the same way: the switch-off and the re-sharing change are saved, and the other edit is not. A `status` the link already has is no edit, so sending the fetched link back with `allow_reshare` false answers `200`; a switch-on is such another edit. + # @param share_id [String] Share ID, the 12 characters at the end of the share's deploy URL + # @param share_update_request [ShareUpdateRequest] + # @param [Hash] opts the optional parameters + # @option opts [String] :project_id Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + # @return [Array<(Share, Integer, Hash)>] Share data, response status code and response headers + def update_share_with_http_info(share_id, share_update_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SharesApi.update_share ...' + end + # verify the required parameter 'share_id' is set + if @api_client.config.client_side_validation && share_id.nil? + fail ArgumentError, "Missing the required parameter 'share_id' when calling SharesApi.update_share" + end + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if @api_client.config.client_side_validation && share_id !~ pattern + fail ArgumentError, "invalid value for 'share_id' when calling SharesApi.update_share, must conform to the pattern #{pattern}." + end + + # verify the required parameter 'share_update_request' is set + if @api_client.config.client_side_validation && share_update_request.nil? + fail ArgumentError, "Missing the required parameter 'share_update_request' when calling SharesApi.update_share" + end + # resource path + local_var_path = '/shares/{share_id}'.sub('{' + 'share_id' + '}', CGI.escape(share_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(share_update_request) + + # return_type + return_type = opts[:debug_return_type] || 'Share' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken'] + + new_options = opts.merge( + :operation => :"SharesApi.update_share", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SharesApi#update_share\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/api/slack_connections_api.rb b/lib/volcano/generated/lib/volcano-generated/api/slack_connections_api.rb new file mode 100644 index 00000000..884e9525 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/api/slack_connections_api.rb @@ -0,0 +1,401 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'cgi' + +module Volcano::Generated + class SlackConnectionsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Disconnect a Slack identity + # Disconnects one Slack identity from the caller's account. LavaFlow stops acting on its mentions for the account's projects at its next check, which also cancels reports still queued. It works whether or not reporting problems from Slack is available in this environment. + # @param connection_id [String] The connection to remove + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_slack_connection(connection_id, opts = {}) + delete_slack_connection_with_http_info(connection_id, opts) + nil + end + + # Disconnect a Slack identity + # Disconnects one Slack identity from the caller's account. LavaFlow stops acting on its mentions for the account's projects at its next check, which also cancels reports still queued. It works whether or not reporting problems from Slack is available in this environment. + # @param connection_id [String] The connection to remove + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_slack_connection_with_http_info(connection_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SlackConnectionsApi.delete_slack_connection ...' + end + # verify the required parameter 'connection_id' is set + if @api_client.config.client_side_validation && connection_id.nil? + fail ArgumentError, "Missing the required parameter 'connection_id' when calling SlackConnectionsApi.delete_slack_connection" + end + # resource path + local_var_path = '/user/slack/connections/{connectionId}'.sub('{' + 'connectionId' + '}', CGI.escape(connection_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken', 'UserToken'] + + new_options = opts.merge( + :operation => :"SlackConnectionsApi.delete_slack_connection", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SlackConnectionsApi#delete_slack_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List a workspace's channels for binding + # Lists the channels in a workspace, public and private, that the Volcano app and one of the Slack identities the caller's sign-in session signed in as are both in, to choose which ones report problems to LavaFlow. Invite the app to a channel in Slack to list it. Slack Connect, shared and archived channels are left out. + # @param team_id [String] The Slack workspace. The app must be installed in it, and one of the caller's connected Slack identities must belong to it. + # @param [Hash] opts the optional parameters + # @return [SlackChannelsResponse] + def list_slack_channels(team_id, opts = {}) + data, _status_code, _headers = list_slack_channels_with_http_info(team_id, opts) + data + end + + # List a workspace's channels for binding + # Lists the channels in a workspace, public and private, that the Volcano app and one of the Slack identities the caller's sign-in session signed in as are both in, to choose which ones report problems to LavaFlow. Invite the app to a channel in Slack to list it. Slack Connect, shared and archived channels are left out. + # @param team_id [String] The Slack workspace. The app must be installed in it, and one of the caller's connected Slack identities must belong to it. + # @param [Hash] opts the optional parameters + # @return [Array<(SlackChannelsResponse, Integer, Hash)>] SlackChannelsResponse data, response status code and response headers + def list_slack_channels_with_http_info(team_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SlackConnectionsApi.list_slack_channels ...' + end + # verify the required parameter 'team_id' is set + if @api_client.config.client_side_validation && team_id.nil? + fail ArgumentError, "Missing the required parameter 'team_id' when calling SlackConnectionsApi.list_slack_channels" + end + pattern = Regexp.new(/^T[A-Z0-9]{2,31}$/) + if @api_client.config.client_side_validation && team_id !~ pattern + fail ArgumentError, "invalid value for 'team_id' when calling SlackConnectionsApi.list_slack_channels, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/user/slack/channels' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'team_id'] = team_id + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SlackChannelsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken', 'UserToken'] + + new_options = opts.merge( + :operation => :"SlackConnectionsApi.list_slack_channels", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SlackConnectionsApi#list_slack_channels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List connected Slack identities + # Lists the caller's connected Slack identities. It answers whether or not reporting problems from Slack is available in this environment, so turning it off strands no connection. + # @param [Hash] opts the optional parameters + # @return [SlackConnectionsResponse] + def list_slack_connections(opts = {}) + data, _status_code, _headers = list_slack_connections_with_http_info(opts) + data + end + + # List connected Slack identities + # Lists the caller's connected Slack identities. It answers whether or not reporting problems from Slack is available in this environment, so turning it off strands no connection. + # @param [Hash] opts the optional parameters + # @return [Array<(SlackConnectionsResponse, Integer, Hash)>] SlackConnectionsResponse data, response status code and response headers + def list_slack_connections_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SlackConnectionsApi.list_slack_connections ...' + end + # resource path + local_var_path = '/user/slack/connections' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SlackConnectionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken', 'UserToken'] + + new_options = opts.merge( + :operation => :"SlackConnectionsApi.list_slack_connections", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SlackConnectionsApi#list_slack_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Complete a Slack install or connection + # Public callback Slack sends the browser to after Add to Slack or Sign in with Slack. The signed `state` names the flow and the Volcano user who started it, and the callback cookie binds it to the browser that started it. Redirects to the flow's `redirect`, or to the dashboard, adding `slack_connect_error=1` when the flow failed. + # @param state [String] The signed state the flow's start returned + # @param [Hash] opts the optional parameters + # @option opts [String] :code Slack's authorization code + # @option opts [String] :error Slack's error, such as `access_denied` + # @return [nil] + def slack_callback(state, opts = {}) + slack_callback_with_http_info(state, opts) + nil + end + + # Complete a Slack install or connection + # Public callback Slack sends the browser to after Add to Slack or Sign in with Slack. The signed `state` names the flow and the Volcano user who started it, and the callback cookie binds it to the browser that started it. Redirects to the flow's `redirect`, or to the dashboard, adding `slack_connect_error=1` when the flow failed. + # @param state [String] The signed state the flow's start returned + # @param [Hash] opts the optional parameters + # @option opts [String] :code Slack's authorization code + # @option opts [String] :error Slack's error, such as `access_denied` + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def slack_callback_with_http_info(state, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SlackConnectionsApi.slack_callback ...' + end + # verify the required parameter 'state' is set + if @api_client.config.client_side_validation && state.nil? + fail ArgumentError, "Missing the required parameter 'state' when calling SlackConnectionsApi.slack_callback" + end + # resource path + local_var_path = '/slack/callback' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'state'] = state + query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil? + query_params[:'error'] = opts[:'error'] if !opts[:'error'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"SlackConnectionsApi.slack_callback", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SlackConnectionsApi#slack_callback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Start connecting a Slack identity + # Starts connecting the caller's Slack identity to their Volcano account and returns its Sign in with Slack URL. LavaFlow acts on a person's Slack mention only for projects owned by an account their identity is connected to. The callback finishes only in the browser that started the connection, so a link forwarded to anyone else connects no one. One Slack identity may connect to several accounts, and one account may have several identities connected. The identity is also tied to the caller's sign-in session: the channel picker and binding act only as the identities this session signed in as, so on an account several people share, nobody picks or binds as another person's identity. An API token has no session, so it can connect an identity that reports, but not pick or bind channels with it. Volcano stores the workspace and user IDs, and no Slack token. The response also sets a short-lived HttpOnly cookie that binds the callback to this browser. Installing and connecting each set their own, so starting one leaves the other's callback working. + # @param [Hash] opts the optional parameters + # @option opts [String] :redirect Where to send the browser after Slack's callback. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. + # @return [SlackAuthorizationResponse] + def start_slack_connect(opts = {}) + data, _status_code, _headers = start_slack_connect_with_http_info(opts) + data + end + + # Start connecting a Slack identity + # Starts connecting the caller's Slack identity to their Volcano account and returns its Sign in with Slack URL. LavaFlow acts on a person's Slack mention only for projects owned by an account their identity is connected to. The callback finishes only in the browser that started the connection, so a link forwarded to anyone else connects no one. One Slack identity may connect to several accounts, and one account may have several identities connected. The identity is also tied to the caller's sign-in session: the channel picker and binding act only as the identities this session signed in as, so on an account several people share, nobody picks or binds as another person's identity. An API token has no session, so it can connect an identity that reports, but not pick or bind channels with it. Volcano stores the workspace and user IDs, and no Slack token. The response also sets a short-lived HttpOnly cookie that binds the callback to this browser. Installing and connecting each set their own, so starting one leaves the other's callback working. + # @param [Hash] opts the optional parameters + # @option opts [String] :redirect Where to send the browser after Slack's callback. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. + # @return [Array<(SlackAuthorizationResponse, Integer, Hash)>] SlackAuthorizationResponse data, response status code and response headers + def start_slack_connect_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SlackConnectionsApi.start_slack_connect ...' + end + # resource path + local_var_path = '/user/slack/connections' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'redirect'] = opts[:'redirect'] if !opts[:'redirect'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SlackAuthorizationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken', 'UserToken'] + + new_options = opts.merge( + :operation => :"SlackConnectionsApi.start_slack_connect", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SlackConnectionsApi#start_slack_connect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Start installing the Volcano Slack app + # Starts an installation of the Volcano app in a Slack workspace, so LavaFlow can take problems reported there, and returns its Add to Slack URL. Send the browser to it; Slack returns it to `GET /slack/callback`, which saves the installation as a `slack` connector (`GET /connectors`). Installing again replaces the workspace's installation. Enterprise Grid org-wide installs are refused. The callback finishes only in the browser that started the installation. The response also sets a short-lived HttpOnly cookie that binds the callback to this browser. Installing and connecting each set their own, so starting one leaves the other's callback working. + # @param [Hash] opts the optional parameters + # @option opts [String] :redirect Where to send the browser after Slack's callback. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. + # @return [SlackAuthorizationResponse] + def start_slack_install(opts = {}) + data, _status_code, _headers = start_slack_install_with_http_info(opts) + data + end + + # Start installing the Volcano Slack app + # Starts an installation of the Volcano app in a Slack workspace, so LavaFlow can take problems reported there, and returns its Add to Slack URL. Send the browser to it; Slack returns it to `GET /slack/callback`, which saves the installation as a `slack` connector (`GET /connectors`). Installing again replaces the workspace's installation. Enterprise Grid org-wide installs are refused. The callback finishes only in the browser that started the installation. The response also sets a short-lived HttpOnly cookie that binds the callback to this browser. Installing and connecting each set their own, so starting one leaves the other's callback working. + # @param [Hash] opts the optional parameters + # @option opts [String] :redirect Where to send the browser after Slack's callback. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. + # @return [Array<(SlackAuthorizationResponse, Integer, Hash)>] SlackAuthorizationResponse data, response status code and response headers + def start_slack_install_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SlackConnectionsApi.start_slack_install ...' + end + # resource path + local_var_path = '/user/slack/installations' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'redirect'] = opts[:'redirect'] if !opts[:'redirect'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SlackAuthorizationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken', 'UserToken'] + + new_options = opts.merge( + :operation => :"SlackConnectionsApi.start_slack_install", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SlackConnectionsApi#start_slack_install\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/api/storage_admin_api.rb b/lib/volcano/generated/lib/volcano-generated/api/storage_admin_api.rb index bb47036b..339e344b 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/storage_admin_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/storage_admin_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/api/storage_buckets_api.rb b/lib/volcano/generated/lib/volcano-generated/api/storage_buckets_api.rb index 889ab73a..33527680 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/storage_buckets_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/storage_buckets_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/api/storage_objects_api.rb b/lib/volcano/generated/lib/volcano-generated/api/storage_objects_api.rb index b1bb8c47..4dc17110 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/storage_objects_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/storage_objects_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/api/storage_policies_api.rb b/lib/volcano/generated/lib/volcano-generated/api/storage_policies_api.rb index 5cc81d6e..e11930ba 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/storage_policies_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/storage_policies_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -164,6 +164,8 @@ def delete_storage_policy_with_http_info(id, bucket_name, policy_id, opts = {}) # header parameters header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} diff --git a/lib/volcano/generated/lib/volcano-generated/api/system_api.rb b/lib/volcano/generated/lib/volcano-generated/api/system_api.rb index 59a9c7ce..f5686e68 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/system_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/system_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -385,7 +385,7 @@ def health_check_with_http_info(opts = {}) end # List capabilities - # Lists which product capabilities accept new work in this environment. Check it to decide what to offer, instead of calling a route to see whether it fails. | ID | Covers | | --- | --- | | `sandboxes` | The Sandbox API: presets, templates, sessions, and executions | | `sandboxes.sessions` | Starting and resuming sessions, and one-shot executions | | `sandboxes.custom_templates` | Deploying a custom template; its validation waits while `sandboxes.sessions` is unavailable | | `issues` | The Issues API: listing, reading, and updating grouped runtime errors | | `autofix` | The Autofix API: a project's AI diagnosis and fix settings | | `autofix.managed_models` | Turning autofix on with Volcano-managed models instead of your own API key | A capability missing from the list is unavailable, and a capability under another, such as `sandboxes.sessions`, is unavailable whenever its parent is. While a capability is unavailable, requests that start new work answer `404` or `400` with code `feature_unavailable`; refresh this list when you receive that code. Reading, deleting, and terminating what already exists keep working unless the whole feature is absent from the environment. Every caller in an environment gets the same answer. + # Lists which product capabilities accept new work in this environment. Check it to decide what to offer, instead of calling a route to see whether it fails. | ID | Covers | | --- | --- | | `sandboxes` | The Sandbox API: presets, templates, sessions, and executions | | `sandboxes.sessions` | Starting and resuming sessions, and one-shot executions | | `sandboxes.custom_templates` | Deploying a custom template; its validation waits while `sandboxes.sessions` is unavailable | | `sandboxes.network_isolation` | Creating sessions and one-shot executions with `network.egress` `deny_all`; existing `deny_all` sessions work either way | | `sandboxes.output_not_kept` | Commands that keep no output: `keep_output: false` on a command, and `executions.keep_output: false` on a session; commands that keep output work either way | | `issues` | The Issues API: listing, reading, and updating grouped runtime errors | | `issues.create` | Writing an issue with `POST /issues`; written issues already recorded read and update either way | | `lavaflow` | LavaFlow, which diagnoses a project's issues and opens pull requests that fix them. Here it reports only whether LavaFlow is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | | `lavaflow.merge` | LavaFlow merging its fixes, with `autonomy: merge`. Here it reports only whether merging is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | | `lavaflow.lineage` | LavaFlow following up its fixes: linking a fix's recurrence or a new issue its deploy caused to the fix, the follow-up runs, and the lineage holds. Here it reports only whether fix lineage is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | | `lavaflow.open_pr_ci_start` | A fix a person merges, as under `autonomy: open_pr`, opening ready for review with LavaFlow running its CI once, unless the repository may run CI outside GitHub Actions; unavailable, such a fix opens as a draft whose commit skips CI. Here it reports only whether this is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | | `lavaflow.code_quality` | LavaFlow Code Quality, which reviews the code each frontend production deploy changes. Here it reports only whether Code Quality is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | | `lavaflow.slack` | Reporting problems to LavaFlow from Slack: installing the Volcano Slack app, connecting Slack identities, and binding channels to projects. Here it reports whether LavaFlow is released, the Slack app is set up, and Slack reports have launched in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | | `lavaflow.aikido` | LavaFlow fixing the security issues Aikido finds: connecting an Aikido workspace and binding projects to it. Here it reports whether LavaFlow is released and Aikido reports have launched in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | | `functions.response_streaming` | Streaming an HTTP-mode function's response on its own URL as the function writes it | | `frontend_routes` | Creating and changing Frontend routes; listing, deleting, and serving existing ones work either way | | `frontends.candidates` | Creating, redeploying, promoting and rolling back to a frontend Candidate; reading, deleting and rolling back to the frontend's own runtime always work | | `databases.migrations` | Starting migration runs and recording a baseline; reading history and runs works either way | | `shares` | Creating, switching on and publishing shares, and forking one | | `ai_gateway` | The Volcano AI gateway: creating a key that holds `ai.invoke` with `POST /projects/{id}/service-keys`, and minting the first run token of a run; reading, regenerating and deleting existing keys, and reading, extending, revoking and minting again for a run already minted for, work either way | | `realtime.http_publish` | Publishing a message with `POST /realtime/v1/publish`; while Realtime is paused it stays available, and the route answers `503` `feature_paused` | A capability missing from the list is unavailable, and a capability under another, such as `sandboxes.sessions`, is unavailable whenever its parent is. While a capability is unavailable, requests that start new work answer `404` or `400` with code `feature_unavailable`; refresh this list when you receive that code. Reading, deleting, and terminating what already exists keep working unless the whole feature is absent from the environment. Every caller in an environment gets the same answer; `GET /projects/{id}/capabilities` answers for one project. `functions.response_streaming` refuses nothing: while it is unavailable, a function's own URL still answers and sends a streamed response whole, once the function finishes, up to 6 MiB with headers; a larger one fails the invocation. Frontend Function routes stream either way. After these, the list names each first-party app Volcano runs in this environment, such as `builder`, by its own ID. Such an app is available while it accepts new work. When only the app's own release is off, work it already accepted continues; when first-party app mounts are off, its mount refuses every request with 404 `feature_unavailable`. # @param [Hash] opts the optional parameters # @return [CapabilityList] def list_capabilities(opts = {}) @@ -394,7 +394,7 @@ def list_capabilities(opts = {}) end # List capabilities - # Lists which product capabilities accept new work in this environment. Check it to decide what to offer, instead of calling a route to see whether it fails. | ID | Covers | | --- | --- | | `sandboxes` | The Sandbox API: presets, templates, sessions, and executions | | `sandboxes.sessions` | Starting and resuming sessions, and one-shot executions | | `sandboxes.custom_templates` | Deploying a custom template; its validation waits while `sandboxes.sessions` is unavailable | | `issues` | The Issues API: listing, reading, and updating grouped runtime errors | | `autofix` | The Autofix API: a project's AI diagnosis and fix settings | | `autofix.managed_models` | Turning autofix on with Volcano-managed models instead of your own API key | A capability missing from the list is unavailable, and a capability under another, such as `sandboxes.sessions`, is unavailable whenever its parent is. While a capability is unavailable, requests that start new work answer `404` or `400` with code `feature_unavailable`; refresh this list when you receive that code. Reading, deleting, and terminating what already exists keep working unless the whole feature is absent from the environment. Every caller in an environment gets the same answer. + # Lists which product capabilities accept new work in this environment. Check it to decide what to offer, instead of calling a route to see whether it fails. | ID | Covers | | --- | --- | | `sandboxes` | The Sandbox API: presets, templates, sessions, and executions | | `sandboxes.sessions` | Starting and resuming sessions, and one-shot executions | | `sandboxes.custom_templates` | Deploying a custom template; its validation waits while `sandboxes.sessions` is unavailable | | `sandboxes.network_isolation` | Creating sessions and one-shot executions with `network.egress` `deny_all`; existing `deny_all` sessions work either way | | `sandboxes.output_not_kept` | Commands that keep no output: `keep_output: false` on a command, and `executions.keep_output: false` on a session; commands that keep output work either way | | `issues` | The Issues API: listing, reading, and updating grouped runtime errors | | `issues.create` | Writing an issue with `POST /issues`; written issues already recorded read and update either way | | `lavaflow` | LavaFlow, which diagnoses a project's issues and opens pull requests that fix them. Here it reports only whether LavaFlow is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | | `lavaflow.merge` | LavaFlow merging its fixes, with `autonomy: merge`. Here it reports only whether merging is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | | `lavaflow.lineage` | LavaFlow following up its fixes: linking a fix's recurrence or a new issue its deploy caused to the fix, the follow-up runs, and the lineage holds. Here it reports only whether fix lineage is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | | `lavaflow.open_pr_ci_start` | A fix a person merges, as under `autonomy: open_pr`, opening ready for review with LavaFlow running its CI once, unless the repository may run CI outside GitHub Actions; unavailable, such a fix opens as a draft whose commit skips CI. Here it reports only whether this is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | | `lavaflow.code_quality` | LavaFlow Code Quality, which reviews the code each frontend production deploy changes. Here it reports only whether Code Quality is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | | `lavaflow.slack` | Reporting problems to LavaFlow from Slack: installing the Volcano Slack app, connecting Slack identities, and binding channels to projects. Here it reports whether LavaFlow is released, the Slack app is set up, and Slack reports have launched in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | | `lavaflow.aikido` | LavaFlow fixing the security issues Aikido finds: connecting an Aikido workspace and binding projects to it. Here it reports whether LavaFlow is released and Aikido reports have launched in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | | `functions.response_streaming` | Streaming an HTTP-mode function's response on its own URL as the function writes it | | `frontend_routes` | Creating and changing Frontend routes; listing, deleting, and serving existing ones work either way | | `frontends.candidates` | Creating, redeploying, promoting and rolling back to a frontend Candidate; reading, deleting and rolling back to the frontend's own runtime always work | | `databases.migrations` | Starting migration runs and recording a baseline; reading history and runs works either way | | `shares` | Creating, switching on and publishing shares, and forking one | | `ai_gateway` | The Volcano AI gateway: creating a key that holds `ai.invoke` with `POST /projects/{id}/service-keys`, and minting the first run token of a run; reading, regenerating and deleting existing keys, and reading, extending, revoking and minting again for a run already minted for, work either way | | `realtime.http_publish` | Publishing a message with `POST /realtime/v1/publish`; while Realtime is paused it stays available, and the route answers `503` `feature_paused` | A capability missing from the list is unavailable, and a capability under another, such as `sandboxes.sessions`, is unavailable whenever its parent is. While a capability is unavailable, requests that start new work answer `404` or `400` with code `feature_unavailable`; refresh this list when you receive that code. Reading, deleting, and terminating what already exists keep working unless the whole feature is absent from the environment. Every caller in an environment gets the same answer; `GET /projects/{id}/capabilities` answers for one project. `functions.response_streaming` refuses nothing: while it is unavailable, a function's own URL still answers and sends a streamed response whole, once the function finishes, up to 6 MiB with headers; a larger one fails the invocation. Frontend Function routes stream either way. After these, the list names each first-party app Volcano runs in this environment, such as `builder`, by its own ID. Such an app is available while it accepts new work. When only the app's own release is off, work it already accepted continues; when first-party app mounts are off, its mount refuses every request with 404 `feature_unavailable`. # @param [Hash] opts the optional parameters # @return [Array<(CapabilityList, Integer, Hash)>] CapabilityList data, response status code and response headers def list_capabilities_with_http_info(opts = {}) diff --git a/lib/volcano/generated/lib/volcano-generated/api/variable_environments_api.rb b/lib/volcano/generated/lib/volcano-generated/api/variable_environments_api.rb index 7b5ab3dd..04025c62 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/variable_environments_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/variable_environments_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/api/variables_api.rb b/lib/volcano/generated/lib/volcano-generated/api/variables_api.rb index bfa2b363..eec4391f 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/variables_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/variables_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/api/verified_domains_api.rb b/lib/volcano/generated/lib/volcano-generated/api/verified_domains_api.rb index 0e41dcec..d23a74c4 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/verified_domains_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/verified_domains_api.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/api_client.rb b/lib/volcano/generated/lib/volcano-generated/api_client.rb index f801689c..1393ef46 100644 --- a/lib/volcano/generated/lib/volcano-generated/api_client.rb +++ b/lib/volcano/generated/lib/volcano-generated/api_client.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/api_error.rb b/lib/volcano/generated/lib/volcano-generated/api_error.rb index fa6902d1..7b84f69f 100644 --- a/lib/volcano/generated/lib/volcano-generated/api_error.rb +++ b/lib/volcano/generated/lib/volcano-generated/api_error.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/api_model_base.rb b/lib/volcano/generated/lib/volcano-generated/api_model_base.rb index 00f3936e..4ae65756 100644 --- a/lib/volcano/generated/lib/volcano-generated/api_model_base.rb +++ b/lib/volcano/generated/lib/volcano-generated/api_model_base.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/configuration.rb b/lib/volcano/generated/lib/volcano-generated/configuration.rb index 4d6a1e6c..fd866c04 100644 --- a/lib/volcano/generated/lib/volcano-generated/configuration.rb +++ b/lib/volcano/generated/lib/volcano-generated/configuration.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/account_session.rb b/lib/volcano/generated/lib/volcano-generated/models/account_session.rb new file mode 100644 index 00000000..c58ed748 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/account_session.rb @@ -0,0 +1,420 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A sign-in to your Volcano account, from the CLI or a browser. + class AccountSession < ApiModelBase + # Unique session identifier + attr_accessor :id + + # The sign-in identity (auth user) the session belongs to. This is not your account ID: an identity linked to your account has its own ID. + attr_accessor :user_id + + # How the session was created: `email`, `google`, `github`, `microsoft`, `apple`, or `device:` for a device-code login such as the `volcano` CLI. More values may be added; use `kind` to tell CLI logins from browser sign-ins. + attr_accessor :provider + + # `cli` for a device-code login, such as `volcano login`, and `browser` for every other sign-in. + attr_accessor :kind + + # Browser/device user agent string + attr_accessor :user_agent + + # IP address of the client when the session was created + attr_accessor :ip_address + + # IP address of the most recent activity (token refresh) + attr_accessor :last_ip_address + + # When this session expires + attr_accessor :expires_at + + # Last activity timestamp + attr_accessor :last_activity_at + + # When the session was created + attr_accessor :session_started_at + + # Whether the session is currently active (not expired) + attr_accessor :is_active + + # Whether this is the session making the current request + attr_accessor :is_current + + attr_accessor :created_at + + attr_accessor :updated_at + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'user_id' => :'user_id', + :'provider' => :'provider', + :'kind' => :'kind', + :'user_agent' => :'user_agent', + :'ip_address' => :'ip_address', + :'last_ip_address' => :'last_ip_address', + :'expires_at' => :'expires_at', + :'last_activity_at' => :'last_activity_at', + :'session_started_at' => :'session_started_at', + :'is_active' => :'is_active', + :'is_current' => :'is_current', + :'created_at' => :'created_at', + :'updated_at' => :'updated_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'user_id' => :'String', + :'provider' => :'String', + :'kind' => :'String', + :'user_agent' => :'String', + :'ip_address' => :'String', + :'last_ip_address' => :'String', + :'expires_at' => :'Time', + :'last_activity_at' => :'Time', + :'session_started_at' => :'Time', + :'is_active' => :'Boolean', + :'is_current' => :'Boolean', + :'created_at' => :'Time', + :'updated_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::AccountSession` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::AccountSession`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + else + self.user_id = nil + end + + if attributes.key?(:'provider') + self.provider = attributes[:'provider'] + else + self.provider = nil + end + + if attributes.key?(:'kind') + self.kind = attributes[:'kind'] + else + self.kind = nil + end + + if attributes.key?(:'user_agent') + self.user_agent = attributes[:'user_agent'] + end + + if attributes.key?(:'ip_address') + self.ip_address = attributes[:'ip_address'] + end + + if attributes.key?(:'last_ip_address') + self.last_ip_address = attributes[:'last_ip_address'] + end + + if attributes.key?(:'expires_at') + self.expires_at = attributes[:'expires_at'] + else + self.expires_at = nil + end + + if attributes.key?(:'last_activity_at') + self.last_activity_at = attributes[:'last_activity_at'] + end + + if attributes.key?(:'session_started_at') + self.session_started_at = attributes[:'session_started_at'] + end + + if attributes.key?(:'is_active') + self.is_active = attributes[:'is_active'] + else + self.is_active = nil + end + + if attributes.key?(:'is_current') + self.is_current = attributes[:'is_current'] + else + self.is_current = nil + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') + end + + if @provider.nil? + invalid_properties.push('invalid value for "provider", provider cannot be nil.') + end + + if @kind.nil? + invalid_properties.push('invalid value for "kind", kind cannot be nil.') + end + + if @expires_at.nil? + invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.') + end + + if @is_active.nil? + invalid_properties.push('invalid value for "is_active", is_active cannot be nil.') + end + + if @is_current.nil? + invalid_properties.push('invalid value for "is_current", is_current cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @user_id.nil? + return false if @provider.nil? + return false if @kind.nil? + kind_validator = EnumAttributeValidator.new('String', ["cli", "browser"]) + return false unless kind_validator.valid?(@kind) + return false if @expires_at.nil? + return false if @is_active.nil? + return false if @is_current.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] user_id Value to be assigned + def user_id=(user_id) + if user_id.nil? + fail ArgumentError, 'user_id cannot be nil' + end + + @user_id = user_id + end + + # Custom attribute writer method with validation + # @param [Object] provider Value to be assigned + def provider=(provider) + if provider.nil? + fail ArgumentError, 'provider cannot be nil' + end + + @provider = provider + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] kind Object to be assigned + def kind=(kind) + validator = EnumAttributeValidator.new('String', ["cli", "browser"]) + unless validator.valid?(kind) + fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}." + end + @kind = kind + end + + # Custom attribute writer method with validation + # @param [Object] expires_at Value to be assigned + def expires_at=(expires_at) + if expires_at.nil? + fail ArgumentError, 'expires_at cannot be nil' + end + + @expires_at = expires_at + end + + # Custom attribute writer method with validation + # @param [Object] is_active Value to be assigned + def is_active=(is_active) + if is_active.nil? + fail ArgumentError, 'is_active cannot be nil' + end + + @is_active = is_active + end + + # Custom attribute writer method with validation + # @param [Object] is_current Value to be assigned + def is_current=(is_current) + if is_current.nil? + fail ArgumentError, 'is_current cannot be nil' + end + + @is_current = is_current + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + user_id == o.user_id && + provider == o.provider && + kind == o.kind && + user_agent == o.user_agent && + ip_address == o.ip_address && + last_ip_address == o.last_ip_address && + expires_at == o.expires_at && + last_activity_at == o.last_activity_at && + session_started_at == o.session_started_at && + is_active == o.is_active && + is_current == o.is_current && + created_at == o.created_at && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, user_id, provider, kind, user_agent, ip_address, last_ip_address, expires_at, last_activity_at, session_started_at, is_active, is_current, created_at, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/account_session_list.rb b/lib/volcano/generated/lib/volcano-generated/models/account_session_list.rb new file mode 100644 index 00000000..07f4ba4b --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/account_session_list.rb @@ -0,0 +1,232 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A page of sessions. Without `sort` the body is the legacy `sessions`/`total`/`page`/`limit`/`total_pages` shape; with `sort=created_at` and a cursor it is the shared `data` envelope. + class AccountSessionList < ApiModelBase + attr_accessor :sessions + + # Total number of sessions + attr_accessor :total + + # Current page number + attr_accessor :page + + # Number of sessions per page + attr_accessor :limit + + # Total number of pages + attr_accessor :total_pages + + # Sessions for this page (cursor pagination only) + attr_accessor :data + + # Whether a further page exists (cursor pagination only) + attr_accessor :has_more + + # Opaque cursor for the next page (cursor pagination only) + attr_accessor :next_cursor + + # Opaque cursor for the previous page (cursor pagination only). Send as `ending_before`. + attr_accessor :prev_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sessions' => :'sessions', + :'total' => :'total', + :'page' => :'page', + :'limit' => :'limit', + :'total_pages' => :'total_pages', + :'data' => :'data', + :'has_more' => :'has_more', + :'next_cursor' => :'next_cursor', + :'prev_cursor' => :'prev_cursor' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'sessions' => :'Array', + :'total' => :'Integer', + :'page' => :'Integer', + :'limit' => :'Integer', + :'total_pages' => :'Integer', + :'data' => :'Array', + :'has_more' => :'Boolean', + :'next_cursor' => :'String', + :'prev_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::AccountSessionList` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::AccountSessionList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sessions') + if (value = attributes[:'sessions']).is_a?(Array) + self.sessions = value + end + end + + if attributes.key?(:'total') + self.total = attributes[:'total'] + end + + if attributes.key?(:'page') + self.page = attributes[:'page'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'total_pages') + self.total_pages = attributes[:'total_pages'] + end + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'has_more') + self.has_more = attributes[:'has_more'] + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + end + + if attributes.key?(:'prev_cursor') + self.prev_cursor = attributes[:'prev_cursor'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sessions == o.sessions && + total == o.total && + page == o.page && + limit == o.limit && + total_pages == o.total_pages && + data == o.data && + has_more == o.has_more && + next_cursor == o.next_cursor && + prev_cursor == o.prev_cursor + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sessions, total, page, limit, total_pages, data, has_more, next_cursor, prev_cursor].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/aikido_connector.rb b/lib/volcano/generated/lib/volcano-generated/models/aikido_connector.rb new file mode 100644 index 00000000..cb1b2dad --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/aikido_connector.rb @@ -0,0 +1,214 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # An `aikido` connector's workspace. Present when `type` is `aikido`. + class AikidoConnector < ApiModelBase + attr_accessor :region + + # The workspace's ID in Aikido, which its webhook deliveries name. + attr_accessor :workspace_id + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'region' => :'region', + :'workspace_id' => :'workspace_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'region' => :'AikidoRegion', + :'workspace_id' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::AikidoConnector` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::AikidoConnector`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'region') + self.region = attributes[:'region'] + else + self.region = nil + end + + if attributes.key?(:'workspace_id') + self.workspace_id = attributes[:'workspace_id'] + else + self.workspace_id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @region.nil? + invalid_properties.push('invalid value for "region", region cannot be nil.') + end + + if @workspace_id.nil? + invalid_properties.push('invalid value for "workspace_id", workspace_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @region.nil? + return false if @workspace_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] region Value to be assigned + def region=(region) + if region.nil? + fail ArgumentError, 'region cannot be nil' + end + + @region = region + end + + # Custom attribute writer method with validation + # @param [Object] workspace_id Value to be assigned + def workspace_id=(workspace_id) + if workspace_id.nil? + fail ArgumentError, 'workspace_id cannot be nil' + end + + @workspace_id = workspace_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + region == o.region && + workspace_id == o.workspace_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [region, workspace_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/aikido_connector_create.rb b/lib/volcano/generated/lib/volcano-generated/models/aikido_connector_create.rb new file mode 100644 index 00000000..726e9536 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/aikido_connector_create.rb @@ -0,0 +1,320 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The Aikido workspace's REST API client and webhook signing secret. + class AikidoConnectorCreate < ApiModelBase + attr_accessor :region + + attr_accessor :client_id + + attr_accessor :client_secret + + # The signing secret from Aikido's webhooks page, which verifies its deliveries. + attr_accessor :webhook_secret + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'region' => :'region', + :'client_id' => :'client_id', + :'client_secret' => :'client_secret', + :'webhook_secret' => :'webhook_secret' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'region' => :'AikidoRegion', + :'client_id' => :'String', + :'client_secret' => :'String', + :'webhook_secret' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::AikidoConnectorCreate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::AikidoConnectorCreate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'region') + self.region = attributes[:'region'] + else + self.region = nil + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + else + self.client_id = nil + end + + if attributes.key?(:'client_secret') + self.client_secret = attributes[:'client_secret'] + else + self.client_secret = nil + end + + if attributes.key?(:'webhook_secret') + self.webhook_secret = attributes[:'webhook_secret'] + else + self.webhook_secret = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @region.nil? + invalid_properties.push('invalid value for "region", region cannot be nil.') + end + + if @client_id.nil? + invalid_properties.push('invalid value for "client_id", client_id cannot be nil.') + end + + if @client_id.to_s.length > 512 + invalid_properties.push('invalid value for "client_id", the character length must be smaller than or equal to 512.') + end + + if @client_id.to_s.length < 1 + invalid_properties.push('invalid value for "client_id", the character length must be greater than or equal to 1.') + end + + if @client_secret.nil? + invalid_properties.push('invalid value for "client_secret", client_secret cannot be nil.') + end + + if @client_secret.to_s.length > 512 + invalid_properties.push('invalid value for "client_secret", the character length must be smaller than or equal to 512.') + end + + if @client_secret.to_s.length < 1 + invalid_properties.push('invalid value for "client_secret", the character length must be greater than or equal to 1.') + end + + if @webhook_secret.nil? + invalid_properties.push('invalid value for "webhook_secret", webhook_secret cannot be nil.') + end + + if @webhook_secret.to_s.length > 512 + invalid_properties.push('invalid value for "webhook_secret", the character length must be smaller than or equal to 512.') + end + + if @webhook_secret.to_s.length < 1 + invalid_properties.push('invalid value for "webhook_secret", the character length must be greater than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @region.nil? + return false if @client_id.nil? + return false if @client_id.to_s.length > 512 + return false if @client_id.to_s.length < 1 + return false if @client_secret.nil? + return false if @client_secret.to_s.length > 512 + return false if @client_secret.to_s.length < 1 + return false if @webhook_secret.nil? + return false if @webhook_secret.to_s.length > 512 + return false if @webhook_secret.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] region Value to be assigned + def region=(region) + if region.nil? + fail ArgumentError, 'region cannot be nil' + end + + @region = region + end + + # Custom attribute writer method with validation + # @param [Object] client_id Value to be assigned + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'client_id cannot be nil' + end + + if client_id.to_s.length > 512 + fail ArgumentError, 'invalid value for "client_id", the character length must be smaller than or equal to 512.' + end + + if client_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_id", the character length must be greater than or equal to 1.' + end + + @client_id = client_id + end + + # Custom attribute writer method with validation + # @param [Object] client_secret Value to be assigned + def client_secret=(client_secret) + if client_secret.nil? + fail ArgumentError, 'client_secret cannot be nil' + end + + if client_secret.to_s.length > 512 + fail ArgumentError, 'invalid value for "client_secret", the character length must be smaller than or equal to 512.' + end + + if client_secret.to_s.length < 1 + fail ArgumentError, 'invalid value for "client_secret", the character length must be greater than or equal to 1.' + end + + @client_secret = client_secret + end + + # Custom attribute writer method with validation + # @param [Object] webhook_secret Value to be assigned + def webhook_secret=(webhook_secret) + if webhook_secret.nil? + fail ArgumentError, 'webhook_secret cannot be nil' + end + + if webhook_secret.to_s.length > 512 + fail ArgumentError, 'invalid value for "webhook_secret", the character length must be smaller than or equal to 512.' + end + + if webhook_secret.to_s.length < 1 + fail ArgumentError, 'invalid value for "webhook_secret", the character length must be greater than or equal to 1.' + end + + @webhook_secret = webhook_secret + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + region == o.region && + client_id == o.client_id && + client_secret == o.client_secret && + webhook_secret == o.webhook_secret + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [region, client_id, client_secret, webhook_secret].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/autofix_stage.rb b/lib/volcano/generated/lib/volcano-generated/models/aikido_region.rb similarity index 71% rename from lib/volcano/generated/lib/volcano-generated/models/autofix_stage.rb rename to lib/volcano/generated/lib/volcano-generated/models/aikido_region.rb index f84c9ddc..ad841147 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/autofix_stage.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/aikido_region.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -14,12 +14,14 @@ require 'time' module Volcano::Generated - class AutofixStage - AutofixStageDiagnose = "diagnose".freeze - AutofixStagePullRequest = "pull_request".freeze + class AikidoRegion + EU = "eu".freeze + US = "us".freeze + AU = "au".freeze + ME = "me".freeze def self.all_vars - @all_vars ||= [AutofixStageDiagnose, AutofixStagePullRequest].freeze + @all_vars ||= [EU, US, AU, ME].freeze end # Builds the enum from string @@ -33,8 +35,8 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - return value if AutofixStage.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #AutofixStage" + return value if AikidoRegion.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #AikidoRegion" end end end diff --git a/lib/volcano/generated/lib/volcano-generated/models/autofix_provider.rb b/lib/volcano/generated/lib/volcano-generated/models/aikido_severity.rb similarity index 70% rename from lib/volcano/generated/lib/volcano-generated/models/autofix_provider.rb rename to lib/volcano/generated/lib/volcano-generated/models/aikido_severity.rb index 3e0cf767..25d2fb34 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/autofix_provider.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/aikido_severity.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -14,12 +14,14 @@ require 'time' module Volcano::Generated - class AutofixProvider - AutofixProviderVolcano = "volcano".freeze - AutofixProviderAnthropic = "anthropic".freeze + class AikidoSeverity + LOW = "low".freeze + MEDIUM = "medium".freeze + HIGH = "high".freeze + CRITICAL = "critical".freeze def self.all_vars - @all_vars ||= [AutofixProviderVolcano, AutofixProviderAnthropic].freeze + @all_vars ||= [LOW, MEDIUM, HIGH, CRITICAL].freeze end # Builds the enum from string @@ -33,8 +35,8 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - return value if AutofixProvider.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #AutofixProvider" + return value if AikidoSeverity.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #AikidoSeverity" end end end diff --git a/lib/volcano/generated/lib/volcano-generated/models/anon_key.rb b/lib/volcano/generated/lib/volcano-generated/models/anon_key.rb index 917e55b9..f811351b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/anon_key.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/anon_key.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_config.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_config.rb index e12d4acd..df7b91e5 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_config.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_config.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -94,6 +94,12 @@ class AuthConfig < ApiModelBase # CORS preflight cache duration (seconds) attr_accessor :cors_max_age + # Allow the exact origins of the project's own live frontend previews in its CORS checks, in addition to `cors_allowed_origins`. A preview's origin stops being allowed within seconds of the preview being deleted or expiring, with no configuration change. + attr_accessor :cors_allow_frontend_previews + + # Origins of the project's live frontend previews that its CORS checks currently allow. Empty unless `cors_allow_frontend_previews` is true. Omitted when the live previews could not be read; the rest of the response, and any update it answers, is unaffected. + attr_accessor :frontend_preview_origins + # Require users to confirm email before sign-in. Can only be true when email_enabled is true. attr_accessor :require_email_confirmation @@ -106,8 +112,10 @@ class AuthConfig < ApiModelBase # Enable transactional email sending (confirmation, reset, change notifications). Must be true when require_email_confirmation is true. attr_accessor :email_enabled + # Sender email address. New or changed values containing carriage returns or newlines return 400. Unchanged stored or exported values are preserved. Leading and trailing whitespace in previously saved settings is trimmed in responses and exports, and ignored when sending. attr_accessor :email_from_address + # Sender display name; supports punctuation and Unicode. New or changed values containing carriage returns or newlines return 400. Unchanged stored or exported values are preserved. Leading and trailing whitespace in previously saved settings is trimmed in responses and exports, and ignored when sending. attr_accessor :email_from_name attr_accessor :smtp_host @@ -200,6 +208,8 @@ def self.attribute_map :'max_password_history' => :'max_password_history', :'cors_allow_credentials' => :'cors_allow_credentials', :'cors_max_age' => :'cors_max_age', + :'cors_allow_frontend_previews' => :'cors_allow_frontend_previews', + :'frontend_preview_origins' => :'frontend_preview_origins', :'require_email_confirmation' => :'require_email_confirmation', :'email_confirmation_timeout' => :'email_confirmation_timeout', :'auto_link_verified_oauth' => :'auto_link_verified_oauth', @@ -266,6 +276,8 @@ def self.openapi_types :'max_password_history' => :'Integer', :'cors_allow_credentials' => :'Boolean', :'cors_max_age' => :'Integer', + :'cors_allow_frontend_previews' => :'Boolean', + :'frontend_preview_origins' => :'Array', :'require_email_confirmation' => :'Boolean', :'email_confirmation_timeout' => :'Integer', :'auto_link_verified_oauth' => :'Boolean', @@ -484,6 +496,18 @@ def initialize(attributes = {}) self.cors_max_age = 86400 end + if attributes.key?(:'cors_allow_frontend_previews') + self.cors_allow_frontend_previews = attributes[:'cors_allow_frontend_previews'] + else + self.cors_allow_frontend_previews = false + end + + if attributes.key?(:'frontend_preview_origins') + if (value = attributes[:'frontend_preview_origins']).is_a?(Array) + self.frontend_preview_origins = value + end + end + if attributes.key?(:'require_email_confirmation') self.require_email_confirmation = attributes[:'require_email_confirmation'] else @@ -691,6 +715,8 @@ def ==(o) max_password_history == o.max_password_history && cors_allow_credentials == o.cors_allow_credentials && cors_max_age == o.cors_max_age && + cors_allow_frontend_previews == o.cors_allow_frontend_previews && + frontend_preview_origins == o.frontend_preview_origins && require_email_confirmation == o.require_email_confirmation && email_confirmation_timeout == o.email_confirmation_timeout && auto_link_verified_oauth == o.auto_link_verified_oauth && @@ -723,7 +749,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [project_id, access_token_lifetime, refresh_token_lifetime, refresh_token_reuse_interval, inactivity_timeout, max_session_duration, min_password_length, password_policy, require_uppercase, require_lowercase, require_numbers, require_special_chars, enable_signup, enable_email_password, rate_limit_signup, rate_limit_signin, rate_limit_token_refresh, rate_limit_password_reset, cors_enabled, cors_allowed_origins, enable_anonymous_signins, allowed_email_domains, allowed_email_domains_mode, platform_token_ttl, allow_password_reset, password_reset_timeout, max_password_history, cors_allow_credentials, cors_max_age, require_email_confirmation, email_confirmation_timeout, auto_link_verified_oauth, email_enabled, email_from_address, email_from_name, smtp_host, smtp_port, smtp_username, smtp_password_configured, smtp_use_tls, email_confirmation_subject, email_password_reset_subject, email_password_changed_subject, managed_auth_enabled, post_auth_redirect_url, allowed_redirect_urls, post_logout_redirect_url, device_verification_url, created_at, updated_at].hash + [project_id, access_token_lifetime, refresh_token_lifetime, refresh_token_reuse_interval, inactivity_timeout, max_session_duration, min_password_length, password_policy, require_uppercase, require_lowercase, require_numbers, require_special_chars, enable_signup, enable_email_password, rate_limit_signup, rate_limit_signin, rate_limit_token_refresh, rate_limit_password_reset, cors_enabled, cors_allowed_origins, enable_anonymous_signins, allowed_email_domains, allowed_email_domains_mode, platform_token_ttl, allow_password_reset, password_reset_timeout, max_password_history, cors_allow_credentials, cors_max_age, cors_allow_frontend_previews, frontend_preview_origins, require_email_confirmation, email_confirmation_timeout, auto_link_verified_oauth, email_enabled, email_from_address, email_from_name, smtp_host, smtp_port, smtp_username, smtp_password_configured, smtp_use_tls, email_confirmation_subject, email_password_reset_subject, email_password_changed_subject, managed_auth_enabled, post_auth_redirect_url, allowed_redirect_urls, post_logout_redirect_url, device_verification_url, created_at, updated_at].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email200_response.rb index 8504d1d2..325c0887 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_change200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_change200_response.rb index 78edb282..372a8162 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_change200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_change200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_change_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_change_request.rb index d9b63158..ab6c29b4 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_change_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_change_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_request.rb index 27118f0c..dbcdd2b2 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_convert_anonymous200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_convert_anonymous200_response.rb index cb79783b..f50836c9 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_convert_anonymous200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_convert_anonymous200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_device_authorize_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_device_authorize_request.rb index e6b143d5..678eddc7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_device_authorize_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_device_authorize_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_device_token_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_device_token_request.rb index 09f42aa5..f5d6a71f 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_device_token_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_device_token_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_device_verify200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_device_verify200_response.rb index bce08407..cdea6d78 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_device_verify200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_device_verify200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_device_verify_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_device_verify_request.rb index 0408405b..819a1e4a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_device_verify_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_device_verify_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_forgot_password200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_forgot_password200_response.rb index 8aadbe4e..9191be56 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_forgot_password200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_forgot_password200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_forgot_password_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_forgot_password_request.rb index 0a057a79..fcf73036 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_forgot_password_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_forgot_password_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_get_my_sessions200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_get_my_sessions200_response.rb index c03924f9..ac90ddf8 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_get_my_sessions200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_get_my_sessions200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page.rb index 6686ad73..5e856863 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_defaults.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_defaults.rb index 134bf8b0..d423de10 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_defaults.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_defaults.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_response.rb index 06e2f875..049ac525 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_runtime.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_runtime.rb index c2d0b21d..33f3294b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_runtime.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_runtime.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_identities_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_identities_response.rb index 42642200..fa3f788a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_identities_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_identities_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_identity.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_identity.rb index 06639ecc..06c7fede 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_identity.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_identity.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_insights_interval.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_insights_interval.rb index 45356fab..eecf2ca1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_insights_interval.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_insights_interval.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_insights_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_insights_response.rb index fef461a4..5da2f48b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_insights_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_insights_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_insights_series_point.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_insights_series_point.rb index 8db6220a..30b5203f 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_insights_series_point.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_insights_series_point.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_insights_summary.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_insights_summary.rb index a1bb9894..41e52b38 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_insights_summary.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_insights_summary.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_insights_window.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_insights_window.rb index 4daff6b8..a70e992c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_insights_window.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_insights_window.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_link_o_auth_provider200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_link_o_auth_provider200_response.rb index b6564585..badb1f09 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_link_o_auth_provider200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_link_o_auth_provider200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_list_o_auth_providers200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_list_o_auth_providers200_response.rb index 0e7c2e6f..20bb84a5 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_list_o_auth_providers200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_list_o_auth_providers200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_list_o_auth_providers200_response_providers_inner.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_list_o_auth_providers200_response_providers_inner.rb index a39ea656..54d1b9f1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_list_o_auth_providers200_response_providers_inner.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_list_o_auth_providers200_response_providers_inner.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -17,6 +17,12 @@ module Volcano::Generated class AuthListOAuthProviders200ResponseProvidersInner < ApiModelBase attr_accessor :provider + # The user's account ID at the provider, as a string. It stays the same when the user renames the account. + attr_accessor :provider_user_id + + # The account's login at the provider when it was linked, such as a GitHub username. It isn't updated when the user renames the account. Omitted for providers without logins. + attr_accessor :provider_login + attr_accessor :linked_at attr_accessor :updated_at @@ -25,6 +31,8 @@ class AuthListOAuthProviders200ResponseProvidersInner < ApiModelBase def self.attribute_map { :'provider' => :'provider', + :'provider_user_id' => :'provider_user_id', + :'provider_login' => :'provider_login', :'linked_at' => :'linked_at', :'updated_at' => :'updated_at' } @@ -44,6 +52,8 @@ def self.acceptable_attributes def self.openapi_types { :'provider' => :'String', + :'provider_user_id' => :'String', + :'provider_login' => :'String', :'linked_at' => :'Time', :'updated_at' => :'Time' } @@ -73,14 +83,30 @@ def initialize(attributes = {}) if attributes.key?(:'provider') self.provider = attributes[:'provider'] + else + self.provider = nil + end + + if attributes.key?(:'provider_user_id') + self.provider_user_id = attributes[:'provider_user_id'] + else + self.provider_user_id = nil + end + + if attributes.key?(:'provider_login') + self.provider_login = attributes[:'provider_login'] end if attributes.key?(:'linked_at') self.linked_at = attributes[:'linked_at'] + else + self.linked_at = nil end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] + else + self.updated_at = nil end end @@ -89,6 +115,22 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new + if @provider.nil? + invalid_properties.push('invalid value for "provider", provider cannot be nil.') + end + + if @provider_user_id.nil? + invalid_properties.push('invalid value for "provider_user_id", provider_user_id cannot be nil.') + end + + if @linked_at.nil? + invalid_properties.push('invalid value for "linked_at", linked_at cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + invalid_properties end @@ -96,15 +138,61 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @provider.nil? + return false if @provider_user_id.nil? + return false if @linked_at.nil? + return false if @updated_at.nil? true end + # Custom attribute writer method with validation + # @param [Object] provider Value to be assigned + def provider=(provider) + if provider.nil? + fail ArgumentError, 'provider cannot be nil' + end + + @provider = provider + end + + # Custom attribute writer method with validation + # @param [Object] provider_user_id Value to be assigned + def provider_user_id=(provider_user_id) + if provider_user_id.nil? + fail ArgumentError, 'provider_user_id cannot be nil' + end + + @provider_user_id = provider_user_id + end + + # Custom attribute writer method with validation + # @param [Object] linked_at Value to be assigned + def linked_at=(linked_at) + if linked_at.nil? + fail ArgumentError, 'linked_at cannot be nil' + end + + @linked_at = linked_at + end + + # Custom attribute writer method with validation + # @param [Object] updated_at Value to be assigned + def updated_at=(updated_at) + if updated_at.nil? + fail ArgumentError, 'updated_at cannot be nil' + end + + @updated_at = updated_at + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && provider == o.provider && + provider_user_id == o.provider_user_id && + provider_login == o.provider_login && linked_at == o.linked_at && updated_at == o.updated_at end @@ -118,7 +206,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [provider, linked_at, updated_at].hash + [provider, provider_user_id, provider_login, linked_at, updated_at].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_method_summary.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_method_summary.rb index 2111c559..e41f2b23 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_method_summary.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_method_summary.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_methods_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_methods_response.rb index b9e363ab..3eb047bc 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_methods_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_methods_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_o_auth_exchange_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_o_auth_exchange_request.rb index 8e65d275..79f08b4f 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_o_auth_exchange_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_o_auth_exchange_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_defaults.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_defaults.rb index 5da7c231..921ca940 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_defaults.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_defaults.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_options.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_options.rb index 444d3d8d..5a8cd767 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_options.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_options.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_response.rb index 259a691a..b2fcece2 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_page_density.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_page_density.rb index 5c34a9e7..b97fd3ab 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_page_density.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_page_density.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_page_font.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_page_font.rb index 5bbdd740..daff3880 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_page_font.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_page_font.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_page_layout.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_page_layout.rb index d104b242..8c3ba8dc 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_page_layout.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_page_layout.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_page_radius.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_page_radius.rb index 2d55ad69..21ddcafc 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_page_radius.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_page_radius.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_page_scale.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_page_scale.rb index fffe8b5a..3c48d4ec 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_page_scale.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_page_scale.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_page_theme.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_page_theme.rb index 02f57789..2da11d98 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_page_theme.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_page_theme.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_page_theme_colors.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_page_theme_colors.rb index 0a17e71c..083a8312 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_page_theme_colors.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_page_theme_colors.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_password_policy.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_password_policy.rb index 19943204..9fd95888 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_password_policy.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_password_policy.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_platform_exchange_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_platform_exchange_request.rb index 0857b798..4c3b4b18 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_platform_exchange_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_platform_exchange_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_refresh_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_refresh_request.rb index 8814ef34..6e22da44 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_refresh_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_refresh_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_request_email_change200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_request_email_change200_response.rb index 393b96ed..8333741d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_request_email_change200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_request_email_change200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_request_email_change_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_request_email_change_request.rb index cf900ad3..ef37a543 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_request_email_change_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_request_email_change_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_reset_password200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_reset_password200_response.rb index 839d3638..58f41520 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_reset_password200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_reset_password200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_reset_password_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_reset_password_request.rb index 20d625e3..340f7d95 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_reset_password_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_reset_password_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_session.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_session.rb index cebba92e..eeee6de7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_session.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_session.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_signin_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_signin_request.rb index a72a544c..9abd1aff 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_signin_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_signin_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_signup_anonymous_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_signup_anonymous_request.rb index 0968f47e..9d168bda 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_signup_anonymous_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_signup_anonymous_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_signup_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_signup_request.rb index 037ad85f..de887c8e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_signup_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_signup_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_signup_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_signup_response.rb index c8674456..cdbbf3fd 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_signup_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_signup_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_token_response.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_token_response.rb index bb46fd4e..0d615975 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_token_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_token_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_update_user_request.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_update_user_request.rb index fbd4fb49..eee9b5c0 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_update_user_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_update_user_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/auth_user.rb b/lib/volcano/generated/lib/volcano-generated/models/auth_user.rb index f15d2ac6..869e12c1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/auth_user.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/auth_user.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/autofix_settings.rb b/lib/volcano/generated/lib/volcano-generated/models/autofix_settings.rb deleted file mode 100644 index 25c73711..00000000 --- a/lib/volcano/generated/lib/volcano-generated/models/autofix_settings.rb +++ /dev/null @@ -1,385 +0,0 @@ -=begin -#Volcano API - -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. - -The version of the OpenAPI document: 3.0.0 -Contact: support@volcano.dev -Generated by: https://openapi-generator.tech -Generator version: 7.17.0 - -=end - -require 'date' -require 'time' - -module Volcano::Generated - class AutofixSettings < ApiModelBase - attr_accessor :project_id - - # Whether Volcano diagnoses the project's issues with AI. - attr_accessor :enabled - - attr_accessor :max_stage - - # Whether a new or reopened issue starts a run on its own. When false, runs start only on request. - attr_accessor :auto_trigger - - attr_accessor :provider - - attr_accessor :model - - # Whether your own API key is stored. The key itself is never returned. - attr_accessor :api_key_configured - - # The provider the stored key belongs to, present when one is stored. - attr_accessor :api_key_provider - - # The stored key's last four characters, present when one is stored. - attr_accessor :api_key_last4 - - # Whether the owner's plan includes autofix. When false, saved settings stay stored and no run starts. Absent when a save that needed no plan succeeded but the plan could not be resolved. - attr_accessor :plan_includes_autofix - - # When the settings were last saved. Absent until the first save. - attr_accessor :updated_at - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'project_id' => :'project_id', - :'enabled' => :'enabled', - :'max_stage' => :'max_stage', - :'auto_trigger' => :'auto_trigger', - :'provider' => :'provider', - :'model' => :'model', - :'api_key_configured' => :'api_key_configured', - :'api_key_provider' => :'api_key_provider', - :'api_key_last4' => :'api_key_last4', - :'plan_includes_autofix' => :'plan_includes_autofix', - :'updated_at' => :'updated_at' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'project_id' => :'String', - :'enabled' => :'Boolean', - :'max_stage' => :'AutofixStage', - :'auto_trigger' => :'Boolean', - :'provider' => :'AutofixProvider', - :'model' => :'AutofixModel', - :'api_key_configured' => :'Boolean', - :'api_key_provider' => :'AutofixProvider', - :'api_key_last4' => :'String', - :'plan_includes_autofix' => :'Boolean', - :'updated_at' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::AutofixSettings` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!acceptable_attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::AutofixSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'project_id') - self.project_id = attributes[:'project_id'] - else - self.project_id = nil - end - - if attributes.key?(:'enabled') - self.enabled = attributes[:'enabled'] - else - self.enabled = nil - end - - if attributes.key?(:'max_stage') - self.max_stage = attributes[:'max_stage'] - else - self.max_stage = nil - end - - if attributes.key?(:'auto_trigger') - self.auto_trigger = attributes[:'auto_trigger'] - else - self.auto_trigger = nil - end - - if attributes.key?(:'provider') - self.provider = attributes[:'provider'] - else - self.provider = nil - end - - if attributes.key?(:'model') - self.model = attributes[:'model'] - else - self.model = nil - end - - if attributes.key?(:'api_key_configured') - self.api_key_configured = attributes[:'api_key_configured'] - else - self.api_key_configured = nil - end - - if attributes.key?(:'api_key_provider') - self.api_key_provider = attributes[:'api_key_provider'] - end - - if attributes.key?(:'api_key_last4') - self.api_key_last4 = attributes[:'api_key_last4'] - end - - if attributes.key?(:'plan_includes_autofix') - self.plan_includes_autofix = attributes[:'plan_includes_autofix'] - end - - if attributes.key?(:'updated_at') - self.updated_at = attributes[:'updated_at'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @project_id.nil? - invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') - end - - if @enabled.nil? - invalid_properties.push('invalid value for "enabled", enabled cannot be nil.') - end - - if @max_stage.nil? - invalid_properties.push('invalid value for "max_stage", max_stage cannot be nil.') - end - - if @auto_trigger.nil? - invalid_properties.push('invalid value for "auto_trigger", auto_trigger cannot be nil.') - end - - if @provider.nil? - invalid_properties.push('invalid value for "provider", provider cannot be nil.') - end - - if @model.nil? - invalid_properties.push('invalid value for "model", model cannot be nil.') - end - - if @api_key_configured.nil? - invalid_properties.push('invalid value for "api_key_configured", api_key_configured cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @project_id.nil? - return false if @enabled.nil? - return false if @max_stage.nil? - return false if @auto_trigger.nil? - return false if @provider.nil? - return false if @model.nil? - return false if @api_key_configured.nil? - true - end - - # Custom attribute writer method with validation - # @param [Object] project_id Value to be assigned - def project_id=(project_id) - if project_id.nil? - fail ArgumentError, 'project_id cannot be nil' - end - - @project_id = project_id - end - - # Custom attribute writer method with validation - # @param [Object] enabled Value to be assigned - def enabled=(enabled) - if enabled.nil? - fail ArgumentError, 'enabled cannot be nil' - end - - @enabled = enabled - end - - # Custom attribute writer method with validation - # @param [Object] max_stage Value to be assigned - def max_stage=(max_stage) - if max_stage.nil? - fail ArgumentError, 'max_stage cannot be nil' - end - - @max_stage = max_stage - end - - # Custom attribute writer method with validation - # @param [Object] auto_trigger Value to be assigned - def auto_trigger=(auto_trigger) - if auto_trigger.nil? - fail ArgumentError, 'auto_trigger cannot be nil' - end - - @auto_trigger = auto_trigger - end - - # Custom attribute writer method with validation - # @param [Object] provider Value to be assigned - def provider=(provider) - if provider.nil? - fail ArgumentError, 'provider cannot be nil' - end - - @provider = provider - end - - # Custom attribute writer method with validation - # @param [Object] model Value to be assigned - def model=(model) - if model.nil? - fail ArgumentError, 'model cannot be nil' - end - - @model = model - end - - # Custom attribute writer method with validation - # @param [Object] api_key_configured Value to be assigned - def api_key_configured=(api_key_configured) - if api_key_configured.nil? - fail ArgumentError, 'api_key_configured cannot be nil' - end - - @api_key_configured = api_key_configured - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - project_id == o.project_id && - enabled == o.enabled && - max_stage == o.max_stage && - auto_trigger == o.auto_trigger && - provider == o.provider && - model == o.model && - api_key_configured == o.api_key_configured && - api_key_provider == o.api_key_provider && - api_key_last4 == o.api_key_last4 && - plan_includes_autofix == o.plan_includes_autofix && - updated_at == o.updated_at - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [project_id, enabled, max_stage, auto_trigger, provider, model, api_key_configured, api_key_provider, api_key_last4, plan_includes_autofix, updated_at].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - end - -end diff --git a/lib/volcano/generated/lib/volcano-generated/models/ban_auth_user_request.rb b/lib/volcano/generated/lib/volcano-generated/models/ban_auth_user_request.rb index a26a5103..5e537254 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/ban_auth_user_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/ban_auth_user_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/ban_user_response.rb b/lib/volcano/generated/lib/volcano-generated/models/ban_user_response.rb index eac2313d..ae364a17 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/ban_user_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/ban_user_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/batch_function_deploy_failure.rb b/lib/volcano/generated/lib/volcano-generated/models/batch_function_deploy_failure.rb index 0436b213..ef1486cc 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/batch_function_deploy_failure.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/batch_function_deploy_failure.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/batch_function_deploy_response.rb b/lib/volcano/generated/lib/volcano-generated/models/batch_function_deploy_response.rb index 181fe443..b8cc705e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/batch_function_deploy_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/batch_function_deploy_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/byoc_project_config_frontend_custom_domain_tls_config.rb b/lib/volcano/generated/lib/volcano-generated/models/byoc_project_config_frontend_custom_domain_tls_config.rb index f9e57ac4..61530be1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/byoc_project_config_frontend_custom_domain_tls_config.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/byoc_project_config_frontend_custom_domain_tls_config.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/byoc_project_config_frontend_custom_domain_tls_config_not.rb b/lib/volcano/generated/lib/volcano-generated/models/byoc_project_config_frontend_custom_domain_tls_config_not.rb index 9197da26..a5cda0ba 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/byoc_project_config_frontend_custom_domain_tls_config_not.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/byoc_project_config_frontend_custom_domain_tls_config_not.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/call_mcp200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/call_mcp200_response.rb index 4f644fbd..7fcff484 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/call_mcp200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/call_mcp200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/call_mcp200_response_error.rb b/lib/volcano/generated/lib/volcano-generated/models/call_mcp200_response_error.rb index d755cdc7..5929476d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/call_mcp200_response_error.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/call_mcp200_response_error.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/call_mcp200_response_id.rb b/lib/volcano/generated/lib/volcano-generated/models/call_mcp200_response_id.rb index d9a09837..8c2be02b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/call_mcp200_response_id.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/call_mcp200_response_id.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/call_mcp_request.rb b/lib/volcano/generated/lib/volcano-generated/models/call_mcp_request.rb index 753b463b..a86dc226 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/call_mcp_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/call_mcp_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/call_mcp_request_id.rb b/lib/volcano/generated/lib/volcano-generated/models/call_mcp_request_id.rb index 04f00215..1cdcb063 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/call_mcp_request_id.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/call_mcp_request_id.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/call_o_auth_provider_api200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/call_o_auth_provider_api200_response.rb index 1ea862cf..6bc09f55 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/call_o_auth_provider_api200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/call_o_auth_provider_api200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/call_o_auth_provider_api_request.rb b/lib/volcano/generated/lib/volcano-generated/models/call_o_auth_provider_api_request.rb index 86536f04..22e7039e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/call_o_auth_provider_api_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/call_o_auth_provider_api_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/capability.rb b/lib/volcano/generated/lib/volcano-generated/models/capability.rb index b4f1f6eb..edef04c1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/capability.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/capability.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -16,11 +16,14 @@ module Volcano::Generated # A product capability and whether it accepts new work in this environment. class Capability < ApiModelBase - # Stable capability ID, such as `sandboxes`, `sandboxes.sessions`, `sandboxes.custom_templates`, `issues`, or `autofix`. New IDs may appear at any time. + # Stable capability ID, such as `sandboxes`, `sandboxes.sessions`, `sandboxes.custom_templates`, or `issues`. New IDs may appear at any time. attr_accessor :id attr_accessor :status + # Why an `unavailable` capability refuses new work, named like the error code its requests answer with, such as `plan_required`. Absent on any other status, and when requests answer `feature_unavailable`. Treat an unknown code as absent. + attr_accessor :code + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -47,7 +50,8 @@ def valid?(value) def self.attribute_map { :'id' => :'id', - :'status' => :'status' + :'status' => :'status', + :'code' => :'code' } end @@ -65,7 +69,8 @@ def self.acceptable_attributes def self.openapi_types { :'id' => :'String', - :'status' => :'CapabilityStatus' + :'status' => :'CapabilityStatus', + :'code' => :'String' } end @@ -102,6 +107,10 @@ def initialize(attributes = {}) else self.status = nil end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && - status == o.status + status == o.status && + code == o.code end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, status].hash + [id, status, code].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/capability_list.rb b/lib/volcano/generated/lib/volcano-generated/models/capability_list.rb index af4c6e52..74bbb49e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/capability_list.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/capability_list.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/capability_status.rb b/lib/volcano/generated/lib/volcano-generated/models/capability_status.rb index 8ac45fba..25828856 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/capability_status.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/capability_status.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -15,11 +15,12 @@ module Volcano::Generated class CapabilityStatus - AVAILABLE = "available".freeze - UNAVAILABLE = "unavailable".freeze + CapabilityStatusAvailable = "available".freeze + CapabilityStatusUnavailable = "unavailable".freeze + CapabilityStatusReadOnly = "read_only".freeze def self.all_vars - @all_vars ||= [AVAILABLE, UNAVAILABLE].freeze + @all_vars ||= [CapabilityStatusAvailable, CapabilityStatusUnavailable, CapabilityStatusReadOnly].freeze end # Builds the enum from string diff --git a/lib/volcano/generated/lib/volcano-generated/models/complete_upload_session_response.rb b/lib/volcano/generated/lib/volcano-generated/models/complete_upload_session_response.rb index e18d1589..9c00a9a7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/complete_upload_session_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/complete_upload_session_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/configure_auth_methods_request.rb b/lib/volcano/generated/lib/volcano-generated/models/configure_auth_methods_request.rb index e5092f2c..cf2bc50b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/configure_auth_methods_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/configure_auth_methods_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/configure_auth_methods_request_oauth_providers_inner.rb b/lib/volcano/generated/lib/volcano-generated/models/configure_auth_methods_request_oauth_providers_inner.rb index c9a3bd88..14e070c3 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/configure_auth_methods_request_oauth_providers_inner.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/configure_auth_methods_request_oauth_providers_inner.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/connect_project_git_request.rb b/lib/volcano/generated/lib/volcano-generated/models/connect_project_git_request.rb index 284f1ba9..b0146cfc 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/connect_project_git_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/connect_project_git_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -29,7 +29,7 @@ class ConnectProjectGitRequest < ApiModelBase # Monorepo subdirectory the project builds from. Omit for the repo root. attr_accessor :root_directory - # The branch a push must land on to deploy, with three cases, because this is a full replace and a read-modify-write client sends back whatever it read. Omit it to follow the repository's GitHub default branch, which also discards a branch set earlier. Send back the branch the project already deploys from, when that is the repository's default, and nothing changes either way — a project pinned to that branch stays pinned. Sending the default branch when the project deploys from something else returns it to following the default, including on a rebind, where a pin describes a branch chosen for the repository being left. Any other branch becomes the project's own choice, exempt from later default-branch renames. Validated as a Git branch name only: it does not have to exist yet, so a project can be pointed at a branch about to be pushed. Changing repository and naming a branch other than the new repository's default in one request is refused with 400, because the branch named is almost always the previous repository's, echoed back — connect first, then set the branch. + # The branch a push must land on to deploy, with three cases, because this is a full replace and a read-modify-write client sends back whatever it read. Omit it to follow the repository's GitHub default branch, which also discards a branch set earlier. Send back the branch the project already deploys from, when that is the repository's default, and nothing changes either way — a project pinned to that branch stays pinned. Sending the default branch when the project deploys from something else returns it to following the default, including on a rebind, where a pin describes a branch chosen for the repository being left. Any other branch becomes the project's own choice, exempt from later default-branch renames. Validated as a Git branch name only: it does not have to exist yet, so a project can be pointed at a branch about to be pushed. Changing repository and naming a branch other than the new repository's default in one request is refused with 400, because the branch named is almost always the previous repository's, echoed back — connect first, then set the branch. A repository that reports no default branch, as one with no commits can, is connected only by naming a branch, and any branch is accepted for it, including on a rebind. An empty repository that still reports a default follows the rule above. attr_accessor :production_branch # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/volcano/generated/lib/volcano-generated/models/connector.rb b/lib/volcano/generated/lib/volcano-generated/models/connector.rb new file mode 100644 index 00000000..4b262125 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/connector.rb @@ -0,0 +1,311 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A link from Volcano to an outside service. A `slack` connector is a Slack workspace the Volcano app is installed in, shared by every Volcano account with a Slack identity connected there. An `aikido` connector is an Aikido workspace one Volcano account connected with its own credentials. + class Connector < ApiModelBase + attr_accessor :id + + attr_accessor :type + + # The connector's name in its service, such as the Slack or Aikido workspace's name. + attr_accessor :name + + attr_accessor :slack + + attr_accessor :aikido + + # Whether the caller can remove the connector. Only the person who installed the Volcano app in a Slack workspace can; an `aikido` connector is always the caller's own. + attr_accessor :removable + + attr_accessor :created_at + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type', + :'name' => :'name', + :'slack' => :'slack', + :'aikido' => :'aikido', + :'removable' => :'removable', + :'created_at' => :'created_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'type' => :'ConnectorType', + :'name' => :'String', + :'slack' => :'SlackConnector', + :'aikido' => :'AikidoConnector', + :'removable' => :'Boolean', + :'created_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::Connector` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::Connector`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = nil + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'slack') + self.slack = attributes[:'slack'] + end + + if attributes.key?(:'aikido') + self.aikido = attributes[:'aikido'] + end + + if attributes.key?(:'removable') + self.removable = attributes[:'removable'] + else + self.removable = nil + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @removable.nil? + invalid_properties.push('invalid value for "removable", removable cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @type.nil? + return false if @name.nil? + return false if @removable.nil? + return false if @created_at.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] removable Value to be assigned + def removable=(removable) + if removable.nil? + fail ArgumentError, 'removable cannot be nil' + end + + @removable = removable + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + name == o.name && + slack == o.slack && + aikido == o.aikido && + removable == o.removable && + created_at == o.created_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, type, name, slack, aikido, removable, created_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/connector_create.rb b/lib/volcano/generated/lib/volcano-generated/models/connector_create.rb new file mode 100644 index 00000000..efdf1bb2 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/connector_create.rb @@ -0,0 +1,215 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ConnectorCreate < ApiModelBase + # The service to connect. Slack installs with `POST /user/slack/installations`. + attr_accessor :type + + attr_accessor :aikido + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'aikido' => :'aikido' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'aikido' => :'AikidoConnectorCreate' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ConnectorCreate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ConnectorCreate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = nil + end + + if attributes.key?(:'aikido') + self.aikido = attributes[:'aikido'] + else + self.aikido = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @aikido.nil? + invalid_properties.push('invalid value for "aikido", aikido cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @type.nil? + type_validator = EnumAttributeValidator.new('String', ["aikido"]) + return false unless type_validator.valid?(@type) + return false if @aikido.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["aikido"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] aikido Value to be assigned + def aikido=(aikido) + if aikido.nil? + fail ArgumentError, 'aikido cannot be nil' + end + + @aikido = aikido + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + aikido == o.aikido + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, aikido].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/autofix_model.rb b/lib/volcano/generated/lib/volcano-generated/models/connector_type.rb similarity index 51% rename from lib/volcano/generated/lib/volcano-generated/models/autofix_model.rb rename to lib/volcano/generated/lib/volcano-generated/models/connector_type.rb index 06ee973c..a2a0ddc8 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/autofix_model.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/connector_type.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -14,17 +14,12 @@ require 'time' module Volcano::Generated - class AutofixModel - AutofixModelClaudeFable51 = "claude-fable-5-1".freeze - AutofixModelClaudeOpus55 = "claude-opus-5-5".freeze - AutofixModelClaudeSonnet55 = "claude-sonnet-5-5".freeze - AutofixModelClaudeHaiku55 = "claude-haiku-5-5".freeze - AutofixModelClaudeOpus5 = "claude-opus-5".freeze - AutofixModelClaudeSonnet5 = "claude-sonnet-5".freeze - AutofixModelClaudeHaiku45 = "claude-haiku-4-5".freeze + class ConnectorType + SLACK = "slack".freeze + AIKIDO = "aikido".freeze def self.all_vars - @all_vars ||= [AutofixModelClaudeFable51, AutofixModelClaudeOpus55, AutofixModelClaudeSonnet55, AutofixModelClaudeHaiku55, AutofixModelClaudeOpus5, AutofixModelClaudeSonnet5, AutofixModelClaudeHaiku45].freeze + @all_vars ||= [SLACK, AIKIDO].freeze end # Builds the enum from string @@ -38,8 +33,8 @@ def self.build_from_hash(value) # @param [String] The enum value in the form of the string # @return [String] The enum value def build_from_hash(value) - return value if AutofixModel.all_vars.include?(value) - raise "Invalid ENUM value #{value} for class #AutofixModel" + return value if ConnectorType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #ConnectorType" end end end diff --git a/lib/volcano/generated/lib/volcano-generated/models/connectors_response.rb b/lib/volcano/generated/lib/volcano-generated/models/connectors_response.rb new file mode 100644 index 00000000..e2101db3 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/connectors_response.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ConnectorsResponse < ApiModelBase + attr_accessor :connectors + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'connectors' => :'connectors' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'connectors' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ConnectorsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ConnectorsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'connectors') + if (value = attributes[:'connectors']).is_a?(Array) + self.connectors = value + end + else + self.connectors = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @connectors.nil? + invalid_properties.push('invalid value for "connectors", connectors cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @connectors.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] connectors Value to be assigned + def connectors=(connectors) + if connectors.nil? + fail ArgumentError, 'connectors cannot be nil' + end + + @connectors = connectors + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + connectors == o.connectors + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [connectors].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_anon_key_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_anon_key_request.rb index a55a0928..198696a3 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_anon_key_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_anon_key_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_database_backup_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_database_backup_request.rb index 5b9334f3..f22f106c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_database_backup_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_database_backup_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -15,7 +15,7 @@ module Volcano::Generated class CreateDatabaseBackupRequest < ApiModelBase - # Backup name, unique within the database. Names beginning with `volcano-` are reserved for the platform's own snapshots. + # Backup name, unique within the database. Names beginning with `volcano-` are reserved for the platform's own snapshots, and names beginning with `before-migration-` for the backups migration runs take. attr_accessor :name # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_database_branch_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_database_branch_request.rb index a8b54e53..3ba4c81b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_database_branch_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_database_branch_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -15,7 +15,7 @@ module Volcano::Generated class CreateDatabaseBranchRequest < ApiModelBase - # Branch name (must be unique within the parent database) + # Branch name, unique within the parent database. Names beginning with `migration_rehearsal_` are reserved for the branches migration runs rehearse on. attr_accessor :name # How long the branch should live, between one hour and 30 days. Defaults to 7 days when omitted. diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_database_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_database_request.rb index c3f58e77..2a4dfaa0 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_database_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_database_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_database_restore_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_database_restore_request.rb index 42fb1986..9dbdc665 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_database_restore_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_database_restore_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_email_template_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_email_template_request.rb index c9a87782..89e89a96 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_email_template_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_email_template_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -18,7 +18,7 @@ class CreateEmailTemplateRequest < ApiModelBase # Type of email template attr_accessor :template_type - # Email subject line + # Subject template. After Go template whitespace trimming, literal interior carriage returns or newlines return 400. Outer whitespace and trailing block-scalar newlines are allowed. attr_accessor :subject # HTML template body. Available placeholders: - {{.Token}} - The confirmation/reset token - {{.ProjectName}} - The project name - {{.Email}} - User's email address diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_frontend_custom_domain_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_frontend_custom_domain_request.rb index dd14977b..81c9f14a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_frontend_custom_domain_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_frontend_custom_domain_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_frontend_deployment_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_frontend_deployment_request.rb new file mode 100644 index 00000000..ee54f80e --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/create_frontend_deployment_request.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Deploys the build of an existing deployment instead of compiling the frontend's source. + class CreateFrontendDeploymentRequest < ApiModelBase + # An `active` or `degraded` deployment of another frontend in the same project. Its build is copied to this frontend and published without compiling it again. + attr_accessor :source_deployment_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'source_deployment_id' => :'source_deployment_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'source_deployment_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::CreateFrontendDeploymentRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::CreateFrontendDeploymentRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'source_deployment_id') + self.source_deployment_id = attributes[:'source_deployment_id'] + else + self.source_deployment_id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @source_deployment_id.nil? + invalid_properties.push('invalid value for "source_deployment_id", source_deployment_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @source_deployment_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] source_deployment_id Value to be assigned + def source_deployment_id=(source_deployment_id) + if source_deployment_id.nil? + fail ArgumentError, 'source_deployment_id cannot be nil' + end + + @source_deployment_id = source_deployment_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + source_deployment_id == o.source_deployment_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [source_deployment_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_frontend_domain_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_frontend_domain_request.rb new file mode 100644 index 00000000..af7fef04 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/create_frontend_domain_request.rb @@ -0,0 +1,209 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class CreateFrontendDomainRequest < ApiModelBase + # Fully-qualified domain name (hostname only, no scheme/path). Managed TLS (`tls.mode: managed`) accepts at most 219 characters; BYOC accepts 253. + attr_accessor :domain + + attr_accessor :tls + + attr_accessor :redirect + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'domain' => :'domain', + :'tls' => :'tls', + :'redirect' => :'redirect' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'domain' => :'String', + :'tls' => :'FrontendCustomDomainTLSConfig', + :'redirect' => :'FrontendCustomDomainRedirectRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::CreateFrontendDomainRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::CreateFrontendDomainRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + else + self.domain = nil + end + + if attributes.key?(:'tls') + self.tls = attributes[:'tls'] + else + self.tls = nil + end + + if attributes.key?(:'redirect') + self.redirect = attributes[:'redirect'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @domain.nil? + invalid_properties.push('invalid value for "domain", domain cannot be nil.') + end + + if @domain.to_s.length > 253 + invalid_properties.push('invalid value for "domain", the character length must be smaller than or equal to 253.') + end + + if @tls.nil? + invalid_properties.push('invalid value for "tls", tls cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @domain.nil? + return false if @domain.to_s.length > 253 + return false if @tls.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] domain Value to be assigned + def domain=(domain) + if domain.nil? + fail ArgumentError, 'domain cannot be nil' + end + + if domain.to_s.length > 253 + fail ArgumentError, 'invalid value for "domain", the character length must be smaller than or equal to 253.' + end + + @domain = domain + end + + # Custom attribute writer method with validation + # @param [Object] tls Value to be assigned + def tls=(tls) + if tls.nil? + fail ArgumentError, 'tls cannot be nil' + end + + @tls = tls + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + domain == o.domain && + tls == o.tls && + redirect == o.redirect + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [domain, tls, redirect].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_frontend_function_route_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_frontend_function_route_request.rb index 594829ac..1686a66a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_frontend_function_route_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_frontend_function_route_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_frontend_route_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_frontend_route_request.rb new file mode 100644 index 00000000..e4932ad7 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/create_frontend_route_request.rb @@ -0,0 +1,220 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class CreateFrontendRouteRequest < ApiModelBase + # The Frontend to mount. It must be another Frontend in the Project. + attr_accessor :target_frontend_id + + attr_accessor :path_prefix + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'target_frontend_id' => :'target_frontend_id', + :'path_prefix' => :'path_prefix' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'target_frontend_id' => :'String', + :'path_prefix' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::CreateFrontendRouteRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::CreateFrontendRouteRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'target_frontend_id') + self.target_frontend_id = attributes[:'target_frontend_id'] + else + self.target_frontend_id = nil + end + + if attributes.key?(:'path_prefix') + self.path_prefix = attributes[:'path_prefix'] + else + self.path_prefix = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @target_frontend_id.nil? + invalid_properties.push('invalid value for "target_frontend_id", target_frontend_id cannot be nil.') + end + + if @path_prefix.nil? + invalid_properties.push('invalid value for "path_prefix", path_prefix cannot be nil.') + end + + if @path_prefix.to_s.length > 512 + invalid_properties.push('invalid value for "path_prefix", the character length must be smaller than or equal to 512.') + end + + if @path_prefix.to_s.length < 2 + invalid_properties.push('invalid value for "path_prefix", the character length must be greater than or equal to 2.') + end + + pattern = Regexp.new(/^\/[^?#\\]*[^\/?#\\]$/) + if @path_prefix !~ pattern + invalid_properties.push("invalid value for \"path_prefix\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @target_frontend_id.nil? + return false if @path_prefix.nil? + return false if @path_prefix.to_s.length > 512 + return false if @path_prefix.to_s.length < 2 + return false if @path_prefix !~ Regexp.new(/^\/[^?#\\]*[^\/?#\\]$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] target_frontend_id Value to be assigned + def target_frontend_id=(target_frontend_id) + if target_frontend_id.nil? + fail ArgumentError, 'target_frontend_id cannot be nil' + end + + @target_frontend_id = target_frontend_id + end + + # Custom attribute writer method with validation + # @param [Object] path_prefix Value to be assigned + def path_prefix=(path_prefix) + if path_prefix.nil? + fail ArgumentError, 'path_prefix cannot be nil' + end + + if path_prefix.to_s.length > 512 + fail ArgumentError, 'invalid value for "path_prefix", the character length must be smaller than or equal to 512.' + end + + if path_prefix.to_s.length < 2 + fail ArgumentError, 'invalid value for "path_prefix", the character length must be greater than or equal to 2.' + end + + pattern = Regexp.new(/^\/[^?#\\]*[^\/?#\\]$/) + if path_prefix !~ pattern + fail ArgumentError, "invalid value for \"path_prefix\", must conform to the pattern #{pattern}." + end + + @path_prefix = path_prefix + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + target_frontend_id == o.target_frontend_id && + path_prefix == o.path_prefix + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [target_frontend_id, path_prefix].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_function_scheduler_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_function_scheduler_request.rb index 67e1f799..1b3c1a02 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_function_scheduler_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_function_scheduler_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_issue_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_issue_request.rb new file mode 100644 index 00000000..fa75125f --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/create_issue_request.rb @@ -0,0 +1,249 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The project, and an issue a person writes on it, describing what to fix. + class CreateIssueRequest < ApiModelBase + # The project to write the issue on. + attr_accessor :project_id + + # What to fix, in your words, up to 4,000 characters. It can span lines. Leading and trailing whitespace is trimmed, and a description of only whitespace is refused. + attr_accessor :description + + # A title, on one line, up to 200 characters; whitespace, line breaks included, collapses to single spaces. Omitted, the title is the description's first line, cut to 80 characters with an ellipsis. + attr_accessor :title + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'project_id' => :'project_id', + :'description' => :'description', + :'title' => :'title' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'project_id' => :'String', + :'description' => :'String', + :'title' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::CreateIssueRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::CreateIssueRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + else + self.description = nil + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @description.to_s.length > 4000 + invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 4000.') + end + + if @description.to_s.length < 1 + invalid_properties.push('invalid value for "description", the character length must be greater than or equal to 1.') + end + + if !@title.nil? && @title.to_s.length > 200 + invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 200.') + end + + if !@title.nil? && @title.to_s.length < 1 + invalid_properties.push('invalid value for "title", the character length must be greater than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + return false if @description.nil? + return false if @description.to_s.length > 4000 + return false if @description.to_s.length < 1 + return false if !@title.nil? && @title.to_s.length > 200 + return false if !@title.nil? && @title.to_s.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] description Value to be assigned + def description=(description) + if description.nil? + fail ArgumentError, 'description cannot be nil' + end + + if description.to_s.length > 4000 + fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 4000.' + end + + if description.to_s.length < 1 + fail ArgumentError, 'invalid value for "description", the character length must be greater than or equal to 1.' + end + + @description = description + end + + # Custom attribute writer method with validation + # @param [Object] title Value to be assigned + def title=(title) + if title.nil? + fail ArgumentError, 'title cannot be nil' + end + + if title.to_s.length > 200 + fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 200.' + end + + if title.to_s.length < 1 + fail ArgumentError, 'invalid value for "title", the character length must be greater than or equal to 1.' + end + + @title = title + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + project_id == o.project_id && + description == o.description && + title == o.title + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [project_id, description, title].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_o_auth_config_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_o_auth_config_request.rb index a9c20566..4fb72d0c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_o_auth_config_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_o_auth_config_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_project_access_token_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_project_access_token_request.rb index 80375508..7b56286e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_project_access_token_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_project_access_token_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_project_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_project_request.rb index 2e1c0edf..cf3225e4 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_project_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_project_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -16,15 +16,12 @@ module Volcano::Generated # Request to create a new project class CreateProjectRequest < ApiModelBase - # Project name (must be unique). Can only contain letters, numbers, underscores, and hyphens. + # Project name. A name you already use is not refused: the project is created with a short random suffix added to it. Can only contain letters, numbers, underscores, and hyphens. attr_accessor :name - # Optional trusted starter template identifier. The server resolves immutable source and database initialization artifacts. Callers cannot supply artifact locations or database credentials. Creation accepts an asynchronous installation; poll the individual project until template_installation.status is ready before using the app. Use pixel-board, trellini, or collab-pad for the configured starter bundles. The official-starter legacy identifier has environment-specific availability. Cannot be combined with initialPrompt. + # Optional trusted starter template identifier. The server resolves immutable source and database initialization artifacts. Callers cannot supply artifact locations or database credentials. Creation accepts an asynchronous installation; poll the individual project until template_installation.status is ready before using the app. Use pixel-board, trellini, or collab-pad for the configured starter bundles. The official-starter legacy identifier has environment-specific availability. attr_accessor :template_id - # Optional initial builder prompt. Cannot be combined with template_id. - attr_accessor :initial_prompt - # Optional region policy. - `true` (default): project functions deploy to all configured regions - `false`: project deploys only to `selected_regions` attr_accessor :all_regions @@ -58,7 +55,6 @@ def self.attribute_map { :'name' => :'name', :'template_id' => :'template_id', - :'initial_prompt' => :'initialPrompt', :'all_regions' => :'all_regions', :'selected_regions' => :'selected_regions' } @@ -79,7 +75,6 @@ def self.openapi_types { :'name' => :'String', :'template_id' => :'String', - :'initial_prompt' => :'String', :'all_regions' => :'Boolean', :'selected_regions' => :'Array' } @@ -117,10 +112,6 @@ def initialize(attributes = {}) self.template_id = attributes[:'template_id'] end - if attributes.key?(:'initial_prompt') - self.initial_prompt = attributes[:'initial_prompt'] - end - if attributes.key?(:'all_regions') self.all_regions = attributes[:'all_regions'] else @@ -212,7 +203,6 @@ def ==(o) self.class == o.class && name == o.name && template_id == o.template_id && - initial_prompt == o.initial_prompt && all_regions == o.all_regions && selected_regions == o.selected_regions end @@ -226,7 +216,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, template_id, initial_prompt, all_regions, selected_regions].hash + [name, template_id, all_regions, selected_regions].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_session_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_session_request.rb index 036861d8..4fc6dcd6 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_session_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_session_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -23,12 +23,18 @@ class CreateSandboxSessionRequest < ApiModelBase # Baseline memory in MiB. Cloud HOBBY supports 1024; SUPERAGENT supports 1024 or 2048. Omission uses the preset or template default; a template requiring more than the plan permits is rejected. Local sessions are exempt from cloud plan limits. attr_accessor :memory_mb - # Region such as `us-east-1`. Region IDs issued by earlier versions of the API are still accepted. + # Region such as `us-east-1`, from the preset catalog. Region IDs issued by earlier versions of the API are still accepted. A temporarily unavailable region answers 400 with code `sandbox_region_unavailable`. attr_accessor :region # Inherits the template TTL when omitted (cloud default 3600 seconds; local default 0, unlimited). Cloud HOBBY accepts 30–3600 seconds; SUPERAGENT accepts 30–28800 seconds. Inherited template defaults are clamped to the plan limit; explicit values above it are rejected. Local accepts 0 for unlimited or a positive lifetime. attr_accessor :max_duration_seconds + attr_accessor :network + + attr_accessor :executions + + attr_accessor :limits + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -36,7 +42,10 @@ def self.attribute_map :'sandbox_id' => :'sandbox_id', :'memory_mb' => :'memory_mb', :'region' => :'region', - :'max_duration_seconds' => :'max_duration_seconds' + :'max_duration_seconds' => :'max_duration_seconds', + :'network' => :'network', + :'executions' => :'executions', + :'limits' => :'limits' } end @@ -57,7 +66,10 @@ def self.openapi_types :'sandbox_id' => :'String', :'memory_mb' => :'Integer', :'region' => :'String', - :'max_duration_seconds' => :'Integer' + :'max_duration_seconds' => :'Integer', + :'network' => :'SandboxSessionNetworkRequest', + :'executions' => :'SandboxSessionExecutions', + :'limits' => :'SandboxSessionLimits' } end @@ -104,6 +116,18 @@ def initialize(attributes = {}) if attributes.key?(:'max_duration_seconds') self.max_duration_seconds = attributes[:'max_duration_seconds'] end + + if attributes.key?(:'network') + self.network = attributes[:'network'] + end + + if attributes.key?(:'executions') + self.executions = attributes[:'executions'] + end + + if attributes.key?(:'limits') + self.limits = attributes[:'limits'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -196,7 +220,10 @@ def ==(o) sandbox_id == o.sandbox_id && memory_mb == o.memory_mb && region == o.region && - max_duration_seconds == o.max_duration_seconds + max_duration_seconds == o.max_duration_seconds && + network == o.network && + executions == o.executions && + limits == o.limits end # @see the `==` method @@ -208,7 +235,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [preset, sandbox_id, memory_mb, region, max_duration_seconds].hash + [preset, sandbox_id, memory_mb, region, max_duration_seconds, network, executions, limits].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_template_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_template_request.rb index 3cfd5621..8f5d6c28 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_template_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_template_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_service_key_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_service_key_request.rb index 5d832d62..a7b8d217 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_service_key_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_service_key_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -18,7 +18,7 @@ class CreateServiceKeyRequest < ApiModelBase # Descriptive name for the key (e.g., \"admin-dashboard\", \"background-jobs\"). Can only contain letters, numbers, underscores, and hyphens. attr_accessor :name - # Optional least-privilege scope for the key. When omitted, empty, or containing only blank strings, the key is granted full access ([\"*\"]) for backward compatibility. Provide an explicit list (e.g. [\"functions.invoke\", \"locks.manage\"]) to restrict the key; \"*\" grants everything. Scope enforcement applies to function invocation, storage object operations, and project locks. + # Optional least-privilege scope for the key. When omitted, empty, or containing only blank strings, the key is granted full access ([\"*\"]) for backward compatibility. Provide an explicit list (e.g. [\"functions.invoke\", \"locks.manage\"]) to restrict the key; \"*\" grants everything. Scope enforcement applies to function invocation, storage object operations, project locks, sandboxes, and server-side auth proxy metadata (auth.signin, auth.signup, auth.refresh, auth.logout, auth.password_reset). A key scoped to a list without \"*\" reads, stops, and messages a durable execution only with the `client_token` its start returned. Today the scope doesn't restrict the database API, and restricts realtime only on a durable run's channel: every service key queries every table with RLS bypassed, subscribes to every other channel, and publishes on broadcast channels. Once Volcano applies scopes to the database API and realtime, a key without \"*\" gets 403 from the database API, needs realtime.subscribe for broadcast and presence channels and realtime.publish to publish, and needs \"*\" for table changes. `ai.invoke` and `grants.mint` are reserved: \"*\" doesn't include them, only a person may ask for one, and it must be the key's only permission. attr_accessor :permissions # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_storage_bucket_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_storage_bucket_request.rb index eb1092f7..7180a5c9 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_storage_bucket_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_storage_bucket_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_storage_policy_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_storage_policy_request.rb index 9371d3f7..981236fa 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_storage_policy_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_storage_policy_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_upload_session_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_upload_session_request.rb index 731ceb5a..707d1d82 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_upload_session_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_upload_session_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_upload_session_response.rb b/lib/volcano/generated/lib/volcano-generated/models/create_upload_session_response.rb index 869a0cf5..bbf5f8c4 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_upload_session_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_upload_session_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_variable_environment_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_variable_environment_request.rb index 055a5985..cdb541f5 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_variable_environment_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_variable_environment_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/create_variable_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_variable_request.rb index 9a6ba95a..906b15ae 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/create_variable_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/create_variable_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/created_project_access_token.rb b/lib/volcano/generated/lib/volcano-generated/models/created_project_access_token.rb index bfad81fd..d62d85cd 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/created_project_access_token.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/created_project_access_token.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -104,7 +104,7 @@ def self.openapi_types :'project_id' => :'String', :'name' => :'String', :'token_prefix' => :'String', - :'scope' => :'ProjectAccessTokenScope', + :'scope' => :'ProjectAccessTokenListedScope', :'status' => :'String', :'token_source' => :'String', :'expires_at' => :'Time', diff --git a/lib/volcano/generated/lib/volcano-generated/models/database.rb b/lib/volcano/generated/lib/volcano-generated/models/database.rb index fc53a636..38e03de1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_backup.rb b/lib/volcano/generated/lib/volcano-generated/models/database_backup.rb index 8054cf93..a2a65d3c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_backup.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_backup.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -19,7 +19,7 @@ class DatabaseBackup < ApiModelBase # Backup name, unique within the database. Backups you create are named by you; scheduled backups are named by the storage provider. attr_accessor :name - # Whether the backup was requested explicitly or produced by the backup schedule. Only `manual` backups count against the plan's backup allowance. + # Whether the backup was requested explicitly, produced by the backup schedule, or taken before migrations were applied to the database. Only `manual` backups count against the plan's backup allowance. attr_accessor :source # Storage the backup occupies. Absent until the provider has costed it, which takes a few minutes after the backup is taken; absent is not the same as empty. @@ -164,7 +164,7 @@ def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @name.nil? return false if @source.nil? - source_validator = EnumAttributeValidator.new('String', ["manual", "scheduled"]) + source_validator = EnumAttributeValidator.new('String', ["manual", "scheduled", "migration"]) return false unless source_validator.valid?(@source) return false if !@size_bytes.nil? && @size_bytes < 0 return false if @created_at.nil? @@ -184,7 +184,7 @@ def name=(name) # Custom attribute writer method checking allowed values (enum). # @param [Object] source Object to be assigned def source=(source) - validator = EnumAttributeValidator.new('String', ["manual", "scheduled"]) + validator = EnumAttributeValidator.new('String', ["manual", "scheduled", "migration"]) unless validator.valid?(source) fail ArgumentError, "invalid value for \"source\", must be one of #{validator.allowable_values}." end diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_backup_list.rb b/lib/volcano/generated/lib/volcano-generated/models/database_backup_list.rb index 81d87978..3e15ef9a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_backup_list.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_backup_list.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_backup_schedule.rb b/lib/volcano/generated/lib/volcano-generated/models/database_backup_schedule.rb index f45c6a87..404084c8 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_backup_schedule.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_backup_schedule.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_backup_schedule_entry.rb b/lib/volcano/generated/lib/volcano-generated/models/database_backup_schedule_entry.rb index 6ebee335..24704953 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_backup_schedule_entry.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_backup_schedule_entry.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_branch.rb b/lib/volcano/generated/lib/volcano-generated/models/database_branch.rb index ac87977c..007f5cbe 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_branch.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_branch.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_branch_list.rb b/lib/volcano/generated/lib/volcano-generated/models/database_branch_list.rb index 4609e44e..5a58d50e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_branch_list.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_branch_list.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_branch_storage.rb b/lib/volcano/generated/lib/volcano-generated/models/database_branch_storage.rb index 08717a8e..03e2556b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_branch_storage.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_branch_storage.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_delete_request.rb b/lib/volcano/generated/lib/volcano-generated/models/database_delete_request.rb index 7493caa5..8701de72 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_delete_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_delete_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_insert_request.rb b/lib/volcano/generated/lib/volcano-generated/models/database_insert_request.rb index dac29d56..b938ef18 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_insert_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_insert_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_migration_baseline.rb b/lib/volcano/generated/lib/volcano-generated/models/database_migration_baseline.rb new file mode 100644 index 00000000..eebe0986 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/database_migration_baseline.rb @@ -0,0 +1,167 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class DatabaseMigrationBaseline < ApiModelBase + # The files this request recorded, in name order. Empty when the history already recorded every file. + attr_accessor :recorded + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'recorded' => :'recorded' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'recorded' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DatabaseMigrationBaseline` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DatabaseMigrationBaseline`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'recorded') + if (value = attributes[:'recorded']).is_a?(Array) + self.recorded = value + end + else + self.recorded = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @recorded.nil? + invalid_properties.push('invalid value for "recorded", recorded cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @recorded.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] recorded Value to be assigned + def recorded=(recorded) + if recorded.nil? + fail ArgumentError, 'recorded cannot be nil' + end + + @recorded = recorded + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + recorded == o.recorded + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [recorded].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_migration_conflict_error.rb b/lib/volcano/generated/lib/volcano-generated/models/database_migration_conflict_error.rb new file mode 100644 index 00000000..788d5afc --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/database_migration_conflict_error.rb @@ -0,0 +1,191 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A migration request refused by the database's state. With code `migration_run_in_progress`, `run_id` names the run that is queued or running. + class DatabaseMigrationConflictError < ApiModelBase + attr_accessor :error + + # Stable machine-readable error code when a specific recovery path is available. `plan_required` (403) means the project owner's plan does not include the requested feature or option; upgrading the plan unlocks it. `person_required` (403) means a project access token tried to change LavaFlow settings, which only the project's owner changes, with a platform token, or that the change needs the owner's own credential that expires, a project repository, and an owner whose GitHub account can push to it; `error` says which. A 403 without a code leaves the reason unspecified: it can be an access refusal, a reached limit, or a plan check that could not read the owner's plan. Match on the code, not the message text. + attr_accessor :code + + attr_accessor :run_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'error' => :'error', + :'code' => :'code', + :'run_id' => :'run_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'error' => :'String', + :'code' => :'String', + :'run_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'Error' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DatabaseMigrationConflictError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DatabaseMigrationConflictError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'error') + self.error = attributes[:'error'] + else + self.error = nil + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'run_id') + self.run_id = attributes[:'run_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @error.nil? + invalid_properties.push('invalid value for "error", error cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @error.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] error Value to be assigned + def error=(error) + if error.nil? + fail ArgumentError, 'error cannot be nil' + end + + @error = error + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error == o.error && + code == o.code && + run_id == o.run_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [error, code, run_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_migration_file.rb b/lib/volcano/generated/lib/volcano-generated/models/database_migration_file.rb new file mode 100644 index 00000000..c6ec92c4 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/database_migration_file.rb @@ -0,0 +1,231 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # One migration file and its SQL. + class DatabaseMigrationFile < ApiModelBase + # The file's path under `volcano/migrations/`: a file name such as `001_create_users.sql`, or `/001_create_users.sql` in a project with more than one database, where `` must be this database. Every file in a request takes the same form. Files run in byte order of their file name, which the history records. + attr_accessor :name + + # The file's SQL, at most 1 MiB. A file may hold several statements and runs in one transaction. A file cannot commit, roll back, use savepoints, or `COPY` from the client; such a file fails with `migration_failed`. A statement that cannot run in a transaction, such as `CREATE INDEX CONCURRENTLY`, goes alone in a file whose first line is `-- volcano:no-transaction`. That file runs outside a transaction and runs again from its start when a run retries it. A run refuses with `invalid_file`, before anything runs, a file with the marker on any other line, and a marked file that builds an unnamed index with `CREATE INDEX CONCURRENTLY` or starts with `COPY`. + attr_accessor :sql + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'sql' => :'sql' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'sql' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DatabaseMigrationFile` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DatabaseMigrationFile`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'sql') + self.sql = attributes[:'sql'] + else + self.sql = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @name.to_s.length > 320 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 320.') + end + + if @name.to_s.length < 5 + invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 5.') + end + + pattern = Regexp.new(/^([a-z0-9_]+\/)?[^\/\\]+\.sql$/) + if @name !~ pattern + invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.") + end + + if @sql.nil? + invalid_properties.push('invalid value for "sql", sql cannot be nil.') + end + + if @sql.to_s.length > 1048576 + invalid_properties.push('invalid value for "sql", the character length must be smaller than or equal to 1048576.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @name.nil? + return false if @name.to_s.length > 320 + return false if @name.to_s.length < 5 + return false if @name !~ Regexp.new(/^([a-z0-9_]+\/)?[^\/\\]+\.sql$/) + return false if @sql.nil? + return false if @sql.to_s.length > 1048576 + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + if name.to_s.length > 320 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 320.' + end + + if name.to_s.length < 5 + fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 5.' + end + + pattern = Regexp.new(/^([a-z0-9_]+\/)?[^\/\\]+\.sql$/) + if name !~ pattern + fail ArgumentError, "invalid value for \"name\", must conform to the pattern #{pattern}." + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] sql Value to be assigned + def sql=(sql) + if sql.nil? + fail ArgumentError, 'sql cannot be nil' + end + + if sql.to_s.length > 1048576 + fail ArgumentError, 'invalid value for "sql", the character length must be smaller than or equal to 1048576.' + end + + @sql = sql + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + sql == o.sql + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, sql].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_migration_file_error.rb b/lib/volcano/generated/lib/volcano-generated/models/database_migration_file_error.rb new file mode 100644 index 00000000..7210831d --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/database_migration_file_error.rb @@ -0,0 +1,205 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The database's error for a `failed` file, or for an `unknown` file that runs outside a transaction, when a later attempt failed it after an earlier one may have run it. `message` is the database's own message and can quote values from the file or the data. + class DatabaseMigrationFileError < ApiModelBase + # At most 8 KiB (8,192 bytes). A longer message is cut and ends with ` … [truncated]`. Volcano reads each reply the database sends about the file up to 4 MiB, which leaves room for a reply that quotes the whole file twice. A larger reply is not read: the file fails, and this message says so instead. + attr_accessor :message + + # The Postgres error code, when the database reported one. + attr_accessor :sqlstate + + # The line of the file the database reported, when known. + attr_accessor :line + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'message' => :'message', + :'sqlstate' => :'sqlstate', + :'line' => :'line' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'message' => :'String', + :'sqlstate' => :'String', + :'line' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DatabaseMigrationFileError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DatabaseMigrationFileError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'message') + self.message = attributes[:'message'] + else + self.message = nil + end + + if attributes.key?(:'sqlstate') + self.sqlstate = attributes[:'sqlstate'] + end + + if attributes.key?(:'line') + self.line = attributes[:'line'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + if !@line.nil? && @line < 1 + invalid_properties.push('invalid value for "line", must be greater than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @message.nil? + return false if !@line.nil? && @line < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] message Value to be assigned + def message=(message) + if message.nil? + fail ArgumentError, 'message cannot be nil' + end + + @message = message + end + + # Custom attribute writer method with validation + # @param [Object] line Value to be assigned + def line=(line) + if line.nil? + fail ArgumentError, 'line cannot be nil' + end + + if line < 1 + fail ArgumentError, 'invalid value for "line", must be greater than or equal to 1.' + end + + @line = line + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + message == o.message && + sqlstate == o.sqlstate && + line == o.line + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [message, sqlstate, line].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_migration_files_request.rb b/lib/volcano/generated/lib/volcano-generated/models/database_migration_files_request.rb new file mode 100644 index 00000000..ef843656 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/database_migration_files_request.rb @@ -0,0 +1,184 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class DatabaseMigrationFilesRequest < ApiModelBase + attr_accessor :files + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'files' => :'files' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'files' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DatabaseMigrationFilesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DatabaseMigrationFilesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'files') + if (value = attributes[:'files']).is_a?(Array) + self.files = value + end + else + self.files = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @files.nil? + invalid_properties.push('invalid value for "files", files cannot be nil.') + end + + if @files.length > 1000 + invalid_properties.push('invalid value for "files", number of items must be less than or equal to 1000.') + end + + if @files.length < 1 + invalid_properties.push('invalid value for "files", number of items must be greater than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @files.nil? + return false if @files.length > 1000 + return false if @files.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] files Value to be assigned + def files=(files) + if files.nil? + fail ArgumentError, 'files cannot be nil' + end + + if files.length > 1000 + fail ArgumentError, 'invalid value for "files", number of items must be less than or equal to 1000.' + end + + if files.length < 1 + fail ArgumentError, 'invalid value for "files", number of items must be greater than or equal to 1.' + end + + @files = files + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + files == o.files + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [files].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_migration_history_entry.rb b/lib/volcano/generated/lib/volcano-generated/models/database_migration_history_entry.rb new file mode 100644 index 00000000..3ab4e85d --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/database_migration_history_entry.rb @@ -0,0 +1,279 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # One file the database's migration history records. + class DatabaseMigrationHistoryEntry < ApiModelBase + attr_accessor :name + + # `sha256:` and the hex digest of the file as recorded, with a leading byte order mark removed and CRLF line endings converted to LF. + attr_accessor :checksum + + # `applied`: a run ran the file and it committed. `baselined`: the file was recorded as applied without running. + attr_accessor :status + + attr_accessor :applied_at + + # The run that recorded the file. Absent for a baseline. + attr_accessor :run_id + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'checksum' => :'checksum', + :'status' => :'status', + :'applied_at' => :'applied_at', + :'run_id' => :'run_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'checksum' => :'String', + :'status' => :'String', + :'applied_at' => :'Time', + :'run_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DatabaseMigrationHistoryEntry` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DatabaseMigrationHistoryEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'checksum') + self.checksum = attributes[:'checksum'] + else + self.checksum = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'applied_at') + self.applied_at = attributes[:'applied_at'] + else + self.applied_at = nil + end + + if attributes.key?(:'run_id') + self.run_id = attributes[:'run_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @checksum.nil? + invalid_properties.push('invalid value for "checksum", checksum cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @applied_at.nil? + invalid_properties.push('invalid value for "applied_at", applied_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @name.nil? + return false if @checksum.nil? + return false if @status.nil? + status_validator = EnumAttributeValidator.new('String', ["applied", "baselined"]) + return false unless status_validator.valid?(@status) + return false if @applied_at.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] checksum Value to be assigned + def checksum=(checksum) + if checksum.nil? + fail ArgumentError, 'checksum cannot be nil' + end + + @checksum = checksum + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["applied", "baselined"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] applied_at Value to be assigned + def applied_at=(applied_at) + if applied_at.nil? + fail ArgumentError, 'applied_at cannot be nil' + end + + @applied_at = applied_at + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + checksum == o.checksum && + status == o.status && + applied_at == o.applied_at && + run_id == o.run_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, checksum, status, applied_at, run_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_migration_run.rb b/lib/volcano/generated/lib/volcano-generated/models/database_migration_run.rb new file mode 100644 index 00000000..708d83ae --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/database_migration_run.rb @@ -0,0 +1,450 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # One application of migration files to a database. A run plans the files against the database's history, rehearses the pending ones on a short-lived branch, takes a backup, and applies them. + class DatabaseMigrationRun < ApiModelBase + attr_accessor :id + + attr_accessor :database + + # `queued` and `running` mean the run has not ended; a run waiting to retry stays `running`. `succeeded`: every pending file was applied, or none was pending. `failed`: `error` says why. + attr_accessor :status + + # The step the run is on, or the one it ended on. `plan` compares the files with the history. `rehearse` applies the pending files to a short-lived branch of the database, which is deleted afterwards. `backup` takes the backup named by `backup_name`. `apply` applies the files to the database. + attr_accessor :phase + + # What started the run. + attr_accessor :source + + # The commit whose files the run applies. Present for `git_deploy` runs. + attr_accessor :commit_sha + + # The backup the run takes before it applies the files, named once the run starts taking it. It is listed with the database's backups with `source: migration`. A run that ended in its `backup` phase may name a backup that was never created. + attr_accessor :backup_name + + # The run's files, in the order they run, with what became of each. Absent when listing runs. + attr_accessor :files + + # A run keeps at most 100 warnings, keeping those about the run, such as a skipped backup, ahead of those about files. A run that raised more ends the list with a `warnings_truncated` warning. + attr_accessor :warnings + + attr_accessor :error + + # When a worker first picked the run up. + attr_accessor :started_at + + attr_accessor :completed_at + + attr_accessor :created_at + + attr_accessor :updated_at + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'database' => :'database', + :'status' => :'status', + :'phase' => :'phase', + :'source' => :'source', + :'commit_sha' => :'commit_sha', + :'backup_name' => :'backup_name', + :'files' => :'files', + :'warnings' => :'warnings', + :'error' => :'error', + :'started_at' => :'started_at', + :'completed_at' => :'completed_at', + :'created_at' => :'created_at', + :'updated_at' => :'updated_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'database' => :'ResourceReference', + :'status' => :'String', + :'phase' => :'String', + :'source' => :'String', + :'commit_sha' => :'String', + :'backup_name' => :'String', + :'files' => :'Array', + :'warnings' => :'Array', + :'error' => :'DatabaseMigrationRunError', + :'started_at' => :'Time', + :'completed_at' => :'Time', + :'created_at' => :'Time', + :'updated_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DatabaseMigrationRun` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DatabaseMigrationRun`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'database') + self.database = attributes[:'database'] + else + self.database = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'phase') + self.phase = attributes[:'phase'] + else + self.phase = nil + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + else + self.source = nil + end + + if attributes.key?(:'commit_sha') + self.commit_sha = attributes[:'commit_sha'] + end + + if attributes.key?(:'backup_name') + self.backup_name = attributes[:'backup_name'] + end + + if attributes.key?(:'files') + if (value = attributes[:'files']).is_a?(Array) + self.files = value + end + end + + if attributes.key?(:'warnings') + if (value = attributes[:'warnings']).is_a?(Array) + self.warnings = value + end + else + self.warnings = nil + end + + if attributes.key?(:'error') + self.error = attributes[:'error'] + end + + if attributes.key?(:'started_at') + self.started_at = attributes[:'started_at'] + end + + if attributes.key?(:'completed_at') + self.completed_at = attributes[:'completed_at'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + else + self.updated_at = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @database.nil? + invalid_properties.push('invalid value for "database", database cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @phase.nil? + invalid_properties.push('invalid value for "phase", phase cannot be nil.') + end + + if @source.nil? + invalid_properties.push('invalid value for "source", source cannot be nil.') + end + + if @warnings.nil? + invalid_properties.push('invalid value for "warnings", warnings cannot be nil.') + end + + if @warnings.length > 101 + invalid_properties.push('invalid value for "warnings", number of items must be less than or equal to 101.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @database.nil? + return false if @status.nil? + status_validator = EnumAttributeValidator.new('String', ["queued", "running", "succeeded", "failed"]) + return false unless status_validator.valid?(@status) + return false if @phase.nil? + phase_validator = EnumAttributeValidator.new('String', ["plan", "rehearse", "backup", "apply"]) + return false unless phase_validator.valid?(@phase) + return false if @source.nil? + source_validator = EnumAttributeValidator.new('String', ["git_deploy", "api"]) + return false unless source_validator.valid?(@source) + return false if @warnings.nil? + return false if @warnings.length > 101 + return false if @created_at.nil? + return false if @updated_at.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] database Value to be assigned + def database=(database) + if database.nil? + fail ArgumentError, 'database cannot be nil' + end + + @database = database + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["queued", "running", "succeeded", "failed"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] phase Object to be assigned + def phase=(phase) + validator = EnumAttributeValidator.new('String', ["plan", "rehearse", "backup", "apply"]) + unless validator.valid?(phase) + fail ArgumentError, "invalid value for \"phase\", must be one of #{validator.allowable_values}." + end + @phase = phase + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] source Object to be assigned + def source=(source) + validator = EnumAttributeValidator.new('String', ["git_deploy", "api"]) + unless validator.valid?(source) + fail ArgumentError, "invalid value for \"source\", must be one of #{validator.allowable_values}." + end + @source = source + end + + # Custom attribute writer method with validation + # @param [Object] warnings Value to be assigned + def warnings=(warnings) + if warnings.nil? + fail ArgumentError, 'warnings cannot be nil' + end + + if warnings.length > 101 + fail ArgumentError, 'invalid value for "warnings", number of items must be less than or equal to 101.' + end + + @warnings = warnings + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param [Object] updated_at Value to be assigned + def updated_at=(updated_at) + if updated_at.nil? + fail ArgumentError, 'updated_at cannot be nil' + end + + @updated_at = updated_at + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + database == o.database && + status == o.status && + phase == o.phase && + source == o.source && + commit_sha == o.commit_sha && + backup_name == o.backup_name && + files == o.files && + warnings == o.warnings && + error == o.error && + started_at == o.started_at && + completed_at == o.completed_at && + created_at == o.created_at && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, database, status, phase, source, commit_sha, backup_name, files, warnings, error, started_at, completed_at, created_at, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_migration_run_error.rb b/lib/volcano/generated/lib/volcano-generated/models/database_migration_run_error.rb new file mode 100644 index 00000000..ea9e8d92 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/database_migration_run_error.rb @@ -0,0 +1,217 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Why the run failed, or why its last attempt did. + class DatabaseMigrationRunError < ApiModelBase + # Stable machine-readable reason. `migration_failed`: a file's SQL, or its `COMMIT`, failed; `phase` says whether in the rehearsal, leaving the database untouched, or in the database, where the files before it stay applied. `checksum_mismatch`: an applied file changed. `history_missing`: the database's history table is gone though migrations ran there; record a baseline of the files already applied. Dropping the whole `_volcano_migrations` schema is not supported and not detected: the database reads as new, and the run applies every file again. `history_too_large`: the history has more than the 1,000 entries Volcano reads. `invalid_file`: a file Volcano refuses to run. `invalid_layout`: file paths that do not map to the database. `plan_changed`: the history changed after the rehearsal. `branch_limit`: the rehearsal branch would exceed the plan's branch allowance. `backup_failed` and `rehearsal_unavailable`: Volcano could not take the backup or prepare the rehearsal. `restore_in_progress` and `database_unavailable`: the database could not take the run. `owner_not_active`: the project owner's account was not `active` when Volcano picked the run up, or before its `backup` or `apply`, or before a file in `apply` unless held `read_only` only for the plan's limits, so the run applied nothing further; files it already applied stay applied. `locked`: another session held the migration lock, or a file, or Volcano's drop of a failed build's index, waited too long for a lock. `connection_failed`: the database could not be reached, or the connection was lost, including while a file ran. `internal_error`: Volcano failed for a reason of its own, such as its own statements around a file. `timeout` and `attempts_exhausted`: the run could not finish. `operator_failed`: Volcano ended a run that stopped making progress; read the history to see which files were applied, then start a new run. + attr_accessor :code + + # What happened, naming files and Postgres error codes. The database's own message is on the failed file. + attr_accessor :message + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'String', + :'message' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DatabaseMigrationRunError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DatabaseMigrationRunError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + else + self.code = nil + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + else + self.message = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @code.nil? + invalid_properties.push('invalid value for "code", code cannot be nil.') + end + + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @code.nil? + code_validator = EnumAttributeValidator.new('String', ["migration_failed", "checksum_mismatch", "history_missing", "history_too_large", "invalid_file", "invalid_layout", "plan_changed", "branch_limit", "rehearsal_unavailable", "backup_failed", "restore_in_progress", "database_unavailable", "owner_not_active", "locked", "connection_failed", "timeout", "attempts_exhausted", "internal_error", "operator_failed"]) + return false unless code_validator.valid?(@code) + return false if @message.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["migration_failed", "checksum_mismatch", "history_missing", "history_too_large", "invalid_file", "invalid_layout", "plan_changed", "branch_limit", "rehearsal_unavailable", "backup_failed", "restore_in_progress", "database_unavailable", "owner_not_active", "locked", "connection_failed", "timeout", "attempts_exhausted", "internal_error", "operator_failed"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + end + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] message Value to be assigned + def message=(message) + if message.nil? + fail ArgumentError, 'message cannot be nil' + end + + @message = message + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_migration_run_file.rb b/lib/volcano/generated/lib/volcano-generated/models/database_migration_run_file.rb new file mode 100644 index 00000000..55b17826 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/database_migration_run_file.rb @@ -0,0 +1,224 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class DatabaseMigrationRunFile < ApiModelBase + attr_accessor :name + + # `pending`: not settled yet, including a file the run will try again on its next attempt. `already_applied`: the history already recorded it, so it did not run; a file can also end this way in `apply`, when another session applied or baselined it after the run planned. `applied`: this run applied it. `failed`: its own SQL failed and its transaction rolled back, in the rehearsal or in the database as the run's `phase` says, including when the run's time limit stopped it; a file whose `COMMIT` failed is `unknown` instead. A file whose first line is `-- volcano:no-transaction` runs outside a transaction, so nothing rolls back what it did before failing, such as the invalid index a failed `CREATE INDEX CONCURRENTLY` leaves. `not_run`: the run ended before the file committed, without its SQL failing: before `apply`, after an earlier file failed or lost its `COMMIT`, or after the connection was lost or Volcano's own statements around the file failed, which rolled it back. `unknown`: the run ended in `apply` without confirming whether the file ran, for example because its attempts ran out, its `COMMIT` failed or was cut short, or it ran outside a transaction and the connection was lost or Volcano's own statements after it failed. The file may have committed. The database's history says whether a file that ran in a transaction committed, and the next run's plan applies a file only if the history does not record it. While the run is `queued` or `running`, each attempt reads the history again before it runs a file, and sets every file the run has not applied from it: `already_applied` if the history holds it, `pending` otherwise. The exception is a file that runs outside a transaction: it is `unknown` from just before Volcano sends it until Volcano confirms what became of it. If it may have run, it stays `unknown` until an attempt applies it or the history holds it, and keeps the `error` of a later attempt that fails it. + attr_accessor :outcome + + attr_accessor :error + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'outcome' => :'outcome', + :'error' => :'error' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'outcome' => :'String', + :'error' => :'DatabaseMigrationFileError' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DatabaseMigrationRunFile` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DatabaseMigrationRunFile`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'outcome') + self.outcome = attributes[:'outcome'] + else + self.outcome = nil + end + + if attributes.key?(:'error') + self.error = attributes[:'error'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @outcome.nil? + invalid_properties.push('invalid value for "outcome", outcome cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @name.nil? + return false if @outcome.nil? + outcome_validator = EnumAttributeValidator.new('String', ["pending", "already_applied", "applied", "failed", "not_run", "unknown"]) + return false unless outcome_validator.valid?(@outcome) + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] outcome Object to be assigned + def outcome=(outcome) + validator = EnumAttributeValidator.new('String', ["pending", "already_applied", "applied", "failed", "not_run", "unknown"]) + unless validator.valid?(outcome) + fail ArgumentError, "invalid value for \"outcome\", must be one of #{validator.allowable_values}." + end + @outcome = outcome + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + outcome == o.outcome && + error == o.error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, outcome, error].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_migration_run_list.rb b/lib/volcano/generated/lib/volcano-generated/models/database_migration_run_list.rb new file mode 100644 index 00000000..c6d53f4d --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/database_migration_run_list.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class DatabaseMigrationRunList < ApiModelBase + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DatabaseMigrationRunList` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DatabaseMigrationRunList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + else + self.data = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @data.nil? + invalid_properties.push('invalid value for "data", data cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] data Value to be assigned + def data=(data) + if data.nil? + fail ArgumentError, 'data cannot be nil' + end + + @data = data + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_migration_warning.rb b/lib/volcano/generated/lib/volcano-generated/models/database_migration_warning.rb new file mode 100644 index 00000000..4fdcd567 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/database_migration_warning.rb @@ -0,0 +1,226 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A condition the run reports that did not stop it. + class DatabaseMigrationWarning < ApiModelBase + # `out_of_order`: a pending file sorts before one the history already records; it still ran. `missing_file`: the history records a file the run did not include. `rehearsal_skipped`: the files were not rehearsed, because branches are not available here or on the plan. `backup_skipped`: no backup was taken, because backups are not available here or on the plan. `backup_prune_failed`: Volcano could not delete older migration backups beyond the 20 it keeps; the run's outcome is unaffected, and the next run that takes a backup tries again. `warnings_truncated`: the run raised more than 100 warnings; it is the last one, and its message says how many more were not kept. + attr_accessor :code + + # The file the warning is about, when it is about one. + attr_accessor :file + + attr_accessor :message + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'file' => :'file', + :'message' => :'message' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'String', + :'file' => :'String', + :'message' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DatabaseMigrationWarning` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DatabaseMigrationWarning`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + else + self.code = nil + end + + if attributes.key?(:'file') + self.file = attributes[:'file'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + else + self.message = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @code.nil? + invalid_properties.push('invalid value for "code", code cannot be nil.') + end + + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @code.nil? + code_validator = EnumAttributeValidator.new('String', ["out_of_order", "missing_file", "rehearsal_skipped", "backup_skipped", "backup_prune_failed", "warnings_truncated"]) + return false unless code_validator.valid?(@code) + return false if @message.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["out_of_order", "missing_file", "rehearsal_skipped", "backup_skipped", "backup_prune_failed", "warnings_truncated"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + end + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] message Value to be assigned + def message=(message) + if message.nil? + fail ArgumentError, 'message cannot be nil' + end + + @message = message + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + file == o.file && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, file, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_migrations.rb b/lib/volcano/generated/lib/volcano-generated/models/database_migrations.rb new file mode 100644 index 00000000..0a0435fe --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/database_migrations.rb @@ -0,0 +1,177 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class DatabaseMigrations < ApiModelBase + # Every file the history records, in name order. + attr_accessor :history + + # The run that is queued or running, if any. + attr_accessor :active_run_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'history' => :'history', + :'active_run_id' => :'active_run_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'history' => :'Array', + :'active_run_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DatabaseMigrations` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DatabaseMigrations`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'history') + if (value = attributes[:'history']).is_a?(Array) + self.history = value + end + else + self.history = nil + end + + if attributes.key?(:'active_run_id') + self.active_run_id = attributes[:'active_run_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @history.nil? + invalid_properties.push('invalid value for "history", history cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @history.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] history Value to be assigned + def history=(history) + if history.nil? + fail ArgumentError, 'history cannot be nil' + end + + @history = history + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + history == o.history && + active_run_id == o.active_run_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [history, active_run_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_query_filter.rb b/lib/volcano/generated/lib/volcano-generated/models/database_query_filter.rb index f5f39263..5383ea37 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_query_filter.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_query_filter.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_query_filter_value.rb b/lib/volcano/generated/lib/volcano-generated/models/database_query_filter_value.rb index d22b9bb4..42662767 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_query_filter_value.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_query_filter_value.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_query_filter_value_one_of_inner.rb b/lib/volcano/generated/lib/volcano-generated/models/database_query_filter_value_one_of_inner.rb index c3b5236f..35325741 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_query_filter_value_one_of_inner.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_query_filter_value_one_of_inner.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_query_order.rb b/lib/volcano/generated/lib/volcano-generated/models/database_query_order.rb index 5f4d0c69..c71f4fb2 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_query_order.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_query_order.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_database.rb b/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_database.rb index 381dd3ff..3ebbe15c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_database.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_database.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_item.rb b/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_item.rb index fe0eedac..a464125b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_item.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_item.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_response.rb b/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_response.rb index c4e6774e..fbfa1f99 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_query_result.rb b/lib/volcano/generated/lib/volcano-generated/models/database_query_result.rb index 7dca7297..83e525ea 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_query_result.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_query_result.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_restore.rb b/lib/volcano/generated/lib/volcano-generated/models/database_restore.rb index 36f097dc..7957dcdb 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_restore.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_restore.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_restore_conflict_error.rb b/lib/volcano/generated/lib/volcano-generated/models/database_restore_conflict_error.rb new file mode 100644 index 00000000..a82576e6 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/database_restore_conflict_error.rb @@ -0,0 +1,191 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A restore refused by the database's state. With code `migration_run_in_progress`, `run_id` names the migration run backing up or applying to the database. + class DatabaseRestoreConflictError < ApiModelBase + attr_accessor :error + + # Stable machine-readable error code when a specific recovery path is available. `plan_required` (403) means the project owner's plan does not include the requested feature or option; upgrading the plan unlocks it. `person_required` (403) means a project access token tried to change LavaFlow settings, which only the project's owner changes, with a platform token, or that the change needs the owner's own credential that expires, a project repository, and an owner whose GitHub account can push to it; `error` says which. A 403 without a code leaves the reason unspecified: it can be an access refusal, a reached limit, or a plan check that could not read the owner's plan. Match on the code, not the message text. + attr_accessor :code + + attr_accessor :run_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'error' => :'error', + :'code' => :'code', + :'run_id' => :'run_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'error' => :'String', + :'code' => :'String', + :'run_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'Error' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DatabaseRestoreConflictError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DatabaseRestoreConflictError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'error') + self.error = attributes[:'error'] + else + self.error = nil + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'run_id') + self.run_id = attributes[:'run_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @error.nil? + invalid_properties.push('invalid value for "error", error cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @error.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] error Value to be assigned + def error=(error) + if error.nil? + fail ArgumentError, 'error cannot be nil' + end + + @error = error + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error == o.error && + code == o.code && + run_id == o.run_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [error, code, run_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_restore_list.rb b/lib/volcano/generated/lib/volcano-generated/models/database_restore_list.rb index a90abe2d..7fc42a4d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_restore_list.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_restore_list.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_restore_window.rb b/lib/volcano/generated/lib/volcano-generated/models/database_restore_window.rb index d86d201c..2c0b5b67 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_restore_window.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_restore_window.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_select_request.rb b/lib/volcano/generated/lib/volcano-generated/models/database_select_request.rb index 46838992..f3e13538 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_select_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_select_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_stats.rb b/lib/volcano/generated/lib/volcano-generated/models/database_stats.rb index 547c94d1..120dca6f 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_stats.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_stats.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/database_update_request.rb b/lib/volcano/generated/lib/volcano-generated/models/database_update_request.rb index 67d70cd7..d7ae595f 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/database_update_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/database_update_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/default_email_template.rb b/lib/volcano/generated/lib/volcano-generated/models/default_email_template.rb new file mode 100644 index 00000000..9ec7322a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/default_email_template.rb @@ -0,0 +1,269 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Built-in email template used when no custom template applies. + class DefaultEmailTemplate < ApiModelBase + attr_accessor :type + + attr_accessor :subject + + # HTML template with placeholders + attr_accessor :html_body + + # Plain text template with placeholders + attr_accessor :text_body + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'subject' => :'subject', + :'html_body' => :'html_body', + :'text_body' => :'text_body' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'subject' => :'String', + :'html_body' => :'String', + :'text_body' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DefaultEmailTemplate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DefaultEmailTemplate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = nil + end + + if attributes.key?(:'subject') + self.subject = attributes[:'subject'] + else + self.subject = nil + end + + if attributes.key?(:'html_body') + self.html_body = attributes[:'html_body'] + else + self.html_body = nil + end + + if attributes.key?(:'text_body') + self.text_body = attributes[:'text_body'] + else + self.text_body = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @subject.nil? + invalid_properties.push('invalid value for "subject", subject cannot be nil.') + end + + if @html_body.nil? + invalid_properties.push('invalid value for "html_body", html_body cannot be nil.') + end + + if @text_body.nil? + invalid_properties.push('invalid value for "text_body", text_body cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @type.nil? + type_validator = EnumAttributeValidator.new('String', ["welcome", "confirmation", "password_reset", "password_changed"]) + return false unless type_validator.valid?(@type) + return false if @subject.nil? + return false if @html_body.nil? + return false if @text_body.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["welcome", "confirmation", "password_reset", "password_changed"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] subject Value to be assigned + def subject=(subject) + if subject.nil? + fail ArgumentError, 'subject cannot be nil' + end + + @subject = subject + end + + # Custom attribute writer method with validation + # @param [Object] html_body Value to be assigned + def html_body=(html_body) + if html_body.nil? + fail ArgumentError, 'html_body cannot be nil' + end + + @html_body = html_body + end + + # Custom attribute writer method with validation + # @param [Object] text_body Value to be assigned + def text_body=(text_body) + if text_body.nil? + fail ArgumentError, 'text_body cannot be nil' + end + + @text_body = text_body + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + subject == o.subject && + html_body == o.html_body && + text_body == o.text_body + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, subject, html_body, text_body].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/delete_database202_response.rb b/lib/volcano/generated/lib/volcano-generated/models/delete_database202_response.rb index 15a9872b..63b2b235 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/delete_database202_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/delete_database202_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/delete_database_backup200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/delete_database_backup200_response.rb index 41ecb86d..fd49a639 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/delete_database_backup200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/delete_database_backup200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/delete_database_branch202_response.rb b/lib/volcano/generated/lib/volcano-generated/models/delete_database_branch202_response.rb index 15ccbaf4..bb2addc8 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/delete_database_branch202_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/delete_database_branch202_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/deployment_commit.rb b/lib/volcano/generated/lib/volcano-generated/models/deployment_commit.rb new file mode 100644 index 00000000..e9a89879 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/deployment_commit.rb @@ -0,0 +1,309 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The commit a deploy client reported for the deployment's source. Absent when the client reported none. A frontend deployment that publishes another deployment's build carries that deployment's commit. + class DeploymentCommit < ApiModelBase + # GitHub repository as `owner/name`, normalized from what the client sent. + attr_accessor :repository + + # Full commit ID. + attr_accessor :sha + + # `true` when the client reported that the uploaded files differ from the commit, or Volcano found an uploaded file in the project's root directory that the commit does not hold, so the deployed code may differ from the commit. + attr_accessor :dirty + + # `true` only when `verification` is `files`: Volcano confirmed that the deployed files are the commit's. A commit verified at the `repository` level is not `verified`. + attr_accessor :verified + + # What Volcano confirmed about the commit, through the project's GitHub connection, when it recorded the deployment. `files`: `repository` is the project's connected repository, `sha` is on its production branch, every uploaded file is the commit's file at its path, and the upload holds the commit's files under its root but those deploy clients leave out. Only a frontend upload is checked this far. `repository`: `repository` is the project's connected repository and `sha` is on its production branch, but the uploaded files were not compared with the commit, since a function upload holds build output rather than the repository's layout. Only a function upload the client reports clean is checked at this level. `none`: Volcano confirmed nothing, as for a commit the client reports dirty, one from another branch or repository, one from a project without a connection, or one it couldn't check in time. + attr_accessor :verification + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'repository' => :'repository', + :'sha' => :'sha', + :'dirty' => :'dirty', + :'verified' => :'verified', + :'verification' => :'verification' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'repository' => :'String', + :'sha' => :'String', + :'dirty' => :'Boolean', + :'verified' => :'Boolean', + :'verification' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DeploymentCommit` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DeploymentCommit`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'repository') + self.repository = attributes[:'repository'] + else + self.repository = nil + end + + if attributes.key?(:'sha') + self.sha = attributes[:'sha'] + else + self.sha = nil + end + + if attributes.key?(:'dirty') + self.dirty = attributes[:'dirty'] + else + self.dirty = nil + end + + if attributes.key?(:'verified') + self.verified = attributes[:'verified'] + else + self.verified = nil + end + + if attributes.key?(:'verification') + self.verification = attributes[:'verification'] + else + self.verification = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @repository.nil? + invalid_properties.push('invalid value for "repository", repository cannot be nil.') + end + + if @sha.nil? + invalid_properties.push('invalid value for "sha", sha cannot be nil.') + end + + pattern = Regexp.new(/^[0-9a-f]{40}$/) + if @sha !~ pattern + invalid_properties.push("invalid value for \"sha\", must conform to the pattern #{pattern}.") + end + + if @dirty.nil? + invalid_properties.push('invalid value for "dirty", dirty cannot be nil.') + end + + if @verified.nil? + invalid_properties.push('invalid value for "verified", verified cannot be nil.') + end + + if @verification.nil? + invalid_properties.push('invalid value for "verification", verification cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @repository.nil? + return false if @sha.nil? + return false if @sha !~ Regexp.new(/^[0-9a-f]{40}$/) + return false if @dirty.nil? + return false if @verified.nil? + return false if @verification.nil? + verification_validator = EnumAttributeValidator.new('String', ["none", "repository", "files"]) + return false unless verification_validator.valid?(@verification) + true + end + + # Custom attribute writer method with validation + # @param [Object] repository Value to be assigned + def repository=(repository) + if repository.nil? + fail ArgumentError, 'repository cannot be nil' + end + + @repository = repository + end + + # Custom attribute writer method with validation + # @param [Object] sha Value to be assigned + def sha=(sha) + if sha.nil? + fail ArgumentError, 'sha cannot be nil' + end + + pattern = Regexp.new(/^[0-9a-f]{40}$/) + if sha !~ pattern + fail ArgumentError, "invalid value for \"sha\", must conform to the pattern #{pattern}." + end + + @sha = sha + end + + # Custom attribute writer method with validation + # @param [Object] dirty Value to be assigned + def dirty=(dirty) + if dirty.nil? + fail ArgumentError, 'dirty cannot be nil' + end + + @dirty = dirty + end + + # Custom attribute writer method with validation + # @param [Object] verified Value to be assigned + def verified=(verified) + if verified.nil? + fail ArgumentError, 'verified cannot be nil' + end + + @verified = verified + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] verification Object to be assigned + def verification=(verification) + validator = EnumAttributeValidator.new('String', ["none", "repository", "files"]) + unless validator.valid?(verification) + fail ArgumentError, "invalid value for \"verification\", must be one of #{validator.allowable_values}." + end + @verification = verification + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + repository == o.repository && + sha == o.sha && + dirty == o.dirty && + verified == o.verified && + verification == o.verification + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [repository, sha, dirty, verified, verification].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/deployment_phase.rb b/lib/volcano/generated/lib/volcano-generated/models/deployment_phase.rb index 2c70cd42..6e66732f 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/deployment_phase.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/deployment_phase.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/deployment_progress.rb b/lib/volcano/generated/lib/volcano-generated/models/deployment_progress.rb index eed0851f..5bdf2443 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/deployment_progress.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/deployment_progress.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/deployment_reference.rb b/lib/volcano/generated/lib/volcano-generated/models/deployment_reference.rb index ce9848b7..cc71d183 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/deployment_reference.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/deployment_reference.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/device_authorization_response.rb b/lib/volcano/generated/lib/volcano-generated/models/device_authorization_response.rb index 75d7f12d..cb27f5b6 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/device_authorization_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/device_authorization_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_approval.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_approval.rb index 21cb0183..aee4c038 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_approval.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_approval.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_counts.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_counts.rb index 9e945270..e10855cd 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_counts.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_counts.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_daily_counts.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_daily_counts.rb index 181333b8..4e957de7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_daily_counts.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_daily_counts.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_decider.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_decider.rb index 0dcd81eb..746b49ec 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_decider.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_decider.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_decision.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_decision.rb index 4e2438e7..dc06e58c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_decision.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_decision.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_decision_request.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_decision_request.rb index bc6a9072..ba9822a6 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_decision_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_decision_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_execution.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_execution.rb index f50e745c..449bd61d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_execution.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_execution.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_function.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_function.rb index be339b97..4c8f8c9c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_function.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_function.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_function_counts.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_function_counts.rb index 49486de1..414199ba 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_function_counts.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_function_counts.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_registration.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_registration.rb index 60422082..4c71c665 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_registration.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_registration.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_stats.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_stats.rb index 29aaa6ab..a238eecc 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_stats.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_stats.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_status.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_status.rb index 7d9acd4b..64c56b2c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_approval_status.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_approval_status.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_callback_error.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_callback_error.rb new file mode 100644 index 00000000..e6dd0401 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_callback_error.rb @@ -0,0 +1,235 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The error the waiting step raises. + class DurableCallbackError < ApiModelBase + # A name workflows can branch on, such as `PaymentDeclined`. Up to 256 characters, without control characters. + attr_accessor :type + + # A human-readable explanation of up to 32,768 bytes of UTF-8, with tab and newline as its only control characters. A character outside ASCII takes more than one byte, so such text reaches the limit before `maxLength`. + attr_accessor :message + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'message' => :'message' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'message' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DurableCallbackError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DurableCallbackError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = nil + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @type.to_s.length > 256 + invalid_properties.push('invalid value for "type", the character length must be smaller than or equal to 256.') + end + + if @type.to_s.length < 1 + invalid_properties.push('invalid value for "type", the character length must be greater than or equal to 1.') + end + + pattern = Regexp.new(/^[^\x00-\x1F\x7F]+$/) + if @type !~ pattern + invalid_properties.push("invalid value for \"type\", must conform to the pattern #{pattern}.") + end + + if !@message.nil? && @message.to_s.length > 32768 + invalid_properties.push('invalid value for "message", the character length must be smaller than or equal to 32768.') + end + + pattern = Regexp.new(/^[^\x00-\x08\x0B-\x1F\x7F]*$/) + if !@message.nil? && @message !~ pattern + invalid_properties.push("invalid value for \"message\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @type.nil? + return false if @type.to_s.length > 256 + return false if @type.to_s.length < 1 + return false if @type !~ Regexp.new(/^[^\x00-\x1F\x7F]+$/) + return false if !@message.nil? && @message.to_s.length > 32768 + return false if !@message.nil? && @message !~ Regexp.new(/^[^\x00-\x08\x0B-\x1F\x7F]*$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + if type.to_s.length > 256 + fail ArgumentError, 'invalid value for "type", the character length must be smaller than or equal to 256.' + end + + if type.to_s.length < 1 + fail ArgumentError, 'invalid value for "type", the character length must be greater than or equal to 1.' + end + + pattern = Regexp.new(/^[^\x00-\x1F\x7F]+$/) + if type !~ pattern + fail ArgumentError, "invalid value for \"type\", must conform to the pattern #{pattern}." + end + + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] message Value to be assigned + def message=(message) + if message.nil? + fail ArgumentError, 'message cannot be nil' + end + + if message.to_s.length > 32768 + fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 32768.' + end + + pattern = Regexp.new(/^[^\x00-\x08\x0B-\x1F\x7F]*$/) + if message !~ pattern + fail ArgumentError, "invalid value for \"message\", must conform to the pattern #{pattern}." + end + + @message = message + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_callback_outcome.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_callback_outcome.rb new file mode 100644 index 00000000..1844c2f8 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_callback_outcome.rb @@ -0,0 +1,186 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class DurableCallbackOutcome < ApiModelBase + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'DurableCallbackStatus' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DurableCallbackOutcome` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DurableCallbackOutcome`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_callback_registration.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_callback_registration.rb new file mode 100644 index 00000000..7920a4a9 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_callback_registration.rb @@ -0,0 +1,208 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The token for the waiting step, as the workflow receives it. + class DurableCallbackRegistration < ApiModelBase + # The `vcb_` token the workflow handed out. It is the only credential the callback operations take, so treat it as a secret. + attr_accessor :token + + # When the waiting step's `timeout` passes and the token stops working. Null when the workflow set no `timeout`. A step with a heartbeat timeout also ends once that long passes without a heartbeat, which can be before this time. + attr_accessor :expires_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'token' => :'token', + :'expires_at' => :'expires_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'token' => :'String', + :'expires_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'expires_at' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DurableCallbackRegistration` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DurableCallbackRegistration`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'token') + self.token = attributes[:'token'] + else + self.token = nil + end + + if attributes.key?(:'expires_at') + self.expires_at = attributes[:'expires_at'] + else + self.expires_at = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @token.nil? + invalid_properties.push('invalid value for "token", token cannot be nil.') + end + + if @token.to_s.length > 128 + invalid_properties.push('invalid value for "token", the character length must be smaller than or equal to 128.') + end + + if @token.to_s.length < 5 + invalid_properties.push('invalid value for "token", the character length must be greater than or equal to 5.') + end + + pattern = Regexp.new(/^vcb_[A-Za-z0-9_-]+$/) + if @token !~ pattern + invalid_properties.push("invalid value for \"token\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @token.nil? + return false if @token.to_s.length > 128 + return false if @token.to_s.length < 5 + return false if @token !~ Regexp.new(/^vcb_[A-Za-z0-9_-]+$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] token Value to be assigned + def token=(token) + if token.nil? + fail ArgumentError, 'token cannot be nil' + end + + if token.to_s.length > 128 + fail ArgumentError, 'invalid value for "token", the character length must be smaller than or equal to 128.' + end + + if token.to_s.length < 5 + fail ArgumentError, 'invalid value for "token", the character length must be greater than or equal to 5.' + end + + pattern = Regexp.new(/^vcb_[A-Za-z0-9_-]+$/) + if token !~ pattern + fail ArgumentError, "invalid value for \"token\", must conform to the pattern #{pattern}." + end + + @token = token + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + token == o.token && + expires_at == o.expires_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [token, expires_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_callback_status.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_callback_status.rb new file mode 100644 index 00000000..15b97d55 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_callback_status.rb @@ -0,0 +1,42 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class DurableCallbackStatus + WAITING = "waiting".freeze + DELIVERING = "delivering".freeze + SUCCEEDED = "succeeded".freeze + FAILED = "failed".freeze + + def self.all_vars + @all_vars ||= [WAITING, DELIVERING, SUCCEEDED, FAILED].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if DurableCallbackStatus.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #DurableCallbackStatus" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_execution.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_execution.rb index 356333c2..c46de67b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_execution.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_execution.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -40,7 +40,7 @@ class DurableExecution < ApiModelBase # Present once the execution has reached a terminal status. attr_accessor :completed_at - # Lets a browser read the execution, stop it, and read and send its messages, and a service key scoped to a list without `*` read and stop it. Returned only by the start whose input the execution runs, never by a repeat under the same name or by a read. Send it as `X-Volcano-Client-Token`. + # Lets a browser read the execution, stop it, and read and send its messages, and a service key scoped to a list without `*` do the same. Returned only by the start whose input the execution runs, never by a repeat under the same name or by a read. Send it as `X-Volcano-Client-Token`. attr_accessor :client_token class EnumAttributeValidator diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_execution_error.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_execution_error.rb index 160b3e60..cf4bb632 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_execution_error.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_execution_error.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_execution_invocation.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_execution_invocation.rb index d6e50ae9..b95284e1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_execution_invocation.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_execution_invocation.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_execution_operation.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_execution_operation.rb index 98020f6c..af9f8692 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_execution_operation.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_execution_operation.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_execution_operation_attempt.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_execution_operation_attempt.rb index b3f92d23..625118da 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_execution_operation_attempt.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_execution_operation_attempt.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_execution_operation_list.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_execution_operation_list.rb index 0b3c82e7..d99c7db0 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_execution_operation_list.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_execution_operation_list.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_execution_status.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_execution_status.rb index 39f587c4..a940fe62 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_execution_status.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_execution_status.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_function.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_function.rb index 39e01a88..a54a5bd9 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_function.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_function.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -27,7 +27,7 @@ class DurableFunction < ApiModelBase # Timestamp when the current provisioning phase started attr_accessor :provisioning_started_at - # Who may start executions of this function through `POST /durable-functions/{functionId}/executions`: service keys at every level, signed-in users of the project from `authenticated`, and anon keys holding `functions.invoke` only at `public`. Reading and stopping an execution always require the project owner's token, whatever this is set to. Set it when the function is deployed. Durable functions have no update endpoint, so changing visibility later means redeploying. A durable function is startable, never invocable: it is not reachable through `POST /functions/{functionId}/invoke` or a function URL, which answer `404` at every level. + # Who may start executions of this function through `POST /durable-functions/{functionId}/executions`, and read and stop them through `GET /durable-functions/{functionId}/executions/{executionId}` and its `/stop`: service keys at every level (a scoped key needs `functions.invoke`), signed-in users of the project from `authenticated`, and anon keys holding `functions.invoke` only at `public`. On the read and stop routes a service key holding `*`, the default, reaches every execution. A service key scoped to a list without `*` and an anon key reach the ones whose client token they send, which the start returns, and a signed-in user also the ones they started. The project-scoped routes under `/projects/{id}/durable-functions` take the project owner's token or a project access token, whatever this is set to. Set it when the function is deployed. Durable functions have no update endpoint, so changing visibility later means redeploying. A durable function is startable, never invocable: it is not reachable through `POST /functions/{functionId}/invoke` or a function URL, which answer `404` at every level. attr_accessor :visibility # Deprecated. `true` exactly when `visibility` is `public`. diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_function_config.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_function_config.rb index 15466341..623619f9 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_function_config.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_function_config.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -19,7 +19,7 @@ class DurableFunctionConfig < ApiModelBase # How long a whole execution may run, including time suspended in a wait. This is not a limit on one attempt: an execution outlives any single attempt by checkpointing and resuming, and the per-attempt timeout is the plan's own, smaller number. attr_accessor :execution_timeout_seconds - # How long a finished execution's result and history are retained, for as long as the function exists. Deleting the function, or its project, ends retention early and takes the history with it. + # How long a finished execution's result and history are retained, for as long as the function exists. Deleting the function, or its project, ends retention early and takes the history with it. A result or error Volcano has just read is kept in memory for up to five minutes, so a read can still return it for up to five minutes after retention ends. attr_accessor :retention_days # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_message.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message.rb index 032dc9a6..c822cc1f 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_message.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_message_direction.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_direction.rb index 501b7a8e..8cadfc41 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_message_direction.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_direction.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -15,11 +15,11 @@ module Volcano::Generated class DurableMessageDirection - IN = "in".freeze - OUT = "out".freeze + DurableMessageDirectionIn = "in".freeze + DurableMessageDirectionOut = "out".freeze def self.all_vars - @all_vars ||= [IN, OUT].freeze + @all_vars ||= [DurableMessageDirectionIn, DurableMessageDirectionOut].freeze end # Builds the enum from string diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_message_list.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_list.rb index 27772279..18a80826 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_message_list.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_list.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_message_sender.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_sender.rb index 4b0eef54..4edf2ad5 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_message_sender.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_sender.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_message_session_registration.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_session_registration.rb index 0781b4c8..1e93fd47 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_message_session_registration.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_session_registration.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_message_status.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_status.rb index d8471cae..96e71eb9 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_message_status.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_status.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait.rb index 3cee4183..6df146a1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_list.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_list.rb index a76a4178..01b19d1d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_list.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_list.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_registration.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_registration.rb index 2230d369..8116622b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_registration.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_registration.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_status.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_status.rb index b80f2547..ca59ecc4 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_status.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_status.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/email_template.rb b/lib/volcano/generated/lib/volcano-generated/models/email_template.rb index ee481e6c..08c3a8fb 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/email_template.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/email_template.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -132,20 +132,14 @@ def initialize(attributes = {}) if attributes.key?(:'subject') self.subject = attributes[:'subject'] - else - self.subject = nil end if attributes.key?(:'html_body') self.html_body = attributes[:'html_body'] - else - self.html_body = nil end if attributes.key?(:'text_body') self.text_body = attributes[:'text_body'] - else - self.text_body = nil end if attributes.key?(:'created_at') @@ -166,18 +160,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "template_type", template_type cannot be nil.') end - if @subject.nil? - invalid_properties.push('invalid value for "subject", subject cannot be nil.') - end - - if @html_body.nil? - invalid_properties.push('invalid value for "html_body", html_body cannot be nil.') - end - - if @text_body.nil? - invalid_properties.push('invalid value for "text_body", text_body cannot be nil.') - end - invalid_properties end @@ -188,9 +170,6 @@ def valid? return false if @template_type.nil? template_type_validator = EnumAttributeValidator.new('String', ["welcome", "confirmation", "password_reset", "password_changed"]) return false unless template_type_validator.valid?(@template_type) - return false if @subject.nil? - return false if @html_body.nil? - return false if @text_body.nil? true end @@ -204,36 +183,6 @@ def template_type=(template_type) @template_type = template_type end - # Custom attribute writer method with validation - # @param [Object] subject Value to be assigned - def subject=(subject) - if subject.nil? - fail ArgumentError, 'subject cannot be nil' - end - - @subject = subject - end - - # Custom attribute writer method with validation - # @param [Object] html_body Value to be assigned - def html_body=(html_body) - if html_body.nil? - fail ArgumentError, 'html_body cannot be nil' - end - - @html_body = html_body - end - - # Custom attribute writer method with validation - # @param [Object] text_body Value to be assigned - def text_body=(text_body) - if text_body.nil? - fail ArgumentError, 'text_body cannot be nil' - end - - @text_body = text_body - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/volcano/generated/lib/volcano-generated/models/error.rb b/lib/volcano/generated/lib/volcano-generated/models/error.rb index 8b563810..6bd11ce2 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/error.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/error.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -17,7 +17,7 @@ module Volcano::Generated class Error < ApiModelBase attr_accessor :error - # Stable machine-readable error code when a specific recovery path is available. + # Stable machine-readable error code when a specific recovery path is available. `plan_required` (403) means the project owner's plan does not include the requested feature or option; upgrading the plan unlocks it. `person_required` (403) means a project access token tried to change LavaFlow settings, which only the project's owner changes, with a platform token, or that the change needs the owner's own credential that expires, a project repository, and an owner whose GitHub account can push to it; `error` says which. A 403 without a code leaves the reason unspecified: it can be an access refusal, a reached limit, or a plan check that could not read the owner's plan. Match on the code, not the message text. attr_accessor :code # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/volcano/generated/lib/volcano-generated/models/export_project_source_request.rb b/lib/volcano/generated/lib/volcano-generated/models/export_project_source_request.rb index ac87a233..34b33641 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/export_project_source_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/export_project_source_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -18,10 +18,14 @@ class ExportProjectSourceRequest < ApiModelBase # The currently configured production branch the user confirmed for export. attr_accessor :production_branch + # The `repo_id` of the connected repository the user confirmed for export, as the git connection reports it. When set, export answers `409` if the project is now connected to a different repository, so source is written only to the repository the user was shown. + attr_accessor :repo_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'production_branch' => :'production_branch' + :'production_branch' => :'production_branch', + :'repo_id' => :'repo_id' } end @@ -38,7 +42,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'production_branch' => :'String' + :'production_branch' => :'String', + :'repo_id' => :'Integer' } end @@ -69,6 +74,10 @@ def initialize(attributes = {}) else self.production_branch = nil end + + if attributes.key?(:'repo_id') + self.repo_id = attributes[:'repo_id'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -115,7 +124,8 @@ def production_branch=(production_branch) def ==(o) return true if self.equal?(o) self.class == o.class && - production_branch == o.production_branch + production_branch == o.production_branch && + repo_id == o.repo_id end # @see the `==` method @@ -127,7 +137,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [production_branch].hash + [production_branch, repo_id].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/fail_durable_callback_request.rb b/lib/volcano/generated/lib/volcano-generated/models/fail_durable_callback_request.rb new file mode 100644 index 00000000..3ee15f0f --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/fail_durable_callback_request.rb @@ -0,0 +1,220 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class FailDurableCallbackRequest < ApiModelBase + # The `vcb_` token the workflow handed out. It is the only credential the callback operations take, so treat it as a secret. + attr_accessor :token + + attr_accessor :error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'token' => :'token', + :'error' => :'error' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'token' => :'String', + :'error' => :'DurableCallbackError' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FailDurableCallbackRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FailDurableCallbackRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'token') + self.token = attributes[:'token'] + else + self.token = nil + end + + if attributes.key?(:'error') + self.error = attributes[:'error'] + else + self.error = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @token.nil? + invalid_properties.push('invalid value for "token", token cannot be nil.') + end + + if @token.to_s.length > 128 + invalid_properties.push('invalid value for "token", the character length must be smaller than or equal to 128.') + end + + if @token.to_s.length < 5 + invalid_properties.push('invalid value for "token", the character length must be greater than or equal to 5.') + end + + pattern = Regexp.new(/^vcb_[A-Za-z0-9_-]+$/) + if @token !~ pattern + invalid_properties.push("invalid value for \"token\", must conform to the pattern #{pattern}.") + end + + if @error.nil? + invalid_properties.push('invalid value for "error", error cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @token.nil? + return false if @token.to_s.length > 128 + return false if @token.to_s.length < 5 + return false if @token !~ Regexp.new(/^vcb_[A-Za-z0-9_-]+$/) + return false if @error.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] token Value to be assigned + def token=(token) + if token.nil? + fail ArgumentError, 'token cannot be nil' + end + + if token.to_s.length > 128 + fail ArgumentError, 'invalid value for "token", the character length must be smaller than or equal to 128.' + end + + if token.to_s.length < 5 + fail ArgumentError, 'invalid value for "token", the character length must be greater than or equal to 5.' + end + + pattern = Regexp.new(/^vcb_[A-Za-z0-9_-]+$/) + if token !~ pattern + fail ArgumentError, "invalid value for \"token\", must conform to the pattern #{pattern}." + end + + @token = token + end + + # Custom attribute writer method with validation + # @param [Object] error Value to be assigned + def error=(error) + if error.nil? + fail ArgumentError, 'error cannot be nil' + end + + @error = error + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + token == o.token && + error == o.error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [token, error].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/fork_create_request.rb b/lib/volcano/generated/lib/volcano-generated/models/fork_create_request.rb new file mode 100644 index 00000000..d7f535a6 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/fork_create_request.rb @@ -0,0 +1,279 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ForkCreateRequest < ApiModelBase + # The share to fork, the id at the end of its deploy URL. + attr_accessor :share_id + + # The `release.id` the share's preview returned, so only the release the visitor saw is installed. + attr_accessor :release_id + + # The new project's name, which may contain only letters, numbers, underscores and hyphens. A name you already use gets a short random suffix. An invalid name answers `400` before anything is counted against the share or your hourly fork limit. + attr_accessor :name + + # Values for the variables the preview lists, by name. Any may be left out and is then created empty; only listed names are accepted (`422` otherwise). Each value is at most 4096 bytes of UTF-8, since a function's environment is limited in bytes; a longer one, or one containing a NUL character, answers `400`. Values are never logged, and `Idempotency-Key` compares only the names given a value. + attr_accessor :variables + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'share_id' => :'share_id', + :'release_id' => :'release_id', + :'name' => :'name', + :'variables' => :'variables' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'share_id' => :'String', + :'release_id' => :'String', + :'name' => :'String', + :'variables' => :'Hash' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ForkCreateRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ForkCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'share_id') + self.share_id = attributes[:'share_id'] + else + self.share_id = nil + end + + if attributes.key?(:'release_id') + self.release_id = attributes[:'release_id'] + else + self.release_id = nil + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'variables') + if (value = attributes[:'variables']).is_a?(Hash) + self.variables = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @share_id.nil? + invalid_properties.push('invalid value for "share_id", share_id cannot be nil.') + end + + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if @share_id !~ pattern + invalid_properties.push("invalid value for \"share_id\", must conform to the pattern #{pattern}.") + end + + if @release_id.nil? + invalid_properties.push('invalid value for "release_id", release_id cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @name.to_s.length > 255 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.') + end + + if @name.to_s.length < 1 + invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.') + end + + if !@variables.nil? && @variables.length > 100 + invalid_properties.push('invalid value for "variables", number of items must be less than or equal to 100.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @share_id.nil? + return false if @share_id !~ Regexp.new(/^[A-Za-z0-9]{12}$/) + return false if @release_id.nil? + return false if @name.nil? + return false if @name.to_s.length > 255 + return false if @name.to_s.length < 1 + return false if !@variables.nil? && @variables.length > 100 + true + end + + # Custom attribute writer method with validation + # @param [Object] share_id Value to be assigned + def share_id=(share_id) + if share_id.nil? + fail ArgumentError, 'share_id cannot be nil' + end + + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if share_id !~ pattern + fail ArgumentError, "invalid value for \"share_id\", must conform to the pattern #{pattern}." + end + + @share_id = share_id + end + + # Custom attribute writer method with validation + # @param [Object] release_id Value to be assigned + def release_id=(release_id) + if release_id.nil? + fail ArgumentError, 'release_id cannot be nil' + end + + @release_id = release_id + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + if name.to_s.length > 255 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.' + end + + if name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 1.' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] variables Value to be assigned + def variables=(variables) + if variables.nil? + fail ArgumentError, 'variables cannot be nil' + end + + if variables.length > 100 + fail ArgumentError, 'invalid value for "variables", number of items must be less than or equal to 100.' + end + + @variables = variables + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + share_id == o.share_id && + release_id == o.release_id && + name == o.name && + variables == o.variables + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [share_id, release_id, name, variables].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend.rb index d4e1d6a0..1b4a5dcd 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -46,6 +46,9 @@ class Frontend < ApiModelBase # Newest queued deployment that will run after the current operation attr_accessor :pending_deployment_id + # The promoted Candidate whose runtime receives this frontend's traffic, the same as `candidate_id` in `serving`. Null when the frontend serves its own runtime. While it is set, `current_deployment_id` and `status` describe a deployment that receives no traffic, and deploying the frontend is refused until it is rolled back. + attr_accessor :serving_candidate_id + attr_accessor :site_url # Active custom domain hostname when configured @@ -57,6 +60,9 @@ class Frontend < ApiModelBase # Paths on this frontend that forward to a public function, ordered from most to least specific. Anyone who can load the frontend can reach the target function at these paths without a credential. attr_accessor :function_routes + # Paths on this frontend served by another frontend in the project, ordered from most to least specific. Function and Frontend routes share one path namespace and the 64-route limit. + attr_accessor :frontend_routes + # Recorded completion time of the most recent deploy or redeploy with status active. Omitted when no such deployment has a recorded completion time. Site traffic, pending deployments, degraded deployments, failed deployments, and deletion do not change this value. attr_accessor :last_deployed_at @@ -103,10 +109,12 @@ def self.attribute_map :'deployed_regions' => :'deployed_regions', :'current_deployment_id' => :'current_deployment_id', :'pending_deployment_id' => :'pending_deployment_id', + :'serving_candidate_id' => :'serving_candidate_id', :'site_url' => :'site_url', :'custom_domain' => :'custom_domain', :'custom_domain_status' => :'custom_domain_status', :'function_routes' => :'function_routes', + :'frontend_routes' => :'frontend_routes', :'last_deployed_at' => :'last_deployed_at', :'last_invoked_at' => :'last_invoked_at', :'created_at' => :'created_at', @@ -139,10 +147,12 @@ def self.openapi_types :'deployed_regions' => :'Array', :'current_deployment_id' => :'String', :'pending_deployment_id' => :'String', + :'serving_candidate_id' => :'String', :'site_url' => :'String', :'custom_domain' => :'String', :'custom_domain_status' => :'String', :'function_routes' => :'Array', + :'frontend_routes' => :'Array', :'last_deployed_at' => :'Time', :'last_invoked_at' => :'Time', :'created_at' => :'Time', @@ -153,6 +163,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'serving_candidate_id', ]) end @@ -236,6 +247,12 @@ def initialize(attributes = {}) self.pending_deployment_id = attributes[:'pending_deployment_id'] end + if attributes.key?(:'serving_candidate_id') + self.serving_candidate_id = attributes[:'serving_candidate_id'] + else + self.serving_candidate_id = nil + end + if attributes.key?(:'site_url') self.site_url = attributes[:'site_url'] end @@ -256,6 +273,14 @@ def initialize(attributes = {}) self.function_routes = nil end + if attributes.key?(:'frontend_routes') + if (value = attributes[:'frontend_routes']).is_a?(Array) + self.frontend_routes = value + end + else + self.frontend_routes = nil + end + if attributes.key?(:'last_deployed_at') self.last_deployed_at = attributes[:'last_deployed_at'] end @@ -327,6 +352,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "function_routes", number of items must be less than or equal to 64.') end + if @frontend_routes.nil? + invalid_properties.push('invalid value for "frontend_routes", frontend_routes cannot be nil.') + end + + if @frontend_routes.length > 64 + invalid_properties.push('invalid value for "frontend_routes", number of items must be less than or equal to 64.') + end + if @created_at.nil? invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') end @@ -361,6 +394,8 @@ def valid? return false unless custom_domain_status_validator.valid?(@custom_domain_status) return false if @function_routes.nil? return false if @function_routes.length > 64 + return false if @frontend_routes.nil? + return false if @frontend_routes.length > 64 return false if @created_at.nil? return false if @updated_at.nil? true @@ -493,6 +528,20 @@ def function_routes=(function_routes) @function_routes = function_routes end + # Custom attribute writer method with validation + # @param [Object] frontend_routes Value to be assigned + def frontend_routes=(frontend_routes) + if frontend_routes.nil? + fail ArgumentError, 'frontend_routes cannot be nil' + end + + if frontend_routes.length > 64 + fail ArgumentError, 'invalid value for "frontend_routes", number of items must be less than or equal to 64.' + end + + @frontend_routes = frontend_routes + end + # Custom attribute writer method with validation # @param [Object] created_at Value to be assigned def created_at=(created_at) @@ -530,10 +579,12 @@ def ==(o) deployed_regions == o.deployed_regions && current_deployment_id == o.current_deployment_id && pending_deployment_id == o.pending_deployment_id && + serving_candidate_id == o.serving_candidate_id && site_url == o.site_url && custom_domain == o.custom_domain && custom_domain_status == o.custom_domain_status && function_routes == o.function_routes && + frontend_routes == o.frontend_routes && last_deployed_at == o.last_deployed_at && last_invoked_at == o.last_invoked_at && created_at == o.created_at && @@ -549,7 +600,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [variable_scope, declared_variables, id, project_id, name, framework, app_root, status, provisioning_started_at, deployed_regions, current_deployment_id, pending_deployment_id, site_url, custom_domain, custom_domain_status, function_routes, last_deployed_at, last_invoked_at, created_at, updated_at].hash + [variable_scope, declared_variables, id, project_id, name, framework, app_root, status, provisioning_started_at, deployed_regions, current_deployment_id, pending_deployment_id, serving_candidate_id, site_url, custom_domain, custom_domain_status, function_routes, frontend_routes, last_deployed_at, last_invoked_at, created_at, updated_at].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_candidate.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_candidate.rb new file mode 100644 index 00000000..ade89469 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_candidate.rb @@ -0,0 +1,390 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A copy of a frontend built from an uploaded archive with the frontend's own configuration, so it can be checked before anything is promoted. A Candidate is reachable by anyone who holds its URL and is not indexed or listed; it is never public, and it does not claim to be private. + class FrontendCandidate < ApiModelBase + attr_accessor :id + + attr_accessor :frontend_id + + attr_accessor :name + + # `creating` until its first deployment succeeds, `ready` while it serves, `deleting` while its runtime is removed, and `error` when its deletion gave up and needs an operator. + attr_accessor :status + + # Where the Candidate is served. Absent until its first deployment succeeds. + attr_accessor :url + + # When the Candidate is deleted on its own. Absent when it is kept until deleted. + attr_accessor :expires_at + + # The deployment the Candidate serves. Absent until its first deployment succeeds. It differs from `deployment` while a redeploy runs or after one failed. + attr_accessor :current_deployment_id + + attr_accessor :deployment + + # Present while the Candidate serves a deployment. `current` means that deployment was built with the variables the frontend selects now; `changed` means they differ, or can no longer be resolved. Promotion refuses a Candidate whose status is `changed`. + attr_accessor :configuration_status + + attr_accessor :created_at + + attr_accessor :updated_at + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'frontend_id' => :'frontend_id', + :'name' => :'name', + :'status' => :'status', + :'url' => :'url', + :'expires_at' => :'expires_at', + :'current_deployment_id' => :'current_deployment_id', + :'deployment' => :'deployment', + :'configuration_status' => :'configuration_status', + :'created_at' => :'created_at', + :'updated_at' => :'updated_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'frontend_id' => :'String', + :'name' => :'String', + :'status' => :'String', + :'url' => :'String', + :'expires_at' => :'Time', + :'current_deployment_id' => :'String', + :'deployment' => :'FrontendCandidateDeployment', + :'configuration_status' => :'String', + :'created_at' => :'Time', + :'updated_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FrontendCandidate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FrontendCandidate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'frontend_id') + self.frontend_id = attributes[:'frontend_id'] + else + self.frontend_id = nil + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + + if attributes.key?(:'expires_at') + self.expires_at = attributes[:'expires_at'] + end + + if attributes.key?(:'current_deployment_id') + self.current_deployment_id = attributes[:'current_deployment_id'] + end + + if attributes.key?(:'deployment') + self.deployment = attributes[:'deployment'] + end + + if attributes.key?(:'configuration_status') + self.configuration_status = attributes[:'configuration_status'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + else + self.updated_at = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @frontend_id.nil? + invalid_properties.push('invalid value for "frontend_id", frontend_id cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @name.to_s.length > 128 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 128.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @frontend_id.nil? + return false if @name.nil? + return false if @name.to_s.length > 128 + return false if @status.nil? + status_validator = EnumAttributeValidator.new('String', ["creating", "ready", "deleting", "error"]) + return false unless status_validator.valid?(@status) + configuration_status_validator = EnumAttributeValidator.new('String', ["current", "changed"]) + return false unless configuration_status_validator.valid?(@configuration_status) + return false if @created_at.nil? + return false if @updated_at.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] frontend_id Value to be assigned + def frontend_id=(frontend_id) + if frontend_id.nil? + fail ArgumentError, 'frontend_id cannot be nil' + end + + @frontend_id = frontend_id + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + if name.to_s.length > 128 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 128.' + end + + @name = name + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["creating", "ready", "deleting", "error"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] configuration_status Object to be assigned + def configuration_status=(configuration_status) + validator = EnumAttributeValidator.new('String', ["current", "changed"]) + unless validator.valid?(configuration_status) + fail ArgumentError, "invalid value for \"configuration_status\", must be one of #{validator.allowable_values}." + end + @configuration_status = configuration_status + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param [Object] updated_at Value to be assigned + def updated_at=(updated_at) + if updated_at.nil? + fail ArgumentError, 'updated_at cannot be nil' + end + + @updated_at = updated_at + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + frontend_id == o.frontend_id && + name == o.name && + status == o.status && + url == o.url && + expires_at == o.expires_at && + current_deployment_id == o.current_deployment_id && + deployment == o.deployment && + configuration_status == o.configuration_status && + created_at == o.created_at && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, frontend_id, name, status, url, expires_at, current_deployment_id, deployment, configuration_status, created_at, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_candidate_deployment.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_candidate_deployment.rb new file mode 100644 index 00000000..fe974380 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_candidate_deployment.rb @@ -0,0 +1,299 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class FrontendCandidateDeployment < ApiModelBase + attr_accessor :id + + # `provisioning` while the build and deploy run, `active` once the Candidate serves this deployment, and `failed` when it could not be built or deployed. A failed deployment of a Candidate that already served keeps the previous deployment serving. + attr_accessor :status + + # Identifies the resolved configuration the deployment was built with. It carries no value. + attr_accessor :configuration_digest + + # Why a failed deployment failed. + attr_accessor :error_message + + attr_accessor :created_at + + # Set once the deployment is no longer provisioning. + attr_accessor :completed_at + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'status' => :'status', + :'configuration_digest' => :'configuration_digest', + :'error_message' => :'error_message', + :'created_at' => :'created_at', + :'completed_at' => :'completed_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'status' => :'String', + :'configuration_digest' => :'String', + :'error_message' => :'String', + :'created_at' => :'Time', + :'completed_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FrontendCandidateDeployment` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FrontendCandidateDeployment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'configuration_digest') + self.configuration_digest = attributes[:'configuration_digest'] + else + self.configuration_digest = nil + end + + if attributes.key?(:'error_message') + self.error_message = attributes[:'error_message'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + + if attributes.key?(:'completed_at') + self.completed_at = attributes[:'completed_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @configuration_digest.nil? + invalid_properties.push('invalid value for "configuration_digest", configuration_digest cannot be nil.') + end + + pattern = Regexp.new(/^sha256:[0-9a-f]{64}$/) + if @configuration_digest !~ pattern + invalid_properties.push("invalid value for \"configuration_digest\", must conform to the pattern #{pattern}.") + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @status.nil? + status_validator = EnumAttributeValidator.new('String', ["provisioning", "active", "failed"]) + return false unless status_validator.valid?(@status) + return false if @configuration_digest.nil? + return false if @configuration_digest !~ Regexp.new(/^sha256:[0-9a-f]{64}$/) + return false if @created_at.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["provisioning", "active", "failed"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] configuration_digest Value to be assigned + def configuration_digest=(configuration_digest) + if configuration_digest.nil? + fail ArgumentError, 'configuration_digest cannot be nil' + end + + pattern = Regexp.new(/^sha256:[0-9a-f]{64}$/) + if configuration_digest !~ pattern + fail ArgumentError, "invalid value for \"configuration_digest\", must conform to the pattern #{pattern}." + end + + @configuration_digest = configuration_digest + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + status == o.status && + configuration_digest == o.configuration_digest && + error_message == o.error_message && + created_at == o.created_at && + completed_at == o.completed_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, status, configuration_digest, error_message, created_at, completed_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_candidate_list.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_candidate_list.rb new file mode 100644 index 00000000..1bd6368a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_candidate_list.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class FrontendCandidateList < ApiModelBase + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FrontendCandidateList` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FrontendCandidateList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + else + self.data = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @data.nil? + invalid_properties.push('invalid value for "data", data cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] data Value to be assigned + def data=(data) + if data.nil? + fail ArgumentError, 'data cannot be nil' + end + + @data = data + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_conflict_error.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_conflict_error.rb index 90e9f5d7..7d2e5d05 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_conflict_error.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_conflict_error.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -18,7 +18,7 @@ module Volcano::Generated class FrontendCustomDomainConflictError < ApiModelBase attr_accessor :error - # Stable machine-readable error code when a specific recovery path is available. + # Stable machine-readable error code when a specific recovery path is available. `plan_required` (403) means the project owner's plan does not include the requested feature or option; upgrading the plan unlocks it. `person_required` (403) means a project access token tried to change LavaFlow settings, which only the project's owner changes, with a platform token, or that the change needs the owner's own credential that expires, a project repository, and an owner whose GitHub account can push to it; `error` says which. A 403 without a code leaves the reason unspecified: it can be an access refusal, a reached limit, or a plan check that could not read the owner's plan. Match on the code, not the message text. attr_accessor :code attr_accessor :required_record diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_list.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_list.rb new file mode 100644 index 00000000..762db035 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_list.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class FrontendCustomDomainList < ApiModelBase + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FrontendCustomDomainList` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FrontendCustomDomainList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + else + self.data = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @data.nil? + invalid_properties.push('invalid value for "data", data cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] data Value to be assigned + def data=(data) + if data.nil? + fail ArgumentError, 'data cannot be nil' + end + + @data = data + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_redirect.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_redirect.rb new file mode 100644 index 00000000..8e8d8546 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_redirect.rb @@ -0,0 +1,215 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class FrontendCustomDomainRedirect < ApiModelBase + # Hostname the domain redirects to. + attr_accessor :to + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'to' => :'to', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'to' => :'String', + :'status' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FrontendCustomDomainRedirect` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FrontendCustomDomainRedirect`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'to') + self.to = attributes[:'to'] + else + self.to = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @to.nil? + invalid_properties.push('invalid value for "to", to cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @to.nil? + return false if @status.nil? + status_validator = EnumAttributeValidator.new('Integer', [301, 302, 307, 308]) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method with validation + # @param [Object] to Value to be assigned + def to=(to) + if to.nil? + fail ArgumentError, 'to cannot be nil' + end + + @to = to + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('Integer', [301, 302, 307, 308]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + to == o.to && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [to, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_redirect_request.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_redirect_request.rb new file mode 100644 index 00000000..4141607f --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_redirect_request.rb @@ -0,0 +1,230 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Redirects every request for the domain to `to`, another active domain of the same frontend that serves it, keeping the path and query string. + class FrontendCustomDomainRedirectRequest < ApiModelBase + # Hostname of an active domain of the same frontend that serves it. + attr_accessor :to + + # Redirect status. 301 and 308 are permanent, 302 and 307 temporary; 307 and 308 keep the request method and body. + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'to' => :'to', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'to' => :'String', + :'status' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FrontendCustomDomainRedirectRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FrontendCustomDomainRedirectRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'to') + self.to = attributes[:'to'] + else + self.to = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = STATUS::N308 + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @to.nil? + invalid_properties.push('invalid value for "to", to cannot be nil.') + end + + if @to.to_s.length > 253 + invalid_properties.push('invalid value for "to", the character length must be smaller than or equal to 253.') + end + + if @to.to_s.length < 1 + invalid_properties.push('invalid value for "to", the character length must be greater than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @to.nil? + return false if @to.to_s.length > 253 + return false if @to.to_s.length < 1 + status_validator = EnumAttributeValidator.new('Integer', [301, 302, 307, 308]) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method with validation + # @param [Object] to Value to be assigned + def to=(to) + if to.nil? + fail ArgumentError, 'to cannot be nil' + end + + if to.to_s.length > 253 + fail ArgumentError, 'invalid value for "to", the character length must be smaller than or equal to 253.' + end + + if to.to_s.length < 1 + fail ArgumentError, 'invalid value for "to", the character length must be greater than or equal to 1.' + end + + @to = to + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('Integer', [301, 302, 307, 308]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + to == o.to && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [to, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_response.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_response.rb index 94ba5abd..7fccd396 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -41,6 +41,9 @@ class FrontendCustomDomainResponse < ApiModelBase attr_accessor :effective_urls + # Where the domain redirects every request, or null when it serves the frontend. + attr_accessor :redirect + attr_accessor :created_at attr_accessor :updated_at @@ -80,6 +83,7 @@ def self.attribute_map :'required_routing_record' => :'required_routing_record', :'routing_target_hostname' => :'routing_target_hostname', :'effective_urls' => :'effective_urls', + :'redirect' => :'redirect', :'created_at' => :'created_at', :'updated_at' => :'updated_at' } @@ -108,6 +112,7 @@ def self.openapi_types :'required_routing_record' => :'FrontendDomainRoutingRecord', :'routing_target_hostname' => :'String', :'effective_urls' => :'Array', + :'redirect' => :'FrontendCustomDomainRedirect', :'created_at' => :'Time', :'updated_at' => :'Time' } @@ -116,6 +121,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'redirect', ]) end @@ -189,6 +195,12 @@ def initialize(attributes = {}) self.effective_urls = nil end + if attributes.key?(:'redirect') + self.redirect = attributes[:'redirect'] + else + self.redirect = nil + end + if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] else @@ -355,6 +367,7 @@ def ==(o) required_routing_record == o.required_routing_record && routing_target_hostname == o.routing_target_hostname && effective_urls == o.effective_urls && + redirect == o.redirect && created_at == o.created_at && updated_at == o.updated_at end @@ -368,7 +381,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [domain, tls_mode, domain_status, verification_status, serving_certificate, failure_reason, verification_records, required_routing_record, routing_target_hostname, effective_urls, created_at, updated_at].hash + [domain, tls_mode, domain_status, verification_status, serving_certificate, failure_reason, verification_records, required_routing_record, routing_target_hostname, effective_urls, redirect, created_at, updated_at].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config.rb index e6a86f29..1a950232 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config_not.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config_not.rb index 8364359f..9eabe4c7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config_not.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config_not.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config_not_any_of.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config_not_any_of.rb index 22b9fd13..833b9924 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config_not_any_of.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config_not_any_of.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config_not_any_of1.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config_not_any_of1.rb index a9fc443b..968630c6 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config_not_any_of1.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config_not_any_of1.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_deployment.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_deployment.rb index ed1af2d8..46ae0a76 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend_deployment.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_deployment.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -32,6 +32,11 @@ class FrontendDeployment < ApiModelBase # Platform user that triggered a request-initiated deployment; absent for git and system deployments. attr_accessor :initiated_by + attr_accessor :commit + + # The deployment whose build this deployment published instead of compiling its own source. Absent when the deployment compiled. + attr_accessor :source_deployment_id + attr_accessor :site_url # Total build time recorded for this deployment, in seconds. @@ -83,6 +88,8 @@ def self.attribute_map :'status' => :'status', :'deploy_source' => :'deploy_source', :'initiated_by' => :'initiated_by', + :'commit' => :'commit', + :'source_deployment_id' => :'source_deployment_id', :'site_url' => :'site_url', :'build_duration_seconds' => :'build_duration_seconds', :'build_count' => :'build_count', @@ -114,6 +121,8 @@ def self.openapi_types :'status' => :'String', :'deploy_source' => :'String', :'initiated_by' => :'String', + :'commit' => :'DeploymentCommit', + :'source_deployment_id' => :'String', :'site_url' => :'String', :'build_duration_seconds' => :'Integer', :'build_count' => :'Integer', @@ -187,6 +196,14 @@ def initialize(attributes = {}) self.initiated_by = attributes[:'initiated_by'] end + if attributes.key?(:'commit') + self.commit = attributes[:'commit'] + end + + if attributes.key?(:'source_deployment_id') + self.source_deployment_id = attributes[:'source_deployment_id'] + end + if attributes.key?(:'site_url') self.site_url = attributes[:'site_url'] end @@ -377,6 +394,8 @@ def ==(o) status == o.status && deploy_source == o.deploy_source && initiated_by == o.initiated_by && + commit == o.commit && + source_deployment_id == o.source_deployment_id && site_url == o.site_url && build_duration_seconds == o.build_duration_seconds && build_count == o.build_count && @@ -396,7 +415,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, frontend_id, project_id, operation, status, deploy_source, initiated_by, site_url, build_duration_seconds, build_count, build_duration_recorded_at, progress, error_message, created_at, updated_at].hash + [id, frontend_id, project_id, operation, status, deploy_source, initiated_by, commit, source_deployment_id, site_url, build_duration_seconds, build_count, build_duration_recorded_at, progress, error_message, created_at, updated_at].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_domain_routing_record.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_domain_routing_record.rb index e6454fe1..ef2a01b5 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend_domain_routing_record.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_domain_routing_record.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_domain_verification_record.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_domain_verification_record.rb index 96d63c40..a50c175b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend_domain_verification_record.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_domain_verification_record.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_function_route.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_function_route.rb index a3ff2c5e..c93ac997 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend_function_route.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_function_route.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_function_route_list.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_function_route_list.rb index 0e11386e..9777dcf8 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend_function_route_list.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_function_route_list.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_route.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_route.rb new file mode 100644 index 00000000..6e607550 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_route.rb @@ -0,0 +1,352 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A path prefix on this Frontend's hostnames served by another Frontend in the Project, the mounted Frontend. Paths are forwarded unchanged, so the mounted Frontend serves its prefix as real pages (page directories or a matching `basePath`). + class FrontendRoute < ApiModelBase + attr_accessor :id + + attr_accessor :project_id + + # The Frontend whose hostnames serve the route + attr_accessor :frontend_id + + # The mounted Frontend + attr_accessor :target_frontend_id + + attr_accessor :path_prefix + + attr_accessor :created_at + + attr_accessor :updated_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'project_id' => :'project_id', + :'frontend_id' => :'frontend_id', + :'target_frontend_id' => :'target_frontend_id', + :'path_prefix' => :'path_prefix', + :'created_at' => :'created_at', + :'updated_at' => :'updated_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'project_id' => :'String', + :'frontend_id' => :'String', + :'target_frontend_id' => :'String', + :'path_prefix' => :'String', + :'created_at' => :'Time', + :'updated_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FrontendRoute` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FrontendRoute`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'frontend_id') + self.frontend_id = attributes[:'frontend_id'] + else + self.frontend_id = nil + end + + if attributes.key?(:'target_frontend_id') + self.target_frontend_id = attributes[:'target_frontend_id'] + else + self.target_frontend_id = nil + end + + if attributes.key?(:'path_prefix') + self.path_prefix = attributes[:'path_prefix'] + else + self.path_prefix = nil + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + else + self.updated_at = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @frontend_id.nil? + invalid_properties.push('invalid value for "frontend_id", frontend_id cannot be nil.') + end + + if @target_frontend_id.nil? + invalid_properties.push('invalid value for "target_frontend_id", target_frontend_id cannot be nil.') + end + + if @path_prefix.nil? + invalid_properties.push('invalid value for "path_prefix", path_prefix cannot be nil.') + end + + if @path_prefix.to_s.length > 512 + invalid_properties.push('invalid value for "path_prefix", the character length must be smaller than or equal to 512.') + end + + if @path_prefix.to_s.length < 2 + invalid_properties.push('invalid value for "path_prefix", the character length must be greater than or equal to 2.') + end + + pattern = Regexp.new(/^\/[^?#\\]*[^\/?#\\]$/) + if @path_prefix !~ pattern + invalid_properties.push("invalid value for \"path_prefix\", must conform to the pattern #{pattern}.") + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @project_id.nil? + return false if @frontend_id.nil? + return false if @target_frontend_id.nil? + return false if @path_prefix.nil? + return false if @path_prefix.to_s.length > 512 + return false if @path_prefix.to_s.length < 2 + return false if @path_prefix !~ Regexp.new(/^\/[^?#\\]*[^\/?#\\]$/) + return false if @created_at.nil? + return false if @updated_at.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] frontend_id Value to be assigned + def frontend_id=(frontend_id) + if frontend_id.nil? + fail ArgumentError, 'frontend_id cannot be nil' + end + + @frontend_id = frontend_id + end + + # Custom attribute writer method with validation + # @param [Object] target_frontend_id Value to be assigned + def target_frontend_id=(target_frontend_id) + if target_frontend_id.nil? + fail ArgumentError, 'target_frontend_id cannot be nil' + end + + @target_frontend_id = target_frontend_id + end + + # Custom attribute writer method with validation + # @param [Object] path_prefix Value to be assigned + def path_prefix=(path_prefix) + if path_prefix.nil? + fail ArgumentError, 'path_prefix cannot be nil' + end + + if path_prefix.to_s.length > 512 + fail ArgumentError, 'invalid value for "path_prefix", the character length must be smaller than or equal to 512.' + end + + if path_prefix.to_s.length < 2 + fail ArgumentError, 'invalid value for "path_prefix", the character length must be greater than or equal to 2.' + end + + pattern = Regexp.new(/^\/[^?#\\]*[^\/?#\\]$/) + if path_prefix !~ pattern + fail ArgumentError, "invalid value for \"path_prefix\", must conform to the pattern #{pattern}." + end + + @path_prefix = path_prefix + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param [Object] updated_at Value to be assigned + def updated_at=(updated_at) + if updated_at.nil? + fail ArgumentError, 'updated_at cannot be nil' + end + + @updated_at = updated_at + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + project_id == o.project_id && + frontend_id == o.frontend_id && + target_frontend_id == o.target_frontend_id && + path_prefix == o.path_prefix && + created_at == o.created_at && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, project_id, frontend_id, target_frontend_id, path_prefix, created_at, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_route_list.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_route_list.rb new file mode 100644 index 00000000..26221f3d --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_route_list.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class FrontendRouteList < ApiModelBase + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FrontendRouteList` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FrontendRouteList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + else + self.data = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @data.nil? + invalid_properties.push('invalid value for "data", data cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] data Value to be assigned + def data=(data) + if data.nil? + fail ArgumentError, 'data cannot be nil' + end + + @data = data + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_serving.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_serving.rb new file mode 100644 index 00000000..0e46a770 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_serving.rb @@ -0,0 +1,199 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # What a frontend serves. Until a Candidate is promoted it serves its own runtime and `candidate_id` is null. After a promotion, the frontend's traffic is routed to that Candidate's runtime, nothing is rebuilt or copied, and `previous_candidate_id` is the runtime a rollback returns to (null when that is the frontend's own). A Candidate that serves cannot be deleted and does not expire. One kept only as the runtime a rollback returns to does not expire either, but it can be deleted, which gives up that rollback; the frontend's own runtime stays one `to_production` rollback away. + class FrontendServing < ApiModelBase + # Counts changes to what the frontend serves or can roll back to — promotions, rollbacks, and deleting the Candidate kept for a rollback. A promotion or rollback names the revision it read, so one that read before such a change fails with `409` instead of overwriting it; read the serving state again and retry. + attr_accessor :revision + + attr_accessor :candidate_id + + attr_accessor :previous_candidate_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'revision' => :'revision', + :'candidate_id' => :'candidate_id', + :'previous_candidate_id' => :'previous_candidate_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'revision' => :'Integer', + :'candidate_id' => :'String', + :'previous_candidate_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'candidate_id', + :'previous_candidate_id' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FrontendServing` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FrontendServing`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'revision') + self.revision = attributes[:'revision'] + else + self.revision = nil + end + + if attributes.key?(:'candidate_id') + self.candidate_id = attributes[:'candidate_id'] + else + self.candidate_id = nil + end + + if attributes.key?(:'previous_candidate_id') + self.previous_candidate_id = attributes[:'previous_candidate_id'] + else + self.previous_candidate_id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @revision.nil? + invalid_properties.push('invalid value for "revision", revision cannot be nil.') + end + + if @revision < 0 + invalid_properties.push('invalid value for "revision", must be greater than or equal to 0.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @revision.nil? + return false if @revision < 0 + true + end + + # Custom attribute writer method with validation + # @param [Object] revision Value to be assigned + def revision=(revision) + if revision.nil? + fail ArgumentError, 'revision cannot be nil' + end + + if revision < 0 + fail ArgumentError, 'invalid value for "revision", must be greater than or equal to 0.' + end + + @revision = revision + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + revision == o.revision && + candidate_id == o.candidate_id && + previous_candidate_id == o.previous_candidate_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [revision, candidate_id, previous_candidate_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_daily_entry.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_daily_entry.rb index bfb1d291..5ed9ab98 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_daily_entry.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_daily_entry.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_data.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_data.rb index 1b4936b5..9917b1e0 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_data.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_data.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_history_response.rb b/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_history_response.rb index 0aaab2c6..7e33e9b9 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_history_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_history_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/function.rb b/lib/volcano/generated/lib/volcano-generated/models/function.rb index 8b526536..ac60540e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/function.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/function.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -41,7 +41,7 @@ class Function < ApiModelBase # Whether OpenAPI metadata is configured; list responses omit the document itself. attr_accessor :has_openapi_spec - # Canonical geo-routed HTTPS endpoint for invoking this function. Use it as-is: it does not share a domain with the API, so a host derived from the API URL will not reach the function. Omitted when the deployment serves no public invocation domain, as in local development, so a client testing for an empty string never matches. + # Canonical geo-routed HTTPS endpoint for invoking this function. Use it as-is: it does not share a domain with the API, so a host derived from the API URL will not reach the function. In local development it is `http://{id}.functions.localhost:8000/`, served by the local API. Omitted when the deployment serves no function invocation domain, so a client testing for an empty string never matches. attr_accessor :invoke_url # Regions where this function is currently deployed @@ -57,6 +57,9 @@ class Function < ApiModelBase # Newest queued deployment that will run after the current operation attr_accessor :pending_deployment_id + # The promoted preview whose runtime receives this function's traffic, the same as `candidate_id` in `serving`. Null when the function runs its own build. While it is set, `current_deployment_id` and `status` describe the function's own build, which receives no traffic until the function is rolled back. + attr_accessor :serving_candidate_id + # Most recent successful invocation timestamp attr_accessor :last_invoked_at @@ -106,6 +109,7 @@ def self.attribute_map :'handler' => :'handler', :'current_deployment_id' => :'current_deployment_id', :'pending_deployment_id' => :'pending_deployment_id', + :'serving_candidate_id' => :'serving_candidate_id', :'last_invoked_at' => :'last_invoked_at', :'created_at' => :'created_at', :'updated_at' => :'updated_at' @@ -142,6 +146,7 @@ def self.openapi_types :'handler' => :'String', :'current_deployment_id' => :'String', :'pending_deployment_id' => :'String', + :'serving_candidate_id' => :'String', :'last_invoked_at' => :'Time', :'created_at' => :'Time', :'updated_at' => :'Time' @@ -152,6 +157,7 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'openapi_spec', + :'serving_candidate_id', ]) end @@ -265,6 +271,12 @@ def initialize(attributes = {}) self.pending_deployment_id = attributes[:'pending_deployment_id'] end + if attributes.key?(:'serving_candidate_id') + self.serving_candidate_id = attributes[:'serving_candidate_id'] + else + self.serving_candidate_id = nil + end + if attributes.key?(:'last_invoked_at') self.last_invoked_at = attributes[:'last_invoked_at'] end @@ -521,6 +533,7 @@ def ==(o) handler == o.handler && current_deployment_id == o.current_deployment_id && pending_deployment_id == o.pending_deployment_id && + serving_candidate_id == o.serving_candidate_id && last_invoked_at == o.last_invoked_at && created_at == o.created_at && updated_at == o.updated_at @@ -535,7 +548,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, project_id, name, status, provisioning_started_at, visibility, is_public, invocation_mode, http_auth_mode, openapi_spec, has_openapi_spec, invoke_url, deployed_regions, runtime, handler, current_deployment_id, pending_deployment_id, last_invoked_at, created_at, updated_at].hash + [id, project_id, name, status, provisioning_started_at, visibility, is_public, invocation_mode, http_auth_mode, openapi_spec, has_openapi_spec, invoke_url, deployed_regions, runtime, handler, current_deployment_id, pending_deployment_id, serving_candidate_id, last_invoked_at, created_at, updated_at].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_candidate.rb b/lib/volcano/generated/lib/volcano-generated/models/function_candidate.rb new file mode 100644 index 00000000..c051dc9f --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/function_candidate.rb @@ -0,0 +1,509 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A copy of an ordinary function built from an uploaded source with the function's own variables, run on a runtime of its own and invoked at its own host with the project's service key only, so it can be checked before it is promoted. It has none of the function's schedules or warmers. Fields that do not apply yet are absent. + class FunctionCandidate < ApiModelBase + attr_accessor :id + + attr_accessor :function_id + + attr_accessor :name + + attr_accessor :slug + + # `creating` until its first deployment succeeds, `ready` while it serves, `deleting` while its runtime is removed, and `error` when its deletion gave up and needs an operator. A deleted preview answers `404`. + attr_accessor :status + + # A function preview is always private. Only the project's service key, with `functions.invoke`, can invoke it; signed-in users, anon keys and access tokens are refused. + attr_accessor :exposure + + # Where the preview is invoked. Absent until its first deployment succeeds. + attr_accessor :url + + # When the preview is deleted on its own. Absent when it is kept until deleted. A preview the function runs, or keeps for a rollback, is not deleted then; it expires once it is neither. + attr_accessor :expires_at + + # The user who created the preview, when a user did. + attr_accessor :created_by + + attr_accessor :created_at + + attr_accessor :updated_at + + # The deployment the preview serves. Absent until its first deployment succeeds. It differs from `deployment` while a redeploy runs or after one failed. + attr_accessor :current_deployment_id + + attr_accessor :deployment + + # Present while the preview serves a deployment. `current` means that deployment was built with the variables, runtime and handler the function would give that source now; `changed` means they differ, or can no longer be resolved. Promotion refuses a preview whose status is `changed`. + attr_accessor :configuration_status + + # The function runs this preview's build. + attr_accessor :serving + + # A rollback of the function returns to this preview's build. + attr_accessor :kept_for_rollback + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'function_id' => :'function_id', + :'name' => :'name', + :'slug' => :'slug', + :'status' => :'status', + :'exposure' => :'exposure', + :'url' => :'url', + :'expires_at' => :'expires_at', + :'created_by' => :'created_by', + :'created_at' => :'created_at', + :'updated_at' => :'updated_at', + :'current_deployment_id' => :'current_deployment_id', + :'deployment' => :'deployment', + :'configuration_status' => :'configuration_status', + :'serving' => :'serving', + :'kept_for_rollback' => :'kept_for_rollback' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'function_id' => :'String', + :'name' => :'String', + :'slug' => :'String', + :'status' => :'String', + :'exposure' => :'String', + :'url' => :'String', + :'expires_at' => :'Time', + :'created_by' => :'String', + :'created_at' => :'Time', + :'updated_at' => :'Time', + :'current_deployment_id' => :'String', + :'deployment' => :'FunctionCandidateDeployment', + :'configuration_status' => :'String', + :'serving' => :'Boolean', + :'kept_for_rollback' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FunctionCandidate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FunctionCandidate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'function_id') + self.function_id = attributes[:'function_id'] + else + self.function_id = nil + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'slug') + self.slug = attributes[:'slug'] + else + self.slug = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'exposure') + self.exposure = attributes[:'exposure'] + else + self.exposure = nil + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + + if attributes.key?(:'expires_at') + self.expires_at = attributes[:'expires_at'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + else + self.updated_at = nil + end + + if attributes.key?(:'current_deployment_id') + self.current_deployment_id = attributes[:'current_deployment_id'] + end + + if attributes.key?(:'deployment') + self.deployment = attributes[:'deployment'] + end + + if attributes.key?(:'configuration_status') + self.configuration_status = attributes[:'configuration_status'] + end + + if attributes.key?(:'serving') + self.serving = attributes[:'serving'] + else + self.serving = nil + end + + if attributes.key?(:'kept_for_rollback') + self.kept_for_rollback = attributes[:'kept_for_rollback'] + else + self.kept_for_rollback = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @function_id.nil? + invalid_properties.push('invalid value for "function_id", function_id cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @name.to_s.length > 128 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 128.') + end + + if @slug.nil? + invalid_properties.push('invalid value for "slug", slug cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @exposure.nil? + invalid_properties.push('invalid value for "exposure", exposure cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + if @serving.nil? + invalid_properties.push('invalid value for "serving", serving cannot be nil.') + end + + if @kept_for_rollback.nil? + invalid_properties.push('invalid value for "kept_for_rollback", kept_for_rollback cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @function_id.nil? + return false if @name.nil? + return false if @name.to_s.length > 128 + return false if @slug.nil? + return false if @status.nil? + status_validator = EnumAttributeValidator.new('String', ["creating", "ready", "deleting", "error"]) + return false unless status_validator.valid?(@status) + return false if @exposure.nil? + exposure_validator = EnumAttributeValidator.new('String', ["private"]) + return false unless exposure_validator.valid?(@exposure) + return false if @created_at.nil? + return false if @updated_at.nil? + configuration_status_validator = EnumAttributeValidator.new('String', ["current", "changed"]) + return false unless configuration_status_validator.valid?(@configuration_status) + return false if @serving.nil? + return false if @kept_for_rollback.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] function_id Value to be assigned + def function_id=(function_id) + if function_id.nil? + fail ArgumentError, 'function_id cannot be nil' + end + + @function_id = function_id + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + if name.to_s.length > 128 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 128.' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] slug Value to be assigned + def slug=(slug) + if slug.nil? + fail ArgumentError, 'slug cannot be nil' + end + + @slug = slug + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["creating", "ready", "deleting", "error"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] exposure Object to be assigned + def exposure=(exposure) + validator = EnumAttributeValidator.new('String', ["private"]) + unless validator.valid?(exposure) + fail ArgumentError, "invalid value for \"exposure\", must be one of #{validator.allowable_values}." + end + @exposure = exposure + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param [Object] updated_at Value to be assigned + def updated_at=(updated_at) + if updated_at.nil? + fail ArgumentError, 'updated_at cannot be nil' + end + + @updated_at = updated_at + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] configuration_status Object to be assigned + def configuration_status=(configuration_status) + validator = EnumAttributeValidator.new('String', ["current", "changed"]) + unless validator.valid?(configuration_status) + fail ArgumentError, "invalid value for \"configuration_status\", must be one of #{validator.allowable_values}." + end + @configuration_status = configuration_status + end + + # Custom attribute writer method with validation + # @param [Object] serving Value to be assigned + def serving=(serving) + if serving.nil? + fail ArgumentError, 'serving cannot be nil' + end + + @serving = serving + end + + # Custom attribute writer method with validation + # @param [Object] kept_for_rollback Value to be assigned + def kept_for_rollback=(kept_for_rollback) + if kept_for_rollback.nil? + fail ArgumentError, 'kept_for_rollback cannot be nil' + end + + @kept_for_rollback = kept_for_rollback + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + function_id == o.function_id && + name == o.name && + slug == o.slug && + status == o.status && + exposure == o.exposure && + url == o.url && + expires_at == o.expires_at && + created_by == o.created_by && + created_at == o.created_at && + updated_at == o.updated_at && + current_deployment_id == o.current_deployment_id && + deployment == o.deployment && + configuration_status == o.configuration_status && + serving == o.serving && + kept_for_rollback == o.kept_for_rollback + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, function_id, name, slug, status, exposure, url, expires_at, created_by, created_at, updated_at, current_deployment_id, deployment, configuration_status, serving, kept_for_rollback].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_candidate_deployment.rb b/lib/volcano/generated/lib/volcano-generated/models/function_candidate_deployment.rb new file mode 100644 index 00000000..54be1c03 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/function_candidate_deployment.rb @@ -0,0 +1,367 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class FunctionCandidateDeployment < ApiModelBase + attr_accessor :id + + # `provisioning` while the build and deploy run, `active` once the preview serves this deployment, and `failed` when it could not be built or deployed. A failed deployment of a preview that already served keeps the previous deployment serving. + attr_accessor :status + + attr_accessor :operation + + # The digest of the image this deployment published, per region. Present once the deployment succeeded. A promotion points the function at this image and deploys nothing. + attr_accessor :image_digests + + # Identifies the variables the build used without carrying any value. + attr_accessor :configuration_digest + + attr_accessor :regions + + # Why a failed deployment failed. + attr_accessor :error_message + + attr_accessor :created_at + + # Set once the deployment is no longer provisioning. + attr_accessor :completed_at + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'status' => :'status', + :'operation' => :'operation', + :'image_digests' => :'image_digests', + :'configuration_digest' => :'configuration_digest', + :'regions' => :'regions', + :'error_message' => :'error_message', + :'created_at' => :'created_at', + :'completed_at' => :'completed_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'status' => :'String', + :'operation' => :'String', + :'image_digests' => :'Array', + :'configuration_digest' => :'String', + :'regions' => :'Array', + :'error_message' => :'String', + :'created_at' => :'Time', + :'completed_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FunctionCandidateDeployment` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FunctionCandidateDeployment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'operation') + self.operation = attributes[:'operation'] + else + self.operation = nil + end + + if attributes.key?(:'image_digests') + if (value = attributes[:'image_digests']).is_a?(Array) + self.image_digests = value + end + end + + if attributes.key?(:'configuration_digest') + self.configuration_digest = attributes[:'configuration_digest'] + else + self.configuration_digest = nil + end + + if attributes.key?(:'regions') + if (value = attributes[:'regions']).is_a?(Array) + self.regions = value + end + else + self.regions = nil + end + + if attributes.key?(:'error_message') + self.error_message = attributes[:'error_message'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + + if attributes.key?(:'completed_at') + self.completed_at = attributes[:'completed_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @operation.nil? + invalid_properties.push('invalid value for "operation", operation cannot be nil.') + end + + if @configuration_digest.nil? + invalid_properties.push('invalid value for "configuration_digest", configuration_digest cannot be nil.') + end + + pattern = Regexp.new(/^sha256:[0-9a-f]{64}$/) + if @configuration_digest !~ pattern + invalid_properties.push("invalid value for \"configuration_digest\", must conform to the pattern #{pattern}.") + end + + if @regions.nil? + invalid_properties.push('invalid value for "regions", regions cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @status.nil? + status_validator = EnumAttributeValidator.new('String', ["provisioning", "active", "failed"]) + return false unless status_validator.valid?(@status) + return false if @operation.nil? + operation_validator = EnumAttributeValidator.new('String', ["deploy", "redeploy"]) + return false unless operation_validator.valid?(@operation) + return false if @configuration_digest.nil? + return false if @configuration_digest !~ Regexp.new(/^sha256:[0-9a-f]{64}$/) + return false if @regions.nil? + return false if @created_at.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["provisioning", "active", "failed"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] operation Object to be assigned + def operation=(operation) + validator = EnumAttributeValidator.new('String', ["deploy", "redeploy"]) + unless validator.valid?(operation) + fail ArgumentError, "invalid value for \"operation\", must be one of #{validator.allowable_values}." + end + @operation = operation + end + + # Custom attribute writer method with validation + # @param [Object] configuration_digest Value to be assigned + def configuration_digest=(configuration_digest) + if configuration_digest.nil? + fail ArgumentError, 'configuration_digest cannot be nil' + end + + pattern = Regexp.new(/^sha256:[0-9a-f]{64}$/) + if configuration_digest !~ pattern + fail ArgumentError, "invalid value for \"configuration_digest\", must conform to the pattern #{pattern}." + end + + @configuration_digest = configuration_digest + end + + # Custom attribute writer method with validation + # @param [Object] regions Value to be assigned + def regions=(regions) + if regions.nil? + fail ArgumentError, 'regions cannot be nil' + end + + @regions = regions + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + status == o.status && + operation == o.operation && + image_digests == o.image_digests && + configuration_digest == o.configuration_digest && + regions == o.regions && + error_message == o.error_message && + created_at == o.created_at && + completed_at == o.completed_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, status, operation, image_digests, configuration_digest, regions, error_message, created_at, completed_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_candidate_deployment_list.rb b/lib/volcano/generated/lib/volcano-generated/models/function_candidate_deployment_list.rb new file mode 100644 index 00000000..64f7983e --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/function_candidate_deployment_list.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class FunctionCandidateDeploymentList < ApiModelBase + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FunctionCandidateDeploymentList` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FunctionCandidateDeploymentList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + else + self.data = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @data.nil? + invalid_properties.push('invalid value for "data", data cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] data Value to be assigned + def data=(data) + if data.nil? + fail ArgumentError, 'data cannot be nil' + end + + @data = data + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_candidate_list.rb b/lib/volcano/generated/lib/volcano-generated/models/function_candidate_list.rb new file mode 100644 index 00000000..8f348d3a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/function_candidate_list.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class FunctionCandidateList < ApiModelBase + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FunctionCandidateList` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FunctionCandidateList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + else + self.data = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @data.nil? + invalid_properties.push('invalid value for "data", data cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] data Value to be assigned + def data=(data) + if data.nil? + fail ArgumentError, 'data cannot be nil' + end + + @data = data + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_deployment.rb b/lib/volcano/generated/lib/volcano-generated/models/function_deployment.rb index f2bd7a2c..e098eef3 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/function_deployment.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/function_deployment.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -33,6 +33,8 @@ class FunctionDeployment < ApiModelBase # Platform user that triggered a request-initiated deployment; absent for git and system deployments. attr_accessor :initiated_by + attr_accessor :commit + # Total build time recorded for this deployment, in seconds. attr_accessor :build_duration_seconds @@ -85,6 +87,7 @@ def self.attribute_map :'status' => :'status', :'deploy_source' => :'deploy_source', :'initiated_by' => :'initiated_by', + :'commit' => :'commit', :'build_duration_seconds' => :'build_duration_seconds', :'build_count' => :'build_count', :'build_duration_recorded_at' => :'build_duration_recorded_at', @@ -117,6 +120,7 @@ def self.openapi_types :'status' => :'String', :'deploy_source' => :'String', :'initiated_by' => :'String', + :'commit' => :'DeploymentCommit', :'build_duration_seconds' => :'Integer', :'build_count' => :'Integer', :'build_duration_recorded_at' => :'Time', @@ -194,6 +198,10 @@ def initialize(attributes = {}) self.initiated_by = attributes[:'initiated_by'] end + if attributes.key?(:'commit') + self.commit = attributes[:'commit'] + end + if attributes.key?(:'build_duration_seconds') self.build_duration_seconds = attributes[:'build_duration_seconds'] end @@ -385,6 +393,7 @@ def ==(o) status == o.status && deploy_source == o.deploy_source && initiated_by == o.initiated_by && + commit == o.commit && build_duration_seconds == o.build_duration_seconds && build_count == o.build_count && build_duration_recorded_at == o.build_duration_recorded_at && @@ -404,7 +413,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, function_id, project_id, batch_id, operation, status, deploy_source, initiated_by, build_duration_seconds, build_count, build_duration_recorded_at, progress, error_message, completed_at, created_at, updated_at].hash + [id, function_id, project_id, batch_id, operation, status, deploy_source, initiated_by, commit, build_duration_seconds, build_count, build_duration_recorded_at, progress, error_message, completed_at, created_at, updated_at].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_http_auth_mode.rb b/lib/volcano/generated/lib/volcano-generated/models/function_http_auth_mode.rb index c9360246..9690a54d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/function_http_auth_mode.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/function_http_auth_mode.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_image_digest.rb b/lib/volcano/generated/lib/volcano-generated/models/function_image_digest.rb new file mode 100644 index 00000000..209c8b2a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/function_image_digest.rb @@ -0,0 +1,186 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The content digest of a function image in one region. It names no registry or account. + class FunctionImageDigest < ApiModelBase + # The region the image was published to. Absent when the build published one image for every region. + attr_accessor :region + + attr_accessor :digest + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'region' => :'region', + :'digest' => :'digest' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'region' => :'String', + :'digest' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FunctionImageDigest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FunctionImageDigest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'region') + self.region = attributes[:'region'] + end + + if attributes.key?(:'digest') + self.digest = attributes[:'digest'] + else + self.digest = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @digest.nil? + invalid_properties.push('invalid value for "digest", digest cannot be nil.') + end + + pattern = Regexp.new(/^sha256:[0-9a-f]{64}$/) + if @digest !~ pattern + invalid_properties.push("invalid value for \"digest\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @digest.nil? + return false if @digest !~ Regexp.new(/^sha256:[0-9a-f]{64}$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] digest Value to be assigned + def digest=(digest) + if digest.nil? + fail ArgumentError, 'digest cannot be nil' + end + + pattern = Regexp.new(/^sha256:[0-9a-f]{64}$/) + if digest !~ pattern + fail ArgumentError, "invalid value for \"digest\", must conform to the pattern #{pattern}." + end + + @digest = digest + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + region == o.region && + digest == o.digest + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [region, digest].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_invocation_mode.rb b/lib/volcano/generated/lib/volcano-generated/models/function_invocation_mode.rb index fcc6d04d..4a1c19b8 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/function_invocation_mode.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/function_invocation_mode.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_invocation_request.rb b/lib/volcano/generated/lib/volcano-generated/models/function_invocation_request.rb index 6e174c33..b7e8e8b8 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/function_invocation_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/function_invocation_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -15,7 +15,7 @@ module Volcano::Generated class FunctionInvocationRequest < ApiModelBase - # Payload to send to the function. If invoked with auth user token, Volcano automatically injects `__volcano_auth` context: ```javascript { ...yourPayload, __volcano_auth: { user_id: \"uuid\", email: \"user@example.com\", project_id: \"uuid\", role: \"authenticated\" | \"anonymous\" } } ``` + # Payload to send to the function. If invoked with auth user token, Volcano automatically injects `__volcano_auth` context: ```javascript { ...yourPayload, __volcano_auth: { user_id: \"uuid\", email: \"user@example.com\", project_id: \"uuid\", role: \"authenticated\" | \"anonymous\" } } ``` The top-level `__volcano_auth`, `__volcano_http` and `__volcano_mount` keys are reserved; Volcano removes caller-supplied values for all three. attr_accessor :payload # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_kind.rb b/lib/volcano/generated/lib/volcano-generated/models/function_kind.rb index 695b5290..bc7ce546 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/function_kind.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/function_kind.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_kind_filter.rb b/lib/volcano/generated/lib/volcano-generated/models/function_kind_filter.rb index db9c4cf2..b3469a24 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/function_kind_filter.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/function_kind_filter.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_production_environment.rb b/lib/volcano/generated/lib/volcano-generated/models/function_production_environment.rb new file mode 100644 index 00000000..1c0c5e58 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/function_production_environment.rb @@ -0,0 +1,200 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Whether the function's own build has the project's current variables. While a preview serves the function, `volcano config deploy` and replacing the shared variable list skip the function, so its own build keeps the values it had. A rollback to the function's own build starts synchronizing them as it returns the traffic, and the status reads `current` once that synchronization completes or a deployment of the function activates. A synchronization that fails leaves it `out_of_date`. + class FunctionProductionEnvironment < ApiModelBase + # `out_of_date`: a stored variable change skipped the function while a preview served it. + attr_accessor :status + + # When the latest skipped change was stored. Absent while `status` is `current`. + attr_accessor :out_of_date_since + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'out_of_date_since' => :'out_of_date_since' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'String', + :'out_of_date_since' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FunctionProductionEnvironment` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FunctionProductionEnvironment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'out_of_date_since') + self.out_of_date_since = attributes[:'out_of_date_since'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + status_validator = EnumAttributeValidator.new('String', ["current", "out_of_date"]) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["current", "out_of_date"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + out_of_date_since == o.out_of_date_since + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, out_of_date_since].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_promotion_request.rb b/lib/volcano/generated/lib/volcano-generated/models/function_promotion_request.rb new file mode 100644 index 00000000..e5c040e2 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/function_promotion_request.rb @@ -0,0 +1,174 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class FunctionPromotionRequest < ApiModelBase + # The `revision` the caller read from `serving`. Refuses the promotion with `stale_revision` unless what the function runs is still at this revision. + attr_accessor :expected_revision + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'expected_revision' => :'expected_revision' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'expected_revision' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FunctionPromotionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FunctionPromotionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'expected_revision') + self.expected_revision = attributes[:'expected_revision'] + else + self.expected_revision = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @expected_revision.nil? + invalid_properties.push('invalid value for "expected_revision", expected_revision cannot be nil.') + end + + if @expected_revision < 0 + invalid_properties.push('invalid value for "expected_revision", must be greater than or equal to 0.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @expected_revision.nil? + return false if @expected_revision < 0 + true + end + + # Custom attribute writer method with validation + # @param [Object] expected_revision Value to be assigned + def expected_revision=(expected_revision) + if expected_revision.nil? + fail ArgumentError, 'expected_revision cannot be nil' + end + + if expected_revision < 0 + fail ArgumentError, 'invalid value for "expected_revision", must be greater than or equal to 0.' + end + + @expected_revision = expected_revision + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + expected_revision == o.expected_revision + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [expected_revision].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_region.rb b/lib/volcano/generated/lib/volcano-generated/models/function_region.rb index 73b63832..f8f56439 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/function_region.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/function_region.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_rollback_request.rb b/lib/volcano/generated/lib/volcano-generated/models/function_rollback_request.rb new file mode 100644 index 00000000..60efdb6e --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/function_rollback_request.rb @@ -0,0 +1,186 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class FunctionRollbackRequest < ApiModelBase + # The `revision` the caller read from `serving`. Refuses the rollback with `stale_revision` unless what the function runs is still at this revision, so a retried rollback cannot undo itself. + attr_accessor :expected_revision + + # Return to the function's own build whatever it ran before. + attr_accessor :to_production + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'expected_revision' => :'expected_revision', + :'to_production' => :'to_production' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'expected_revision' => :'Integer', + :'to_production' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FunctionRollbackRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FunctionRollbackRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'expected_revision') + self.expected_revision = attributes[:'expected_revision'] + else + self.expected_revision = nil + end + + if attributes.key?(:'to_production') + self.to_production = attributes[:'to_production'] + else + self.to_production = false + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @expected_revision.nil? + invalid_properties.push('invalid value for "expected_revision", expected_revision cannot be nil.') + end + + if @expected_revision < 0 + invalid_properties.push('invalid value for "expected_revision", must be greater than or equal to 0.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @expected_revision.nil? + return false if @expected_revision < 0 + true + end + + # Custom attribute writer method with validation + # @param [Object] expected_revision Value to be assigned + def expected_revision=(expected_revision) + if expected_revision.nil? + fail ArgumentError, 'expected_revision cannot be nil' + end + + if expected_revision < 0 + fail ArgumentError, 'invalid value for "expected_revision", must be greater than or equal to 0.' + end + + @expected_revision = expected_revision + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + expected_revision == o.expected_revision && + to_production == o.to_production + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [expected_revision, to_production].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_runtime_deployment.rb b/lib/volcano/generated/lib/volcano-generated/models/function_runtime_deployment.rb index 170daa1d..0b483884 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/function_runtime_deployment.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/function_runtime_deployment.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_runtime_option.rb b/lib/volcano/generated/lib/volcano-generated/models/function_runtime_option.rb index 207d2a78..d49efe9f 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/function_runtime_option.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/function_runtime_option.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_runtimes_response.rb b/lib/volcano/generated/lib/volcano-generated/models/function_runtimes_response.rb index 7bed7b8c..f3e34c6b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/function_runtimes_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/function_runtimes_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_scheduler.rb b/lib/volcano/generated/lib/volcano-generated/models/function_scheduler.rb index 78ac6a6a..a4842b7e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/function_scheduler.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/function_scheduler.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -49,6 +49,21 @@ class FunctionScheduler < ApiModelBase # Total number of times this scheduler has executed. 0 for a scheduler that has never run. attr_accessor :run_count + # `failing` while `consecutive_failures` is above 0; `healthy` otherwise, including before its first run in the region the scheduler runs in now. A run from a region it moved away from does not count. For a durable function a run finishes when its execution does, so a run that starts but then fails counts as failed. + attr_accessor :health + + # How many runs in a row have failed in the region the scheduler runs in now. Resets to 0 when a run succeeds, and starts at 0 in a region it moves to. + attr_accessor :consecutive_failures + + # Outcome of the most recent finished run. Absent before the first. + attr_accessor :last_run_status + + # When the most recent successful run finished. + attr_accessor :last_success_at + + # When the most recent failed run finished. + attr_accessor :last_failure_at + attr_accessor :created_at attr_accessor :updated_at @@ -94,6 +109,11 @@ def self.attribute_map :'last_completed_at' => :'last_completed_at', :'last_error' => :'last_error', :'run_count' => :'run_count', + :'health' => :'health', + :'consecutive_failures' => :'consecutive_failures', + :'last_run_status' => :'last_run_status', + :'last_success_at' => :'last_success_at', + :'last_failure_at' => :'last_failure_at', :'created_at' => :'created_at', :'updated_at' => :'updated_at' } @@ -128,6 +148,11 @@ def self.openapi_types :'last_completed_at' => :'Time', :'last_error' => :'String', :'run_count' => :'Integer', + :'health' => :'String', + :'consecutive_failures' => :'Integer', + :'last_run_status' => :'String', + :'last_success_at' => :'Time', + :'last_failure_at' => :'Time', :'created_at' => :'Time', :'updated_at' => :'Time' } @@ -223,6 +248,26 @@ def initialize(attributes = {}) self.run_count = attributes[:'run_count'] end + if attributes.key?(:'health') + self.health = attributes[:'health'] + end + + if attributes.key?(:'consecutive_failures') + self.consecutive_failures = attributes[:'consecutive_failures'] + end + + if attributes.key?(:'last_run_status') + self.last_run_status = attributes[:'last_run_status'] + end + + if attributes.key?(:'last_success_at') + self.last_success_at = attributes[:'last_success_at'] + end + + if attributes.key?(:'last_failure_at') + self.last_failure_at = attributes[:'last_failure_at'] + end + if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end @@ -237,6 +282,10 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new + if !@consecutive_failures.nil? && @consecutive_failures < 0 + invalid_properties.push('invalid value for "consecutive_failures", must be greater than or equal to 0.') + end + invalid_properties end @@ -246,6 +295,11 @@ def valid? warn '[DEPRECATED] the `valid?` method is obsolete' schedule_kind_validator = EnumAttributeValidator.new('String', ["cron"]) return false unless schedule_kind_validator.valid?(@schedule_kind) + health_validator = EnumAttributeValidator.new('String', ["healthy", "failing"]) + return false unless health_validator.valid?(@health) + return false if !@consecutive_failures.nil? && @consecutive_failures < 0 + last_run_status_validator = EnumAttributeValidator.new('String', ["succeeded", "failed"]) + return false unless last_run_status_validator.valid?(@last_run_status) true end @@ -259,6 +313,40 @@ def schedule_kind=(schedule_kind) @schedule_kind = schedule_kind end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] health Object to be assigned + def health=(health) + validator = EnumAttributeValidator.new('String', ["healthy", "failing"]) + unless validator.valid?(health) + fail ArgumentError, "invalid value for \"health\", must be one of #{validator.allowable_values}." + end + @health = health + end + + # Custom attribute writer method with validation + # @param [Object] consecutive_failures Value to be assigned + def consecutive_failures=(consecutive_failures) + if consecutive_failures.nil? + fail ArgumentError, 'consecutive_failures cannot be nil' + end + + if consecutive_failures < 0 + fail ArgumentError, 'invalid value for "consecutive_failures", must be greater than or equal to 0.' + end + + @consecutive_failures = consecutive_failures + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] last_run_status Object to be assigned + def last_run_status=(last_run_status) + validator = EnumAttributeValidator.new('String', ["succeeded", "failed"]) + unless validator.valid?(last_run_status) + fail ArgumentError, "invalid value for \"last_run_status\", must be one of #{validator.allowable_values}." + end + @last_run_status = last_run_status + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -280,6 +368,11 @@ def ==(o) last_completed_at == o.last_completed_at && last_error == o.last_error && run_count == o.run_count && + health == o.health && + consecutive_failures == o.consecutive_failures && + last_run_status == o.last_run_status && + last_success_at == o.last_success_at && + last_failure_at == o.last_failure_at && created_at == o.created_at && updated_at == o.updated_at end @@ -293,7 +386,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, project_id, function_id, function_kind, name, enabled, schedule_kind, cron_expression, payload, regions, regions_explicit, next_run_at, last_started_at, last_completed_at, last_error, run_count, created_at, updated_at].hash + [id, project_id, function_id, function_kind, name, enabled, schedule_kind, cron_expression, payload, regions, regions_explicit, next_run_at, last_started_at, last_completed_at, last_error, run_count, health, consecutive_failures, last_run_status, last_success_at, last_failure_at, created_at, updated_at].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_scheduler_list_response.rb b/lib/volcano/generated/lib/volcano-generated/models/function_scheduler_list_response.rb index 1af7edcd..f0d817a7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/function_scheduler_list_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/function_scheduler_list_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_serving.rb b/lib/volcano/generated/lib/volcano-generated/models/function_serving.rb new file mode 100644 index 00000000..60c04cd7 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/function_serving.rb @@ -0,0 +1,236 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # What a function runs. Until a preview is promoted it runs its own build and `candidate_id` is null. After a promotion, the function's traffic runs on that preview's runtime, nothing is rebuilt or deployed, and `previous_candidate_id` is what a rollback returns to (null when that is the function's own build). A preview the function runs cannot be deleted and does not expire. One kept only as what a rollback returns to does not expire either, but it can be deleted, which gives up that rollback; the function's own build stays one `to_production` rollback away. + class FunctionServing < ApiModelBase + # Counts changes to what the function runs or can roll back to — promotions, rollbacks, a deployment that returns the traffic to the function's own build, and deleting the preview kept for a rollback. A promotion or rollback names the revision it read, so one that read before such a change fails with `409` (`stale_revision`) instead of overwriting it; read the serving state again and retry. + attr_accessor :revision + + # The preview whose build the function runs; null for its own. + attr_accessor :candidate_id + + # The preview a rollback returns to; null for the function's own build. + attr_accessor :previous_candidate_id + + attr_accessor :activation + + attr_accessor :production_environment + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'revision' => :'revision', + :'candidate_id' => :'candidate_id', + :'previous_candidate_id' => :'previous_candidate_id', + :'activation' => :'activation', + :'production_environment' => :'production_environment' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'revision' => :'Integer', + :'candidate_id' => :'String', + :'previous_candidate_id' => :'String', + :'activation' => :'FunctionServingActivation', + :'production_environment' => :'FunctionProductionEnvironment' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'candidate_id', + :'previous_candidate_id', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FunctionServing` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FunctionServing`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'revision') + self.revision = attributes[:'revision'] + else + self.revision = nil + end + + if attributes.key?(:'candidate_id') + self.candidate_id = attributes[:'candidate_id'] + else + self.candidate_id = nil + end + + if attributes.key?(:'previous_candidate_id') + self.previous_candidate_id = attributes[:'previous_candidate_id'] + else + self.previous_candidate_id = nil + end + + if attributes.key?(:'activation') + self.activation = attributes[:'activation'] + end + + if attributes.key?(:'production_environment') + self.production_environment = attributes[:'production_environment'] + else + self.production_environment = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @revision.nil? + invalid_properties.push('invalid value for "revision", revision cannot be nil.') + end + + if @revision < 0 + invalid_properties.push('invalid value for "revision", must be greater than or equal to 0.') + end + + if @production_environment.nil? + invalid_properties.push('invalid value for "production_environment", production_environment cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @revision.nil? + return false if @revision < 0 + return false if @production_environment.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] revision Value to be assigned + def revision=(revision) + if revision.nil? + fail ArgumentError, 'revision cannot be nil' + end + + if revision < 0 + fail ArgumentError, 'invalid value for "revision", must be greater than or equal to 0.' + end + + @revision = revision + end + + # Custom attribute writer method with validation + # @param [Object] production_environment Value to be assigned + def production_environment=(production_environment) + if production_environment.nil? + fail ArgumentError, 'production_environment cannot be nil' + end + + @production_environment = production_environment + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + revision == o.revision && + candidate_id == o.candidate_id && + previous_candidate_id == o.previous_candidate_id && + activation == o.activation && + production_environment == o.production_environment + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [revision, candidate_id, previous_candidate_id, activation, production_environment].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_serving_activation.rb b/lib/volcano/generated/lib/volcano-generated/models/function_serving_activation.rb new file mode 100644 index 00000000..55408b86 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/function_serving_activation.rb @@ -0,0 +1,302 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The latest change to what serves the function's traffic: a promotion, a rollback, or a deployment of the function that returned its traffic to its own build. Each takes effect at once. Absent until the function's first promotion. + class FunctionServingActivation < ApiModelBase + attr_accessor :id + + # `deploy`: a successful deployment of the function cleared the preview pointers. + attr_accessor :kind + + # `applied`: the change takes effect when it is recorded. + attr_accessor :status + + attr_accessor :revision + + # The preview the activation pointed the function at. Absent for the function's own build. + attr_accessor :candidate_id + + # The digests of the image the activation pointed the function at. Absent for the function's own build. + attr_accessor :image_digests + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'kind' => :'kind', + :'status' => :'status', + :'revision' => :'revision', + :'candidate_id' => :'candidate_id', + :'image_digests' => :'image_digests' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'kind' => :'String', + :'status' => :'String', + :'revision' => :'Integer', + :'candidate_id' => :'String', + :'image_digests' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::FunctionServingActivation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::FunctionServingActivation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'kind') + self.kind = attributes[:'kind'] + else + self.kind = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'revision') + self.revision = attributes[:'revision'] + else + self.revision = nil + end + + if attributes.key?(:'candidate_id') + self.candidate_id = attributes[:'candidate_id'] + end + + if attributes.key?(:'image_digests') + if (value = attributes[:'image_digests']).is_a?(Array) + self.image_digests = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @kind.nil? + invalid_properties.push('invalid value for "kind", kind cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @revision.nil? + invalid_properties.push('invalid value for "revision", revision cannot be nil.') + end + + if @revision < 1 + invalid_properties.push('invalid value for "revision", must be greater than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @kind.nil? + kind_validator = EnumAttributeValidator.new('String', ["promotion", "rollback", "deploy"]) + return false unless kind_validator.valid?(@kind) + return false if @status.nil? + status_validator = EnumAttributeValidator.new('String', ["applied"]) + return false unless status_validator.valid?(@status) + return false if @revision.nil? + return false if @revision < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] kind Object to be assigned + def kind=(kind) + validator = EnumAttributeValidator.new('String', ["promotion", "rollback", "deploy"]) + unless validator.valid?(kind) + fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}." + end + @kind = kind + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["applied"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] revision Value to be assigned + def revision=(revision) + if revision.nil? + fail ArgumentError, 'revision cannot be nil' + end + + if revision < 1 + fail ArgumentError, 'invalid value for "revision", must be greater than or equal to 1.' + end + + @revision = revision + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + kind == o.kind && + status == o.status && + revision == o.revision && + candidate_id == o.candidate_id && + image_digests == o.image_digests + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, kind, status, revision, candidate_id, image_digests].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/function_visibility.rb b/lib/volcano/generated/lib/volcano-generated/models/function_visibility.rb index a3a1404d..a0bf099a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/function_visibility.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/function_visibility.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response.rb index ae975d18..9ced47a7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response_email_password.rb b/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response_email_password.rb index dfef4452..9f0dc77e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response_email_password.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response_email_password.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response_oauth_providers_inner.rb b/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response_oauth_providers_inner.rb index 1328874e..aed64dcc 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response_oauth_providers_inner.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response_oauth_providers_inner.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/get_default_email_templates200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/get_default_email_templates200_response.rb new file mode 100644 index 00000000..a5d7b8cc --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/get_default_email_templates200_response.rb @@ -0,0 +1,149 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class GetDefaultEmailTemplates200Response < ApiModelBase + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::GetDefaultEmailTemplates200Response` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::GetDefaultEmailTemplates200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/git_connect_start_response.rb b/lib/volcano/generated/lib/volcano-generated/models/git_connect_start_response.rb index 49391129..254fd57a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/git_connect_start_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/git_connect_start_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/git_connection.rb b/lib/volcano/generated/lib/volcano-generated/models/git_connection.rb index f403c6da..5906172b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/git_connection.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/git_connection.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/git_connections_response.rb b/lib/volcano/generated/lib/volcano-generated/models/git_connections_response.rb index c08ad9c0..cb765b19 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/git_connections_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/git_connections_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/git_deployment_migration_run.rb b/lib/volcano/generated/lib/volcano-generated/models/git_deployment_migration_run.rb new file mode 100644 index 00000000..bc01d596 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/git_deployment_migration_run.rb @@ -0,0 +1,191 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A migration run a deployment run started. Get it at `GET /projects/{id}/databases/{databaseName}/migration-runs/{runId}` with `database.name` and `id`. + class GitDeploymentMigrationRun < ApiModelBase + attr_accessor :id + + attr_accessor :database + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'database' => :'database' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'database' => :'ResourceReference' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::GitDeploymentMigrationRun` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::GitDeploymentMigrationRun`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'database') + self.database = attributes[:'database'] + else + self.database = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @database.nil? + invalid_properties.push('invalid value for "database", database cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @database.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] database Value to be assigned + def database=(database) + if database.nil? + fail ArgumentError, 'database cannot be nil' + end + + @database = database + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + database == o.database + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, database].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/git_deployment_run.rb b/lib/volcano/generated/lib/volcano-generated/models/git_deployment_run.rb new file mode 100644 index 00000000..03ecb42f --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/git_deployment_run.rb @@ -0,0 +1,379 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # One push's deployment through Git auto deploy. + class GitDeploymentRun < ApiModelBase + attr_accessor :id + + attr_accessor :status + + # The branch the push updated, the project's production branch at the time. + attr_accessor :branch + + # The commit the run deploys. + attr_accessor :commit_sha + + # Whether the run applies the commit's migrations: the project's `apply_migrations` Git deploy setting when the push arrived. + attr_accessor :apply_migrations + + # The migration runs the run started, one per database, ordered by database name. Empty when it started none. + attr_accessor :migration_runs + + attr_accessor :error + + # When the push was recorded. + attr_accessor :created_at + + # When a worker first picked the run up. + attr_accessor :started_at + + # When the run ended. + attr_accessor :completed_at + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'status' => :'status', + :'branch' => :'branch', + :'commit_sha' => :'commit_sha', + :'apply_migrations' => :'apply_migrations', + :'migration_runs' => :'migration_runs', + :'error' => :'error', + :'created_at' => :'created_at', + :'started_at' => :'started_at', + :'completed_at' => :'completed_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'status' => :'GitDeploymentRunStatus', + :'branch' => :'String', + :'commit_sha' => :'String', + :'apply_migrations' => :'Boolean', + :'migration_runs' => :'Array', + :'error' => :'GitDeploymentRunError', + :'created_at' => :'Time', + :'started_at' => :'Time', + :'completed_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::GitDeploymentRun` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::GitDeploymentRun`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'branch') + self.branch = attributes[:'branch'] + else + self.branch = nil + end + + if attributes.key?(:'commit_sha') + self.commit_sha = attributes[:'commit_sha'] + else + self.commit_sha = nil + end + + if attributes.key?(:'apply_migrations') + self.apply_migrations = attributes[:'apply_migrations'] + else + self.apply_migrations = nil + end + + if attributes.key?(:'migration_runs') + if (value = attributes[:'migration_runs']).is_a?(Array) + self.migration_runs = value + end + else + self.migration_runs = nil + end + + if attributes.key?(:'error') + self.error = attributes[:'error'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + + if attributes.key?(:'started_at') + self.started_at = attributes[:'started_at'] + end + + if attributes.key?(:'completed_at') + self.completed_at = attributes[:'completed_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @branch.nil? + invalid_properties.push('invalid value for "branch", branch cannot be nil.') + end + + if @commit_sha.nil? + invalid_properties.push('invalid value for "commit_sha", commit_sha cannot be nil.') + end + + if @apply_migrations.nil? + invalid_properties.push('invalid value for "apply_migrations", apply_migrations cannot be nil.') + end + + if @migration_runs.nil? + invalid_properties.push('invalid value for "migration_runs", migration_runs cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @status.nil? + return false if @branch.nil? + return false if @commit_sha.nil? + return false if @apply_migrations.nil? + return false if @migration_runs.nil? + return false if @created_at.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] branch Value to be assigned + def branch=(branch) + if branch.nil? + fail ArgumentError, 'branch cannot be nil' + end + + @branch = branch + end + + # Custom attribute writer method with validation + # @param [Object] commit_sha Value to be assigned + def commit_sha=(commit_sha) + if commit_sha.nil? + fail ArgumentError, 'commit_sha cannot be nil' + end + + @commit_sha = commit_sha + end + + # Custom attribute writer method with validation + # @param [Object] apply_migrations Value to be assigned + def apply_migrations=(apply_migrations) + if apply_migrations.nil? + fail ArgumentError, 'apply_migrations cannot be nil' + end + + @apply_migrations = apply_migrations + end + + # Custom attribute writer method with validation + # @param [Object] migration_runs Value to be assigned + def migration_runs=(migration_runs) + if migration_runs.nil? + fail ArgumentError, 'migration_runs cannot be nil' + end + + @migration_runs = migration_runs + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + status == o.status && + branch == o.branch && + commit_sha == o.commit_sha && + apply_migrations == o.apply_migrations && + migration_runs == o.migration_runs && + error == o.error && + created_at == o.created_at && + started_at == o.started_at && + completed_at == o.completed_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, status, branch, commit_sha, apply_migrations, migration_runs, error, created_at, started_at, completed_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/git_deployment_run_error.rb b/lib/volcano/generated/lib/volcano-generated/models/git_deployment_run_error.rb new file mode 100644 index 00000000..8c1af62d --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/git_deployment_run_error.rb @@ -0,0 +1,193 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Why a run failed or was skipped. + class GitDeploymentRunError < ApiModelBase + # Stable machine-readable reason. For a failed run: `migration_failed`, `migration_invalid_layout`, `migration_timeout`, `feature_unavailable`, `source_invalid`, `child_deploy_failed`, `child_deploy_not_started`, `deploy_refused`, `typescript_not_compiled`, `deploy_failed`, `max_attempts_exhausted`, `owner_not_active`, or `project_deleting`. `source_invalid`, `deploy_refused`, and `typescript_not_compiled` fail the same way if the same commit is pushed again; `child_deploy_not_started`, `deploy_failed`, and `max_attempts_exhausted` may succeed on another push; for `owner_not_active`, reactivating the owner's account restores deployment eligibility; push again to deploy. `project_deleting` means the project is being deleted. For a skipped run: `auto_deploy_disabled`, `binding_changed`, `disconnected`, `project_missing`, or `nothing_to_deploy`. Treat a code you do not know as a failure. + attr_accessor :code + + # What happened. For `migration_failed`, `migration_invalid_layout`, `source_invalid`, `deploy_refused`, `child_deploy_not_started`, and `typescript_not_compiled` it names the database, files, resource, or setting at fault when Volcano has them. + attr_accessor :message + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'String', + :'message' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::GitDeploymentRunError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::GitDeploymentRunError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + else + self.code = nil + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + else + self.message = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @code.nil? + invalid_properties.push('invalid value for "code", code cannot be nil.') + end + + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @code.nil? + return false if @message.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if code.nil? + fail ArgumentError, 'code cannot be nil' + end + + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] message Value to be assigned + def message=(message) + if message.nil? + fail ArgumentError, 'message cannot be nil' + end + + @message = message + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/git_deployment_run_status.rb b/lib/volcano/generated/lib/volcano-generated/models/git_deployment_run_status.rb new file mode 100644 index 00000000..0d66aed6 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/git_deployment_run_status.rb @@ -0,0 +1,44 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class GitDeploymentRunStatus + GitDeploymentRunStatusPending = "pending".freeze + GitDeploymentRunStatusRunning = "running".freeze + GitDeploymentRunStatusSucceeded = "succeeded".freeze + GitDeploymentRunStatusFailed = "failed".freeze + GitDeploymentRunStatusSuperseded = "superseded".freeze + GitDeploymentRunStatusSkipped = "skipped".freeze + + def self.all_vars + @all_vars ||= [GitDeploymentRunStatusPending, GitDeploymentRunStatusRunning, GitDeploymentRunStatusSucceeded, GitDeploymentRunStatusFailed, GitDeploymentRunStatusSuperseded, GitDeploymentRunStatusSkipped].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if GitDeploymentRunStatus.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #GitDeploymentRunStatus" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/git_installation.rb b/lib/volcano/generated/lib/volcano-generated/models/git_installation.rb index 0b71ac3e..f5005f5b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/git_installation.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/git_installation.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/git_installations_response.rb b/lib/volcano/generated/lib/volcano-generated/models/git_installations_response.rb index 7d924dc2..0d80229e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/git_installations_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/git_installations_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/git_repositories_response.rb b/lib/volcano/generated/lib/volcano-generated/models/git_repositories_response.rb index 0d2029b0..c4b9056f 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/git_repositories_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/git_repositories_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/git_repository.rb b/lib/volcano/generated/lib/volcano-generated/models/git_repository.rb index 9dc7ae6d..9d680e7d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/git_repository.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/git_repository.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -15,9 +15,10 @@ module Volcano::Generated class GitRepository < ApiModelBase - # Stable GitHub repository id (repository.id), unchanged by renames. + # GitHub's repository id. It stays the same through a rename or a transfer. attr_accessor :id + # The repository's owner and name, such as `acme/shop`. attr_accessor :full_name attr_accessor :default_branch @@ -65,6 +66,13 @@ def self.openapi_nullable ]) end + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'GitRepositoryReference' + ] + end + # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) diff --git a/lib/volcano/generated/lib/volcano-generated/models/git_repository_reference.rb b/lib/volcano/generated/lib/volcano-generated/models/git_repository_reference.rb new file mode 100644 index 00000000..2f1b1e6b --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/git_repository_reference.rb @@ -0,0 +1,193 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A GitHub repository, by its stable id and its name. + class GitRepositoryReference < ApiModelBase + # GitHub's repository id. It stays the same through a rename or a transfer. + attr_accessor :id + + # The repository's owner and name, such as `acme/shop`. + attr_accessor :full_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'full_name' => :'full_name' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'Integer', + :'full_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::GitRepositoryReference` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::GitRepositoryReference`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'full_name') + self.full_name = attributes[:'full_name'] + else + self.full_name = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @full_name.nil? + invalid_properties.push('invalid value for "full_name", full_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @full_name.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] full_name Value to be assigned + def full_name=(full_name) + if full_name.nil? + fail ArgumentError, 'full_name cannot be nil' + end + + @full_name = full_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + full_name == o.full_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, full_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/heartbeat_durable_callback_request.rb b/lib/volcano/generated/lib/volcano-generated/models/heartbeat_durable_callback_request.rb new file mode 100644 index 00000000..b103965b --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/heartbeat_durable_callback_request.rb @@ -0,0 +1,194 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class HeartbeatDurableCallbackRequest < ApiModelBase + # The `vcb_` token the workflow handed out. It is the only credential the callback operations take, so treat it as a secret. + attr_accessor :token + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'token' => :'token' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'token' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::HeartbeatDurableCallbackRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::HeartbeatDurableCallbackRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'token') + self.token = attributes[:'token'] + else + self.token = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @token.nil? + invalid_properties.push('invalid value for "token", token cannot be nil.') + end + + if @token.to_s.length > 128 + invalid_properties.push('invalid value for "token", the character length must be smaller than or equal to 128.') + end + + if @token.to_s.length < 5 + invalid_properties.push('invalid value for "token", the character length must be greater than or equal to 5.') + end + + pattern = Regexp.new(/^vcb_[A-Za-z0-9_-]+$/) + if @token !~ pattern + invalid_properties.push("invalid value for \"token\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @token.nil? + return false if @token.to_s.length > 128 + return false if @token.to_s.length < 5 + return false if @token !~ Regexp.new(/^vcb_[A-Za-z0-9_-]+$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] token Value to be assigned + def token=(token) + if token.nil? + fail ArgumentError, 'token cannot be nil' + end + + if token.to_s.length > 128 + fail ArgumentError, 'invalid value for "token", the character length must be smaller than or equal to 128.' + end + + if token.to_s.length < 5 + fail ArgumentError, 'invalid value for "token", the character length must be greater than or equal to 5.' + end + + pattern = Regexp.new(/^vcb_[A-Za-z0-9_-]+$/) + if token !~ pattern + fail ArgumentError, "invalid value for \"token\", must conform to the pattern #{pattern}." + end + + @token = token + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + token == o.token + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [token].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/hosted_auth_page_type.rb b/lib/volcano/generated/lib/volcano-generated/models/hosted_auth_page_type.rb index 10a9629d..b7514bdd 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/hosted_auth_page_type.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/hosted_auth_page_type.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/hosted_login_email_check_request.rb b/lib/volcano/generated/lib/volcano-generated/models/hosted_login_email_check_request.rb index e74096ea..98b1fcff 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/hosted_login_email_check_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/hosted_login_email_check_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/hosted_login_email_check_response.rb b/lib/volcano/generated/lib/volcano-generated/models/hosted_login_email_check_response.rb index b49d2484..f38abb01 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/hosted_login_email_check_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/hosted_login_email_check_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/hosted_login_options_response.rb b/lib/volcano/generated/lib/volcano-generated/models/hosted_login_options_response.rb index 3119fea5..b56118b8 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/hosted_login_options_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/hosted_login_options_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/hosted_renderable_page_type.rb b/lib/volcano/generated/lib/volcano-generated/models/hosted_renderable_page_type.rb index f4a9eea5..717f3036 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/hosted_renderable_page_type.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/hosted_renderable_page_type.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/import_connect_start_response.rb b/lib/volcano/generated/lib/volcano-generated/models/import_connect_start_response.rb index eeb44cf0..7a7c40db 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/import_connect_start_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/import_connect_start_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/import_connection.rb b/lib/volcano/generated/lib/volcano-generated/models/import_connection.rb index 63674237..57022f7b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/import_connection.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/import_connection.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/import_connections_response.rb b/lib/volcano/generated/lib/volcano-generated/models/import_connections_response.rb index 030a8a3c..a7df8de5 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/import_connections_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/import_connections_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/import_provider.rb b/lib/volcano/generated/lib/volcano-generated/models/import_provider.rb index c8db48d4..3db4fe4c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/import_provider.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/import_provider.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/import_source.rb b/lib/volcano/generated/lib/volcano-generated/models/import_source.rb index af9bddfe..ece842b1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/import_source.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/import_source.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/import_sources_response.rb b/lib/volcano/generated/lib/volcano-generated/models/import_sources_response.rb index 7a3059fe..d4f04f28 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/import_sources_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/import_sources_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/issue.rb b/lib/volcano/generated/lib/volcano-generated/models/issue.rb index 2995c924..ac30b554 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/issue.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/issue.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -14,7 +14,7 @@ require 'time' module Volcano::Generated - # Runtime errors from one function or frontend, grouped by error type and stack. + # Runtime errors from one function or frontend, grouped by error type and stack, one LavaFlow Code Quality finding, failed builds of one function or frontend with the same first error, a user-reported project problem, or an issue a person wrote. A report or a written issue has a project resource, zero runtime occurrences, and the time it was made as its first and last seen times. class Issue < ApiModelBase attr_accessor :id @@ -28,11 +28,23 @@ class Issue < ApiModelBase # The exception class, such as `TypeError`. Omitted when the error has none. attr_accessor :error_type - # The innermost frame of your code in the stack, as `function (file)`. Omitted without a stack. + # The innermost frame of your code in the stack, as `function (file)`. For a frontend's Next.js build output, the outermost route or page file of the build in the stack, such as `.next/server/app/checkout/route.js`, or without one, the outermost file of the build. For a minified file of a function's own bundle, the file alone. Omitted without a stack. attr_accessor :culprit attr_accessor :status + # Where the issue came from. A `code_quality` issue's `error_type` is the finding's rule, its `culprit` the enclosing function and file, and its `event_count` the scans that found it. A `build` issue's `title` is the build's first error, its `error_type` the tool's code, such as `TS2322` or `Type error`, its `culprit` the error's `file:line`, its `event_count` the failed deploys, and its `last_deployment_id` the latest of them. + attr_accessor :source + + # The finding behind a `code_quality` issue. Absent on a `runtime` issue. + attr_accessor :finding + + # What the person who wrote a `request` issue asked for, as they wrote it, trimmed. Omitted for every other source. + attr_accessor :description + + # Whether the issue holds an exception: one your code threw, or one it logged with `console.error(err)` or Python's `logger.exception()`. `false` for an error logged any other way, such as a structured log line, a logger's error line, or a printed traceback, and for every `code_quality` issue. `true` for every `build` issue: a failed build stops its deploy as an exception stops a request. Once `true`, it stays `true`. + attr_accessor :exception + # Errors counted in this issue. A retried delivery can count an error twice. attr_accessor :event_count @@ -43,6 +55,9 @@ class Issue < ApiModelBase # The region that served the latest error, such as `us-east-1`. attr_accessor :last_region + # For a `build` issue, the latest deployment that failed in its build step. Omitted for every other issue: runtime errors are not tied to a deployment. + attr_accessor :last_deployment_id + # The ID of the latest error's log event, while logs retain it. attr_accessor :sample_event_id @@ -91,10 +106,15 @@ def self.attribute_map :'error_type' => :'error_type', :'culprit' => :'culprit', :'status' => :'status', + :'source' => :'source', + :'finding' => :'finding', + :'description' => :'description', + :'exception' => :'exception', :'event_count' => :'event_count', :'first_seen_at' => :'first_seen_at', :'last_seen_at' => :'last_seen_at', :'last_region' => :'last_region', + :'last_deployment_id' => :'last_deployment_id', :'sample_event_id' => :'sample_event_id', :'sample_event_at' => :'sample_event_at', :'resolved_at' => :'resolved_at', @@ -124,10 +144,15 @@ def self.openapi_types :'error_type' => :'String', :'culprit' => :'String', :'status' => :'IssueStatus', + :'source' => :'IssueSource', + :'finding' => :'IssueFinding', + :'description' => :'String', + :'exception' => :'Boolean', :'event_count' => :'Integer', :'first_seen_at' => :'Time', :'last_seen_at' => :'Time', :'last_region' => :'String', + :'last_deployment_id' => :'String', :'sample_event_id' => :'String', :'sample_event_at' => :'Time', :'resolved_at' => :'Time', @@ -197,6 +222,26 @@ def initialize(attributes = {}) self.status = nil end + if attributes.key?(:'source') + self.source = attributes[:'source'] + else + self.source = nil + end + + if attributes.key?(:'finding') + self.finding = attributes[:'finding'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'exception') + self.exception = attributes[:'exception'] + else + self.exception = nil + end + if attributes.key?(:'event_count') self.event_count = attributes[:'event_count'] else @@ -219,6 +264,10 @@ def initialize(attributes = {}) self.last_region = attributes[:'last_region'] end + if attributes.key?(:'last_deployment_id') + self.last_deployment_id = attributes[:'last_deployment_id'] + end + if attributes.key?(:'sample_event_id') self.sample_event_id = attributes[:'sample_event_id'] end @@ -273,6 +322,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "status", status cannot be nil.') end + if @source.nil? + invalid_properties.push('invalid value for "source", source cannot be nil.') + end + + if @exception.nil? + invalid_properties.push('invalid value for "exception", exception cannot be nil.') + end + if @event_count.nil? invalid_properties.push('invalid value for "event_count", event_count cannot be nil.') end @@ -305,6 +362,8 @@ def valid? return false if @resource.nil? return false if @title.nil? return false if @status.nil? + return false if @source.nil? + return false if @exception.nil? return false if @event_count.nil? return false if @first_seen_at.nil? return false if @last_seen_at.nil? @@ -363,6 +422,26 @@ def status=(status) @status = status end + # Custom attribute writer method with validation + # @param [Object] source Value to be assigned + def source=(source) + if source.nil? + fail ArgumentError, 'source cannot be nil' + end + + @source = source + end + + # Custom attribute writer method with validation + # @param [Object] exception Value to be assigned + def exception=(exception) + if exception.nil? + fail ArgumentError, 'exception cannot be nil' + end + + @exception = exception + end + # Custom attribute writer method with validation # @param [Object] event_count Value to be assigned def event_count=(event_count) @@ -425,10 +504,15 @@ def ==(o) error_type == o.error_type && culprit == o.culprit && status == o.status && + source == o.source && + finding == o.finding && + description == o.description && + exception == o.exception && event_count == o.event_count && first_seen_at == o.first_seen_at && last_seen_at == o.last_seen_at && last_region == o.last_region && + last_deployment_id == o.last_deployment_id && sample_event_id == o.sample_event_id && sample_event_at == o.sample_event_at && resolved_at == o.resolved_at && @@ -446,7 +530,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, project_id, resource, title, error_type, culprit, status, event_count, first_seen_at, last_seen_at, last_region, sample_event_id, sample_event_at, resolved_at, regressed_at, created_at, updated_at].hash + [id, project_id, resource, title, error_type, culprit, status, source, finding, description, exception, event_count, first_seen_at, last_seen_at, last_region, last_deployment_id, sample_event_id, sample_event_at, resolved_at, regressed_at, created_at, updated_at].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/issue_finding.rb b/lib/volcano/generated/lib/volcano-generated/models/issue_finding.rb new file mode 100644 index 00000000..b532968d --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/issue_finding.rb @@ -0,0 +1,352 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The LavaFlow Code Quality finding behind a `code_quality` issue. + class IssueFinding < ApiModelBase + # The rule the finding names, such as `null-dereference`. + attr_accessor :rule + + # How much the problem matters, as the finding was confirmed. + attr_accessor :severity + + # The deployed commit the scan found the problem in. + attr_accessor :commit_sha + + # The file, from the repository root. + attr_accessor :path + + # The first line of the problem in that commit, from 1. + attr_accessor :start_line + + # The last line of the problem in that commit. + attr_accessor :end_line + + # What fails and on which input, as plain text. When it holds one of the project's secret values or a secret gitleaks' default rules detect, it reads `Hidden: this field matched a secret.` in place of all of it. + attr_accessor :explanation + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'rule' => :'rule', + :'severity' => :'severity', + :'commit_sha' => :'commit_sha', + :'path' => :'path', + :'start_line' => :'start_line', + :'end_line' => :'end_line', + :'explanation' => :'explanation' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'rule' => :'String', + :'severity' => :'String', + :'commit_sha' => :'String', + :'path' => :'String', + :'start_line' => :'Integer', + :'end_line' => :'Integer', + :'explanation' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::IssueFinding` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::IssueFinding`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'rule') + self.rule = attributes[:'rule'] + else + self.rule = nil + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + else + self.severity = nil + end + + if attributes.key?(:'commit_sha') + self.commit_sha = attributes[:'commit_sha'] + else + self.commit_sha = nil + end + + if attributes.key?(:'path') + self.path = attributes[:'path'] + else + self.path = nil + end + + if attributes.key?(:'start_line') + self.start_line = attributes[:'start_line'] + else + self.start_line = nil + end + + if attributes.key?(:'end_line') + self.end_line = attributes[:'end_line'] + else + self.end_line = nil + end + + if attributes.key?(:'explanation') + self.explanation = attributes[:'explanation'] + else + self.explanation = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @rule.nil? + invalid_properties.push('invalid value for "rule", rule cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity cannot be nil.') + end + + if @commit_sha.nil? + invalid_properties.push('invalid value for "commit_sha", commit_sha cannot be nil.') + end + + if @path.nil? + invalid_properties.push('invalid value for "path", path cannot be nil.') + end + + if @start_line.nil? + invalid_properties.push('invalid value for "start_line", start_line cannot be nil.') + end + + if @end_line.nil? + invalid_properties.push('invalid value for "end_line", end_line cannot be nil.') + end + + if @explanation.nil? + invalid_properties.push('invalid value for "explanation", explanation cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @rule.nil? + return false if @severity.nil? + severity_validator = EnumAttributeValidator.new('String', ["nit", "minor", "major", "critical"]) + return false unless severity_validator.valid?(@severity) + return false if @commit_sha.nil? + return false if @path.nil? + return false if @start_line.nil? + return false if @end_line.nil? + return false if @explanation.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] rule Value to be assigned + def rule=(rule) + if rule.nil? + fail ArgumentError, 'rule cannot be nil' + end + + @rule = rule + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] severity Object to be assigned + def severity=(severity) + validator = EnumAttributeValidator.new('String', ["nit", "minor", "major", "critical"]) + unless validator.valid?(severity) + fail ArgumentError, "invalid value for \"severity\", must be one of #{validator.allowable_values}." + end + @severity = severity + end + + # Custom attribute writer method with validation + # @param [Object] commit_sha Value to be assigned + def commit_sha=(commit_sha) + if commit_sha.nil? + fail ArgumentError, 'commit_sha cannot be nil' + end + + @commit_sha = commit_sha + end + + # Custom attribute writer method with validation + # @param [Object] path Value to be assigned + def path=(path) + if path.nil? + fail ArgumentError, 'path cannot be nil' + end + + @path = path + end + + # Custom attribute writer method with validation + # @param [Object] start_line Value to be assigned + def start_line=(start_line) + if start_line.nil? + fail ArgumentError, 'start_line cannot be nil' + end + + @start_line = start_line + end + + # Custom attribute writer method with validation + # @param [Object] end_line Value to be assigned + def end_line=(end_line) + if end_line.nil? + fail ArgumentError, 'end_line cannot be nil' + end + + @end_line = end_line + end + + # Custom attribute writer method with validation + # @param [Object] explanation Value to be assigned + def explanation=(explanation) + if explanation.nil? + fail ArgumentError, 'explanation cannot be nil' + end + + @explanation = explanation + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + rule == o.rule && + severity == o.severity && + commit_sha == o.commit_sha && + path == o.path && + start_line == o.start_line && + end_line == o.end_line && + explanation == o.explanation + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [rule, severity, commit_sha, path, start_line, end_line, explanation].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/issue_source.rb b/lib/volcano/generated/lib/volcano-generated/models/issue_source.rb new file mode 100644 index 00000000..0fd32ae1 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/issue_source.rb @@ -0,0 +1,43 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class IssueSource + RUNTIME = "runtime".freeze + CODE_QUALITY = "code_quality".freeze + BUILD = "build".freeze + REPORT = "report".freeze + REQUEST = "request".freeze + + def self.all_vars + @all_vars ||= [RUNTIME, CODE_QUALITY, BUILD, REPORT, REQUEST].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if IssueSource.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #IssueSource" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/issue_status.rb b/lib/volcano/generated/lib/volcano-generated/models/issue_status.rb index f397a5d8..4b0b19e9 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/issue_status.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/issue_status.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_aikido_binding.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_aikido_binding.rb new file mode 100644 index 00000000..dccb3a29 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_aikido_binding.rb @@ -0,0 +1,213 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The Aikido workspace a binding reports issues from. Present when `connector_type` is `aikido`. + class LavaflowAikidoBinding < ApiModelBase + attr_accessor :workspace_name + + attr_accessor :min_severity + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'workspace_name' => :'workspace_name', + :'min_severity' => :'min_severity' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'workspace_name' => :'String', + :'min_severity' => :'AikidoSeverity' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowAikidoBinding` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowAikidoBinding`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'workspace_name') + self.workspace_name = attributes[:'workspace_name'] + else + self.workspace_name = nil + end + + if attributes.key?(:'min_severity') + self.min_severity = attributes[:'min_severity'] + else + self.min_severity = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @workspace_name.nil? + invalid_properties.push('invalid value for "workspace_name", workspace_name cannot be nil.') + end + + if @min_severity.nil? + invalid_properties.push('invalid value for "min_severity", min_severity cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @workspace_name.nil? + return false if @min_severity.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] workspace_name Value to be assigned + def workspace_name=(workspace_name) + if workspace_name.nil? + fail ArgumentError, 'workspace_name cannot be nil' + end + + @workspace_name = workspace_name + end + + # Custom attribute writer method with validation + # @param [Object] min_severity Value to be assigned + def min_severity=(min_severity) + if min_severity.nil? + fail ArgumentError, 'min_severity cannot be nil' + end + + @min_severity = min_severity + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + workspace_name == o.workspace_name && + min_severity == o.min_severity + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [workspace_name, min_severity].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_aikido_binding_target.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_aikido_binding_target.rb new file mode 100644 index 00000000..8622c31b --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_aikido_binding_target.rb @@ -0,0 +1,171 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # What an `aikido` connector reports for the project. Send `aikido`, not `slack`, for an `aikido` connector. + class LavaflowAikidoBindingTarget < ApiModelBase + # The lowest severity that starts a LavaFlow run. Defaults to `high`: each run counts against the project's LavaFlow runs. + attr_accessor :min_severity + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'min_severity' => :'min_severity' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'min_severity' => :'AikidoSeverity' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowAikidoBindingTarget` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowAikidoBindingTarget`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'min_severity') + self.min_severity = attributes[:'min_severity'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + min_severity == o.min_severity + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [min_severity].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_allowed_workflow.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_allowed_workflow.rb new file mode 100644 index 00000000..19cb11b3 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_allowed_workflow.rb @@ -0,0 +1,212 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A workflow job that could run a fix's pull request with the repository's secrets before a person approves it. + class LavaflowAllowedWorkflow < ApiModelBase + # The branch or commit whose workflows run it. + attr_accessor :source + + attr_accessor :path + + # The job, absent for a workflow that could not be read. + attr_accessor :job + + # The event that runs it, absent for a workflow that could not be read. + attr_accessor :trigger + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'source' => :'source', + :'path' => :'path', + :'job' => :'job', + :'trigger' => :'trigger' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'source' => :'String', + :'path' => :'String', + :'job' => :'String', + :'trigger' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowAllowedWorkflow` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowAllowedWorkflow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'source') + self.source = attributes[:'source'] + else + self.source = nil + end + + if attributes.key?(:'path') + self.path = attributes[:'path'] + else + self.path = nil + end + + if attributes.key?(:'job') + self.job = attributes[:'job'] + end + + if attributes.key?(:'trigger') + self.trigger = attributes[:'trigger'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @source.nil? + invalid_properties.push('invalid value for "source", source cannot be nil.') + end + + if @path.nil? + invalid_properties.push('invalid value for "path", path cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @source.nil? + return false if @path.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] source Value to be assigned + def source=(source) + if source.nil? + fail ArgumentError, 'source cannot be nil' + end + + @source = source + end + + # Custom attribute writer method with validation + # @param [Object] path Value to be assigned + def path=(path) + if path.nil? + fail ArgumentError, 'path cannot be nil' + end + + @path = path + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + source == o.source && + path == o.path && + job == o.job && + trigger == o.trigger + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [source, path, job, trigger].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_anomaly.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_anomaly.rb new file mode 100644 index 00000000..3e181f41 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_anomaly.rb @@ -0,0 +1,177 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowAnomaly < ApiModelBase + attr_accessor :flagged + + # Why the resource is flagged, null when it is not. + attr_accessor :reason + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'flagged' => :'flagged', + :'reason' => :'reason' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'flagged' => :'Boolean', + :'reason' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'reason' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowAnomaly` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowAnomaly`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'flagged') + self.flagged = attributes[:'flagged'] + else + self.flagged = nil + end + + if attributes.key?(:'reason') + self.reason = attributes[:'reason'] + else + self.reason = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @flagged.nil? + invalid_properties.push('invalid value for "flagged", flagged cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @flagged.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] flagged Value to be assigned + def flagged=(flagged) + if flagged.nil? + fail ArgumentError, 'flagged cannot be nil' + end + + @flagged = flagged + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + flagged == o.flagged && + reason == o.reason + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [flagged, reason].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_autonomy.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_autonomy.rb new file mode 100644 index 00000000..2baf1f9c --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_autonomy.rb @@ -0,0 +1,41 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowAutonomy + DIAGNOSE_ONLY = "diagnose_only".freeze + OPEN_PR = "open_pr".freeze + MERGE = "merge".freeze + + def self.all_vars + @all_vars ||= [DIAGNOSE_ONLY, OPEN_PR, MERGE].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if LavaflowAutonomy.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #LavaflowAutonomy" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_category_counts.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_category_counts.rb new file mode 100644 index 00000000..a3f1bd04 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_category_counts.rb @@ -0,0 +1,347 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Matching runs in each category, zeros included. `uncategorized` counts runs whose `category` is null. + class LavaflowCategoryCounts < ApiModelBase + attr_accessor :bug + + attr_accessor :performance + + attr_accessor :security + + attr_accessor :improvement + + attr_accessor :configuration + + attr_accessor :dependency + + attr_accessor :external + + attr_accessor :uncategorized + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'bug' => :'bug', + :'performance' => :'performance', + :'security' => :'security', + :'improvement' => :'improvement', + :'configuration' => :'configuration', + :'dependency' => :'dependency', + :'external' => :'external', + :'uncategorized' => :'uncategorized' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'bug' => :'Integer', + :'performance' => :'Integer', + :'security' => :'Integer', + :'improvement' => :'Integer', + :'configuration' => :'Integer', + :'dependency' => :'Integer', + :'external' => :'Integer', + :'uncategorized' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowCategoryCounts` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowCategoryCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'bug') + self.bug = attributes[:'bug'] + else + self.bug = nil + end + + if attributes.key?(:'performance') + self.performance = attributes[:'performance'] + else + self.performance = nil + end + + if attributes.key?(:'security') + self.security = attributes[:'security'] + else + self.security = nil + end + + if attributes.key?(:'improvement') + self.improvement = attributes[:'improvement'] + else + self.improvement = nil + end + + if attributes.key?(:'configuration') + self.configuration = attributes[:'configuration'] + else + self.configuration = nil + end + + if attributes.key?(:'dependency') + self.dependency = attributes[:'dependency'] + else + self.dependency = nil + end + + if attributes.key?(:'external') + self.external = attributes[:'external'] + else + self.external = nil + end + + if attributes.key?(:'uncategorized') + self.uncategorized = attributes[:'uncategorized'] + else + self.uncategorized = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @bug.nil? + invalid_properties.push('invalid value for "bug", bug cannot be nil.') + end + + if @performance.nil? + invalid_properties.push('invalid value for "performance", performance cannot be nil.') + end + + if @security.nil? + invalid_properties.push('invalid value for "security", security cannot be nil.') + end + + if @improvement.nil? + invalid_properties.push('invalid value for "improvement", improvement cannot be nil.') + end + + if @configuration.nil? + invalid_properties.push('invalid value for "configuration", configuration cannot be nil.') + end + + if @dependency.nil? + invalid_properties.push('invalid value for "dependency", dependency cannot be nil.') + end + + if @external.nil? + invalid_properties.push('invalid value for "external", external cannot be nil.') + end + + if @uncategorized.nil? + invalid_properties.push('invalid value for "uncategorized", uncategorized cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @bug.nil? + return false if @performance.nil? + return false if @security.nil? + return false if @improvement.nil? + return false if @configuration.nil? + return false if @dependency.nil? + return false if @external.nil? + return false if @uncategorized.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] bug Value to be assigned + def bug=(bug) + if bug.nil? + fail ArgumentError, 'bug cannot be nil' + end + + @bug = bug + end + + # Custom attribute writer method with validation + # @param [Object] performance Value to be assigned + def performance=(performance) + if performance.nil? + fail ArgumentError, 'performance cannot be nil' + end + + @performance = performance + end + + # Custom attribute writer method with validation + # @param [Object] security Value to be assigned + def security=(security) + if security.nil? + fail ArgumentError, 'security cannot be nil' + end + + @security = security + end + + # Custom attribute writer method with validation + # @param [Object] improvement Value to be assigned + def improvement=(improvement) + if improvement.nil? + fail ArgumentError, 'improvement cannot be nil' + end + + @improvement = improvement + end + + # Custom attribute writer method with validation + # @param [Object] configuration Value to be assigned + def configuration=(configuration) + if configuration.nil? + fail ArgumentError, 'configuration cannot be nil' + end + + @configuration = configuration + end + + # Custom attribute writer method with validation + # @param [Object] dependency Value to be assigned + def dependency=(dependency) + if dependency.nil? + fail ArgumentError, 'dependency cannot be nil' + end + + @dependency = dependency + end + + # Custom attribute writer method with validation + # @param [Object] external Value to be assigned + def external=(external) + if external.nil? + fail ArgumentError, 'external cannot be nil' + end + + @external = external + end + + # Custom attribute writer method with validation + # @param [Object] uncategorized Value to be assigned + def uncategorized=(uncategorized) + if uncategorized.nil? + fail ArgumentError, 'uncategorized cannot be nil' + end + + @uncategorized = uncategorized + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + bug == o.bug && + performance == o.performance && + security == o.security && + improvement == o.improvement && + configuration == o.configuration && + dependency == o.dependency && + external == o.external && + uncategorized == o.uncategorized + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [bug, performance, security, improvement, configuration, dependency, external, uncategorized].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_code_quality_settings.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_code_quality_settings.rb new file mode 100644 index 00000000..4ae186fa --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_code_quality_settings.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # LavaFlow Code Quality: whether LavaFlow reviews the code each production deploy changes and opens pull requests that fix what it confirms. + class LavaflowCodeQualitySettings < ApiModelBase + # Whether Code Quality reviews the project's deploys. Off by default. It reads as off while the project points at another repository than the one it was turned on for, and works only while LavaFlow is on. + attr_accessor :enabled + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'enabled' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowCodeQualitySettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowCodeQualitySettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + else + self.enabled = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @enabled.nil? + invalid_properties.push('invalid value for "enabled", enabled cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @enabled.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] enabled Value to be assigned + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'enabled cannot be nil' + end + + @enabled = enabled + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [enabled].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_code_quality_update.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_code_quality_update.rb new file mode 100644 index 00000000..faa1f0fe --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_code_quality_update.rb @@ -0,0 +1,165 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Turns Code Quality on or off. Only the project's owner, signed in, can turn it on; any credential that can save the settings can turn it off. + class LavaflowCodeQualityUpdate < ApiModelBase + attr_accessor :enabled + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'enabled' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowCodeQualityUpdate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowCodeQualityUpdate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + else + self.enabled = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @enabled.nil? + invalid_properties.push('invalid value for "enabled", enabled cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @enabled.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] enabled Value to be assigned + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'enabled cannot be nil' + end + + @enabled = enabled + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [enabled].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_commit_origin.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_commit_origin.rb new file mode 100644 index 00000000..3fc085eb --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_commit_origin.rb @@ -0,0 +1,42 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowCommitOrigin + LavaflowCommitOriginPush = "push".freeze + LavaflowCommitOriginClientReported = "client_reported".freeze + LavaflowCommitOriginClientReportedRepository = "client_reported_repository".freeze + LavaflowCommitOriginRepository = "repository".freeze + + def self.all_vars + @all_vars ||= [LavaflowCommitOriginPush, LavaflowCommitOriginClientReported, LavaflowCommitOriginClientReportedRepository, LavaflowCommitOriginRepository].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if LavaflowCommitOrigin.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #LavaflowCommitOrigin" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_connector_binding.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_connector_binding.rb new file mode 100644 index 00000000..2de1384c --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_connector_binding.rb @@ -0,0 +1,294 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A place in a connector that reports problems to LavaFlow for a project: a Slack channel, or an Aikido workspace's issues on the project's repository. + class LavaflowConnectorBinding < ApiModelBase + # The binding's ID, which removing it takes. + attr_accessor :id + + attr_accessor :project_id + + attr_accessor :connector_type + + # The connector the binding reports through. Omitted while the Volcano app is not installed in the binding's Slack workspace; the binding reports again once it is. + attr_accessor :connector_id + + attr_accessor :slack + + attr_accessor :aikido + + attr_accessor :created_at + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'project_id' => :'project_id', + :'connector_type' => :'connector_type', + :'connector_id' => :'connector_id', + :'slack' => :'slack', + :'aikido' => :'aikido', + :'created_at' => :'created_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'project_id' => :'String', + :'connector_type' => :'ConnectorType', + :'connector_id' => :'String', + :'slack' => :'LavaflowSlackBinding', + :'aikido' => :'LavaflowAikidoBinding', + :'created_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowConnectorBinding` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowConnectorBinding`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'connector_type') + self.connector_type = attributes[:'connector_type'] + else + self.connector_type = nil + end + + if attributes.key?(:'connector_id') + self.connector_id = attributes[:'connector_id'] + end + + if attributes.key?(:'slack') + self.slack = attributes[:'slack'] + end + + if attributes.key?(:'aikido') + self.aikido = attributes[:'aikido'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @connector_type.nil? + invalid_properties.push('invalid value for "connector_type", connector_type cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @project_id.nil? + return false if @connector_type.nil? + return false if @created_at.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] connector_type Value to be assigned + def connector_type=(connector_type) + if connector_type.nil? + fail ArgumentError, 'connector_type cannot be nil' + end + + @connector_type = connector_type + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + project_id == o.project_id && + connector_type == o.connector_type && + connector_id == o.connector_id && + slack == o.slack && + aikido == o.aikido && + created_at == o.created_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, project_id, connector_type, connector_id, slack, aikido, created_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_connector_binding_create.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_connector_binding_create.rb new file mode 100644 index 00000000..e68beb49 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_connector_binding_create.rb @@ -0,0 +1,211 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Send exactly one of `slack` and `aikido`, matching the connector's type. + class LavaflowConnectorBindingCreate < ApiModelBase + # The project the place reports for. + attr_accessor :project_id + + # The connector to bind, from `GET /connectors`. + attr_accessor :connector_id + + attr_accessor :slack + + attr_accessor :aikido + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'project_id' => :'project_id', + :'connector_id' => :'connector_id', + :'slack' => :'slack', + :'aikido' => :'aikido' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'project_id' => :'String', + :'connector_id' => :'String', + :'slack' => :'LavaflowSlackBindingTarget', + :'aikido' => :'LavaflowAikidoBindingTarget' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowConnectorBindingCreate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowConnectorBindingCreate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'connector_id') + self.connector_id = attributes[:'connector_id'] + else + self.connector_id = nil + end + + if attributes.key?(:'slack') + self.slack = attributes[:'slack'] + end + + if attributes.key?(:'aikido') + self.aikido = attributes[:'aikido'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @connector_id.nil? + invalid_properties.push('invalid value for "connector_id", connector_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + return false if @connector_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] connector_id Value to be assigned + def connector_id=(connector_id) + if connector_id.nil? + fail ArgumentError, 'connector_id cannot be nil' + end + + @connector_id = connector_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + project_id == o.project_id && + connector_id == o.connector_id && + slack == o.slack && + aikido == o.aikido + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [project_id, connector_id, slack, aikido].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_connector_bindings_response.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_connector_bindings_response.rb new file mode 100644 index 00000000..22f57825 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_connector_bindings_response.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowConnectorBindingsResponse < ApiModelBase + attr_accessor :bindings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'bindings' => :'bindings' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'bindings' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowConnectorBindingsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowConnectorBindingsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'bindings') + if (value = attributes[:'bindings']).is_a?(Array) + self.bindings = value + end + else + self.bindings = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @bindings.nil? + invalid_properties.push('invalid value for "bindings", bindings cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @bindings.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] bindings Value to be assigned + def bindings=(bindings) + if bindings.nil? + fail ArgumentError, 'bindings cannot be nil' + end + + @bindings = bindings + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + bindings == o.bindings + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [bindings].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_day_counts.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_day_counts.rb new file mode 100644 index 00000000..9628b94e --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_day_counts.rb @@ -0,0 +1,218 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowDayCounts < ApiModelBase + attr_accessor :date + + # Issues LavaFlow took on that UTC day. + attr_accessor :issues_opened + + # Pull requests with a fix LavaFlow opened that UTC day. + attr_accessor :pull_requests_opened + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'date' => :'date', + :'issues_opened' => :'issues_opened', + :'pull_requests_opened' => :'pull_requests_opened' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'date' => :'Date', + :'issues_opened' => :'Integer', + :'pull_requests_opened' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowDayCounts` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowDayCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'date') + self.date = attributes[:'date'] + else + self.date = nil + end + + if attributes.key?(:'issues_opened') + self.issues_opened = attributes[:'issues_opened'] + else + self.issues_opened = nil + end + + if attributes.key?(:'pull_requests_opened') + self.pull_requests_opened = attributes[:'pull_requests_opened'] + else + self.pull_requests_opened = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @date.nil? + invalid_properties.push('invalid value for "date", date cannot be nil.') + end + + if @issues_opened.nil? + invalid_properties.push('invalid value for "issues_opened", issues_opened cannot be nil.') + end + + if @pull_requests_opened.nil? + invalid_properties.push('invalid value for "pull_requests_opened", pull_requests_opened cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @date.nil? + return false if @issues_opened.nil? + return false if @pull_requests_opened.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] date Value to be assigned + def date=(date) + if date.nil? + fail ArgumentError, 'date cannot be nil' + end + + @date = date + end + + # Custom attribute writer method with validation + # @param [Object] issues_opened Value to be assigned + def issues_opened=(issues_opened) + if issues_opened.nil? + fail ArgumentError, 'issues_opened cannot be nil' + end + + @issues_opened = issues_opened + end + + # Custom attribute writer method with validation + # @param [Object] pull_requests_opened Value to be assigned + def pull_requests_opened=(pull_requests_opened) + if pull_requests_opened.nil? + fail ArgumentError, 'pull_requests_opened cannot be nil' + end + + @pull_requests_opened = pull_requests_opened + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + date == o.date && + issues_opened == o.issues_opened && + pull_requests_opened == o.pull_requests_opened + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [date, issues_opened, pull_requests_opened].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_diagnosis.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_diagnosis.rb new file mode 100644 index 00000000..c355c8a4 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_diagnosis.rb @@ -0,0 +1,275 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Each text reads `Hidden: this field matched a secret.` in place of all of it when it holds one of the project's secret values or a secret gitleaks' default rules detect; the other texts are served as written. A log line's `level` reads `\"\"` then. + class LavaflowDiagnosis < ApiModelBase + attr_accessor :summary + + attr_accessor :root_cause + + attr_accessor :evidence + + # Empty for now. `evidence` cites the log lines the diagnosis relies on. + attr_accessor :log_lines + + # Whether the run makes a change its report's reporter asked for in their own words, such as new content or functionality, rather than fixing a defect. Only a reported problem's run can set it, and only from what the person who mentioned LavaFlow wrote. + attr_accessor :requested + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'summary' => :'summary', + :'root_cause' => :'root_cause', + :'evidence' => :'evidence', + :'log_lines' => :'log_lines', + :'requested' => :'requested' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'summary' => :'String', + :'root_cause' => :'String', + :'evidence' => :'Array', + :'log_lines' => :'Array', + :'requested' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowDiagnosis` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowDiagnosis`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'summary') + self.summary = attributes[:'summary'] + else + self.summary = nil + end + + if attributes.key?(:'root_cause') + self.root_cause = attributes[:'root_cause'] + else + self.root_cause = nil + end + + if attributes.key?(:'evidence') + if (value = attributes[:'evidence']).is_a?(Array) + self.evidence = value + end + else + self.evidence = nil + end + + if attributes.key?(:'log_lines') + if (value = attributes[:'log_lines']).is_a?(Array) + self.log_lines = value + end + else + self.log_lines = nil + end + + if attributes.key?(:'requested') + self.requested = attributes[:'requested'] + else + self.requested = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @summary.nil? + invalid_properties.push('invalid value for "summary", summary cannot be nil.') + end + + if @root_cause.nil? + invalid_properties.push('invalid value for "root_cause", root_cause cannot be nil.') + end + + if @evidence.nil? + invalid_properties.push('invalid value for "evidence", evidence cannot be nil.') + end + + if @log_lines.nil? + invalid_properties.push('invalid value for "log_lines", log_lines cannot be nil.') + end + + if @requested.nil? + invalid_properties.push('invalid value for "requested", requested cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @summary.nil? + return false if @root_cause.nil? + return false if @evidence.nil? + return false if @log_lines.nil? + return false if @requested.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] summary Value to be assigned + def summary=(summary) + if summary.nil? + fail ArgumentError, 'summary cannot be nil' + end + + @summary = summary + end + + # Custom attribute writer method with validation + # @param [Object] root_cause Value to be assigned + def root_cause=(root_cause) + if root_cause.nil? + fail ArgumentError, 'root_cause cannot be nil' + end + + @root_cause = root_cause + end + + # Custom attribute writer method with validation + # @param [Object] evidence Value to be assigned + def evidence=(evidence) + if evidence.nil? + fail ArgumentError, 'evidence cannot be nil' + end + + @evidence = evidence + end + + # Custom attribute writer method with validation + # @param [Object] log_lines Value to be assigned + def log_lines=(log_lines) + if log_lines.nil? + fail ArgumentError, 'log_lines cannot be nil' + end + + @log_lines = log_lines + end + + # Custom attribute writer method with validation + # @param [Object] requested Value to be assigned + def requested=(requested) + if requested.nil? + fail ArgumentError, 'requested cannot be nil' + end + + @requested = requested + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + summary == o.summary && + root_cause == o.root_cause && + evidence == o.evidence && + log_lines == o.log_lines && + requested == o.requested + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [summary, root_cause, evidence, log_lines, requested].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_draft_reason.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_draft_reason.rb new file mode 100644 index 00000000..3f4dd4cd --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_draft_reason.rb @@ -0,0 +1,41 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowDraftReason + LavaflowDraftReasonOpenPr = "open_pr".freeze + LavaflowDraftReasonReviewUnresolved = "review_unresolved".freeze + LavaflowDraftReasonConvertedToDraft = "converted_to_draft".freeze + + def self.all_vars + @all_vars ||= [LavaflowDraftReasonOpenPr, LavaflowDraftReasonReviewUnresolved, LavaflowDraftReasonConvertedToDraft].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if LavaflowDraftReason.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #LavaflowDraftReason" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_failure.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_failure.rb new file mode 100644 index 00000000..95b613be --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_failure.rb @@ -0,0 +1,192 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowFailure < ApiModelBase + # Stable code, such as `timed_out` or `feature_paused`. + attr_accessor :code + + # Text to show for the code. + attr_accessor :message + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'message' => :'message' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'String', + :'message' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowFailure` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowFailure`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + else + self.code = nil + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + else + self.message = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @code.nil? + invalid_properties.push('invalid value for "code", code cannot be nil.') + end + + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @code.nil? + return false if @message.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if code.nil? + fail ArgumentError, 'code cannot be nil' + end + + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] message Value to be assigned + def message=(message) + if message.nil? + fail ArgumentError, 'message cannot be nil' + end + + @message = message + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_fix_outcome.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_fix_outcome.rb new file mode 100644 index 00000000..da6072a9 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_fix_outcome.rb @@ -0,0 +1,241 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # How a merged LavaFlow fix fared once it went live. + class LavaflowFixOutcome < ApiModelBase + # `watching` for 14 days after the fix goes live, then `effective` unless its issue came back (`ineffective`) or a new issue was traced to its deploy (`regressed`). An outcome never moves back. `reverted` is reserved and not produced yet. + attr_accessor :state + + attr_accessor :live_at + + attr_accessor :watch_until + + # Runs linked to this fix. + attr_accessor :follow_ups + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'state' => :'state', + :'live_at' => :'live_at', + :'watch_until' => :'watch_until', + :'follow_ups' => :'follow_ups' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'state' => :'String', + :'live_at' => :'Time', + :'watch_until' => :'Time', + :'follow_ups' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'live_at', + :'watch_until', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowFixOutcome` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowFixOutcome`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'state') + self.state = attributes[:'state'] + else + self.state = nil + end + + if attributes.key?(:'live_at') + self.live_at = attributes[:'live_at'] + else + self.live_at = nil + end + + if attributes.key?(:'watch_until') + self.watch_until = attributes[:'watch_until'] + else + self.watch_until = nil + end + + if attributes.key?(:'follow_ups') + self.follow_ups = attributes[:'follow_ups'] + else + self.follow_ups = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @state.nil? + invalid_properties.push('invalid value for "state", state cannot be nil.') + end + + if @follow_ups.nil? + invalid_properties.push('invalid value for "follow_ups", follow_ups cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @state.nil? + state_validator = EnumAttributeValidator.new('String', ["awaiting_deploy", "watching", "effective", "ineffective", "regressed", "reverted"]) + return false unless state_validator.valid?(@state) + return false if @follow_ups.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] state Object to be assigned + def state=(state) + validator = EnumAttributeValidator.new('String', ["awaiting_deploy", "watching", "effective", "ineffective", "regressed", "reverted"]) + unless validator.valid?(state) + fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}." + end + @state = state + end + + # Custom attribute writer method with validation + # @param [Object] follow_ups Value to be assigned + def follow_ups=(follow_ups) + if follow_ups.nil? + fail ArgumentError, 'follow_ups cannot be nil' + end + + @follow_ups = follow_ups + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + state == o.state && + live_at == o.live_at && + watch_until == o.watch_until && + follow_ups == o.follow_ups + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [state, live_at, watch_until, follow_ups].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_held_fix_open.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_held_fix_open.rb new file mode 100644 index 00000000..16eb0414 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_held_fix_open.rb @@ -0,0 +1,269 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The project, the run, and the diff and jobs of the held fix you read, by the digests the run served them with. + class LavaflowHeldFixOpen < ApiModelBase + # The project the run belongs to. + attr_accessor :project_id + + # The run whose held fix to open. + attr_accessor :run_id + + # The run's `diff_sha256`, as it served it. + attr_accessor :diff_sha256 + + # The run's `held_workflows.jobs_sha256`, as it served it. + attr_accessor :jobs_sha256 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'project_id' => :'project_id', + :'run_id' => :'run_id', + :'diff_sha256' => :'diff_sha256', + :'jobs_sha256' => :'jobs_sha256' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'project_id' => :'String', + :'run_id' => :'String', + :'diff_sha256' => :'String', + :'jobs_sha256' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowHeldFixOpen` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowHeldFixOpen`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'run_id') + self.run_id = attributes[:'run_id'] + else + self.run_id = nil + end + + if attributes.key?(:'diff_sha256') + self.diff_sha256 = attributes[:'diff_sha256'] + else + self.diff_sha256 = nil + end + + if attributes.key?(:'jobs_sha256') + self.jobs_sha256 = attributes[:'jobs_sha256'] + else + self.jobs_sha256 = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @run_id.nil? + invalid_properties.push('invalid value for "run_id", run_id cannot be nil.') + end + + if @diff_sha256.nil? + invalid_properties.push('invalid value for "diff_sha256", diff_sha256 cannot be nil.') + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if @diff_sha256 !~ pattern + invalid_properties.push("invalid value for \"diff_sha256\", must conform to the pattern #{pattern}.") + end + + if @jobs_sha256.nil? + invalid_properties.push('invalid value for "jobs_sha256", jobs_sha256 cannot be nil.') + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if @jobs_sha256 !~ pattern + invalid_properties.push("invalid value for \"jobs_sha256\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + return false if @run_id.nil? + return false if @diff_sha256.nil? + return false if @diff_sha256 !~ Regexp.new(/^[0-9a-f]{64}$/) + return false if @jobs_sha256.nil? + return false if @jobs_sha256 !~ Regexp.new(/^[0-9a-f]{64}$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] run_id Value to be assigned + def run_id=(run_id) + if run_id.nil? + fail ArgumentError, 'run_id cannot be nil' + end + + @run_id = run_id + end + + # Custom attribute writer method with validation + # @param [Object] diff_sha256 Value to be assigned + def diff_sha256=(diff_sha256) + if diff_sha256.nil? + fail ArgumentError, 'diff_sha256 cannot be nil' + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if diff_sha256 !~ pattern + fail ArgumentError, "invalid value for \"diff_sha256\", must conform to the pattern #{pattern}." + end + + @diff_sha256 = diff_sha256 + end + + # Custom attribute writer method with validation + # @param [Object] jobs_sha256 Value to be assigned + def jobs_sha256=(jobs_sha256) + if jobs_sha256.nil? + fail ArgumentError, 'jobs_sha256 cannot be nil' + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if jobs_sha256 !~ pattern + fail ArgumentError, "invalid value for \"jobs_sha256\", must conform to the pattern #{pattern}." + end + + @jobs_sha256 = jobs_sha256 + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + project_id == o.project_id && + run_id == o.run_id && + diff_sha256 == o.diff_sha256 && + jobs_sha256 == o.jobs_sha256 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [project_id, run_id, diff_sha256, jobs_sha256].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_held_workflows.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_held_workflows.rb new file mode 100644 index 00000000..4d604a1d --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_held_workflows.rb @@ -0,0 +1,235 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Every workflow job that could run a held fix's pull request with the repository's secrets before a person approves it, as LavaFlow found them when it held the fix, and the commits it read the workflows at. + class LavaflowHeldWorkflows < ApiModelBase + # Each branch or commit whose workflows LavaFlow read: the project's production branch, the repository's default branch, and the commit the fix is cut from. + attr_accessor :read_at + + # Every such job, at most 256, sorted by source, path and job. Empty when LavaFlow read every workflow to the end and found none, such as when they changed between the hold and the read. + attr_accessor :jobs + + # Identifies `read_at` and `jobs` together. Treat it as opaque: it changes when a listed job, or a commit the workflows were read at, does. + attr_accessor :jobs_sha256 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'read_at' => :'read_at', + :'jobs' => :'jobs', + :'jobs_sha256' => :'jobs_sha256' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'read_at' => :'Array', + :'jobs' => :'Array', + :'jobs_sha256' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowHeldWorkflows` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowHeldWorkflows`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'read_at') + if (value = attributes[:'read_at']).is_a?(Array) + self.read_at = value + end + else + self.read_at = nil + end + + if attributes.key?(:'jobs') + if (value = attributes[:'jobs']).is_a?(Array) + self.jobs = value + end + else + self.jobs = nil + end + + if attributes.key?(:'jobs_sha256') + self.jobs_sha256 = attributes[:'jobs_sha256'] + else + self.jobs_sha256 = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @read_at.nil? + invalid_properties.push('invalid value for "read_at", read_at cannot be nil.') + end + + if @jobs.nil? + invalid_properties.push('invalid value for "jobs", jobs cannot be nil.') + end + + if @jobs_sha256.nil? + invalid_properties.push('invalid value for "jobs_sha256", jobs_sha256 cannot be nil.') + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if @jobs_sha256 !~ pattern + invalid_properties.push("invalid value for \"jobs_sha256\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @read_at.nil? + return false if @jobs.nil? + return false if @jobs_sha256.nil? + return false if @jobs_sha256 !~ Regexp.new(/^[0-9a-f]{64}$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] read_at Value to be assigned + def read_at=(read_at) + if read_at.nil? + fail ArgumentError, 'read_at cannot be nil' + end + + @read_at = read_at + end + + # Custom attribute writer method with validation + # @param [Object] jobs Value to be assigned + def jobs=(jobs) + if jobs.nil? + fail ArgumentError, 'jobs cannot be nil' + end + + @jobs = jobs + end + + # Custom attribute writer method with validation + # @param [Object] jobs_sha256 Value to be assigned + def jobs_sha256=(jobs_sha256) + if jobs_sha256.nil? + fail ArgumentError, 'jobs_sha256 cannot be nil' + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if jobs_sha256 !~ pattern + fail ArgumentError, "invalid value for \"jobs_sha256\", must conform to the pattern #{pattern}." + end + + @jobs_sha256 = jobs_sha256 + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + read_at == o.read_at && + jobs == o.jobs && + jobs_sha256 == o.jobs_sha256 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [read_at, jobs, jobs_sha256].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_hold_reason.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_hold_reason.rb new file mode 100644 index 00000000..a2b97190 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_hold_reason.rb @@ -0,0 +1,222 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # One reason LavaFlow holds the fix for a person. + class LavaflowHoldReason < ApiModelBase + # Why the fix is held. `client_reported_commit`: the fix is built on a commit Volcano can't tie to a push. `path`: it changes a path in `human_review_paths`, or deploy or infrastructure configuration Volcano always holds, such as `volcano-config.yaml`, Terraform files, a YAML or JSON file that declares a resource, a YAML template that mentions `apiVersion` or `kind`, a file in a Helm chart or Kustomize directory, or, in a repository too large to read in full, any file no other path reason holds. `sensitive_path`: it changes another path Volcano always holds: authentication or authorization code, Next.js middleware included; secret, key, certificate or cryptography files; a coding agent's instructions or settings, or Git hook configuration; CI configuration; a dependency manifest or lockfile, or a `package.json` change to what installs or its install scripts; or runtime, container or other configuration files. `label`: the pull request has the `needs-human-review` label. `no_checks`: no CI ran on it. `required_check_skipped`: a required check was skipped. `no_required_checks`: the base branch requires no check, so passing checks alone don't vouch for the fix. `changes_requested`: a reviewer requested changes. `repository_requires_approval`: the repository requires an approving review. `person_commits`: someone other than LavaFlow pushed to the fix's branch. `rules_bypass`: the Volcano GitHub App can bypass a ruleset on the base branch. `unchecked_rules`: the base branch has a rule LavaFlow doesn't check, such as required signatures. On a fix a person merges it names only rules that kept LavaFlow from starting the fix's CI, such as `code_scanning` or `workflows`, or that LavaFlow couldn't read them. `commit_convention`: no title can meet the repository's commit convention. `ungated_workflows`: the fix opened past workflows that can run it with the repository's secrets before a person approves it, as the project's owner allowed, or LavaFlow couldn't check its workflows, or, when LavaFlow was about to start its CI or add it to a merge queue, a workflow could run it with those secrets before a person approves it or couldn't be read, so LavaFlow takes it no further and never merges it. A fix held for another reason before its CI starts lists it too when that check, run without starting CI, finds such a workflow or can't finish. `ci_outside_actions`: when LavaFlow was about to start the fix's CI, the repository could run CI, a build or a preview outside GitHub Actions: the root of the fix's tree or its base branch's holds another service's configuration, such as `.travis.yml`, `.circleci/` or `netlify.toml`, which `paths` names, another app reported checks or statuses on the base branch, or LavaFlow couldn't read them in full. LavaFlow starts CI only when it finds no sign of CI outside GitHub Actions, so it never starts this fix's CI or merges it. `lineage_undoes_parent`: the fix follows up an earlier LavaFlow fix and deletes or changes lines that fix added, which could undo it. `lineage_cap`: the fix's lineage opened as many pull requests as it may. `lineage_held`: an earlier pull request in the fix's lineage was held, stopped or closed; one a person merges holds it only when closed. `recent_regressions`: fixes LavaFlow merged in the project recently caused new errors. `no_test`: the fix changes code the repository tests and adds no test, because testing it needs test infrastructure the repository doesn't have or the change has no effect a test can observe. `choices_to_confirm`: the fix states behavior it decides beyond stopping the error, listed in the run's `choices` and, on a private repository, under Choices to confirm in the pull request's description, for a person to confirm, and LavaFlow's reviewers didn't all mark each choice as needing no person. It never applies alongside `person_merges`: the person confirms the choices while reviewing the fix. `risky_change`: the fix adds or removes a line that converts a value, such as with `float()` or `parseInt()`, in a file that names a rate limit or quota, authentication or authorization, or money, so values such as NaN, Infinity or a negative number could get past a check there; `paths` names the files. `review_notes`: LavaFlow's reviewers passed the fix, but its review's last round left notes, findings below `major` that a later round no longer sends back for revision, such as a decision the fix makes without stating it. `person_merges`: a person reviews and merges the fix, because the project's autonomy is `open_pr`, merging was unavailable when it opened, or its run may only open a pull request; LavaFlow ran the fix's CI once first unless another reason, or the CI start's own checks, stopped it. Other codes name a concern LavaFlow's reviewers raised. New codes may appear. + attr_accessor :code + + # Why LavaFlow holds the fix and what to check before you merge it, in one or two sentences to show as given. A reviewer's reason is a question for you to answer. Reads `Hidden: this field matched a secret.` when it holds one of the project's secret values or a secret gitleaks detects, or when one of its `paths` reads `\"\"`. Every question reads `Hidden: the fix may add a credential.`, LavaFlow's fixed sentences too, on a run whose `pull_request_skipped` is `possible_credential`. + attr_accessor :question + + # The changed paths that matched, for a path code. For `ci_outside_actions`, the entries at the repository's root that another CI or preview service reads, whether or not the fix changes them. `\"\"` for a path that holds a control character, one of the project's secret values or a secret gitleaks detects. + attr_accessor :paths + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'question' => :'question', + :'paths' => :'paths' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'String', + :'question' => :'String', + :'paths' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowHoldReason` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowHoldReason`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + else + self.code = nil + end + + if attributes.key?(:'question') + self.question = attributes[:'question'] + else + self.question = nil + end + + if attributes.key?(:'paths') + if (value = attributes[:'paths']).is_a?(Array) + self.paths = value + end + else + self.paths = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @code.nil? + invalid_properties.push('invalid value for "code", code cannot be nil.') + end + + if @question.nil? + invalid_properties.push('invalid value for "question", question cannot be nil.') + end + + if @paths.nil? + invalid_properties.push('invalid value for "paths", paths cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @code.nil? + return false if @question.nil? + return false if @paths.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if code.nil? + fail ArgumentError, 'code cannot be nil' + end + + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] question Value to be assigned + def question=(question) + if question.nil? + fail ArgumentError, 'question cannot be nil' + end + + @question = question + end + + # Custom attribute writer method with validation + # @param [Object] paths Value to be assigned + def paths=(paths) + if paths.nil? + fail ArgumentError, 'paths cannot be nil' + end + + @paths = paths + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + question == o.question && + paths == o.paths + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, question, paths].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_involved_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_involved_resource.rb new file mode 100644 index 00000000..f077b9fc --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_involved_resource.rb @@ -0,0 +1,211 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A resource a run involves, and how. + class LavaflowInvolvedResource < ApiModelBase + attr_accessor :resource + + # `issue`: the issue came from it. `cause`: the issue came from it, or code the diagnosis cites as evidence is in its source. `fix`: the diagnosis proposes changing its source, or the fix changes it; a change to code that every function shares involves every function. + attr_accessor :roles + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resource' => :'resource', + :'roles' => :'roles' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'resource' => :'LavaflowResourceReference', + :'roles' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowInvolvedResource` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowInvolvedResource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'resource') + self.resource = attributes[:'resource'] + else + self.resource = nil + end + + if attributes.key?(:'roles') + if (value = attributes[:'roles']).is_a?(Array) + self.roles = value + end + else + self.roles = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @resource.nil? + invalid_properties.push('invalid value for "resource", resource cannot be nil.') + end + + if @roles.nil? + invalid_properties.push('invalid value for "roles", roles cannot be nil.') + end + + if @roles.length < 1 + invalid_properties.push('invalid value for "roles", number of items must be greater than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @resource.nil? + return false if @roles.nil? + return false if @roles.length < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] resource Value to be assigned + def resource=(resource) + if resource.nil? + fail ArgumentError, 'resource cannot be nil' + end + + @resource = resource + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + resource == o.resource && + roles == o.roles + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [resource, roles].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_involved_resource_count.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_involved_resource_count.rb new file mode 100644 index 00000000..8cdc940a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_involved_resource_count.rb @@ -0,0 +1,191 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A resource and how many matching runs involve it. + class LavaflowInvolvedResourceCount < ApiModelBase + attr_accessor :resource + + attr_accessor :runs + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resource' => :'resource', + :'runs' => :'runs' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'resource' => :'LavaflowResourceReference', + :'runs' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowInvolvedResourceCount` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowInvolvedResourceCount`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'resource') + self.resource = attributes[:'resource'] + else + self.resource = nil + end + + if attributes.key?(:'runs') + self.runs = attributes[:'runs'] + else + self.runs = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @resource.nil? + invalid_properties.push('invalid value for "resource", resource cannot be nil.') + end + + if @runs.nil? + invalid_properties.push('invalid value for "runs", runs cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @resource.nil? + return false if @runs.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] resource Value to be assigned + def resource=(resource) + if resource.nil? + fail ArgumentError, 'resource cannot be nil' + end + + @resource = resource + end + + # Custom attribute writer method with validation + # @param [Object] runs Value to be assigned + def runs=(runs) + if runs.nil? + fail ArgumentError, 'runs cannot be nil' + end + + @runs = runs + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + resource == o.resource && + runs == o.runs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [resource, runs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_issue_summary.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_issue_summary.rb new file mode 100644 index 00000000..a8a7e196 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_issue_summary.rb @@ -0,0 +1,390 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The project issue a run works on. + class LavaflowIssueSummary < ApiModelBase + attr_accessor :id + + # The issue's title: the error type and message, a Code Quality finding's title, or a reported problem's title. + attr_accessor :title + + # The innermost frame of your code, as `function (file)`; for a Code Quality finding, the symbol and file it is in, as `symbol (file)`, or the file alone; for a failed build, its first error's `file:line`. Null for an error without a stack and for a reported problem. + attr_accessor :culprit + + attr_accessor :status + + attr_accessor :source + + # The confirmed Code Quality finding's recorded severity. Omitted for other issue sources and when no canonical severity is known; absence does not mean the issue has low severity. + attr_accessor :severity + + # Errors the issue has grouped so far; for a Code Quality finding, the scans that saw it; for a failed build, the failed deploys; 0 for a reported problem. + attr_accessor :event_count + + attr_accessor :last_seen_at + + # When the issue was resolved; null unless it is resolved now. + attr_accessor :resolved_at + + # When the issue was last seen again after it was resolved, and reopened; null if it never was. + attr_accessor :regressed_at + + # LavaFlow runs on this issue, this one included. + attr_accessor :run_count + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'title' => :'title', + :'culprit' => :'culprit', + :'status' => :'status', + :'source' => :'source', + :'severity' => :'severity', + :'event_count' => :'event_count', + :'last_seen_at' => :'last_seen_at', + :'resolved_at' => :'resolved_at', + :'regressed_at' => :'regressed_at', + :'run_count' => :'run_count' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'title' => :'String', + :'culprit' => :'String', + :'status' => :'IssueStatus', + :'source' => :'IssueSource', + :'severity' => :'String', + :'event_count' => :'Integer', + :'last_seen_at' => :'Time', + :'resolved_at' => :'Time', + :'regressed_at' => :'Time', + :'run_count' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'culprit', + :'resolved_at', + :'regressed_at', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowIssueSummary` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowIssueSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + else + self.title = nil + end + + if attributes.key?(:'culprit') + self.culprit = attributes[:'culprit'] + else + self.culprit = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + if attributes.key?(:'event_count') + self.event_count = attributes[:'event_count'] + else + self.event_count = nil + end + + if attributes.key?(:'last_seen_at') + self.last_seen_at = attributes[:'last_seen_at'] + else + self.last_seen_at = nil + end + + if attributes.key?(:'resolved_at') + self.resolved_at = attributes[:'resolved_at'] + else + self.resolved_at = nil + end + + if attributes.key?(:'regressed_at') + self.regressed_at = attributes[:'regressed_at'] + else + self.regressed_at = nil + end + + if attributes.key?(:'run_count') + self.run_count = attributes[:'run_count'] + else + self.run_count = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @title.nil? + invalid_properties.push('invalid value for "title", title cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @event_count.nil? + invalid_properties.push('invalid value for "event_count", event_count cannot be nil.') + end + + if @last_seen_at.nil? + invalid_properties.push('invalid value for "last_seen_at", last_seen_at cannot be nil.') + end + + if @run_count.nil? + invalid_properties.push('invalid value for "run_count", run_count cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @title.nil? + return false if @status.nil? + severity_validator = EnumAttributeValidator.new('String', ["nit", "minor", "major", "critical"]) + return false unless severity_validator.valid?(@severity) + return false if @event_count.nil? + return false if @last_seen_at.nil? + return false if @run_count.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] title Value to be assigned + def title=(title) + if title.nil? + fail ArgumentError, 'title cannot be nil' + end + + @title = title + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] severity Object to be assigned + def severity=(severity) + validator = EnumAttributeValidator.new('String', ["nit", "minor", "major", "critical"]) + unless validator.valid?(severity) + fail ArgumentError, "invalid value for \"severity\", must be one of #{validator.allowable_values}." + end + @severity = severity + end + + # Custom attribute writer method with validation + # @param [Object] event_count Value to be assigned + def event_count=(event_count) + if event_count.nil? + fail ArgumentError, 'event_count cannot be nil' + end + + @event_count = event_count + end + + # Custom attribute writer method with validation + # @param [Object] last_seen_at Value to be assigned + def last_seen_at=(last_seen_at) + if last_seen_at.nil? + fail ArgumentError, 'last_seen_at cannot be nil' + end + + @last_seen_at = last_seen_at + end + + # Custom attribute writer method with validation + # @param [Object] run_count Value to be assigned + def run_count=(run_count) + if run_count.nil? + fail ArgumentError, 'run_count cannot be nil' + end + + @run_count = run_count + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + title == o.title && + culprit == o.culprit && + status == o.status && + source == o.source && + severity == o.severity && + event_count == o.event_count && + last_seen_at == o.last_seen_at && + resolved_at == o.resolved_at && + regressed_at == o.regressed_at && + run_count == o.run_count + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, title, culprit, status, source, severity, event_count, last_seen_at, resolved_at, regressed_at, run_count].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_lineage.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_lineage.rb new file mode 100644 index 00000000..117e3235 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_lineage.rb @@ -0,0 +1,415 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A chain of LavaFlow fixes: a merged fix, and the runs that followed up an issue traced to it or to a fix after it. + class LavaflowLineage < ApiModelBase + # The lineage's root run. + attr_accessor :id + + # 0 for the root fix. + attr_accessor :depth + + # `regression` for an issue traced to the parent's deploy, `recurrence` for an issue that came back after the parent went live. Null for the root. + attr_accessor :relation + + # Null for the root, and otherwise `strong`. `weak` is reserved: nothing writes it. + attr_accessor :confidence + + # The fix this run follows up. Null for the root. + attr_accessor :parent + + # The run whose fix also covers this issue, so this run opened nothing. + attr_accessor :covered_by + + # How the run follows up its parent. Currently always `fix`: a regression gets a follow-up fix. `revert` and `none` are reserved. + attr_accessor :remedy + + attr_accessor :state + + # Why the lineage holds: `lineage_cap`, `lineage_held` or `repository_changed`. New values may appear. Null unless `state` is `held`. + attr_accessor :hold_reason + + # Pull requests the lineage opened, counting the root's. + attr_accessor :pull_requests_opened + + # The most pull requests a lineage opens before it holds. + attr_accessor :pull_request_cap + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'depth' => :'depth', + :'relation' => :'relation', + :'confidence' => :'confidence', + :'parent' => :'parent', + :'covered_by' => :'covered_by', + :'remedy' => :'remedy', + :'state' => :'state', + :'hold_reason' => :'hold_reason', + :'pull_requests_opened' => :'pull_requests_opened', + :'pull_request_cap' => :'pull_request_cap' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'depth' => :'Integer', + :'relation' => :'String', + :'confidence' => :'String', + :'parent' => :'LavaflowRunReference', + :'covered_by' => :'LavaflowRunReference', + :'remedy' => :'String', + :'state' => :'String', + :'hold_reason' => :'String', + :'pull_requests_opened' => :'Integer', + :'pull_request_cap' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'relation', + :'confidence', + :'parent', + :'covered_by', + :'hold_reason', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowLineage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowLineage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'depth') + self.depth = attributes[:'depth'] + else + self.depth = nil + end + + if attributes.key?(:'relation') + self.relation = attributes[:'relation'] + else + self.relation = nil + end + + if attributes.key?(:'confidence') + self.confidence = attributes[:'confidence'] + else + self.confidence = nil + end + + if attributes.key?(:'parent') + self.parent = attributes[:'parent'] + else + self.parent = nil + end + + if attributes.key?(:'covered_by') + self.covered_by = attributes[:'covered_by'] + else + self.covered_by = nil + end + + if attributes.key?(:'remedy') + self.remedy = attributes[:'remedy'] + else + self.remedy = nil + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + else + self.state = nil + end + + if attributes.key?(:'hold_reason') + self.hold_reason = attributes[:'hold_reason'] + else + self.hold_reason = nil + end + + if attributes.key?(:'pull_requests_opened') + self.pull_requests_opened = attributes[:'pull_requests_opened'] + else + self.pull_requests_opened = nil + end + + if attributes.key?(:'pull_request_cap') + self.pull_request_cap = attributes[:'pull_request_cap'] + else + self.pull_request_cap = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @depth.nil? + invalid_properties.push('invalid value for "depth", depth cannot be nil.') + end + + if @remedy.nil? + invalid_properties.push('invalid value for "remedy", remedy cannot be nil.') + end + + if @state.nil? + invalid_properties.push('invalid value for "state", state cannot be nil.') + end + + if @pull_requests_opened.nil? + invalid_properties.push('invalid value for "pull_requests_opened", pull_requests_opened cannot be nil.') + end + + if @pull_request_cap.nil? + invalid_properties.push('invalid value for "pull_request_cap", pull_request_cap cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @depth.nil? + relation_validator = EnumAttributeValidator.new('String', ["regression", "recurrence"]) + return false unless relation_validator.valid?(@relation) + confidence_validator = EnumAttributeValidator.new('String', ["strong", "weak"]) + return false unless confidence_validator.valid?(@confidence) + return false if @remedy.nil? + remedy_validator = EnumAttributeValidator.new('String', ["fix", "revert", "none"]) + return false unless remedy_validator.valid?(@remedy) + return false if @state.nil? + state_validator = EnumAttributeValidator.new('String', ["active", "settled", "held"]) + return false unless state_validator.valid?(@state) + return false if @pull_requests_opened.nil? + return false if @pull_request_cap.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] depth Value to be assigned + def depth=(depth) + if depth.nil? + fail ArgumentError, 'depth cannot be nil' + end + + @depth = depth + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] relation Object to be assigned + def relation=(relation) + validator = EnumAttributeValidator.new('String', ["regression", "recurrence"]) + unless validator.valid?(relation) + fail ArgumentError, "invalid value for \"relation\", must be one of #{validator.allowable_values}." + end + @relation = relation + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] confidence Object to be assigned + def confidence=(confidence) + validator = EnumAttributeValidator.new('String', ["strong", "weak"]) + unless validator.valid?(confidence) + fail ArgumentError, "invalid value for \"confidence\", must be one of #{validator.allowable_values}." + end + @confidence = confidence + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] remedy Object to be assigned + def remedy=(remedy) + validator = EnumAttributeValidator.new('String', ["fix", "revert", "none"]) + unless validator.valid?(remedy) + fail ArgumentError, "invalid value for \"remedy\", must be one of #{validator.allowable_values}." + end + @remedy = remedy + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] state Object to be assigned + def state=(state) + validator = EnumAttributeValidator.new('String', ["active", "settled", "held"]) + unless validator.valid?(state) + fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}." + end + @state = state + end + + # Custom attribute writer method with validation + # @param [Object] pull_requests_opened Value to be assigned + def pull_requests_opened=(pull_requests_opened) + if pull_requests_opened.nil? + fail ArgumentError, 'pull_requests_opened cannot be nil' + end + + @pull_requests_opened = pull_requests_opened + end + + # Custom attribute writer method with validation + # @param [Object] pull_request_cap Value to be assigned + def pull_request_cap=(pull_request_cap) + if pull_request_cap.nil? + fail ArgumentError, 'pull_request_cap cannot be nil' + end + + @pull_request_cap = pull_request_cap + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + depth == o.depth && + relation == o.relation && + confidence == o.confidence && + parent == o.parent && + covered_by == o.covered_by && + remedy == o.remedy && + state == o.state && + hold_reason == o.hold_reason && + pull_requests_opened == o.pull_requests_opened && + pull_request_cap == o.pull_request_cap + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, depth, relation, confidence, parent, covered_by, remedy, state, hold_reason, pull_requests_opened, pull_request_cap].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_lineage_evidence.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_lineage_evidence.rb new file mode 100644 index 00000000..104335a0 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_lineage_evidence.rb @@ -0,0 +1,365 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # What tied the run's issue to a recent LavaFlow fix. A `display` link rests on less than a strong one and joins no lineage. + class LavaflowLineageEvidence < ApiModelBase + # `strong` or `display`. `weak` is reserved: nothing writes it. + attr_accessor :confidence + + # The fix the issue was traced to. + attr_accessor :parent + + attr_accessor :deployment + + # The commit of the deployment before it. + attr_accessor :previous_commit_sha + + attr_accessor :fix_live_at + + # The occurrence attribution judged. + attr_accessor :opened_at + + attr_accessor :overlapping_functions + + attr_accessor :overlapping_files + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'confidence' => :'confidence', + :'parent' => :'parent', + :'deployment' => :'deployment', + :'previous_commit_sha' => :'previous_commit_sha', + :'fix_live_at' => :'fix_live_at', + :'opened_at' => :'opened_at', + :'overlapping_functions' => :'overlapping_functions', + :'overlapping_files' => :'overlapping_files' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'confidence' => :'String', + :'parent' => :'LavaflowRunReference', + :'deployment' => :'LavaflowLineageEvidenceDeployment', + :'previous_commit_sha' => :'String', + :'fix_live_at' => :'Time', + :'opened_at' => :'Time', + :'overlapping_functions' => :'Array', + :'overlapping_files' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'previous_commit_sha', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowLineageEvidence` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowLineageEvidence`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'confidence') + self.confidence = attributes[:'confidence'] + else + self.confidence = nil + end + + if attributes.key?(:'parent') + self.parent = attributes[:'parent'] + else + self.parent = nil + end + + if attributes.key?(:'deployment') + self.deployment = attributes[:'deployment'] + else + self.deployment = nil + end + + if attributes.key?(:'previous_commit_sha') + self.previous_commit_sha = attributes[:'previous_commit_sha'] + else + self.previous_commit_sha = nil + end + + if attributes.key?(:'fix_live_at') + self.fix_live_at = attributes[:'fix_live_at'] + else + self.fix_live_at = nil + end + + if attributes.key?(:'opened_at') + self.opened_at = attributes[:'opened_at'] + else + self.opened_at = nil + end + + if attributes.key?(:'overlapping_functions') + if (value = attributes[:'overlapping_functions']).is_a?(Array) + self.overlapping_functions = value + end + else + self.overlapping_functions = nil + end + + if attributes.key?(:'overlapping_files') + if (value = attributes[:'overlapping_files']).is_a?(Array) + self.overlapping_files = value + end + else + self.overlapping_files = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @confidence.nil? + invalid_properties.push('invalid value for "confidence", confidence cannot be nil.') + end + + if @parent.nil? + invalid_properties.push('invalid value for "parent", parent cannot be nil.') + end + + if @deployment.nil? + invalid_properties.push('invalid value for "deployment", deployment cannot be nil.') + end + + if @fix_live_at.nil? + invalid_properties.push('invalid value for "fix_live_at", fix_live_at cannot be nil.') + end + + if @opened_at.nil? + invalid_properties.push('invalid value for "opened_at", opened_at cannot be nil.') + end + + if @overlapping_functions.nil? + invalid_properties.push('invalid value for "overlapping_functions", overlapping_functions cannot be nil.') + end + + if @overlapping_files.nil? + invalid_properties.push('invalid value for "overlapping_files", overlapping_files cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @confidence.nil? + confidence_validator = EnumAttributeValidator.new('String', ["strong", "weak", "display"]) + return false unless confidence_validator.valid?(@confidence) + return false if @parent.nil? + return false if @deployment.nil? + return false if @fix_live_at.nil? + return false if @opened_at.nil? + return false if @overlapping_functions.nil? + return false if @overlapping_files.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] confidence Object to be assigned + def confidence=(confidence) + validator = EnumAttributeValidator.new('String', ["strong", "weak", "display"]) + unless validator.valid?(confidence) + fail ArgumentError, "invalid value for \"confidence\", must be one of #{validator.allowable_values}." + end + @confidence = confidence + end + + # Custom attribute writer method with validation + # @param [Object] parent Value to be assigned + def parent=(parent) + if parent.nil? + fail ArgumentError, 'parent cannot be nil' + end + + @parent = parent + end + + # Custom attribute writer method with validation + # @param [Object] deployment Value to be assigned + def deployment=(deployment) + if deployment.nil? + fail ArgumentError, 'deployment cannot be nil' + end + + @deployment = deployment + end + + # Custom attribute writer method with validation + # @param [Object] fix_live_at Value to be assigned + def fix_live_at=(fix_live_at) + if fix_live_at.nil? + fail ArgumentError, 'fix_live_at cannot be nil' + end + + @fix_live_at = fix_live_at + end + + # Custom attribute writer method with validation + # @param [Object] opened_at Value to be assigned + def opened_at=(opened_at) + if opened_at.nil? + fail ArgumentError, 'opened_at cannot be nil' + end + + @opened_at = opened_at + end + + # Custom attribute writer method with validation + # @param [Object] overlapping_functions Value to be assigned + def overlapping_functions=(overlapping_functions) + if overlapping_functions.nil? + fail ArgumentError, 'overlapping_functions cannot be nil' + end + + @overlapping_functions = overlapping_functions + end + + # Custom attribute writer method with validation + # @param [Object] overlapping_files Value to be assigned + def overlapping_files=(overlapping_files) + if overlapping_files.nil? + fail ArgumentError, 'overlapping_files cannot be nil' + end + + @overlapping_files = overlapping_files + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + confidence == o.confidence && + parent == o.parent && + deployment == o.deployment && + previous_commit_sha == o.previous_commit_sha && + fix_live_at == o.fix_live_at && + opened_at == o.opened_at && + overlapping_functions == o.overlapping_functions && + overlapping_files == o.overlapping_files + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [confidence, parent, deployment, previous_commit_sha, fix_live_at, opened_at, overlapping_functions, overlapping_files].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_lineage_evidence_deployment.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_lineage_evidence_deployment.rb new file mode 100644 index 00000000..65df289f --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_lineage_evidence_deployment.rb @@ -0,0 +1,192 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowLineageEvidenceDeployment < ApiModelBase + # The commit of the deployment that served the occurrence attribution judged (`opened_at`). + attr_accessor :commit_sha + + # `push` for a commit Volcano built from a push, `client_reported` for one the deploy client reported. New values may appear. + attr_accessor :commit_origin + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'commit_sha' => :'commit_sha', + :'commit_origin' => :'commit_origin' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'commit_sha' => :'String', + :'commit_origin' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowLineageEvidenceDeployment` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowLineageEvidenceDeployment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'commit_sha') + self.commit_sha = attributes[:'commit_sha'] + else + self.commit_sha = nil + end + + if attributes.key?(:'commit_origin') + self.commit_origin = attributes[:'commit_origin'] + else + self.commit_origin = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @commit_sha.nil? + invalid_properties.push('invalid value for "commit_sha", commit_sha cannot be nil.') + end + + if @commit_origin.nil? + invalid_properties.push('invalid value for "commit_origin", commit_origin cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @commit_sha.nil? + return false if @commit_origin.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] commit_sha Value to be assigned + def commit_sha=(commit_sha) + if commit_sha.nil? + fail ArgumentError, 'commit_sha cannot be nil' + end + + @commit_sha = commit_sha + end + + # Custom attribute writer method with validation + # @param [Object] commit_origin Value to be assigned + def commit_origin=(commit_origin) + if commit_origin.nil? + fail ArgumentError, 'commit_origin cannot be nil' + end + + @commit_origin = commit_origin + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + commit_sha == o.commit_sha && + commit_origin == o.commit_origin + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [commit_sha, commit_origin].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_log_line.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_log_line.rb new file mode 100644 index 00000000..44f85607 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_log_line.rb @@ -0,0 +1,202 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowLogLine < ApiModelBase + attr_accessor :timestamp + + attr_accessor :level + + attr_accessor :message + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'timestamp' => :'timestamp', + :'level' => :'level', + :'message' => :'message' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'timestamp' => :'Time', + :'level' => :'String', + :'message' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'timestamp', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowLogLine` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowLogLine`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'timestamp') + self.timestamp = attributes[:'timestamp'] + else + self.timestamp = nil + end + + if attributes.key?(:'level') + self.level = attributes[:'level'] + else + self.level = nil + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + else + self.message = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @level.nil? + invalid_properties.push('invalid value for "level", level cannot be nil.') + end + + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @level.nil? + return false if @message.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] level Value to be assigned + def level=(level) + if level.nil? + fail ArgumentError, 'level cannot be nil' + end + + @level = level + end + + # Custom attribute writer method with validation + # @param [Object] message Value to be assigned + def message=(message) + if message.nil? + fail ArgumentError, 'message cannot be nil' + end + + @message = message + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + timestamp == o.timestamp && + level == o.level && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [timestamp, level, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge.rb new file mode 100644 index 00000000..744850b2 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge.rb @@ -0,0 +1,242 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Where the run's merge stands. Present for a run that may merge its fix, once its pull request opens, and for a run whose fix a person merges (its autonomy is `open_pr`, merging was unavailable when it opened, or the run may only open a pull request) that opened ready for review: LavaFlow starts that fix's CI once, then holds it for `person_merges` and never merges it. + class LavaflowMerge < ApiModelBase + attr_accessor :status + + # Why the merge stopped, or what a waiting merge is paused for. A stopped merge leaves the pull request open for you, and LavaFlow never merges, pushes to, rebases or dequeues it again; unless a reason says otherwise, review the change, then merge or close the pull request yourself. `review_unresolved`: LavaFlow's review didn't pass the fix; the run's `review` says why. `checks_failed`: a check on the fix failed. `checks_timed_out`: the checks didn't all finish within 24 hours. `blocked_by_rules`: a rule of the repository that LavaFlow can't satisfy blocks the merge. `not_mergeable`: GitHub can't merge the pull request, for example because it conflicts with its base branch; resolve the conflict first. `branch_behind`: the base branch requires the fix to be up to date with it, and LavaFlow doesn't update fix branches; update the branch first. `removed_from_queue`: the fix isn't in the merge queue, and LavaFlow can't tell why, for example because its checks failed there or someone removed it. `reads_failed`: LavaFlow failed to read the pull request for about an hour while the fix may have been queued, so it took the fix out of the merge queue, when it could still reach it, and stopped, or failed to read the project's settings or repository for about a day while merging was paused. For a fix a person merges, which LavaFlow never queues, it means only the latter, with its CI start paused instead of merging. `handed_off`: someone drafted or closed the pull request, or moved it to another branch, so LavaFlow stopped; nothing to do. `unreadable`: the pull request has more checks, reviews, labels or commits than LavaFlow reads, so it can't judge the fix. `permission_missing`: the Volcano GitHub App, or the project owner's GitHub account, lacks a permission the merge needs; grant the App's requested permissions and make sure the owner can push. `repository_changed`: the project now deploys from another repository. `settings_changed`: the project's settings no longer let LavaFlow merge, or, for a fix a person merges, start its CI: LavaFlow was turned off, `autonomy` is no longer `merge` (no longer `open_pr` or `merge` for a fix a person merges), the owner's plan no longer includes LavaFlow, or the project is being deleted. `request_rejected`: GitHub refused LavaFlow's request to start the checks on the fix. `ci_start_commit_mismatch`: GitHub reports a different commit from the one LavaFlow made to start the checks. `branch_refused`: LavaFlow didn't start the fix's checks because the pull request was no longer open, or its branch isn't a LavaFlow branch of a pull request LavaFlow opened; LavaFlow never starts checks on the default or production branch. `head_unverified`: GitHub doesn't report the fix's head as the signed commit LavaFlow pushed, so LavaFlow didn't start its checks. `checks_not_started`: LavaFlow couldn't give the fix a commit message that runs CI. `queue_carries_ci_skip`: the repository's merge queue could carry an instruction to skip checks, from the fix's commits or its pull request's title or description, into the base branch; reword LavaFlow's commit to drop it and force-push, and take any such instruction out of the title and description, before you queue the fix. `merge_carries_ci_skip`: merging would carry an instruction to skip checks into the base branch, for example because the repository allows no squash merge; reword LavaFlow's commit to drop it and force-push before you merge. After `request_rejected`, `ci_start_commit_mismatch` or `checks_not_started`, the fix's CI didn't start: push a commit to its branch to run it. `paused_too_long`: merging stayed paused for more than 7 days, or, for a fix a person merges, LavaFlow's CI start for such fixes did. `cancelled`: the project is being deleted, so LavaFlow stopped waiting on the merge; nothing to do. `manual_deploy`: the fix merged and waits for you to deploy it. `paused`: merging is paused, and the merge waits. LavaFlow takes a queued fix out of the merge queue, so it shows `waiting_for_checks`, and queues it again when merging resumes. For a fix a person merges, LavaFlow's CI start for such fixes is paused instead, whatever merging does, and LavaFlow never takes it out of a queue. New reasons may appear. + attr_accessor :reason + + # Why LavaFlow holds the fix. Empty unless `status` is `held`. + attr_accessor :hold_reasons + + # Whether LavaFlow made the merge: `true` when it merged the fix's commit itself or through the merge queue, `false` when someone else merged the pull request while LavaFlow waited. `null` unless `status` is `merged`. + attr_accessor :merged_by_lavaflow + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'reason' => :'reason', + :'hold_reasons' => :'hold_reasons', + :'merged_by_lavaflow' => :'merged_by_lavaflow' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'LavaflowMergeStatus', + :'reason' => :'String', + :'hold_reasons' => :'Array', + :'merged_by_lavaflow' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'reason', + :'merged_by_lavaflow' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowMerge` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowMerge`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'reason') + self.reason = attributes[:'reason'] + else + self.reason = nil + end + + if attributes.key?(:'hold_reasons') + if (value = attributes[:'hold_reasons']).is_a?(Array) + self.hold_reasons = value + end + else + self.hold_reasons = nil + end + + if attributes.key?(:'merged_by_lavaflow') + self.merged_by_lavaflow = attributes[:'merged_by_lavaflow'] + else + self.merged_by_lavaflow = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @hold_reasons.nil? + invalid_properties.push('invalid value for "hold_reasons", hold_reasons cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + return false if @hold_reasons.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] hold_reasons Value to be assigned + def hold_reasons=(hold_reasons) + if hold_reasons.nil? + fail ArgumentError, 'hold_reasons cannot be nil' + end + + @hold_reasons = hold_reasons + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + reason == o.reason && + hold_reasons == o.hold_reasons && + merged_by_lavaflow == o.merged_by_lavaflow + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, reason, hold_reasons, merged_by_lavaflow].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge_policy.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge_policy.rb new file mode 100644 index 00000000..cccaf396 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge_policy.rb @@ -0,0 +1,177 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Your rules for fixes LavaFlow must never merge. They apply with `autonomy: merge`; at another autonomy they are saved and do nothing. + class LavaflowMergePolicy < ApiModelBase + # Globs of paths whose change LavaFlow never merges: a fix that changes one is held and handed to you. Paths are relative to the repository root, such as `db/migrations/**`. `*` and `?` match within one directory, `**/` spans any number of directories, and a final `**` matches the rest. A pattern that starts with `/`, `./` or `../`, ends with `/`, holds an empty, `.` or `..` segment, or holds a NUL character answers `400`. Volcano's own held paths, such as deploy configuration and authentication code, are always held too. Defaults to none. + attr_accessor :human_review_paths + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'human_review_paths' => :'human_review_paths' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'human_review_paths' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowMergePolicy` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowMergePolicy`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'human_review_paths') + if (value = attributes[:'human_review_paths']).is_a?(Array) + self.human_review_paths = value + end + else + self.human_review_paths = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @human_review_paths.nil? + invalid_properties.push('invalid value for "human_review_paths", human_review_paths cannot be nil.') + end + + if @human_review_paths.length > 50 + invalid_properties.push('invalid value for "human_review_paths", number of items must be less than or equal to 50.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @human_review_paths.nil? + return false if @human_review_paths.length > 50 + true + end + + # Custom attribute writer method with validation + # @param [Object] human_review_paths Value to be assigned + def human_review_paths=(human_review_paths) + if human_review_paths.nil? + fail ArgumentError, 'human_review_paths cannot be nil' + end + + if human_review_paths.length > 50 + fail ArgumentError, 'invalid value for "human_review_paths", number of items must be less than or equal to 50.' + end + + @human_review_paths = human_review_paths + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + human_review_paths == o.human_review_paths + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [human_review_paths].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge_policy_update.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge_policy_update.rb new file mode 100644 index 00000000..6d10f5aa --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge_policy_update.rb @@ -0,0 +1,169 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The merge policy fields to change. An omitted field keeps its saved value. Send `human_review_paths: []` to clear the paths. + class LavaflowMergePolicyUpdate < ApiModelBase + attr_accessor :human_review_paths + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'human_review_paths' => :'human_review_paths' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'human_review_paths' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowMergePolicyUpdate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowMergePolicyUpdate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'human_review_paths') + if (value = attributes[:'human_review_paths']).is_a?(Array) + self.human_review_paths = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@human_review_paths.nil? && @human_review_paths.length > 50 + invalid_properties.push('invalid value for "human_review_paths", number of items must be less than or equal to 50.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@human_review_paths.nil? && @human_review_paths.length > 50 + true + end + + # Custom attribute writer method with validation + # @param [Object] human_review_paths Value to be assigned + def human_review_paths=(human_review_paths) + if human_review_paths.nil? + fail ArgumentError, 'human_review_paths cannot be nil' + end + + if human_review_paths.length > 50 + fail ArgumentError, 'invalid value for "human_review_paths", number of items must be less than or equal to 50.' + end + + @human_review_paths = human_review_paths + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + human_review_paths == o.human_review_paths + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [human_review_paths].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge_status.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge_status.rb new file mode 100644 index 00000000..5a7894fe --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_merge_status.rb @@ -0,0 +1,43 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowMergeStatus + WAITING_FOR_CHECKS = "waiting_for_checks".freeze + QUEUED = "queued".freeze + MERGED = "merged".freeze + HELD = "held".freeze + STOPPED = "stopped".freeze + + def self.all_vars + @all_vars ||= [WAITING_FOR_CHECKS, QUEUED, MERGED, HELD, STOPPED].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if LavaflowMergeStatus.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #LavaflowMergeStatus" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_counts.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_counts.rb new file mode 100644 index 00000000..ddfcc91f --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_counts.rb @@ -0,0 +1,244 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Retained confirmations in the requested interval. These are lower bounds when collection coverage is incomplete. + class LavaflowOutcomeCounts < ApiModelBase + attr_accessor :pull_requests_merged + + attr_accessor :improvements_observed_live + + attr_accessor :issue_resolutions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'pull_requests_merged' => :'pull_requests_merged', + :'improvements_observed_live' => :'improvements_observed_live', + :'issue_resolutions' => :'issue_resolutions' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'pull_requests_merged' => :'Integer', + :'improvements_observed_live' => :'Integer', + :'issue_resolutions' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowOutcomeCounts` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowOutcomeCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'pull_requests_merged') + self.pull_requests_merged = attributes[:'pull_requests_merged'] + else + self.pull_requests_merged = nil + end + + if attributes.key?(:'improvements_observed_live') + self.improvements_observed_live = attributes[:'improvements_observed_live'] + else + self.improvements_observed_live = nil + end + + if attributes.key?(:'issue_resolutions') + self.issue_resolutions = attributes[:'issue_resolutions'] + else + self.issue_resolutions = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @pull_requests_merged.nil? + invalid_properties.push('invalid value for "pull_requests_merged", pull_requests_merged cannot be nil.') + end + + if @pull_requests_merged < 0 + invalid_properties.push('invalid value for "pull_requests_merged", must be greater than or equal to 0.') + end + + if @improvements_observed_live.nil? + invalid_properties.push('invalid value for "improvements_observed_live", improvements_observed_live cannot be nil.') + end + + if @improvements_observed_live < 0 + invalid_properties.push('invalid value for "improvements_observed_live", must be greater than or equal to 0.') + end + + if @issue_resolutions.nil? + invalid_properties.push('invalid value for "issue_resolutions", issue_resolutions cannot be nil.') + end + + if @issue_resolutions < 0 + invalid_properties.push('invalid value for "issue_resolutions", must be greater than or equal to 0.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @pull_requests_merged.nil? + return false if @pull_requests_merged < 0 + return false if @improvements_observed_live.nil? + return false if @improvements_observed_live < 0 + return false if @issue_resolutions.nil? + return false if @issue_resolutions < 0 + true + end + + # Custom attribute writer method with validation + # @param [Object] pull_requests_merged Value to be assigned + def pull_requests_merged=(pull_requests_merged) + if pull_requests_merged.nil? + fail ArgumentError, 'pull_requests_merged cannot be nil' + end + + if pull_requests_merged < 0 + fail ArgumentError, 'invalid value for "pull_requests_merged", must be greater than or equal to 0.' + end + + @pull_requests_merged = pull_requests_merged + end + + # Custom attribute writer method with validation + # @param [Object] improvements_observed_live Value to be assigned + def improvements_observed_live=(improvements_observed_live) + if improvements_observed_live.nil? + fail ArgumentError, 'improvements_observed_live cannot be nil' + end + + if improvements_observed_live < 0 + fail ArgumentError, 'invalid value for "improvements_observed_live", must be greater than or equal to 0.' + end + + @improvements_observed_live = improvements_observed_live + end + + # Custom attribute writer method with validation + # @param [Object] issue_resolutions Value to be assigned + def issue_resolutions=(issue_resolutions) + if issue_resolutions.nil? + fail ArgumentError, 'issue_resolutions cannot be nil' + end + + if issue_resolutions < 0 + fail ArgumentError, 'invalid value for "issue_resolutions", must be greater than or equal to 0.' + end + + @issue_resolutions = issue_resolutions + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + pull_requests_merged == o.pull_requests_merged && + improvements_observed_live == o.improvements_observed_live && + issue_resolutions == o.issue_resolutions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [pull_requests_merged, improvements_observed_live, issue_resolutions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_coverage.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_coverage.rb new file mode 100644 index 00000000..122e7867 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_coverage.rb @@ -0,0 +1,330 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Collection coverage for one metric. A migration or the earliest retained event establishes no complete interval. Undated observations are not assigned to the requested dates or totals. + class LavaflowOutcomeCoverage < ApiModelBase + attr_accessor :status + + attr_accessor :complete_from + + attr_accessor :complete_through + + attr_accessor :reason + + attr_accessor :event_time_basis + + attr_accessor :supported_sources + + attr_accessor :undated_confirmed_events + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'complete_from' => :'complete_from', + :'complete_through' => :'complete_through', + :'reason' => :'reason', + :'event_time_basis' => :'event_time_basis', + :'supported_sources' => :'supported_sources', + :'undated_confirmed_events' => :'undated_confirmed_events' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'String', + :'complete_from' => :'Time', + :'complete_through' => :'Time', + :'reason' => :'String', + :'event_time_basis' => :'String', + :'supported_sources' => :'Array', + :'undated_confirmed_events' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'complete_from', + :'complete_through', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowOutcomeCoverage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowOutcomeCoverage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'complete_from') + self.complete_from = attributes[:'complete_from'] + else + self.complete_from = nil + end + + if attributes.key?(:'complete_through') + self.complete_through = attributes[:'complete_through'] + else + self.complete_through = nil + end + + if attributes.key?(:'reason') + self.reason = attributes[:'reason'] + else + self.reason = nil + end + + if attributes.key?(:'event_time_basis') + self.event_time_basis = attributes[:'event_time_basis'] + else + self.event_time_basis = nil + end + + if attributes.key?(:'supported_sources') + if (value = attributes[:'supported_sources']).is_a?(Array) + self.supported_sources = value + end + else + self.supported_sources = nil + end + + if attributes.key?(:'undated_confirmed_events') + self.undated_confirmed_events = attributes[:'undated_confirmed_events'] + else + self.undated_confirmed_events = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @reason.nil? + invalid_properties.push('invalid value for "reason", reason cannot be nil.') + end + + if @event_time_basis.nil? + invalid_properties.push('invalid value for "event_time_basis", event_time_basis cannot be nil.') + end + + if @supported_sources.nil? + invalid_properties.push('invalid value for "supported_sources", supported_sources cannot be nil.') + end + + if @undated_confirmed_events.nil? + invalid_properties.push('invalid value for "undated_confirmed_events", undated_confirmed_events cannot be nil.') + end + + if @undated_confirmed_events < 0 + invalid_properties.push('invalid value for "undated_confirmed_events", must be greater than or equal to 0.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + status_validator = EnumAttributeValidator.new('String', ["complete", "partial", "unavailable"]) + return false unless status_validator.valid?(@status) + return false if @reason.nil? + return false if @event_time_basis.nil? + event_time_basis_validator = EnumAttributeValidator.new('String', ["confirmed_merge_time", "first_recorded_live_confirmation", "recorded_automatic_resolution"]) + return false unless event_time_basis_validator.valid?(@event_time_basis) + return false if @supported_sources.nil? + return false if @undated_confirmed_events.nil? + return false if @undated_confirmed_events < 0 + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["complete", "partial", "unavailable"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] reason Value to be assigned + def reason=(reason) + if reason.nil? + fail ArgumentError, 'reason cannot be nil' + end + + @reason = reason + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] event_time_basis Object to be assigned + def event_time_basis=(event_time_basis) + validator = EnumAttributeValidator.new('String', ["confirmed_merge_time", "first_recorded_live_confirmation", "recorded_automatic_resolution"]) + unless validator.valid?(event_time_basis) + fail ArgumentError, "invalid value for \"event_time_basis\", must be one of #{validator.allowable_values}." + end + @event_time_basis = event_time_basis + end + + # Custom attribute writer method with validation + # @param [Object] supported_sources Value to be assigned + def supported_sources=(supported_sources) + if supported_sources.nil? + fail ArgumentError, 'supported_sources cannot be nil' + end + + @supported_sources = supported_sources + end + + # Custom attribute writer method with validation + # @param [Object] undated_confirmed_events Value to be assigned + def undated_confirmed_events=(undated_confirmed_events) + if undated_confirmed_events.nil? + fail ArgumentError, 'undated_confirmed_events cannot be nil' + end + + if undated_confirmed_events < 0 + fail ArgumentError, 'invalid value for "undated_confirmed_events", must be greater than or equal to 0.' + end + + @undated_confirmed_events = undated_confirmed_events + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + complete_from == o.complete_from && + complete_through == o.complete_through && + reason == o.reason && + event_time_basis == o.event_time_basis && + supported_sources == o.supported_sources && + undated_confirmed_events == o.undated_confirmed_events + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, complete_from, complete_through, reason, event_time_basis, supported_sources, undated_confirmed_events].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_current.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_current.rb new file mode 100644 index 00000000..51aba710 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_current.rb @@ -0,0 +1,276 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Current known open critical Code Quality findings, including findings without a fix run. The historical window and run-category filter do not narrow this inventory. Zero is not an exhaustive security assessment. + class LavaflowOutcomeCurrent < ApiModelBase + attr_accessor :known_open_critical_count + + attr_accessor :scope + + attr_accessor :inventory_not_exhaustive + + attr_accessor :category_filter_applied + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'known_open_critical_count' => :'known_open_critical_count', + :'scope' => :'scope', + :'inventory_not_exhaustive' => :'inventory_not_exhaustive', + :'category_filter_applied' => :'category_filter_applied' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'known_open_critical_count' => :'Integer', + :'scope' => :'String', + :'inventory_not_exhaustive' => :'Boolean', + :'category_filter_applied' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowOutcomeCurrent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowOutcomeCurrent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'known_open_critical_count') + self.known_open_critical_count = attributes[:'known_open_critical_count'] + else + self.known_open_critical_count = nil + end + + if attributes.key?(:'scope') + self.scope = attributes[:'scope'] + else + self.scope = nil + end + + if attributes.key?(:'inventory_not_exhaustive') + self.inventory_not_exhaustive = attributes[:'inventory_not_exhaustive'] + else + self.inventory_not_exhaustive = nil + end + + if attributes.key?(:'category_filter_applied') + self.category_filter_applied = attributes[:'category_filter_applied'] + else + self.category_filter_applied = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @known_open_critical_count.nil? + invalid_properties.push('invalid value for "known_open_critical_count", known_open_critical_count cannot be nil.') + end + + if @known_open_critical_count < 0 + invalid_properties.push('invalid value for "known_open_critical_count", must be greater than or equal to 0.') + end + + if @scope.nil? + invalid_properties.push('invalid value for "scope", scope cannot be nil.') + end + + if @inventory_not_exhaustive.nil? + invalid_properties.push('invalid value for "inventory_not_exhaustive", inventory_not_exhaustive cannot be nil.') + end + + if @category_filter_applied.nil? + invalid_properties.push('invalid value for "category_filter_applied", category_filter_applied cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @known_open_critical_count.nil? + return false if @known_open_critical_count < 0 + return false if @scope.nil? + scope_validator = EnumAttributeValidator.new('String', ["confirmed_code_quality"]) + return false unless scope_validator.valid?(@scope) + return false if @inventory_not_exhaustive.nil? + return false if @category_filter_applied.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] known_open_critical_count Value to be assigned + def known_open_critical_count=(known_open_critical_count) + if known_open_critical_count.nil? + fail ArgumentError, 'known_open_critical_count cannot be nil' + end + + if known_open_critical_count < 0 + fail ArgumentError, 'invalid value for "known_open_critical_count", must be greater than or equal to 0.' + end + + @known_open_critical_count = known_open_critical_count + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] scope Object to be assigned + def scope=(scope) + validator = EnumAttributeValidator.new('String', ["confirmed_code_quality"]) + unless validator.valid?(scope) + fail ArgumentError, "invalid value for \"scope\", must be one of #{validator.allowable_values}." + end + @scope = scope + end + + # Custom attribute writer method with validation + # @param [Object] inventory_not_exhaustive Value to be assigned + def inventory_not_exhaustive=(inventory_not_exhaustive) + if inventory_not_exhaustive.nil? + fail ArgumentError, 'inventory_not_exhaustive cannot be nil' + end + + @inventory_not_exhaustive = inventory_not_exhaustive + end + + # Custom attribute writer method with validation + # @param [Object] category_filter_applied Value to be assigned + def category_filter_applied=(category_filter_applied) + if category_filter_applied.nil? + fail ArgumentError, 'category_filter_applied cannot be nil' + end + + @category_filter_applied = category_filter_applied + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + known_open_critical_count == o.known_open_critical_count && + scope == o.scope && + inventory_not_exhaustive == o.inventory_not_exhaustive && + category_filter_applied == o.category_filter_applied + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [known_open_critical_count, scope, inventory_not_exhaustive, category_filter_applied].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_day.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_day.rb new file mode 100644 index 00000000..6ce49fe5 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_day.rb @@ -0,0 +1,216 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowOutcomeDay < ApiModelBase + attr_accessor :date + + attr_accessor :counts + + attr_accessor :confirmed_counts + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'date' => :'date', + :'counts' => :'counts', + :'confirmed_counts' => :'confirmed_counts' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'date' => :'Date', + :'counts' => :'LavaflowOutcomeValues', + :'confirmed_counts' => :'LavaflowOutcomeCounts' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowOutcomeDay` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowOutcomeDay`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'date') + self.date = attributes[:'date'] + else + self.date = nil + end + + if attributes.key?(:'counts') + self.counts = attributes[:'counts'] + else + self.counts = nil + end + + if attributes.key?(:'confirmed_counts') + self.confirmed_counts = attributes[:'confirmed_counts'] + else + self.confirmed_counts = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @date.nil? + invalid_properties.push('invalid value for "date", date cannot be nil.') + end + + if @counts.nil? + invalid_properties.push('invalid value for "counts", counts cannot be nil.') + end + + if @confirmed_counts.nil? + invalid_properties.push('invalid value for "confirmed_counts", confirmed_counts cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @date.nil? + return false if @counts.nil? + return false if @confirmed_counts.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] date Value to be assigned + def date=(date) + if date.nil? + fail ArgumentError, 'date cannot be nil' + end + + @date = date + end + + # Custom attribute writer method with validation + # @param [Object] counts Value to be assigned + def counts=(counts) + if counts.nil? + fail ArgumentError, 'counts cannot be nil' + end + + @counts = counts + end + + # Custom attribute writer method with validation + # @param [Object] confirmed_counts Value to be assigned + def confirmed_counts=(confirmed_counts) + if confirmed_counts.nil? + fail ArgumentError, 'confirmed_counts cannot be nil' + end + + @confirmed_counts = confirmed_counts + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + date == o.date && + counts == o.counts && + confirmed_counts == o.confirmed_counts + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [date, counts, confirmed_counts].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_values.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_values.rb new file mode 100644 index 00000000..81e7955d --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcome_values.rb @@ -0,0 +1,220 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Exact counts only when collection coverage is complete. Null means unknown, including days with no retained observations. + class LavaflowOutcomeValues < ApiModelBase + attr_accessor :pull_requests_merged + + attr_accessor :improvements_observed_live + + attr_accessor :issue_resolutions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'pull_requests_merged' => :'pull_requests_merged', + :'improvements_observed_live' => :'improvements_observed_live', + :'issue_resolutions' => :'issue_resolutions' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'pull_requests_merged' => :'Integer', + :'improvements_observed_live' => :'Integer', + :'issue_resolutions' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'pull_requests_merged', + :'improvements_observed_live', + :'issue_resolutions' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowOutcomeValues` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowOutcomeValues`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'pull_requests_merged') + self.pull_requests_merged = attributes[:'pull_requests_merged'] + else + self.pull_requests_merged = nil + end + + if attributes.key?(:'improvements_observed_live') + self.improvements_observed_live = attributes[:'improvements_observed_live'] + else + self.improvements_observed_live = nil + end + + if attributes.key?(:'issue_resolutions') + self.issue_resolutions = attributes[:'issue_resolutions'] + else + self.issue_resolutions = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @pull_requests_merged < 0 + invalid_properties.push('invalid value for "pull_requests_merged", must be greater than or equal to 0.') + end + + if @improvements_observed_live < 0 + invalid_properties.push('invalid value for "improvements_observed_live", must be greater than or equal to 0.') + end + + if @issue_resolutions < 0 + invalid_properties.push('invalid value for "issue_resolutions", must be greater than or equal to 0.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @pull_requests_merged < 0 + return false if @improvements_observed_live < 0 + return false if @issue_resolutions < 0 + true + end + + # Custom attribute writer method with validation + # @param [Object] pull_requests_merged Value to be assigned + def pull_requests_merged=(pull_requests_merged) + if !pull_requests_merged.nil? && pull_requests_merged < 0 + fail ArgumentError, 'invalid value for "pull_requests_merged", must be greater than or equal to 0.' + end + + @pull_requests_merged = pull_requests_merged + end + + # Custom attribute writer method with validation + # @param [Object] improvements_observed_live Value to be assigned + def improvements_observed_live=(improvements_observed_live) + if !improvements_observed_live.nil? && improvements_observed_live < 0 + fail ArgumentError, 'invalid value for "improvements_observed_live", must be greater than or equal to 0.' + end + + @improvements_observed_live = improvements_observed_live + end + + # Custom attribute writer method with validation + # @param [Object] issue_resolutions Value to be assigned + def issue_resolutions=(issue_resolutions) + if !issue_resolutions.nil? && issue_resolutions < 0 + fail ArgumentError, 'invalid value for "issue_resolutions", must be greater than or equal to 0.' + end + + @issue_resolutions = issue_resolutions + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + pull_requests_merged == o.pull_requests_merged && + improvements_observed_live == o.improvements_observed_live && + issue_resolutions == o.issue_resolutions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [pull_requests_merged, improvements_observed_live, issue_resolutions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcomes.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcomes.rb new file mode 100644 index 00000000..e2e9c288 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcomes.rb @@ -0,0 +1,299 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Separate confirmed merges, live improvements and actual automatic issue-resolution episodes. A live improvement is counted once per project, repository and pull request when inclusion is first durably confirmed on a tracked function or frontend. Resolution includes automatic open or ignored to resolved transitions, preserves the reason and category, and excludes manual actions. The primary issue resolution count includes every category, even when a category filter narrows merge and live counts. Only the first qualifying automatic resolution of a metric episode contributes a count. Recurrence and manual reopen start new metric episodes without erasing previous resolutions; moving resolved to ignored does not start an episode. Existing activity counts remain separate. Older servers omit this object; absence is unavailable, never zero. + class LavaflowOutcomes < ApiModelBase + # The UTC timestamp of the consistent database snapshot. + attr_accessor :as_of + + # The same ordered UTC date domain as the activity series, with unknown counts distinct from zero retained confirmations. + attr_accessor :days + + attr_accessor :totals + + attr_accessor :confirmed_totals + + attr_accessor :coverage + + attr_accessor :current + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'as_of' => :'as_of', + :'days' => :'days', + :'totals' => :'totals', + :'confirmed_totals' => :'confirmed_totals', + :'coverage' => :'coverage', + :'current' => :'current' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'as_of' => :'Time', + :'days' => :'Array', + :'totals' => :'LavaflowOutcomeValues', + :'confirmed_totals' => :'LavaflowOutcomeCounts', + :'coverage' => :'LavaflowOutcomesCoverage', + :'current' => :'LavaflowOutcomeCurrent' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowOutcomes` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowOutcomes`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'as_of') + self.as_of = attributes[:'as_of'] + else + self.as_of = nil + end + + if attributes.key?(:'days') + if (value = attributes[:'days']).is_a?(Array) + self.days = value + end + else + self.days = nil + end + + if attributes.key?(:'totals') + self.totals = attributes[:'totals'] + else + self.totals = nil + end + + if attributes.key?(:'confirmed_totals') + self.confirmed_totals = attributes[:'confirmed_totals'] + else + self.confirmed_totals = nil + end + + if attributes.key?(:'coverage') + self.coverage = attributes[:'coverage'] + else + self.coverage = nil + end + + if attributes.key?(:'current') + self.current = attributes[:'current'] + else + self.current = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @as_of.nil? + invalid_properties.push('invalid value for "as_of", as_of cannot be nil.') + end + + if @days.nil? + invalid_properties.push('invalid value for "days", days cannot be nil.') + end + + if @totals.nil? + invalid_properties.push('invalid value for "totals", totals cannot be nil.') + end + + if @confirmed_totals.nil? + invalid_properties.push('invalid value for "confirmed_totals", confirmed_totals cannot be nil.') + end + + if @coverage.nil? + invalid_properties.push('invalid value for "coverage", coverage cannot be nil.') + end + + if @current.nil? + invalid_properties.push('invalid value for "current", current cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @as_of.nil? + return false if @days.nil? + return false if @totals.nil? + return false if @confirmed_totals.nil? + return false if @coverage.nil? + return false if @current.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] as_of Value to be assigned + def as_of=(as_of) + if as_of.nil? + fail ArgumentError, 'as_of cannot be nil' + end + + @as_of = as_of + end + + # Custom attribute writer method with validation + # @param [Object] days Value to be assigned + def days=(days) + if days.nil? + fail ArgumentError, 'days cannot be nil' + end + + @days = days + end + + # Custom attribute writer method with validation + # @param [Object] totals Value to be assigned + def totals=(totals) + if totals.nil? + fail ArgumentError, 'totals cannot be nil' + end + + @totals = totals + end + + # Custom attribute writer method with validation + # @param [Object] confirmed_totals Value to be assigned + def confirmed_totals=(confirmed_totals) + if confirmed_totals.nil? + fail ArgumentError, 'confirmed_totals cannot be nil' + end + + @confirmed_totals = confirmed_totals + end + + # Custom attribute writer method with validation + # @param [Object] coverage Value to be assigned + def coverage=(coverage) + if coverage.nil? + fail ArgumentError, 'coverage cannot be nil' + end + + @coverage = coverage + end + + # Custom attribute writer method with validation + # @param [Object] current Value to be assigned + def current=(current) + if current.nil? + fail ArgumentError, 'current cannot be nil' + end + + @current = current + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + as_of == o.as_of && + days == o.days && + totals == o.totals && + confirmed_totals == o.confirmed_totals && + coverage == o.coverage && + current == o.current + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [as_of, days, totals, confirmed_totals, coverage, current].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcomes_coverage.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcomes_coverage.rb new file mode 100644 index 00000000..0107f081 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_outcomes_coverage.rb @@ -0,0 +1,216 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowOutcomesCoverage < ApiModelBase + attr_accessor :pull_requests_merged + + attr_accessor :improvements_observed_live + + attr_accessor :issue_resolutions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'pull_requests_merged' => :'pull_requests_merged', + :'improvements_observed_live' => :'improvements_observed_live', + :'issue_resolutions' => :'issue_resolutions' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'pull_requests_merged' => :'LavaflowOutcomeCoverage', + :'improvements_observed_live' => :'LavaflowOutcomeCoverage', + :'issue_resolutions' => :'LavaflowOutcomeCoverage' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowOutcomesCoverage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowOutcomesCoverage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'pull_requests_merged') + self.pull_requests_merged = attributes[:'pull_requests_merged'] + else + self.pull_requests_merged = nil + end + + if attributes.key?(:'improvements_observed_live') + self.improvements_observed_live = attributes[:'improvements_observed_live'] + else + self.improvements_observed_live = nil + end + + if attributes.key?(:'issue_resolutions') + self.issue_resolutions = attributes[:'issue_resolutions'] + else + self.issue_resolutions = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @pull_requests_merged.nil? + invalid_properties.push('invalid value for "pull_requests_merged", pull_requests_merged cannot be nil.') + end + + if @improvements_observed_live.nil? + invalid_properties.push('invalid value for "improvements_observed_live", improvements_observed_live cannot be nil.') + end + + if @issue_resolutions.nil? + invalid_properties.push('invalid value for "issue_resolutions", issue_resolutions cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @pull_requests_merged.nil? + return false if @improvements_observed_live.nil? + return false if @issue_resolutions.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] pull_requests_merged Value to be assigned + def pull_requests_merged=(pull_requests_merged) + if pull_requests_merged.nil? + fail ArgumentError, 'pull_requests_merged cannot be nil' + end + + @pull_requests_merged = pull_requests_merged + end + + # Custom attribute writer method with validation + # @param [Object] improvements_observed_live Value to be assigned + def improvements_observed_live=(improvements_observed_live) + if improvements_observed_live.nil? + fail ArgumentError, 'improvements_observed_live cannot be nil' + end + + @improvements_observed_live = improvements_observed_live + end + + # Custom attribute writer method with validation + # @param [Object] issue_resolutions Value to be assigned + def issue_resolutions=(issue_resolutions) + if issue_resolutions.nil? + fail ArgumentError, 'issue_resolutions cannot be nil' + end + + @issue_resolutions = issue_resolutions + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + pull_requests_merged == o.pull_requests_merged && + improvements_observed_live == o.improvements_observed_live && + issue_resolutions == o.issue_resolutions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [pull_requests_merged, improvements_observed_live, issue_resolutions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_pull_request.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_pull_request.rb new file mode 100644 index 00000000..3b1f9f75 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_pull_request.rb @@ -0,0 +1,315 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowPullRequest < ApiModelBase + attr_accessor :number + + attr_accessor :url + + # The recorded pull request branch. Omitted when it was not recorded, the run's fix is withheld because it may add a credential, or the branch name holds one of the project's secret values or a secret gitleaks detects. It is never shortened. + attr_accessor :branch + + attr_accessor :state + + # When the run opened the pull request, null for one opened before LavaFlow recorded the time. + attr_accessor :opened_at + + # When the pull request merged; null unless `state` is `merged`. + attr_accessor :merged_at + + # When the merged fix went live: the first live deployment of the issue's resource that includes it finished. When more than 20 deployments went live between the merge and the one LavaFlow found the fix in, LavaFlow can't tell which first included it, and this is the merge time. Null until LavaFlow finds the fix live, and for a pull request that didn't merge. A later live deployment can be verified even more than a week after the merge. Unverifiable or exhausted evidence remains unknown. + attr_accessor :deployed_at + + # Whether the pull request is a draft, as GitHub last reported it to LavaFlow. Null for one opened before LavaFlow recorded it. + attr_accessor :draft + + # Why the pull request is a draft, null unless `draft` is true. + attr_accessor :draft_reason + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'number', + :'url' => :'url', + :'branch' => :'branch', + :'state' => :'state', + :'opened_at' => :'opened_at', + :'merged_at' => :'merged_at', + :'deployed_at' => :'deployed_at', + :'draft' => :'draft', + :'draft_reason' => :'draft_reason' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'number' => :'Integer', + :'url' => :'String', + :'branch' => :'String', + :'state' => :'String', + :'opened_at' => :'Time', + :'merged_at' => :'Time', + :'deployed_at' => :'Time', + :'draft' => :'Boolean', + :'draft_reason' => :'LavaflowDraftReason' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'opened_at', + :'merged_at', + :'deployed_at', + :'draft', + :'draft_reason' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowPullRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowPullRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'number') + self.number = attributes[:'number'] + else + self.number = nil + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + else + self.url = nil + end + + if attributes.key?(:'branch') + self.branch = attributes[:'branch'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + else + self.state = nil + end + + if attributes.key?(:'opened_at') + self.opened_at = attributes[:'opened_at'] + else + self.opened_at = nil + end + + if attributes.key?(:'merged_at') + self.merged_at = attributes[:'merged_at'] + else + self.merged_at = nil + end + + if attributes.key?(:'deployed_at') + self.deployed_at = attributes[:'deployed_at'] + else + self.deployed_at = nil + end + + if attributes.key?(:'draft') + self.draft = attributes[:'draft'] + else + self.draft = nil + end + + if attributes.key?(:'draft_reason') + self.draft_reason = attributes[:'draft_reason'] + else + self.draft_reason = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @number.nil? + invalid_properties.push('invalid value for "number", number cannot be nil.') + end + + if @url.nil? + invalid_properties.push('invalid value for "url", url cannot be nil.') + end + + if @state.nil? + invalid_properties.push('invalid value for "state", state cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @number.nil? + return false if @url.nil? + return false if @state.nil? + state_validator = EnumAttributeValidator.new('String', ["open", "merged", "closed"]) + return false unless state_validator.valid?(@state) + true + end + + # Custom attribute writer method with validation + # @param [Object] number Value to be assigned + def number=(number) + if number.nil? + fail ArgumentError, 'number cannot be nil' + end + + @number = number + end + + # Custom attribute writer method with validation + # @param [Object] url Value to be assigned + def url=(url) + if url.nil? + fail ArgumentError, 'url cannot be nil' + end + + @url = url + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] state Object to be assigned + def state=(state) + validator = EnumAttributeValidator.new('String', ["open", "merged", "closed"]) + unless validator.valid?(state) + fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}." + end + @state = state + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + number == o.number && + url == o.url && + branch == o.branch && + state == o.state && + opened_at == o.opened_at && + merged_at == o.merged_at && + deployed_at == o.deployed_at && + draft == o.draft && + draft_reason == o.draft_reason + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [number, url, branch, state, opened_at, merged_at, deployed_at, draft, draft_reason].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_pull_request_state_counts.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_pull_request_state_counts.rb new file mode 100644 index 00000000..da8b1a49 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_pull_request_state_counts.rb @@ -0,0 +1,243 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Matching runs by the state of their pull request, zeros included. `none` counts runs without one. + class LavaflowPullRequestStateCounts < ApiModelBase + attr_accessor :open + + attr_accessor :merged + + attr_accessor :closed + + attr_accessor :none + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'open' => :'open', + :'merged' => :'merged', + :'closed' => :'closed', + :'none' => :'none' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'open' => :'Integer', + :'merged' => :'Integer', + :'closed' => :'Integer', + :'none' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowPullRequestStateCounts` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowPullRequestStateCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'open') + self.open = attributes[:'open'] + else + self.open = nil + end + + if attributes.key?(:'merged') + self.merged = attributes[:'merged'] + else + self.merged = nil + end + + if attributes.key?(:'closed') + self.closed = attributes[:'closed'] + else + self.closed = nil + end + + if attributes.key?(:'none') + self.none = attributes[:'none'] + else + self.none = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @open.nil? + invalid_properties.push('invalid value for "open", open cannot be nil.') + end + + if @merged.nil? + invalid_properties.push('invalid value for "merged", merged cannot be nil.') + end + + if @closed.nil? + invalid_properties.push('invalid value for "closed", closed cannot be nil.') + end + + if @none.nil? + invalid_properties.push('invalid value for "none", none cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @open.nil? + return false if @merged.nil? + return false if @closed.nil? + return false if @none.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] open Value to be assigned + def open=(open) + if open.nil? + fail ArgumentError, 'open cannot be nil' + end + + @open = open + end + + # Custom attribute writer method with validation + # @param [Object] merged Value to be assigned + def merged=(merged) + if merged.nil? + fail ArgumentError, 'merged cannot be nil' + end + + @merged = merged + end + + # Custom attribute writer method with validation + # @param [Object] closed Value to be assigned + def closed=(closed) + if closed.nil? + fail ArgumentError, 'closed cannot be nil' + end + + @closed = closed + end + + # Custom attribute writer method with validation + # @param [Object] none Value to be assigned + def none=(none) + if none.nil? + fail ArgumentError, 'none cannot be nil' + end + + @none = none + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + open == o.open && + merged == o.merged && + closed == o.closed && + none == o.none + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [open, merged, closed, none].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_repository_check_command.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_repository_check_command.rb new file mode 100644 index 00000000..f9d0c3b9 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_repository_check_command.rb @@ -0,0 +1,216 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # One command the repository's checks ran. `command` and `output` are the repository's own text, served as LavaFlow recorded it. Each reads `Hidden: this field matched a secret.` when it holds one of the project's secret values or a secret gitleaks detects, and `Hidden: the fix may add a credential.` when the run is held with `possible_credential`. + class LavaflowRepositoryCheckCommand < ApiModelBase + # The command as LavaFlow ran it. + attr_accessor :command + + # `passed`: the command succeeded. `failed`: it exited with an error. `timed_out`: it ran past its time limit, and LavaFlow stopped it. Treat a status you don't know as `failed`. + attr_accessor :status + + # The code the command exited with, null when it gave none, as a command that timed out may not. + attr_accessor :exit_code + + # The end of what the command printed, present only when `status` is `failed` or `timed_out` and LavaFlow kept it; `\"\"` when it printed nothing. + attr_accessor :output + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'command' => :'command', + :'status' => :'status', + :'exit_code' => :'exit_code', + :'output' => :'output' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'command' => :'String', + :'status' => :'String', + :'exit_code' => :'Integer', + :'output' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'exit_code', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowRepositoryCheckCommand` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowRepositoryCheckCommand`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'command') + self.command = attributes[:'command'] + else + self.command = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'exit_code') + self.exit_code = attributes[:'exit_code'] + else + self.exit_code = nil + end + + if attributes.key?(:'output') + self.output = attributes[:'output'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @command.nil? + invalid_properties.push('invalid value for "command", command cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @command.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] command Value to be assigned + def command=(command) + if command.nil? + fail ArgumentError, 'command cannot be nil' + end + + @command = command + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + command == o.command && + status == o.status && + exit_code == o.exit_code && + output == o.output + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [command, status, exit_code, output].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_repository_checks.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_repository_checks.rb new file mode 100644 index 00000000..438ce3a5 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_repository_checks.rb @@ -0,0 +1,225 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Whether LavaFlow ran the repository's own checks, such as its tests, on a fix itself, before it opened a pull request or held the fix, and what they found. When LavaFlow ran them more than once, this is the last time the run's last attempt ran them; `not_run` when that attempt didn't, or while the run is queued or running. CI that runs on the pull request afterwards is the repository's own. + class LavaflowRepositoryChecks < ApiModelBase + # `passed`: every command the checks ran passed. `failed`: a command failed or timed out; `commands` shows which. `no_checks_found`: LavaFlow found no checks in the repository to run. `not_run`: LavaFlow did not run the repository's checks on the fix, for the reason `reason` names. Treat a status you don't know as `not_run`. + attr_accessor :status + + # Stable code for why the checks did not run, present only when `status` is `not_run`. `dependencies_changed`: the fix changes the repository's dependencies. `dependencies_not_installed`: LavaFlow couldn't install the repository's dependencies. `run_deadline`: the run reached its time limit. `sandbox_capacity`: no sandbox slot was free in time to run them. `sandbox_budget`: LavaFlow's sandbox allowance for checks was used up. `sandbox_not_isolated`: LavaFlow couldn't confirm the sandbox was isolated. `sandbox_plan_limit`: LavaFlow couldn't start a sandbox large enough to run them. `sandbox_unavailable`: LavaFlow couldn't run them itself. `source_too_large`: the repository is too large to copy into a sandbox. `source_unavailable`: LavaFlow couldn't fetch the fix's source to check it, as when the repository was disconnected or changed during the run. `tool_unavailable`: a tool the checks need isn't available. New reasons may appear; treat one you don't know like any other `not_run`. + attr_accessor :reason + + # Text to show for the status and reason. It names the pull request when one opened. For `not_run` on a fix whose pull request opened, a second sentence says what became of the repository's CI there, as the run stands when read: whether LavaFlow started it, tried to, may still, or won't. + attr_accessor :message + + # Present and `true` only when `status` is `failed` and LavaFlow then revised the fix once without running the checks again. `status` and `commands` describe that earlier version, not the fix as saved, which the checks never ran on. + attr_accessor :revised + + # The commands the checks ran, in order. Absent when LavaFlow recorded none, as for `no_checks_found` and `not_run`. + attr_accessor :commands + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'status' => :'status', + :'reason' => :'reason', + :'message' => :'message', + :'revised' => :'revised', + :'commands' => :'commands' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'status' => :'String', + :'reason' => :'String', + :'message' => :'String', + :'revised' => :'Boolean', + :'commands' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowRepositoryChecks` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowRepositoryChecks`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + else + self.message = nil + end + + if attributes.key?(:'revised') + self.revised = attributes[:'revised'] + end + + if attributes.key?(:'commands') + if (value = attributes[:'commands']).is_a?(Array) + self.commands = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @status.nil? + return false if @message.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] message Value to be assigned + def message=(message) + if message.nil? + fail ArgumentError, 'message cannot be nil' + end + + @message = message + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + reason == o.reason && + message == o.message && + revised == o.revised && + commands == o.commands + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [status, reason, message, revised, commands].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_resource.rb new file mode 100644 index 00000000..8ead87d8 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_resource.rb @@ -0,0 +1,284 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowResource < ApiModelBase + # The project the resource belongs to. + attr_accessor :project_id + + attr_accessor :resource + + # When a LavaFlow run last started on the resource, null if never. + attr_accessor :last_analyzed_at + + # Issues LavaFlow took on in the window. + attr_accessor :issues_opened + + # Pull requests with a fix LavaFlow opened in the window. + attr_accessor :pull_requests_opened + + attr_accessor :anomaly + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'project_id' => :'project_id', + :'resource' => :'resource', + :'last_analyzed_at' => :'last_analyzed_at', + :'issues_opened' => :'issues_opened', + :'pull_requests_opened' => :'pull_requests_opened', + :'anomaly' => :'anomaly' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'project_id' => :'String', + :'resource' => :'LavaflowResourceReference', + :'last_analyzed_at' => :'Time', + :'issues_opened' => :'Integer', + :'pull_requests_opened' => :'Integer', + :'anomaly' => :'LavaflowAnomaly' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'last_analyzed_at', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowResource` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowResource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'resource') + self.resource = attributes[:'resource'] + else + self.resource = nil + end + + if attributes.key?(:'last_analyzed_at') + self.last_analyzed_at = attributes[:'last_analyzed_at'] + else + self.last_analyzed_at = nil + end + + if attributes.key?(:'issues_opened') + self.issues_opened = attributes[:'issues_opened'] + else + self.issues_opened = nil + end + + if attributes.key?(:'pull_requests_opened') + self.pull_requests_opened = attributes[:'pull_requests_opened'] + else + self.pull_requests_opened = nil + end + + if attributes.key?(:'anomaly') + self.anomaly = attributes[:'anomaly'] + else + self.anomaly = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @resource.nil? + invalid_properties.push('invalid value for "resource", resource cannot be nil.') + end + + if @issues_opened.nil? + invalid_properties.push('invalid value for "issues_opened", issues_opened cannot be nil.') + end + + if @pull_requests_opened.nil? + invalid_properties.push('invalid value for "pull_requests_opened", pull_requests_opened cannot be nil.') + end + + if @anomaly.nil? + invalid_properties.push('invalid value for "anomaly", anomaly cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + return false if @resource.nil? + return false if @issues_opened.nil? + return false if @pull_requests_opened.nil? + return false if @anomaly.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] resource Value to be assigned + def resource=(resource) + if resource.nil? + fail ArgumentError, 'resource cannot be nil' + end + + @resource = resource + end + + # Custom attribute writer method with validation + # @param [Object] issues_opened Value to be assigned + def issues_opened=(issues_opened) + if issues_opened.nil? + fail ArgumentError, 'issues_opened cannot be nil' + end + + @issues_opened = issues_opened + end + + # Custom attribute writer method with validation + # @param [Object] pull_requests_opened Value to be assigned + def pull_requests_opened=(pull_requests_opened) + if pull_requests_opened.nil? + fail ArgumentError, 'pull_requests_opened cannot be nil' + end + + @pull_requests_opened = pull_requests_opened + end + + # Custom attribute writer method with validation + # @param [Object] anomaly Value to be assigned + def anomaly=(anomaly) + if anomaly.nil? + fail ArgumentError, 'anomaly cannot be nil' + end + + @anomaly = anomaly + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + project_id == o.project_id && + resource == o.resource && + last_analyzed_at == o.last_analyzed_at && + issues_opened == o.issues_opened && + pull_requests_opened == o.pull_requests_opened && + anomaly == o.anomaly + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [project_id, resource, last_analyzed_at, issues_opened, pull_requests_opened, anomaly].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_resource_list.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_resource_list.rb new file mode 100644 index 00000000..22ff2170 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_resource_list.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowResourceList < ApiModelBase + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowResourceList` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowResourceList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + else + self.data = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @data.nil? + invalid_properties.push('invalid value for "data", data cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] data Value to be assigned + def data=(data) + if data.nil? + fail ArgumentError, 'data cannot be nil' + end + + @data = data + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_resource_reference.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_resource_reference.rb new file mode 100644 index 00000000..3393438a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_resource_reference.rb @@ -0,0 +1,241 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A function, durable function or frontend in the project, or the project of a user-reported problem. + class LavaflowResourceReference < ApiModelBase + attr_accessor :type + + attr_accessor :id + + attr_accessor :name + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'id' => :'id', + :'name' => :'name' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'id' => :'String', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowResourceReference` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowResourceReference`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = nil + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @type.nil? + type_validator = EnumAttributeValidator.new('String', ["function", "durable_function", "frontend", "project"]) + return false unless type_validator.valid?(@type) + return false if @id.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["function", "durable_function", "frontend", "project"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + id == o.id && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, id, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_review.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_review.rb new file mode 100644 index 00000000..12fb2c3c --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_review.rb @@ -0,0 +1,265 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowReview < ApiModelBase + # The last review round's verdict. `blocked` means a critical or major finding stops the fix; `changes_requested` means only minor findings do; `error` means a reviewer failed without a blocking finding, or no reviewer could run. + attr_accessor :verdict + + # The review rounds that ran, 0 when no reviewer could run. + attr_accessor :rounds + + # Why the review ended without passing the fix, null when it passed the fix or when the run saved no fix. + attr_accessor :stopped + + # The findings the review saved with the fix left open. When the review passed the fix, the notes its last round left: findings below `major` that a later round no longer sends back, which hold a fix under `autonomy: merge` with `review_notes`. Absent when the review left none open, or the run saved no fix. + attr_accessor :open_findings + + # What the review saved with the fix asks a person to decide before the fix merges. Absent when it asks nothing or the run saved no fix. + attr_accessor :person_reasons + + # The reviewers' observations on the fix saved with the run: follow-ups that don't hold the fix, such as bad data stored before it or a related problem elsewhere. They aren't findings, unlike a minor finding that blocks nothing. Each reads `Hidden: this field matched a secret.` when it holds one of the project's secret values or a secret gitleaks detects, and `Hidden: the fix may add a credential.` when the run is held with `possible_credential`. Absent when there are none or the run saved no fix. + attr_accessor :observations + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'verdict' => :'verdict', + :'rounds' => :'rounds', + :'stopped' => :'stopped', + :'open_findings' => :'open_findings', + :'person_reasons' => :'person_reasons', + :'observations' => :'observations' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'verdict' => :'String', + :'rounds' => :'Integer', + :'stopped' => :'LavaflowReviewStop', + :'open_findings' => :'Array', + :'person_reasons' => :'Array', + :'observations' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'stopped', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowReview` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowReview`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'verdict') + self.verdict = attributes[:'verdict'] + else + self.verdict = nil + end + + if attributes.key?(:'rounds') + self.rounds = attributes[:'rounds'] + else + self.rounds = nil + end + + if attributes.key?(:'stopped') + self.stopped = attributes[:'stopped'] + else + self.stopped = nil + end + + if attributes.key?(:'open_findings') + if (value = attributes[:'open_findings']).is_a?(Array) + self.open_findings = value + end + end + + if attributes.key?(:'person_reasons') + if (value = attributes[:'person_reasons']).is_a?(Array) + self.person_reasons = value + end + end + + if attributes.key?(:'observations') + if (value = attributes[:'observations']).is_a?(Array) + self.observations = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @verdict.nil? + invalid_properties.push('invalid value for "verdict", verdict cannot be nil.') + end + + if @rounds.nil? + invalid_properties.push('invalid value for "rounds", rounds cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @verdict.nil? + verdict_validator = EnumAttributeValidator.new('String', ["passed", "changes_requested", "blocked", "error"]) + return false unless verdict_validator.valid?(@verdict) + return false if @rounds.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] verdict Object to be assigned + def verdict=(verdict) + validator = EnumAttributeValidator.new('String', ["passed", "changes_requested", "blocked", "error"]) + unless validator.valid?(verdict) + fail ArgumentError, "invalid value for \"verdict\", must be one of #{validator.allowable_values}." + end + @verdict = verdict + end + + # Custom attribute writer method with validation + # @param [Object] rounds Value to be assigned + def rounds=(rounds) + if rounds.nil? + fail ArgumentError, 'rounds cannot be nil' + end + + @rounds = rounds + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + verdict == o.verdict && + rounds == o.rounds && + stopped == o.stopped && + open_findings == o.open_findings && + person_reasons == o.person_reasons && + observations == o.observations + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [verdict, rounds, stopped, open_findings, person_reasons, observations].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_review_finding.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_review_finding.rb new file mode 100644 index 00000000..63a17897 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_review_finding.rb @@ -0,0 +1,241 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A finding the review left open, in the reviewer's words. `explanation` reads `Hidden: this field matched a secret.` when it holds one of the project's secret values or a secret gitleaks detects, or when `file` reads `\"\"`, and `Hidden: the fix may add a credential.` when the run is held with `possible_credential`. + class LavaflowReviewFinding < ApiModelBase + attr_accessor :severity + + # The file the finding is about, null when it is about no file. `\"\"` when the path holds a control character, one of the project's secret values or a secret gitleaks detects. + attr_accessor :file + + # The line of `file` the finding is about, null when it is about no one line. + attr_accessor :line + + attr_accessor :explanation + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'severity' => :'severity', + :'file' => :'file', + :'line' => :'line', + :'explanation' => :'explanation' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'severity' => :'String', + :'file' => :'String', + :'line' => :'Integer', + :'explanation' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'file', + :'line', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowReviewFinding` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowReviewFinding`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + else + self.severity = nil + end + + if attributes.key?(:'file') + self.file = attributes[:'file'] + else + self.file = nil + end + + if attributes.key?(:'line') + self.line = attributes[:'line'] + else + self.line = nil + end + + if attributes.key?(:'explanation') + self.explanation = attributes[:'explanation'] + else + self.explanation = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity cannot be nil.') + end + + if @explanation.nil? + invalid_properties.push('invalid value for "explanation", explanation cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @severity.nil? + severity_validator = EnumAttributeValidator.new('String', ["nit", "minor", "major", "critical"]) + return false unless severity_validator.valid?(@severity) + return false if @explanation.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] severity Object to be assigned + def severity=(severity) + validator = EnumAttributeValidator.new('String', ["nit", "minor", "major", "critical"]) + unless validator.valid?(severity) + fail ArgumentError, "invalid value for \"severity\", must be one of #{validator.allowable_values}." + end + @severity = severity + end + + # Custom attribute writer method with validation + # @param [Object] explanation Value to be assigned + def explanation=(explanation) + if explanation.nil? + fail ArgumentError, 'explanation cannot be nil' + end + + @explanation = explanation + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + severity == o.severity && + file == o.file && + line == o.line && + explanation == o.explanation + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [severity, file, line, explanation].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_review_person_reason.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_review_person_reason.rb new file mode 100644 index 00000000..bb593c4d --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_review_person_reason.rb @@ -0,0 +1,193 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # One decision the review leaves to a person. `question` reads `Hidden: this field matched a secret.` when it holds one of the project's secret values or a secret gitleaks detects, and `Hidden: the fix may add a credential.` when the run is held with `possible_credential`. + class LavaflowReviewPersonReason < ApiModelBase + # `irreversible`: merging the fix itself does what a revert can't undo, such as deleting or migrating stored data. `trust_boundary`: it changes authentication, authorization, secrets, who can reach what, or rate limits, quotas or other abuse controls, including whether they fail open. `breaks_contract`: it removes or renames an existing field, status, event, or accepted input that other code or users rely on, or changes what one means, or it newly rejects a request the code could serve before it, or input it served even when its documentation marks that input invalid, with a client error, validation error, or limit, or drops or skips records the code handled. `billing`: it touches payments, pricing, metering, or charges. `unexplained`: it changes behavior that neither the diagnosis nor the fix's stated choices justify, and that the code doesn't support. `not_reviewable`: it couldn't be reviewed closely. New kinds may appear. + attr_accessor :kind + + # What the person decides, written to show as given. + attr_accessor :question + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'kind' => :'kind', + :'question' => :'question' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'kind' => :'String', + :'question' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowReviewPersonReason` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowReviewPersonReason`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'kind') + self.kind = attributes[:'kind'] + else + self.kind = nil + end + + if attributes.key?(:'question') + self.question = attributes[:'question'] + else + self.question = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @kind.nil? + invalid_properties.push('invalid value for "kind", kind cannot be nil.') + end + + if @question.nil? + invalid_properties.push('invalid value for "question", question cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @kind.nil? + return false if @question.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] kind Value to be assigned + def kind=(kind) + if kind.nil? + fail ArgumentError, 'kind cannot be nil' + end + + @kind = kind + end + + # Custom attribute writer method with validation + # @param [Object] question Value to be assigned + def question=(question) + if question.nil? + fail ArgumentError, 'question cannot be nil' + end + + @question = question + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + kind == o.kind && + question == o.question + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [kind, question].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_review_stop.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_review_stop.rb new file mode 100644 index 00000000..e7e9338b --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_review_stop.rb @@ -0,0 +1,46 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowReviewStop + LavaflowReviewStopRounds = "rounds".freeze + LavaflowReviewStopNoRevision = "no_revision".freeze + LavaflowReviewStopBudgetExhausted = "budget_exhausted".freeze + LavaflowReviewStopContextLimit = "context_limit".freeze + LavaflowReviewStopTimedOut = "timed_out".freeze + LavaflowReviewStopReviewersFailed = "reviewers_failed".freeze + LavaflowReviewStopTooFewReviewers = "too_few_reviewers".freeze + LavaflowReviewStopUnreadable = "unreadable".freeze + + def self.all_vars + @all_vars ||= [LavaflowReviewStopRounds, LavaflowReviewStopNoRevision, LavaflowReviewStopBudgetExhausted, LavaflowReviewStopContextLimit, LavaflowReviewStopTimedOut, LavaflowReviewStopReviewersFailed, LavaflowReviewStopTooFewReviewers, LavaflowReviewStopUnreadable].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if LavaflowReviewStop.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #LavaflowReviewStop" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run.rb new file mode 100644 index 00000000..884a0f2e --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run.rb @@ -0,0 +1,806 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowRun < ApiModelBase + attr_accessor :id + + # The project the run belongs to. + attr_accessor :project_id + + attr_accessor :status + + attr_accessor :resource + + attr_accessor :issue_id + + # Names the problem the run worked on, in at most 80 characters: its diagnosis' title, else the title of the fix it proposed, else the first line or sentence of its diagnosis' summary. A sentence too long for a title ends at its last clause that fits, or, with none, is cut at a word and ends with `…`. Null while none is known. Reads `Hidden: this field matched a secret.` when it or the text it comes from holds one of the project's secret values or a secret gitleaks detects. + attr_accessor :title + + # The saved proposed fix's title, on one line of at most 80 characters. This describes a proposal, not a verified fix, successful review, merge or deployment. It never falls back to the diagnosis. Omitted when no saved patch title is known. Reads `Hidden: this field matched a secret.` when the full title or the shortened one holds one of the project's secret values or a secret gitleaks detects, and `Hidden: the fix may add a credential.` when the fix is held for one. A shortened value ends with `…`. + attr_accessor :fix_summary + + attr_accessor :created_at + + attr_accessor :finished_at + + attr_accessor :pull_request + + attr_accessor :merge + + attr_accessor :mode + + # A Code Quality run carries its finding's from the start. Any other run's is null until LavaFlow records a diagnosis. Runs from before categories get one when their diagnosis names one or their saved fix's paths imply one, and stay null only when neither does. + attr_accessor :category + + # Every resource the run involves: the issue's first, then by name. A run without a recorded diagnosis lists only the issue's. For a run whose report came from what it saved rather than its source, such as one from before involved resources were recorded, the list may leave out frontends and the functions involved through shared code or the build root's dependency files. + attr_accessor :resources + + # Null only for a run that works on no issue. + attr_accessor :issue + + # Where a run LavaFlow is still working on stands; null once it has nothing left to do. + attr_accessor :progress + + # Why a finished run opened no pull request. A `completed` run without `pull_request` always has one; it is `diagnose_only` when the project's `autonomy` stopped the run at its diagnosis. Null when the run opened a pull request, while it is queued or runs, and when it failed or was cancelled. + attr_accessor :pull_request_skipped + + # The fix lineage the run belongs to. Null for a run in no lineage. + attr_accessor :lineage + + # How the run's merged fix fared once it went live. Null until a merged fix goes live with the `lavaflow.lineage` capability on. Also null, meaning unknown, when the fix is first found live only after its 14-day watch ended and its issue neither resolved as of go-live nor was last seen inside the watch. + attr_accessor :fix_outcome + + # The commit the run read the code at. Null when it read none, as for a run that diagnosed from the logs alone. + attr_accessor :source_commit + + attr_accessor :diagnosis + + # The fix LavaFlow saved, as the unified diff its reviewers read, cut short past 256 KiB as they read it, with a last line that starts with `[diff truncated`. When a file's changes hold one of the project's secret values or a secret gitleaks detects, every change to that file is left out, with one line in their place that starts with `# LavaFlow withheld` and names the file; an older fix also keeps the files it was saved with as withheld. A run held with `possible_credential` leaves out every file. Null for a run with no saved fix, or one saved before LavaFlow kept its diff. + attr_accessor :diff + + # The SHA-256, in hex, of `diff` exactly as served, its UTF-8 bytes. Null whenever `diff` is. + attr_accessor :diff_sha256 + + # `diff` was cut short, so it does not show the whole fix. False when `diff` is null. + attr_accessor :diff_truncated + + # The files whose changes `diff` leaves out, by path, as its `# LavaFlow withheld` lines name them; an empty string for a file whose path holds a secret. Empty when `diff` shows every file, or is null. + attr_accessor :diff_withheld + + # The behavior the saved fix says it decides beyond stopping the error, one plain sentence each. Under `autonomy: merge`, a fix is held with `choices_to_confirm` for a person to confirm these only when LavaFlow's reviewers didn't all mark each one as needing no person; a fix they all cleared merges without a person. A person who merges the fix confirms them as they review it. Each reads `Hidden: this field matched a secret.` when it holds one of the project's secret values or a secret gitleaks detects, and `Hidden: the fix may add a credential.` when the run is held with `possible_credential`. Absent when the fix states none or the run saved no fix. + attr_accessor :choices + + # Where the saved fix says the defect starts outside its changes, such as code that writes records in the wrong shape, and why the fix leaves it, in one plain sentence. Masked as `choices` is. Null when the fix says nothing is left or the run saved no fix. + attr_accessor :not_fixed + + # The review of the run's fix. When no reviewer could run, it still says why in `stopped`. Null when no review ran. + attr_accessor :review + + # Whether LavaFlow ran the repository's own checks on the fix itself. Null for a run with no fix. + attr_accessor :repository_checks + + # Why the run stopped or waits, null when nothing went wrong. + attr_accessor :failure + + # Repository paths the fix changes, sorted; empty without a fix. A path that holds a secret is listed as \"\", as `diff_withheld` lists it, and so is every path when `diff` can't tell the fix's files apart. A file past a truncated `diff`'s cut is listed. + attr_accessor :changed_files + + # The workflow jobs the run's pull request opened past because the project's owner allowed ungated workflows, the first one on each branch or commit checked. Empty when none or when the run opened no pull request. Null when there is no record of the workflows its pull request opened past, as for pull requests opened before LavaFlow recorded them. Under the merge stage, LavaFlow holds such a fix as unchecked, with `ungated_workflows`. + attr_accessor :ungated_workflows + + # What tied the run's issue to a recent LavaFlow fix's deploy. Null when nothing did, and for a recurrence, whose issue came back after the fix. + attr_accessor :lineage_evidence + + # For a run whose `pull_request_skipped` is `ungated_workflows`, every workflow job that held its fix. Null for any other run, and for a held run whose workflows LavaFlow couldn't read to the end, such as one with a workflow it couldn't parse, or more than 256 such jobs. + attr_accessor :held_workflows + + # For a run whose `pull_request_skipped` is `source_unavailable`, why LavaFlow couldn't read, or open a fix on, the code that served the error. Null for any other run, for a run recorded before LavaFlow kept the reason, and when LavaFlow couldn't tell why. + attr_accessor :source_unavailable + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'project_id' => :'project_id', + :'status' => :'status', + :'resource' => :'resource', + :'issue_id' => :'issue_id', + :'title' => :'title', + :'fix_summary' => :'fix_summary', + :'created_at' => :'created_at', + :'finished_at' => :'finished_at', + :'pull_request' => :'pull_request', + :'merge' => :'merge', + :'mode' => :'mode', + :'category' => :'category', + :'resources' => :'resources', + :'issue' => :'issue', + :'progress' => :'progress', + :'pull_request_skipped' => :'pull_request_skipped', + :'lineage' => :'lineage', + :'fix_outcome' => :'fix_outcome', + :'source_commit' => :'source_commit', + :'diagnosis' => :'diagnosis', + :'diff' => :'diff', + :'diff_sha256' => :'diff_sha256', + :'diff_truncated' => :'diff_truncated', + :'diff_withheld' => :'diff_withheld', + :'choices' => :'choices', + :'not_fixed' => :'not_fixed', + :'review' => :'review', + :'repository_checks' => :'repository_checks', + :'failure' => :'failure', + :'changed_files' => :'changed_files', + :'ungated_workflows' => :'ungated_workflows', + :'lineage_evidence' => :'lineage_evidence', + :'held_workflows' => :'held_workflows', + :'source_unavailable' => :'source_unavailable' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'project_id' => :'String', + :'status' => :'LavaflowRunStatus', + :'resource' => :'LavaflowResourceReference', + :'issue_id' => :'String', + :'title' => :'String', + :'fix_summary' => :'String', + :'created_at' => :'Time', + :'finished_at' => :'Time', + :'pull_request' => :'LavaflowPullRequest', + :'merge' => :'LavaflowMerge', + :'mode' => :'LavaflowRunMode', + :'category' => :'LavaflowRunCategory', + :'resources' => :'Array', + :'issue' => :'LavaflowIssueSummary', + :'progress' => :'LavaflowRunProgress', + :'pull_request_skipped' => :'LavaflowSkipReason', + :'lineage' => :'LavaflowLineage', + :'fix_outcome' => :'LavaflowFixOutcome', + :'source_commit' => :'LavaflowSourceCommit', + :'diagnosis' => :'LavaflowDiagnosis', + :'diff' => :'String', + :'diff_sha256' => :'String', + :'diff_truncated' => :'Boolean', + :'diff_withheld' => :'Array', + :'choices' => :'Array', + :'not_fixed' => :'String', + :'review' => :'LavaflowReview', + :'repository_checks' => :'LavaflowRepositoryChecks', + :'failure' => :'LavaflowFailure', + :'changed_files' => :'Array', + :'ungated_workflows' => :'Array', + :'lineage_evidence' => :'LavaflowLineageEvidence', + :'held_workflows' => :'LavaflowHeldWorkflows', + :'source_unavailable' => :'LavaflowSourceUnavailable' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'title', + :'finished_at', + :'pull_request', + :'merge', + :'category', + :'issue', + :'progress', + :'pull_request_skipped', + :'lineage', + :'fix_outcome', + :'source_commit', + :'diagnosis', + :'diff', + :'diff_sha256', + :'not_fixed', + :'review', + :'repository_checks', + :'failure', + :'ungated_workflows', + :'lineage_evidence', + :'held_workflows', + :'source_unavailable' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'LavaflowRunSummary' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowRun` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowRun`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'resource') + self.resource = attributes[:'resource'] + else + self.resource = nil + end + + if attributes.key?(:'issue_id') + self.issue_id = attributes[:'issue_id'] + else + self.issue_id = nil + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + else + self.title = nil + end + + if attributes.key?(:'fix_summary') + self.fix_summary = attributes[:'fix_summary'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + + if attributes.key?(:'finished_at') + self.finished_at = attributes[:'finished_at'] + else + self.finished_at = nil + end + + if attributes.key?(:'pull_request') + self.pull_request = attributes[:'pull_request'] + else + self.pull_request = nil + end + + if attributes.key?(:'merge') + self.merge = attributes[:'merge'] + else + self.merge = nil + end + + if attributes.key?(:'mode') + self.mode = attributes[:'mode'] + else + self.mode = nil + end + + if attributes.key?(:'category') + self.category = attributes[:'category'] + else + self.category = nil + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + else + self.resources = nil + end + + if attributes.key?(:'issue') + self.issue = attributes[:'issue'] + else + self.issue = nil + end + + if attributes.key?(:'progress') + self.progress = attributes[:'progress'] + else + self.progress = nil + end + + if attributes.key?(:'pull_request_skipped') + self.pull_request_skipped = attributes[:'pull_request_skipped'] + else + self.pull_request_skipped = nil + end + + if attributes.key?(:'lineage') + self.lineage = attributes[:'lineage'] + else + self.lineage = nil + end + + if attributes.key?(:'fix_outcome') + self.fix_outcome = attributes[:'fix_outcome'] + else + self.fix_outcome = nil + end + + if attributes.key?(:'source_commit') + self.source_commit = attributes[:'source_commit'] + else + self.source_commit = nil + end + + if attributes.key?(:'diagnosis') + self.diagnosis = attributes[:'diagnosis'] + else + self.diagnosis = nil + end + + if attributes.key?(:'diff') + self.diff = attributes[:'diff'] + else + self.diff = nil + end + + if attributes.key?(:'diff_sha256') + self.diff_sha256 = attributes[:'diff_sha256'] + else + self.diff_sha256 = nil + end + + if attributes.key?(:'diff_truncated') + self.diff_truncated = attributes[:'diff_truncated'] + else + self.diff_truncated = nil + end + + if attributes.key?(:'diff_withheld') + if (value = attributes[:'diff_withheld']).is_a?(Array) + self.diff_withheld = value + end + else + self.diff_withheld = nil + end + + if attributes.key?(:'choices') + if (value = attributes[:'choices']).is_a?(Array) + self.choices = value + end + end + + if attributes.key?(:'not_fixed') + self.not_fixed = attributes[:'not_fixed'] + else + self.not_fixed = nil + end + + if attributes.key?(:'review') + self.review = attributes[:'review'] + else + self.review = nil + end + + if attributes.key?(:'repository_checks') + self.repository_checks = attributes[:'repository_checks'] + else + self.repository_checks = nil + end + + if attributes.key?(:'failure') + self.failure = attributes[:'failure'] + else + self.failure = nil + end + + if attributes.key?(:'changed_files') + if (value = attributes[:'changed_files']).is_a?(Array) + self.changed_files = value + end + else + self.changed_files = nil + end + + if attributes.key?(:'ungated_workflows') + if (value = attributes[:'ungated_workflows']).is_a?(Array) + self.ungated_workflows = value + end + else + self.ungated_workflows = nil + end + + if attributes.key?(:'lineage_evidence') + self.lineage_evidence = attributes[:'lineage_evidence'] + else + self.lineage_evidence = nil + end + + if attributes.key?(:'held_workflows') + self.held_workflows = attributes[:'held_workflows'] + else + self.held_workflows = nil + end + + if attributes.key?(:'source_unavailable') + self.source_unavailable = attributes[:'source_unavailable'] + else + self.source_unavailable = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @resource.nil? + invalid_properties.push('invalid value for "resource", resource cannot be nil.') + end + + if @issue_id.nil? + invalid_properties.push('invalid value for "issue_id", issue_id cannot be nil.') + end + + if !@fix_summary.nil? && @fix_summary.to_s.length > 80 + invalid_properties.push('invalid value for "fix_summary", the character length must be smaller than or equal to 80.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @mode.nil? + invalid_properties.push('invalid value for "mode", mode cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if @diff_sha256 !~ pattern + invalid_properties.push("invalid value for \"diff_sha256\", must conform to the pattern #{pattern}.") + end + + if @diff_truncated.nil? + invalid_properties.push('invalid value for "diff_truncated", diff_truncated cannot be nil.') + end + + if @diff_withheld.nil? + invalid_properties.push('invalid value for "diff_withheld", diff_withheld cannot be nil.') + end + + if @changed_files.nil? + invalid_properties.push('invalid value for "changed_files", changed_files cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @project_id.nil? + return false if @status.nil? + return false if @resource.nil? + return false if @issue_id.nil? + return false if !@fix_summary.nil? && @fix_summary.to_s.length > 80 + return false if @created_at.nil? + return false if @mode.nil? + return false if @resources.nil? + return false if @diff_sha256 !~ Regexp.new(/^[0-9a-f]{64}$/) + return false if @diff_truncated.nil? + return false if @diff_withheld.nil? + return false if @changed_files.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] resource Value to be assigned + def resource=(resource) + if resource.nil? + fail ArgumentError, 'resource cannot be nil' + end + + @resource = resource + end + + # Custom attribute writer method with validation + # @param [Object] issue_id Value to be assigned + def issue_id=(issue_id) + if issue_id.nil? + fail ArgumentError, 'issue_id cannot be nil' + end + + @issue_id = issue_id + end + + # Custom attribute writer method with validation + # @param [Object] fix_summary Value to be assigned + def fix_summary=(fix_summary) + if fix_summary.nil? + fail ArgumentError, 'fix_summary cannot be nil' + end + + if fix_summary.to_s.length > 80 + fail ArgumentError, 'invalid value for "fix_summary", the character length must be smaller than or equal to 80.' + end + + @fix_summary = fix_summary + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param [Object] mode Value to be assigned + def mode=(mode) + if mode.nil? + fail ArgumentError, 'mode cannot be nil' + end + + @mode = mode + end + + # Custom attribute writer method with validation + # @param [Object] resources Value to be assigned + def resources=(resources) + if resources.nil? + fail ArgumentError, 'resources cannot be nil' + end + + @resources = resources + end + + # Custom attribute writer method with validation + # @param [Object] diff_sha256 Value to be assigned + def diff_sha256=(diff_sha256) + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if !diff_sha256.nil? && diff_sha256 !~ pattern + fail ArgumentError, "invalid value for \"diff_sha256\", must conform to the pattern #{pattern}." + end + + @diff_sha256 = diff_sha256 + end + + # Custom attribute writer method with validation + # @param [Object] diff_truncated Value to be assigned + def diff_truncated=(diff_truncated) + if diff_truncated.nil? + fail ArgumentError, 'diff_truncated cannot be nil' + end + + @diff_truncated = diff_truncated + end + + # Custom attribute writer method with validation + # @param [Object] diff_withheld Value to be assigned + def diff_withheld=(diff_withheld) + if diff_withheld.nil? + fail ArgumentError, 'diff_withheld cannot be nil' + end + + @diff_withheld = diff_withheld + end + + # Custom attribute writer method with validation + # @param [Object] changed_files Value to be assigned + def changed_files=(changed_files) + if changed_files.nil? + fail ArgumentError, 'changed_files cannot be nil' + end + + @changed_files = changed_files + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + project_id == o.project_id && + status == o.status && + resource == o.resource && + issue_id == o.issue_id && + title == o.title && + fix_summary == o.fix_summary && + created_at == o.created_at && + finished_at == o.finished_at && + pull_request == o.pull_request && + merge == o.merge && + mode == o.mode && + category == o.category && + resources == o.resources && + issue == o.issue && + progress == o.progress && + pull_request_skipped == o.pull_request_skipped && + lineage == o.lineage && + fix_outcome == o.fix_outcome && + source_commit == o.source_commit && + diagnosis == o.diagnosis && + diff == o.diff && + diff_sha256 == o.diff_sha256 && + diff_truncated == o.diff_truncated && + diff_withheld == o.diff_withheld && + choices == o.choices && + not_fixed == o.not_fixed && + review == o.review && + repository_checks == o.repository_checks && + failure == o.failure && + changed_files == o.changed_files && + ungated_workflows == o.ungated_workflows && + lineage_evidence == o.lineage_evidence && + held_workflows == o.held_workflows && + source_unavailable == o.source_unavailable + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, project_id, status, resource, issue_id, title, fix_summary, created_at, finished_at, pull_request, merge, mode, category, resources, issue, progress, pull_request_skipped, lineage, fix_outcome, source_commit, diagnosis, diff, diff_sha256, diff_truncated, diff_withheld, choices, not_fixed, review, repository_checks, failure, changed_files, ungated_workflows, lineage_evidence, held_workflows, source_unavailable].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_category.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_category.rb new file mode 100644 index 00000000..2737e0b4 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_category.rb @@ -0,0 +1,45 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowRunCategory + BUG = "bug".freeze + PERFORMANCE = "performance".freeze + SECURITY = "security".freeze + IMPROVEMENT = "improvement".freeze + CONFIGURATION = "configuration".freeze + DEPENDENCY = "dependency".freeze + EXTERNAL = "external".freeze + + def self.all_vars + @all_vars ||= [BUG, PERFORMANCE, SECURITY, IMPROVEMENT, CONFIGURATION, DEPENDENCY, EXTERNAL].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if LavaflowRunCategory.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #LavaflowRunCategory" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_counts.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_counts.rb new file mode 100644 index 00000000..82fa6b4a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_counts.rb @@ -0,0 +1,281 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Runs that match the request. `total` applies every filter. Each breakdown applies every filter but its own, so it shows what picking another value would return. + class LavaflowRunCounts < ApiModelBase + attr_accessor :total + + attr_accessor :status + + attr_accessor :category + + attr_accessor :pull_request_state + + # Resources involved in at least one matching run, most runs first, then by name; at most 50. A run counts once per resource it involves. A run whose report came from what it saved rather than its source, such as one from before involved resources were recorded, may leave out frontends and the functions involved through shared code or the build root's dependency files, so these counts can undercount them. + attr_accessor :involved_resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total' => :'total', + :'status' => :'status', + :'category' => :'category', + :'pull_request_state' => :'pull_request_state', + :'involved_resources' => :'involved_resources' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'total' => :'Integer', + :'status' => :'LavaflowRunStatusCounts', + :'category' => :'LavaflowCategoryCounts', + :'pull_request_state' => :'LavaflowPullRequestStateCounts', + :'involved_resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowRunCounts` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowRunCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'total') + self.total = attributes[:'total'] + else + self.total = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'category') + self.category = attributes[:'category'] + else + self.category = nil + end + + if attributes.key?(:'pull_request_state') + self.pull_request_state = attributes[:'pull_request_state'] + else + self.pull_request_state = nil + end + + if attributes.key?(:'involved_resources') + if (value = attributes[:'involved_resources']).is_a?(Array) + self.involved_resources = value + end + else + self.involved_resources = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @total.nil? + invalid_properties.push('invalid value for "total", total cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @category.nil? + invalid_properties.push('invalid value for "category", category cannot be nil.') + end + + if @pull_request_state.nil? + invalid_properties.push('invalid value for "pull_request_state", pull_request_state cannot be nil.') + end + + if @involved_resources.nil? + invalid_properties.push('invalid value for "involved_resources", involved_resources cannot be nil.') + end + + if @involved_resources.length > 50 + invalid_properties.push('invalid value for "involved_resources", number of items must be less than or equal to 50.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @total.nil? + return false if @status.nil? + return false if @category.nil? + return false if @pull_request_state.nil? + return false if @involved_resources.nil? + return false if @involved_resources.length > 50 + true + end + + # Custom attribute writer method with validation + # @param [Object] total Value to be assigned + def total=(total) + if total.nil? + fail ArgumentError, 'total cannot be nil' + end + + @total = total + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] category Value to be assigned + def category=(category) + if category.nil? + fail ArgumentError, 'category cannot be nil' + end + + @category = category + end + + # Custom attribute writer method with validation + # @param [Object] pull_request_state Value to be assigned + def pull_request_state=(pull_request_state) + if pull_request_state.nil? + fail ArgumentError, 'pull_request_state cannot be nil' + end + + @pull_request_state = pull_request_state + end + + # Custom attribute writer method with validation + # @param [Object] involved_resources Value to be assigned + def involved_resources=(involved_resources) + if involved_resources.nil? + fail ArgumentError, 'involved_resources cannot be nil' + end + + if involved_resources.length > 50 + fail ArgumentError, 'invalid value for "involved_resources", number of items must be less than or equal to 50.' + end + + @involved_resources = involved_resources + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total == o.total && + status == o.status && + category == o.category && + pull_request_state == o.pull_request_state && + involved_resources == o.involved_resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [total, status, category, pull_request_state, involved_resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_create.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_create.rb new file mode 100644 index 00000000..e082758c --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_create.rb @@ -0,0 +1,193 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The project, and the issue to start a run on. + class LavaflowRunCreate < ApiModelBase + # The project the issue belongs to. + attr_accessor :project_id + + # The issue to start a run on. + attr_accessor :issue_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'project_id' => :'project_id', + :'issue_id' => :'issue_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'project_id' => :'String', + :'issue_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowRunCreate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowRunCreate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'issue_id') + self.issue_id = attributes[:'issue_id'] + else + self.issue_id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @issue_id.nil? + invalid_properties.push('invalid value for "issue_id", issue_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + return false if @issue_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] issue_id Value to be assigned + def issue_id=(issue_id) + if issue_id.nil? + fail ArgumentError, 'issue_id cannot be nil' + end + + @issue_id = issue_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + project_id == o.project_id && + issue_id == o.issue_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [project_id, issue_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_mode.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_mode.rb new file mode 100644 index 00000000..95b0e87e --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_mode.rb @@ -0,0 +1,40 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowRunMode + LIVE = "live".freeze + CODE_QUALITY = "code_quality".freeze + + def self.all_vars + @all_vars ||= [LIVE, CODE_QUALITY].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if LavaflowRunMode.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #LavaflowRunMode" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_progress.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_progress.rb new file mode 100644 index 00000000..e8531b03 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_progress.rb @@ -0,0 +1,244 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # How far an active run has come. The steps are `queued`, `diagnosing`, `fixing`, `reviewing`, `waiting_for_checks` and `merge_queued`, in that order, and a run takes as many as its autonomy when it was queued allows: 2 for `diagnose_only`, 4 for `open_pr` (opening the pull request ends it, unless LavaFlow starts the fix's CI once, when it shows `waiting_for_checks` as step 5 until LavaFlow has), 6 for `merge` (the merge ends it). + class LavaflowRunProgress < ApiModelBase + # New stages may appear. + attr_accessor :stage + + # The stage's place among the run's steps, from 1. + attr_accessor :step + + # How many steps the run takes. + attr_accessor :steps + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'stage' => :'stage', + :'step' => :'step', + :'steps' => :'steps' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'stage' => :'String', + :'step' => :'Integer', + :'steps' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowRunProgress` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowRunProgress`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'stage') + self.stage = attributes[:'stage'] + else + self.stage = nil + end + + if attributes.key?(:'step') + self.step = attributes[:'step'] + else + self.step = nil + end + + if attributes.key?(:'steps') + self.steps = attributes[:'steps'] + else + self.steps = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @stage.nil? + invalid_properties.push('invalid value for "stage", stage cannot be nil.') + end + + if @step.nil? + invalid_properties.push('invalid value for "step", step cannot be nil.') + end + + if @steps.nil? + invalid_properties.push('invalid value for "steps", steps cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @stage.nil? + stage_validator = EnumAttributeValidator.new('String', ["queued", "diagnosing", "fixing", "reviewing", "waiting_for_checks", "merge_queued"]) + return false unless stage_validator.valid?(@stage) + return false if @step.nil? + return false if @steps.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] stage Object to be assigned + def stage=(stage) + validator = EnumAttributeValidator.new('String', ["queued", "diagnosing", "fixing", "reviewing", "waiting_for_checks", "merge_queued"]) + unless validator.valid?(stage) + fail ArgumentError, "invalid value for \"stage\", must be one of #{validator.allowable_values}." + end + @stage = stage + end + + # Custom attribute writer method with validation + # @param [Object] step Value to be assigned + def step=(step) + if step.nil? + fail ArgumentError, 'step cannot be nil' + end + + @step = step + end + + # Custom attribute writer method with validation + # @param [Object] steps Value to be assigned + def steps=(steps) + if steps.nil? + fail ArgumentError, 'steps cannot be nil' + end + + @steps = steps + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + stage == o.stage && + step == o.step && + steps == o.steps + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [stage, step, steps].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_reference.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_reference.rb new file mode 100644 index 00000000..e375d1c4 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_reference.rb @@ -0,0 +1,178 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Another LavaFlow run of the same project. + class LavaflowRunReference < ApiModelBase + attr_accessor :id + + # The run's title, as `LavaflowRunSummary.title` gives it. + attr_accessor :title + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'title' => :'title' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'title' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'title' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowRunReference` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowRunReference`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + else + self.title = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + title == o.title + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, title].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_status.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_status.rb new file mode 100644 index 00000000..a3e30d13 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_status.rb @@ -0,0 +1,46 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowRunStatus + QUEUED = "queued".freeze + DIAGNOSING = "diagnosing".freeze + FIXING = "fixing".freeze + REVIEWING = "reviewing".freeze + PR_OPEN = "pr_open".freeze + COMPLETED = "completed".freeze + FAILED = "failed".freeze + CANCELLED = "cancelled".freeze + + def self.all_vars + @all_vars ||= [QUEUED, DIAGNOSING, FIXING, REVIEWING, PR_OPEN, COMPLETED, FAILED, CANCELLED].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if LavaflowRunStatus.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #LavaflowRunStatus" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_status_counts.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_status_counts.rb new file mode 100644 index 00000000..109c5cce --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_status_counts.rb @@ -0,0 +1,347 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Matching runs in each status, zeros included. + class LavaflowRunStatusCounts < ApiModelBase + attr_accessor :queued + + attr_accessor :diagnosing + + attr_accessor :fixing + + attr_accessor :reviewing + + attr_accessor :pr_open + + attr_accessor :completed + + attr_accessor :failed + + attr_accessor :cancelled + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'queued' => :'queued', + :'diagnosing' => :'diagnosing', + :'fixing' => :'fixing', + :'reviewing' => :'reviewing', + :'pr_open' => :'pr_open', + :'completed' => :'completed', + :'failed' => :'failed', + :'cancelled' => :'cancelled' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'queued' => :'Integer', + :'diagnosing' => :'Integer', + :'fixing' => :'Integer', + :'reviewing' => :'Integer', + :'pr_open' => :'Integer', + :'completed' => :'Integer', + :'failed' => :'Integer', + :'cancelled' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowRunStatusCounts` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowRunStatusCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'queued') + self.queued = attributes[:'queued'] + else + self.queued = nil + end + + if attributes.key?(:'diagnosing') + self.diagnosing = attributes[:'diagnosing'] + else + self.diagnosing = nil + end + + if attributes.key?(:'fixing') + self.fixing = attributes[:'fixing'] + else + self.fixing = nil + end + + if attributes.key?(:'reviewing') + self.reviewing = attributes[:'reviewing'] + else + self.reviewing = nil + end + + if attributes.key?(:'pr_open') + self.pr_open = attributes[:'pr_open'] + else + self.pr_open = nil + end + + if attributes.key?(:'completed') + self.completed = attributes[:'completed'] + else + self.completed = nil + end + + if attributes.key?(:'failed') + self.failed = attributes[:'failed'] + else + self.failed = nil + end + + if attributes.key?(:'cancelled') + self.cancelled = attributes[:'cancelled'] + else + self.cancelled = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @queued.nil? + invalid_properties.push('invalid value for "queued", queued cannot be nil.') + end + + if @diagnosing.nil? + invalid_properties.push('invalid value for "diagnosing", diagnosing cannot be nil.') + end + + if @fixing.nil? + invalid_properties.push('invalid value for "fixing", fixing cannot be nil.') + end + + if @reviewing.nil? + invalid_properties.push('invalid value for "reviewing", reviewing cannot be nil.') + end + + if @pr_open.nil? + invalid_properties.push('invalid value for "pr_open", pr_open cannot be nil.') + end + + if @completed.nil? + invalid_properties.push('invalid value for "completed", completed cannot be nil.') + end + + if @failed.nil? + invalid_properties.push('invalid value for "failed", failed cannot be nil.') + end + + if @cancelled.nil? + invalid_properties.push('invalid value for "cancelled", cancelled cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @queued.nil? + return false if @diagnosing.nil? + return false if @fixing.nil? + return false if @reviewing.nil? + return false if @pr_open.nil? + return false if @completed.nil? + return false if @failed.nil? + return false if @cancelled.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] queued Value to be assigned + def queued=(queued) + if queued.nil? + fail ArgumentError, 'queued cannot be nil' + end + + @queued = queued + end + + # Custom attribute writer method with validation + # @param [Object] diagnosing Value to be assigned + def diagnosing=(diagnosing) + if diagnosing.nil? + fail ArgumentError, 'diagnosing cannot be nil' + end + + @diagnosing = diagnosing + end + + # Custom attribute writer method with validation + # @param [Object] fixing Value to be assigned + def fixing=(fixing) + if fixing.nil? + fail ArgumentError, 'fixing cannot be nil' + end + + @fixing = fixing + end + + # Custom attribute writer method with validation + # @param [Object] reviewing Value to be assigned + def reviewing=(reviewing) + if reviewing.nil? + fail ArgumentError, 'reviewing cannot be nil' + end + + @reviewing = reviewing + end + + # Custom attribute writer method with validation + # @param [Object] pr_open Value to be assigned + def pr_open=(pr_open) + if pr_open.nil? + fail ArgumentError, 'pr_open cannot be nil' + end + + @pr_open = pr_open + end + + # Custom attribute writer method with validation + # @param [Object] completed Value to be assigned + def completed=(completed) + if completed.nil? + fail ArgumentError, 'completed cannot be nil' + end + + @completed = completed + end + + # Custom attribute writer method with validation + # @param [Object] failed Value to be assigned + def failed=(failed) + if failed.nil? + fail ArgumentError, 'failed cannot be nil' + end + + @failed = failed + end + + # Custom attribute writer method with validation + # @param [Object] cancelled Value to be assigned + def cancelled=(cancelled) + if cancelled.nil? + fail ArgumentError, 'cancelled cannot be nil' + end + + @cancelled = cancelled + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + queued == o.queued && + diagnosing == o.diagnosing && + fixing == o.fixing && + reviewing == o.reviewing && + pr_open == o.pr_open && + completed == o.completed && + failed == o.failed && + cancelled == o.cancelled + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [queued, diagnosing, fixing, reviewing, pr_open, completed, failed, cancelled].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_summary.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_summary.rb new file mode 100644 index 00000000..f28a4d0f --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_run_summary.rb @@ -0,0 +1,528 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowRunSummary < ApiModelBase + attr_accessor :id + + # The project the run belongs to. + attr_accessor :project_id + + attr_accessor :status + + attr_accessor :resource + + attr_accessor :issue_id + + # Names the problem the run worked on, in at most 80 characters: its diagnosis' title, else the title of the fix it proposed, else the first line or sentence of its diagnosis' summary. A sentence too long for a title ends at its last clause that fits, or, with none, is cut at a word and ends with `…`. Null while none is known. Reads `Hidden: this field matched a secret.` when it or the text it comes from holds one of the project's secret values or a secret gitleaks detects. + attr_accessor :title + + # The saved proposed fix's title, on one line of at most 80 characters. This describes a proposal, not a verified fix, successful review, merge or deployment. It never falls back to the diagnosis. Omitted when no saved patch title is known. Reads `Hidden: this field matched a secret.` when the full title or the shortened one holds one of the project's secret values or a secret gitleaks detects, and `Hidden: the fix may add a credential.` when the fix is held for one. A shortened value ends with `…`. + attr_accessor :fix_summary + + attr_accessor :created_at + + attr_accessor :finished_at + + attr_accessor :pull_request + + attr_accessor :merge + + attr_accessor :mode + + # A Code Quality run carries its finding's from the start. Any other run's is null until LavaFlow records a diagnosis. Runs from before categories get one when their diagnosis names one or their saved fix's paths imply one, and stay null only when neither does. + attr_accessor :category + + # Every resource the run involves: the issue's first, then by name. A run without a recorded diagnosis lists only the issue's. For a run whose report came from what it saved rather than its source, such as one from before involved resources were recorded, the list may leave out frontends and the functions involved through shared code or the build root's dependency files. + attr_accessor :resources + + # Null only for a run that works on no issue. + attr_accessor :issue + + # Where a run LavaFlow is still working on stands; null once it has nothing left to do. + attr_accessor :progress + + # Why a finished run opened no pull request. A `completed` run without `pull_request` always has one; it is `diagnose_only` when the project's `autonomy` stopped the run at its diagnosis. Null when the run opened a pull request, while it is queued or runs, and when it failed or was cancelled. + attr_accessor :pull_request_skipped + + # The fix lineage the run belongs to. Null for a run in no lineage. + attr_accessor :lineage + + # How the run's merged fix fared once it went live. Null until a merged fix goes live with the `lavaflow.lineage` capability on. Also null, meaning unknown, when the fix is first found live only after its 14-day watch ended and its issue neither resolved as of go-live nor was last seen inside the watch. + attr_accessor :fix_outcome + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'project_id' => :'project_id', + :'status' => :'status', + :'resource' => :'resource', + :'issue_id' => :'issue_id', + :'title' => :'title', + :'fix_summary' => :'fix_summary', + :'created_at' => :'created_at', + :'finished_at' => :'finished_at', + :'pull_request' => :'pull_request', + :'merge' => :'merge', + :'mode' => :'mode', + :'category' => :'category', + :'resources' => :'resources', + :'issue' => :'issue', + :'progress' => :'progress', + :'pull_request_skipped' => :'pull_request_skipped', + :'lineage' => :'lineage', + :'fix_outcome' => :'fix_outcome' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'project_id' => :'String', + :'status' => :'LavaflowRunStatus', + :'resource' => :'LavaflowResourceReference', + :'issue_id' => :'String', + :'title' => :'String', + :'fix_summary' => :'String', + :'created_at' => :'Time', + :'finished_at' => :'Time', + :'pull_request' => :'LavaflowPullRequest', + :'merge' => :'LavaflowMerge', + :'mode' => :'LavaflowRunMode', + :'category' => :'LavaflowRunCategory', + :'resources' => :'Array', + :'issue' => :'LavaflowIssueSummary', + :'progress' => :'LavaflowRunProgress', + :'pull_request_skipped' => :'LavaflowSkipReason', + :'lineage' => :'LavaflowLineage', + :'fix_outcome' => :'LavaflowFixOutcome' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'title', + :'finished_at', + :'pull_request', + :'merge', + :'category', + :'issue', + :'progress', + :'pull_request_skipped', + :'lineage', + :'fix_outcome' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowRunSummary` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowRunSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'resource') + self.resource = attributes[:'resource'] + else + self.resource = nil + end + + if attributes.key?(:'issue_id') + self.issue_id = attributes[:'issue_id'] + else + self.issue_id = nil + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + else + self.title = nil + end + + if attributes.key?(:'fix_summary') + self.fix_summary = attributes[:'fix_summary'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + + if attributes.key?(:'finished_at') + self.finished_at = attributes[:'finished_at'] + else + self.finished_at = nil + end + + if attributes.key?(:'pull_request') + self.pull_request = attributes[:'pull_request'] + else + self.pull_request = nil + end + + if attributes.key?(:'merge') + self.merge = attributes[:'merge'] + else + self.merge = nil + end + + if attributes.key?(:'mode') + self.mode = attributes[:'mode'] + else + self.mode = nil + end + + if attributes.key?(:'category') + self.category = attributes[:'category'] + else + self.category = nil + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + else + self.resources = nil + end + + if attributes.key?(:'issue') + self.issue = attributes[:'issue'] + else + self.issue = nil + end + + if attributes.key?(:'progress') + self.progress = attributes[:'progress'] + else + self.progress = nil + end + + if attributes.key?(:'pull_request_skipped') + self.pull_request_skipped = attributes[:'pull_request_skipped'] + else + self.pull_request_skipped = nil + end + + if attributes.key?(:'lineage') + self.lineage = attributes[:'lineage'] + else + self.lineage = nil + end + + if attributes.key?(:'fix_outcome') + self.fix_outcome = attributes[:'fix_outcome'] + else + self.fix_outcome = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @resource.nil? + invalid_properties.push('invalid value for "resource", resource cannot be nil.') + end + + if @issue_id.nil? + invalid_properties.push('invalid value for "issue_id", issue_id cannot be nil.') + end + + if !@fix_summary.nil? && @fix_summary.to_s.length > 80 + invalid_properties.push('invalid value for "fix_summary", the character length must be smaller than or equal to 80.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @mode.nil? + invalid_properties.push('invalid value for "mode", mode cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @project_id.nil? + return false if @status.nil? + return false if @resource.nil? + return false if @issue_id.nil? + return false if !@fix_summary.nil? && @fix_summary.to_s.length > 80 + return false if @created_at.nil? + return false if @mode.nil? + return false if @resources.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] resource Value to be assigned + def resource=(resource) + if resource.nil? + fail ArgumentError, 'resource cannot be nil' + end + + @resource = resource + end + + # Custom attribute writer method with validation + # @param [Object] issue_id Value to be assigned + def issue_id=(issue_id) + if issue_id.nil? + fail ArgumentError, 'issue_id cannot be nil' + end + + @issue_id = issue_id + end + + # Custom attribute writer method with validation + # @param [Object] fix_summary Value to be assigned + def fix_summary=(fix_summary) + if fix_summary.nil? + fail ArgumentError, 'fix_summary cannot be nil' + end + + if fix_summary.to_s.length > 80 + fail ArgumentError, 'invalid value for "fix_summary", the character length must be smaller than or equal to 80.' + end + + @fix_summary = fix_summary + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param [Object] mode Value to be assigned + def mode=(mode) + if mode.nil? + fail ArgumentError, 'mode cannot be nil' + end + + @mode = mode + end + + # Custom attribute writer method with validation + # @param [Object] resources Value to be assigned + def resources=(resources) + if resources.nil? + fail ArgumentError, 'resources cannot be nil' + end + + @resources = resources + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + project_id == o.project_id && + status == o.status && + resource == o.resource && + issue_id == o.issue_id && + title == o.title && + fix_summary == o.fix_summary && + created_at == o.created_at && + finished_at == o.finished_at && + pull_request == o.pull_request && + merge == o.merge && + mode == o.mode && + category == o.category && + resources == o.resources && + issue == o.issue && + progress == o.progress && + pull_request_skipped == o.pull_request_skipped && + lineage == o.lineage && + fix_outcome == o.fix_outcome + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, project_id, status, resource, issue_id, title, fix_summary, created_at, finished_at, pull_request, merge, mode, category, resources, issue, progress, pull_request_skipped, lineage, fix_outcome].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan.rb new file mode 100644 index 00000000..115b982a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan.rb @@ -0,0 +1,509 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # One Code Quality scan of the code a project's deploys changed. + class LavaflowScan < ApiModelBase + # The scan's ID, null while it is waiting. + attr_accessor :id + + attr_accessor :project_id + + # What asked for the scan. + attr_accessor :source + + attr_accessor :status + + # How a finished scan ended: `scanned`; `no_changes` when the deploy changed nothing since the last scan, as after a redeploy or a rollback; `no_base` when there was no earlier commit to compare against, so the head became the starting point; `unreachable` when the head commit is on neither the project's production branch nor the repository's default branch; `repository_changed`; `failed`; or `cancelled`. Null until it ends. + attr_accessor :outcome + + # The bound a waiting scan waits at: `findings_limit`, `pull_request_limit`, `spend_limit`, `scan_limit` or `feature_unavailable`; `feature_paused` means a platform publication pause is holding the scan without spending its retry allowance. Null while it only waits out its settle window, and for a scan that started. A waiting scan skips no deploy: it covers every commit since the last scan when it starts. + attr_accessor :waiting_reason + + # The GitHub repository the scan reads. + attr_accessor :repository_id + + # The commit the scan compares against, null while waiting or when there was none. + attr_accessor :base_sha + + # The newest deployed commit the scan covers. + attr_accessor :head_sha + + attr_accessor :resources + + # Whether the scan reviewed only part of the change. A change too large to review whole keeps the files with the most changed lines, a review that stops early keeps what it found, and a repository too large to read whole skips the files past what it read. No later scan covers the rest. + attr_accessor :truncated + + attr_accessor :counts + + # The scan's findings whose runs were billed. + attr_accessor :billed + + # When the first deploy the scan covers asked for it. + attr_accessor :requested_at + + attr_accessor :started_at + + attr_accessor :completed_at + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'project_id' => :'project_id', + :'source' => :'source', + :'status' => :'status', + :'outcome' => :'outcome', + :'waiting_reason' => :'waiting_reason', + :'repository_id' => :'repository_id', + :'base_sha' => :'base_sha', + :'head_sha' => :'head_sha', + :'resources' => :'resources', + :'truncated' => :'truncated', + :'counts' => :'counts', + :'billed' => :'billed', + :'requested_at' => :'requested_at', + :'started_at' => :'started_at', + :'completed_at' => :'completed_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'project_id' => :'String', + :'source' => :'String', + :'status' => :'LavaflowScanStatus', + :'outcome' => :'String', + :'waiting_reason' => :'String', + :'repository_id' => :'Integer', + :'base_sha' => :'String', + :'head_sha' => :'String', + :'resources' => :'Array', + :'truncated' => :'Boolean', + :'counts' => :'LavaflowScanCounts', + :'billed' => :'Array', + :'requested_at' => :'Time', + :'started_at' => :'Time', + :'completed_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'id', + :'outcome', + :'waiting_reason', + :'base_sha', + :'started_at', + :'completed_at' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowScan` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowScan`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + else + self.source = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'outcome') + self.outcome = attributes[:'outcome'] + else + self.outcome = nil + end + + if attributes.key?(:'waiting_reason') + self.waiting_reason = attributes[:'waiting_reason'] + else + self.waiting_reason = nil + end + + if attributes.key?(:'repository_id') + self.repository_id = attributes[:'repository_id'] + else + self.repository_id = nil + end + + if attributes.key?(:'base_sha') + self.base_sha = attributes[:'base_sha'] + else + self.base_sha = nil + end + + if attributes.key?(:'head_sha') + self.head_sha = attributes[:'head_sha'] + else + self.head_sha = nil + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + else + self.resources = nil + end + + if attributes.key?(:'truncated') + self.truncated = attributes[:'truncated'] + else + self.truncated = nil + end + + if attributes.key?(:'counts') + self.counts = attributes[:'counts'] + else + self.counts = nil + end + + if attributes.key?(:'billed') + if (value = attributes[:'billed']).is_a?(Array) + self.billed = value + end + else + self.billed = nil + end + + if attributes.key?(:'requested_at') + self.requested_at = attributes[:'requested_at'] + else + self.requested_at = nil + end + + if attributes.key?(:'started_at') + self.started_at = attributes[:'started_at'] + else + self.started_at = nil + end + + if attributes.key?(:'completed_at') + self.completed_at = attributes[:'completed_at'] + else + self.completed_at = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @source.nil? + invalid_properties.push('invalid value for "source", source cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @repository_id.nil? + invalid_properties.push('invalid value for "repository_id", repository_id cannot be nil.') + end + + if @head_sha.nil? + invalid_properties.push('invalid value for "head_sha", head_sha cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + if @truncated.nil? + invalid_properties.push('invalid value for "truncated", truncated cannot be nil.') + end + + if @counts.nil? + invalid_properties.push('invalid value for "counts", counts cannot be nil.') + end + + if @billed.nil? + invalid_properties.push('invalid value for "billed", billed cannot be nil.') + end + + if @requested_at.nil? + invalid_properties.push('invalid value for "requested_at", requested_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + return false if @source.nil? + source_validator = EnumAttributeValidator.new('String', ["deployment"]) + return false unless source_validator.valid?(@source) + return false if @status.nil? + return false if @repository_id.nil? + return false if @head_sha.nil? + return false if @resources.nil? + return false if @truncated.nil? + return false if @counts.nil? + return false if @billed.nil? + return false if @requested_at.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] source Object to be assigned + def source=(source) + validator = EnumAttributeValidator.new('String', ["deployment"]) + unless validator.valid?(source) + fail ArgumentError, "invalid value for \"source\", must be one of #{validator.allowable_values}." + end + @source = source + end + + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' + end + + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] repository_id Value to be assigned + def repository_id=(repository_id) + if repository_id.nil? + fail ArgumentError, 'repository_id cannot be nil' + end + + @repository_id = repository_id + end + + # Custom attribute writer method with validation + # @param [Object] head_sha Value to be assigned + def head_sha=(head_sha) + if head_sha.nil? + fail ArgumentError, 'head_sha cannot be nil' + end + + @head_sha = head_sha + end + + # Custom attribute writer method with validation + # @param [Object] resources Value to be assigned + def resources=(resources) + if resources.nil? + fail ArgumentError, 'resources cannot be nil' + end + + @resources = resources + end + + # Custom attribute writer method with validation + # @param [Object] truncated Value to be assigned + def truncated=(truncated) + if truncated.nil? + fail ArgumentError, 'truncated cannot be nil' + end + + @truncated = truncated + end + + # Custom attribute writer method with validation + # @param [Object] counts Value to be assigned + def counts=(counts) + if counts.nil? + fail ArgumentError, 'counts cannot be nil' + end + + @counts = counts + end + + # Custom attribute writer method with validation + # @param [Object] billed Value to be assigned + def billed=(billed) + if billed.nil? + fail ArgumentError, 'billed cannot be nil' + end + + @billed = billed + end + + # Custom attribute writer method with validation + # @param [Object] requested_at Value to be assigned + def requested_at=(requested_at) + if requested_at.nil? + fail ArgumentError, 'requested_at cannot be nil' + end + + @requested_at = requested_at + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + project_id == o.project_id && + source == o.source && + status == o.status && + outcome == o.outcome && + waiting_reason == o.waiting_reason && + repository_id == o.repository_id && + base_sha == o.base_sha && + head_sha == o.head_sha && + resources == o.resources && + truncated == o.truncated && + counts == o.counts && + billed == o.billed && + requested_at == o.requested_at && + started_at == o.started_at && + completed_at == o.completed_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, project_id, source, status, outcome, waiting_reason, repository_id, base_sha, head_sha, resources, truncated, counts, billed, requested_at, started_at, completed_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_billed_finding.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_billed_finding.rb new file mode 100644 index 00000000..227b3cbd --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_billed_finding.rb @@ -0,0 +1,248 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A finding of the scan whose Code Quality runs were billed. + class LavaflowScanBilledFinding < ApiModelBase + # The finding's issue. Its `finding` says where the problem is and why. + attr_accessor :issue_id + + # The rule the finding is about. + attr_accessor :rule + + attr_accessor :title + + # How many billable events of each kind the finding's runs recorded, keyed by kind, such as `issue_diagnosed` and `pull_request_opened`. + attr_accessor :billable_events + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'issue_id' => :'issue_id', + :'rule' => :'rule', + :'title' => :'title', + :'billable_events' => :'billable_events' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'issue_id' => :'String', + :'rule' => :'String', + :'title' => :'String', + :'billable_events' => :'Hash' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowScanBilledFinding` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowScanBilledFinding`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'issue_id') + self.issue_id = attributes[:'issue_id'] + else + self.issue_id = nil + end + + if attributes.key?(:'rule') + self.rule = attributes[:'rule'] + else + self.rule = nil + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + else + self.title = nil + end + + if attributes.key?(:'billable_events') + if (value = attributes[:'billable_events']).is_a?(Hash) + self.billable_events = value + end + else + self.billable_events = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @issue_id.nil? + invalid_properties.push('invalid value for "issue_id", issue_id cannot be nil.') + end + + if @rule.nil? + invalid_properties.push('invalid value for "rule", rule cannot be nil.') + end + + if @title.nil? + invalid_properties.push('invalid value for "title", title cannot be nil.') + end + + if @billable_events.nil? + invalid_properties.push('invalid value for "billable_events", billable_events cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @issue_id.nil? + return false if @rule.nil? + return false if @title.nil? + return false if @billable_events.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] issue_id Value to be assigned + def issue_id=(issue_id) + if issue_id.nil? + fail ArgumentError, 'issue_id cannot be nil' + end + + @issue_id = issue_id + end + + # Custom attribute writer method with validation + # @param [Object] rule Value to be assigned + def rule=(rule) + if rule.nil? + fail ArgumentError, 'rule cannot be nil' + end + + @rule = rule + end + + # Custom attribute writer method with validation + # @param [Object] title Value to be assigned + def title=(title) + if title.nil? + fail ArgumentError, 'title cannot be nil' + end + + @title = title + end + + # Custom attribute writer method with validation + # @param [Object] billable_events Value to be assigned + def billable_events=(billable_events) + if billable_events.nil? + fail ArgumentError, 'billable_events cannot be nil' + end + + @billable_events = billable_events + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + issue_id == o.issue_id && + rule == o.rule && + title == o.title && + billable_events == o.billable_events + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [issue_id, rule, title, billable_events].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_counts.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_counts.rb new file mode 100644 index 00000000..c833a7fe --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_counts.rb @@ -0,0 +1,301 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # What the scan did with the problems it found. + class LavaflowScanCounts < ApiModelBase + # Candidates the scan found in the changed lines. + attr_accessor :found + + # New issues the scan opened. + attr_accessor :created + + # Candidates that matched an issue the project already has, or a finding the scan already kept. + attr_accessor :duplicate + + # Candidates a person had already turned down, by closing their pull request or ignoring their issue. + attr_accessor :suppressed + + # Confirmed findings past the plan's findings per scan, which no later scan reports again. + attr_accessor :capped + + # Candidates LavaFlow's second check didn't confirm, or that it couldn't report. + attr_accessor :rejected + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'found' => :'found', + :'created' => :'created', + :'duplicate' => :'duplicate', + :'suppressed' => :'suppressed', + :'capped' => :'capped', + :'rejected' => :'rejected' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'found' => :'Integer', + :'created' => :'Integer', + :'duplicate' => :'Integer', + :'suppressed' => :'Integer', + :'capped' => :'Integer', + :'rejected' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowScanCounts` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowScanCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'found') + self.found = attributes[:'found'] + else + self.found = nil + end + + if attributes.key?(:'created') + self.created = attributes[:'created'] + else + self.created = nil + end + + if attributes.key?(:'duplicate') + self.duplicate = attributes[:'duplicate'] + else + self.duplicate = nil + end + + if attributes.key?(:'suppressed') + self.suppressed = attributes[:'suppressed'] + else + self.suppressed = nil + end + + if attributes.key?(:'capped') + self.capped = attributes[:'capped'] + else + self.capped = nil + end + + if attributes.key?(:'rejected') + self.rejected = attributes[:'rejected'] + else + self.rejected = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @found.nil? + invalid_properties.push('invalid value for "found", found cannot be nil.') + end + + if @created.nil? + invalid_properties.push('invalid value for "created", created cannot be nil.') + end + + if @duplicate.nil? + invalid_properties.push('invalid value for "duplicate", duplicate cannot be nil.') + end + + if @suppressed.nil? + invalid_properties.push('invalid value for "suppressed", suppressed cannot be nil.') + end + + if @capped.nil? + invalid_properties.push('invalid value for "capped", capped cannot be nil.') + end + + if @rejected.nil? + invalid_properties.push('invalid value for "rejected", rejected cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @found.nil? + return false if @created.nil? + return false if @duplicate.nil? + return false if @suppressed.nil? + return false if @capped.nil? + return false if @rejected.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] found Value to be assigned + def found=(found) + if found.nil? + fail ArgumentError, 'found cannot be nil' + end + + @found = found + end + + # Custom attribute writer method with validation + # @param [Object] created Value to be assigned + def created=(created) + if created.nil? + fail ArgumentError, 'created cannot be nil' + end + + @created = created + end + + # Custom attribute writer method with validation + # @param [Object] duplicate Value to be assigned + def duplicate=(duplicate) + if duplicate.nil? + fail ArgumentError, 'duplicate cannot be nil' + end + + @duplicate = duplicate + end + + # Custom attribute writer method with validation + # @param [Object] suppressed Value to be assigned + def suppressed=(suppressed) + if suppressed.nil? + fail ArgumentError, 'suppressed cannot be nil' + end + + @suppressed = suppressed + end + + # Custom attribute writer method with validation + # @param [Object] capped Value to be assigned + def capped=(capped) + if capped.nil? + fail ArgumentError, 'capped cannot be nil' + end + + @capped = capped + end + + # Custom attribute writer method with validation + # @param [Object] rejected Value to be assigned + def rejected=(rejected) + if rejected.nil? + fail ArgumentError, 'rejected cannot be nil' + end + + @rejected = rejected + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + found == o.found && + created == o.created && + duplicate == o.duplicate && + suppressed == o.suppressed && + capped == o.capped && + rejected == o.rejected + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [found, created, duplicate, suppressed, capped, rejected].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_resource.rb new file mode 100644 index 00000000..0b6b7b38 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_resource.rb @@ -0,0 +1,241 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A resource whose production deploy the scan covers. Only frontend deploys ask for a scan for now. + class LavaflowScanResource < ApiModelBase + attr_accessor :resource_type + + attr_accessor :resource_id + + attr_accessor :deployment_id + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resource_type' => :'resource_type', + :'resource_id' => :'resource_id', + :'deployment_id' => :'deployment_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'resource_type' => :'String', + :'resource_id' => :'String', + :'deployment_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowScanResource` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowScanResource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'resource_type') + self.resource_type = attributes[:'resource_type'] + else + self.resource_type = nil + end + + if attributes.key?(:'resource_id') + self.resource_id = attributes[:'resource_id'] + else + self.resource_id = nil + end + + if attributes.key?(:'deployment_id') + self.deployment_id = attributes[:'deployment_id'] + else + self.deployment_id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @resource_type.nil? + invalid_properties.push('invalid value for "resource_type", resource_type cannot be nil.') + end + + if @resource_id.nil? + invalid_properties.push('invalid value for "resource_id", resource_id cannot be nil.') + end + + if @deployment_id.nil? + invalid_properties.push('invalid value for "deployment_id", deployment_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @resource_type.nil? + resource_type_validator = EnumAttributeValidator.new('String', ["function", "frontend"]) + return false unless resource_type_validator.valid?(@resource_type) + return false if @resource_id.nil? + return false if @deployment_id.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] resource_type Object to be assigned + def resource_type=(resource_type) + validator = EnumAttributeValidator.new('String', ["function", "frontend"]) + unless validator.valid?(resource_type) + fail ArgumentError, "invalid value for \"resource_type\", must be one of #{validator.allowable_values}." + end + @resource_type = resource_type + end + + # Custom attribute writer method with validation + # @param [Object] resource_id Value to be assigned + def resource_id=(resource_id) + if resource_id.nil? + fail ArgumentError, 'resource_id cannot be nil' + end + + @resource_id = resource_id + end + + # Custom attribute writer method with validation + # @param [Object] deployment_id Value to be assigned + def deployment_id=(deployment_id) + if deployment_id.nil? + fail ArgumentError, 'deployment_id cannot be nil' + end + + @deployment_id = deployment_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + resource_type == o.resource_type && + resource_id == o.resource_id && + deployment_id == o.deployment_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [resource_type, resource_id, deployment_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_status.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_status.rb new file mode 100644 index 00000000..349dfdaa --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_scan_status.rb @@ -0,0 +1,43 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowScanStatus + WAITING = "waiting".freeze + RUNNING = "running".freeze + COMPLETED = "completed".freeze + FAILED = "failed".freeze + CANCELLED = "cancelled".freeze + + def self.all_vars + @all_vars ||= [WAITING, RUNNING, COMPLETED, FAILED, CANCELLED].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if LavaflowScanStatus.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #LavaflowScanStatus" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_settings.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_settings.rb new file mode 100644 index 00000000..91141b09 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_settings.rb @@ -0,0 +1,399 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A project's LavaFlow settings. LavaFlow sends this project's logs and source code to an AI service that Volcano operates. + class LavaflowSettings < ApiModelBase + # The project the settings belong to. + attr_accessor :project_id + + # Whether LavaFlow works on the project's issues. Off by default. + attr_accessor :enabled + + attr_accessor :autonomy + + attr_accessor :merge_policy + + attr_accessor :code_quality + + # Whether LavaFlow opens a fix's pull request even where a workflow could run it, or put its text into a command, with the repository's secrets before a person approves it. Off by default; while off, such a fix stays on its run and no pull request opens. Only the project's owner turns it on, signed in as a person: with the platform token `volcano login` stores, or another platform token that expires. It applies to the repository their GitHub account can push to. Connecting the project to another repository, or disconnecting it, turns it off, and connecting the first one again doesn't turn it back on. Workflows in the repository may then run LavaFlow's pull requests, or put their text into commands, with the repository's secrets before a person reviews them. LavaFlow writes those changes from the project's error logs, which its users can influence. Turn it on only if those workflows keep secrets away from untrusted code; gating them on a label a person adds is safer. + attr_accessor :allow_ungated_workflows + + # When the settings were last saved, or last changed by connecting a repository. Null until they first are. + attr_accessor :updated_at + + # The user ID of the person who made the last save; null when no person made it, such as a project access token. + attr_accessor :updated_by + + # Whether the caller can save the settings: true only for the project's owner with a platform token while the owner's account is active; false for any project access token and for a read-only account. + attr_accessor :can_update + + # The GitHub repository the project is linked to, as `GET /projects/{id}/git-connection` reports it. LavaFlow opens fix pull requests there, against `production_branch`. Null when the project has none. + attr_accessor :repository + + # What in the project's repository setup stops LavaFlow from fixing issues although it is on. Null when the repository setup doesn't, and while the project's `lavaflow` capability isn't available; null doesn't mean nothing else stops LavaFlow. `message` is text to show as given. `repository_required`: the project has no linked repository. With `autonomy` `open_pr` or `merge`, LavaFlow diagnoses issues but fixes none; turned on for a repository the project no longer links, it starts no runs. Link a repository with `PUT /projects/{id}/git-connection` or `volcano git connect `. Turned on with none, LavaFlow fixes issues in the first one linked, unless `message` asks to turn it on again after the link; linking the one it was turned on for resumes it. `repository_changed`: the project is linked to a repository LavaFlow wasn't turned on for. LavaFlow starts no runs until the owner turns it on again, with `{\"enabled\": true}` or `volcano cloud lavaflow enable`, which makes the linked repository the one it fixes. New codes may appear; show the `message` of one you don't know. + attr_accessor :fix_blocker + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'project_id' => :'project_id', + :'enabled' => :'enabled', + :'autonomy' => :'autonomy', + :'merge_policy' => :'merge_policy', + :'code_quality' => :'code_quality', + :'allow_ungated_workflows' => :'allow_ungated_workflows', + :'updated_at' => :'updated_at', + :'updated_by' => :'updated_by', + :'can_update' => :'can_update', + :'repository' => :'repository', + :'fix_blocker' => :'fix_blocker' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'project_id' => :'String', + :'enabled' => :'Boolean', + :'autonomy' => :'LavaflowAutonomy', + :'merge_policy' => :'LavaflowMergePolicy', + :'code_quality' => :'LavaflowCodeQualitySettings', + :'allow_ungated_workflows' => :'Boolean', + :'updated_at' => :'Time', + :'updated_by' => :'String', + :'can_update' => :'Boolean', + :'repository' => :'ProjectGitConnectionSummary', + :'fix_blocker' => :'LavaflowFailure' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'updated_at', + :'updated_by', + :'repository', + :'fix_blocker' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + else + self.enabled = nil + end + + if attributes.key?(:'autonomy') + self.autonomy = attributes[:'autonomy'] + else + self.autonomy = nil + end + + if attributes.key?(:'merge_policy') + self.merge_policy = attributes[:'merge_policy'] + else + self.merge_policy = nil + end + + if attributes.key?(:'code_quality') + self.code_quality = attributes[:'code_quality'] + else + self.code_quality = nil + end + + if attributes.key?(:'allow_ungated_workflows') + self.allow_ungated_workflows = attributes[:'allow_ungated_workflows'] + else + self.allow_ungated_workflows = nil + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + else + self.updated_at = nil + end + + if attributes.key?(:'updated_by') + self.updated_by = attributes[:'updated_by'] + else + self.updated_by = nil + end + + if attributes.key?(:'can_update') + self.can_update = attributes[:'can_update'] + else + self.can_update = nil + end + + if attributes.key?(:'repository') + self.repository = attributes[:'repository'] + else + self.repository = nil + end + + if attributes.key?(:'fix_blocker') + self.fix_blocker = attributes[:'fix_blocker'] + else + self.fix_blocker = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @enabled.nil? + invalid_properties.push('invalid value for "enabled", enabled cannot be nil.') + end + + if @autonomy.nil? + invalid_properties.push('invalid value for "autonomy", autonomy cannot be nil.') + end + + if @merge_policy.nil? + invalid_properties.push('invalid value for "merge_policy", merge_policy cannot be nil.') + end + + if @code_quality.nil? + invalid_properties.push('invalid value for "code_quality", code_quality cannot be nil.') + end + + if @allow_ungated_workflows.nil? + invalid_properties.push('invalid value for "allow_ungated_workflows", allow_ungated_workflows cannot be nil.') + end + + if @can_update.nil? + invalid_properties.push('invalid value for "can_update", can_update cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + return false if @enabled.nil? + return false if @autonomy.nil? + return false if @merge_policy.nil? + return false if @code_quality.nil? + return false if @allow_ungated_workflows.nil? + return false if @can_update.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] enabled Value to be assigned + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'enabled cannot be nil' + end + + @enabled = enabled + end + + # Custom attribute writer method with validation + # @param [Object] autonomy Value to be assigned + def autonomy=(autonomy) + if autonomy.nil? + fail ArgumentError, 'autonomy cannot be nil' + end + + @autonomy = autonomy + end + + # Custom attribute writer method with validation + # @param [Object] merge_policy Value to be assigned + def merge_policy=(merge_policy) + if merge_policy.nil? + fail ArgumentError, 'merge_policy cannot be nil' + end + + @merge_policy = merge_policy + end + + # Custom attribute writer method with validation + # @param [Object] code_quality Value to be assigned + def code_quality=(code_quality) + if code_quality.nil? + fail ArgumentError, 'code_quality cannot be nil' + end + + @code_quality = code_quality + end + + # Custom attribute writer method with validation + # @param [Object] allow_ungated_workflows Value to be assigned + def allow_ungated_workflows=(allow_ungated_workflows) + if allow_ungated_workflows.nil? + fail ArgumentError, 'allow_ungated_workflows cannot be nil' + end + + @allow_ungated_workflows = allow_ungated_workflows + end + + # Custom attribute writer method with validation + # @param [Object] can_update Value to be assigned + def can_update=(can_update) + if can_update.nil? + fail ArgumentError, 'can_update cannot be nil' + end + + @can_update = can_update + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + project_id == o.project_id && + enabled == o.enabled && + autonomy == o.autonomy && + merge_policy == o.merge_policy && + code_quality == o.code_quality && + allow_ungated_workflows == o.allow_ungated_workflows && + updated_at == o.updated_at && + updated_by == o.updated_by && + can_update == o.can_update && + repository == o.repository && + fix_blocker == o.fix_blocker + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [project_id, enabled, autonomy, merge_policy, code_quality, allow_ungated_workflows, updated_at, updated_by, can_update, repository, fix_blocker].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_settings_update.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_settings_update.rb new file mode 100644 index 00000000..e2960e6f --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_settings_update.rb @@ -0,0 +1,234 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The project, and at least one field to change. An omitted field keeps its saved value. + class LavaflowSettingsUpdate < ApiModelBase + # The project whose settings to change. + attr_accessor :project_id + + attr_accessor :enabled + + attr_accessor :autonomy + + attr_accessor :merge_policy + + attr_accessor :code_quality + + # Turns on opening fixes past ungated workflows, for the repository the project is connected to now; it applies only to that repository. Only the project's owner turns it on, signed in as a person: with the platform token `volcano login` stores, or another platform token that expires. Their GitHub account must be able to push to that repository. A project access token, a platform token that never expires, or anyone else gets `403` with `person_required`. Any of the owner's credentials turns it off. Workflows in the repository may then run LavaFlow's pull requests, or put their text into commands, with the repository's secrets before a person reviews them. LavaFlow writes those changes from the project's error logs, which its users can influence. Turn it on only if those workflows keep secrets away from untrusted code; gating them on a label a person adds is safer. While LavaFlow is not available, only `false` is saved, and only with `enabled: false`. + attr_accessor :allow_ungated_workflows + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'project_id' => :'project_id', + :'enabled' => :'enabled', + :'autonomy' => :'autonomy', + :'merge_policy' => :'merge_policy', + :'code_quality' => :'code_quality', + :'allow_ungated_workflows' => :'allow_ungated_workflows' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'project_id' => :'String', + :'enabled' => :'Boolean', + :'autonomy' => :'LavaflowAutonomy', + :'merge_policy' => :'LavaflowMergePolicyUpdate', + :'code_quality' => :'LavaflowCodeQualityUpdate', + :'allow_ungated_workflows' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowSettingsUpdate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowSettingsUpdate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'autonomy') + self.autonomy = attributes[:'autonomy'] + end + + if attributes.key?(:'merge_policy') + self.merge_policy = attributes[:'merge_policy'] + end + + if attributes.key?(:'code_quality') + self.code_quality = attributes[:'code_quality'] + end + + if attributes.key?(:'allow_ungated_workflows') + self.allow_ungated_workflows = attributes[:'allow_ungated_workflows'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + project_id == o.project_id && + enabled == o.enabled && + autonomy == o.autonomy && + merge_policy == o.merge_policy && + code_quality == o.code_quality && + allow_ungated_workflows == o.allow_ungated_workflows + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [project_id, enabled, autonomy, merge_policy, code_quality, allow_ungated_workflows].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_skip_reason.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_skip_reason.rb new file mode 100644 index 00000000..688c281b --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_skip_reason.rb @@ -0,0 +1,56 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowSkipReason + LavaflowSkipReasonDiagnoseOnly = "diagnose_only".freeze + LavaflowSkipReasonNotFixable = "not_fixable".freeze + LavaflowSkipReasonLowConfidence = "low_confidence".freeze + LavaflowSkipReasonNoPatch = "no_patch".freeze + LavaflowSkipReasonPossibleCredential = "possible_credential".freeze + LavaflowSkipReasonPossiblePersonalData = "possible_personal_data".freeze + LavaflowSkipReasonUngatedWorkflows = "ungated_workflows".freeze + LavaflowSkipReasonConventionUnsatisfiable = "convention_unsatisfiable".freeze + LavaflowSkipReasonPullRequestOpen = "pull_request_open".freeze + LavaflowSkipReasonSourceUnavailable = "source_unavailable".freeze + LavaflowSkipReasonPermissionMissing = "permission_missing".freeze + LavaflowSkipReasonRepositoryChanged = "repository_changed".freeze + LavaflowSkipReasonPublishFailed = "publish_failed".freeze + LavaflowSkipReasonLineageCap = "lineage_cap".freeze + LavaflowSkipReasonLineageHeld = "lineage_held".freeze + LavaflowSkipReasonReviewUnresolved = "review_unresolved".freeze + LavaflowSkipReasonDuplicateInRepository = "duplicate_in_repository".freeze + LavaflowSkipReasonSecurityFinding = "security_finding".freeze + + def self.all_vars + @all_vars ||= [LavaflowSkipReasonDiagnoseOnly, LavaflowSkipReasonNotFixable, LavaflowSkipReasonLowConfidence, LavaflowSkipReasonNoPatch, LavaflowSkipReasonPossibleCredential, LavaflowSkipReasonPossiblePersonalData, LavaflowSkipReasonUngatedWorkflows, LavaflowSkipReasonConventionUnsatisfiable, LavaflowSkipReasonPullRequestOpen, LavaflowSkipReasonSourceUnavailable, LavaflowSkipReasonPermissionMissing, LavaflowSkipReasonRepositoryChanged, LavaflowSkipReasonPublishFailed, LavaflowSkipReasonLineageCap, LavaflowSkipReasonLineageHeld, LavaflowSkipReasonReviewUnresolved, LavaflowSkipReasonDuplicateInRepository, LavaflowSkipReasonSecurityFinding].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if LavaflowSkipReason.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #LavaflowSkipReason" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_slack_binding.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_slack_binding.rb new file mode 100644 index 00000000..ca7e8d20 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_slack_binding.rb @@ -0,0 +1,242 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The Slack channel a binding reports from. Present when `connector_type` is `slack`. + class LavaflowSlackBinding < ApiModelBase + # A Slack workspace ID, such as `T0123ABCD`. + attr_accessor :team_id + + # The workspace's name, or empty while the Volcano app is not installed in it. + attr_accessor :team_name + + # A Slack channel ID, such as `C0123ABCD`. + attr_accessor :channel_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'team_id' => :'team_id', + :'team_name' => :'team_name', + :'channel_id' => :'channel_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'team_id' => :'String', + :'team_name' => :'String', + :'channel_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowSlackBinding` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowSlackBinding`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'team_id') + self.team_id = attributes[:'team_id'] + else + self.team_id = nil + end + + if attributes.key?(:'team_name') + self.team_name = attributes[:'team_name'] + else + self.team_name = nil + end + + if attributes.key?(:'channel_id') + self.channel_id = attributes[:'channel_id'] + else + self.channel_id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @team_id.nil? + invalid_properties.push('invalid value for "team_id", team_id cannot be nil.') + end + + pattern = Regexp.new(/^T[A-Z0-9]{2,31}$/) + if @team_id !~ pattern + invalid_properties.push("invalid value for \"team_id\", must conform to the pattern #{pattern}.") + end + + if @team_name.nil? + invalid_properties.push('invalid value for "team_name", team_name cannot be nil.') + end + + if @channel_id.nil? + invalid_properties.push('invalid value for "channel_id", channel_id cannot be nil.') + end + + pattern = Regexp.new(/^[CG][A-Z0-9]{2,31}$/) + if @channel_id !~ pattern + invalid_properties.push("invalid value for \"channel_id\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @team_id.nil? + return false if @team_id !~ Regexp.new(/^T[A-Z0-9]{2,31}$/) + return false if @team_name.nil? + return false if @channel_id.nil? + return false if @channel_id !~ Regexp.new(/^[CG][A-Z0-9]{2,31}$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] team_id Value to be assigned + def team_id=(team_id) + if team_id.nil? + fail ArgumentError, 'team_id cannot be nil' + end + + pattern = Regexp.new(/^T[A-Z0-9]{2,31}$/) + if team_id !~ pattern + fail ArgumentError, "invalid value for \"team_id\", must conform to the pattern #{pattern}." + end + + @team_id = team_id + end + + # Custom attribute writer method with validation + # @param [Object] team_name Value to be assigned + def team_name=(team_name) + if team_name.nil? + fail ArgumentError, 'team_name cannot be nil' + end + + @team_name = team_name + end + + # Custom attribute writer method with validation + # @param [Object] channel_id Value to be assigned + def channel_id=(channel_id) + if channel_id.nil? + fail ArgumentError, 'channel_id cannot be nil' + end + + pattern = Regexp.new(/^[CG][A-Z0-9]{2,31}$/) + if channel_id !~ pattern + fail ArgumentError, "invalid value for \"channel_id\", must conform to the pattern #{pattern}." + end + + @channel_id = channel_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + team_id == o.team_id && + team_name == o.team_name && + channel_id == o.channel_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [team_id, team_name, channel_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_slack_binding_target.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_slack_binding_target.rb new file mode 100644 index 00000000..58e2e941 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_slack_binding_target.rb @@ -0,0 +1,177 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The channel to bind, for a `slack` connector. + class LavaflowSlackBindingTarget < ApiModelBase + # A Slack channel ID, such as `C0123ABCD`. + attr_accessor :channel_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'channel_id' => :'channel_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'channel_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowSlackBindingTarget` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowSlackBindingTarget`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'channel_id') + self.channel_id = attributes[:'channel_id'] + else + self.channel_id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @channel_id.nil? + invalid_properties.push('invalid value for "channel_id", channel_id cannot be nil.') + end + + pattern = Regexp.new(/^[CG][A-Z0-9]{2,31}$/) + if @channel_id !~ pattern + invalid_properties.push("invalid value for \"channel_id\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @channel_id.nil? + return false if @channel_id !~ Regexp.new(/^[CG][A-Z0-9]{2,31}$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] channel_id Value to be assigned + def channel_id=(channel_id) + if channel_id.nil? + fail ArgumentError, 'channel_id cannot be nil' + end + + pattern = Regexp.new(/^[CG][A-Z0-9]{2,31}$/) + if channel_id !~ pattern + fail ArgumentError, "invalid value for \"channel_id\", must conform to the pattern #{pattern}." + end + + @channel_id = channel_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + channel_id == o.channel_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [channel_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_autofix.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_source_commit.rb similarity index 74% rename from lib/volcano/generated/lib/volcano-generated/models/project_config_autofix.rb rename to lib/volcano/generated/lib/volcano-generated/models/lavaflow_source_commit.rb index fce2837a..be0439f2 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_autofix.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_source_commit.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -14,17 +14,13 @@ require 'time' module Volcano::Generated - # AI diagnosis and fix settings. Omitted fields keep their current value. Your API key is never part of the manifest, and an apply never sets or deletes it: set it with `PUT /projects/{id}/autofix` before turning on a provider that runs on your own key. - class ProjectConfigAutofix < ApiModelBase - attr_accessor :enabled + # The commit a run read its source at. + class LavaflowSourceCommit < ApiModelBase + # The commit's full SHA. + attr_accessor :sha - attr_accessor :max_stage - - attr_accessor :auto_trigger - - attr_accessor :provider - - attr_accessor :model + # Where the commit came from. Null for a run recorded before Volcano kept it. + attr_accessor :origin class EnumAttributeValidator attr_reader :datatype @@ -51,11 +47,8 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'enabled' => :'enabled', - :'max_stage' => :'max_stage', - :'auto_trigger' => :'auto_trigger', - :'provider' => :'provider', - :'model' => :'model' + :'sha' => :'sha', + :'origin' => :'origin' } end @@ -72,17 +65,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'enabled' => :'Boolean', - :'max_stage' => :'AutofixStage', - :'auto_trigger' => :'Boolean', - :'provider' => :'AutofixProvider', - :'model' => :'AutofixModel' + :'sha' => :'String', + :'origin' => :'LavaflowCommitOrigin' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'origin' ]) end @@ -90,36 +81,28 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ProjectConfigAutofix` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowSourceCommit` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ProjectConfigAutofix`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowSourceCommit`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'enabled') - self.enabled = attributes[:'enabled'] - end - - if attributes.key?(:'max_stage') - self.max_stage = attributes[:'max_stage'] - end - - if attributes.key?(:'auto_trigger') - self.auto_trigger = attributes[:'auto_trigger'] + if attributes.key?(:'sha') + self.sha = attributes[:'sha'] + else + self.sha = nil end - if attributes.key?(:'provider') - self.provider = attributes[:'provider'] - end - - if attributes.key?(:'model') - self.model = attributes[:'model'] + if attributes.key?(:'origin') + self.origin = attributes[:'origin'] + else + self.origin = nil end end @@ -128,6 +111,10 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new + if @sha.nil? + invalid_properties.push('invalid value for "sha", sha cannot be nil.') + end + invalid_properties end @@ -135,19 +122,27 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @sha.nil? true end + # Custom attribute writer method with validation + # @param [Object] sha Value to be assigned + def sha=(sha) + if sha.nil? + fail ArgumentError, 'sha cannot be nil' + end + + @sha = sha + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && - enabled == o.enabled && - max_stage == o.max_stage && - auto_trigger == o.auto_trigger && - provider == o.provider && - model == o.model + sha == o.sha && + origin == o.origin end # @see the `==` method @@ -159,7 +154,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [enabled, max_stage, auto_trigger, provider, model].hash + [sha, origin].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_source_unavailable.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_source_unavailable.rb new file mode 100644 index 00000000..165f79e8 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_source_unavailable.rb @@ -0,0 +1,200 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Why LavaFlow couldn't read, or open a fix on, the code that served a run's error, so the run opened no pull request. + class LavaflowSourceUnavailable < ApiModelBase + attr_accessor :reason + + # The deployment of the run's `resource` that served the error, for `no_commit`, `uncommitted_changes`, `unverified_commit` and `other_repository`. Null for any other reason, including `deployment_unattributed`, and when no deployment was serving. + attr_accessor :deployment_id + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'reason' => :'reason', + :'deployment_id' => :'deployment_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'reason' => :'LavaflowSourceUnavailableReason', + :'deployment_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'deployment_id' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowSourceUnavailable` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowSourceUnavailable`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'reason') + self.reason = attributes[:'reason'] + else + self.reason = nil + end + + if attributes.key?(:'deployment_id') + self.deployment_id = attributes[:'deployment_id'] + else + self.deployment_id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @reason.nil? + invalid_properties.push('invalid value for "reason", reason cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @reason.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] reason Value to be assigned + def reason=(reason) + if reason.nil? + fail ArgumentError, 'reason cannot be nil' + end + + @reason = reason + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reason == o.reason && + deployment_id == o.deployment_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [reason, deployment_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_source_unavailable_reason.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_source_unavailable_reason.rb new file mode 100644 index 00000000..337eabfc --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_source_unavailable_reason.rb @@ -0,0 +1,46 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowSourceUnavailableReason + LavaflowSourceUnavailableReasonNoRepository = "no_repository".freeze + LavaflowSourceUnavailableReasonNoCommit = "no_commit".freeze + LavaflowSourceUnavailableReasonUncommittedChanges = "uncommitted_changes".freeze + LavaflowSourceUnavailableReasonUnverifiedCommit = "unverified_commit".freeze + LavaflowSourceUnavailableReasonOtherRepository = "other_repository".freeze + LavaflowSourceUnavailableReasonRepositoryUnreadable = "repository_unreadable".freeze + LavaflowSourceUnavailableReasonCommitNotOnProductionBranch = "commit_not_on_production_branch".freeze + LavaflowSourceUnavailableReasonDeploymentUnattributed = "deployment_unattributed".freeze + + def self.all_vars + @all_vars ||= [LavaflowSourceUnavailableReasonNoRepository, LavaflowSourceUnavailableReasonNoCommit, LavaflowSourceUnavailableReasonUncommittedChanges, LavaflowSourceUnavailableReasonUnverifiedCommit, LavaflowSourceUnavailableReasonOtherRepository, LavaflowSourceUnavailableReasonRepositoryUnreadable, LavaflowSourceUnavailableReasonCommitNotOnProductionBranch, LavaflowSourceUnavailableReasonDeploymentUnattributed].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if LavaflowSourceUnavailableReason.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #LavaflowSourceUnavailableReason" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_stats.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_stats.rb new file mode 100644 index 00000000..a5c96345 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_stats.rb @@ -0,0 +1,283 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowStats < ApiModelBase + # The project the counts are for. + attr_accessor :project_id + + # The first UTC day in the window. + attr_accessor :window_start + + # The last UTC day in the window, today. + attr_accessor :window_end + + # One entry per UTC day, oldest first, zeros included. + attr_accessor :days + + attr_accessor :outcomes + + attr_accessor :totals + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'project_id' => :'project_id', + :'window_start' => :'window_start', + :'window_end' => :'window_end', + :'days' => :'days', + :'outcomes' => :'outcomes', + :'totals' => :'totals' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'project_id' => :'String', + :'window_start' => :'Date', + :'window_end' => :'Date', + :'days' => :'Array', + :'outcomes' => :'LavaflowOutcomes', + :'totals' => :'LavaflowStatsTotals' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowStats` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowStats`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'window_start') + self.window_start = attributes[:'window_start'] + else + self.window_start = nil + end + + if attributes.key?(:'window_end') + self.window_end = attributes[:'window_end'] + else + self.window_end = nil + end + + if attributes.key?(:'days') + if (value = attributes[:'days']).is_a?(Array) + self.days = value + end + else + self.days = nil + end + + if attributes.key?(:'outcomes') + self.outcomes = attributes[:'outcomes'] + end + + if attributes.key?(:'totals') + self.totals = attributes[:'totals'] + else + self.totals = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @window_start.nil? + invalid_properties.push('invalid value for "window_start", window_start cannot be nil.') + end + + if @window_end.nil? + invalid_properties.push('invalid value for "window_end", window_end cannot be nil.') + end + + if @days.nil? + invalid_properties.push('invalid value for "days", days cannot be nil.') + end + + if @totals.nil? + invalid_properties.push('invalid value for "totals", totals cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + return false if @window_start.nil? + return false if @window_end.nil? + return false if @days.nil? + return false if @totals.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] window_start Value to be assigned + def window_start=(window_start) + if window_start.nil? + fail ArgumentError, 'window_start cannot be nil' + end + + @window_start = window_start + end + + # Custom attribute writer method with validation + # @param [Object] window_end Value to be assigned + def window_end=(window_end) + if window_end.nil? + fail ArgumentError, 'window_end cannot be nil' + end + + @window_end = window_end + end + + # Custom attribute writer method with validation + # @param [Object] days Value to be assigned + def days=(days) + if days.nil? + fail ArgumentError, 'days cannot be nil' + end + + @days = days + end + + # Custom attribute writer method with validation + # @param [Object] totals Value to be assigned + def totals=(totals) + if totals.nil? + fail ArgumentError, 'totals cannot be nil' + end + + @totals = totals + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + project_id == o.project_id && + window_start == o.window_start && + window_end == o.window_end && + days == o.days && + outcomes == o.outcomes && + totals == o.totals + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [project_id, window_start, window_end, days, outcomes, totals].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_stats_totals.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_stats_totals.rb new file mode 100644 index 00000000..c1f0a171 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_stats_totals.rb @@ -0,0 +1,190 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class LavaflowStatsTotals < ApiModelBase + attr_accessor :issues_opened + + attr_accessor :pull_requests_opened + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'issues_opened' => :'issues_opened', + :'pull_requests_opened' => :'pull_requests_opened' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'issues_opened' => :'Integer', + :'pull_requests_opened' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowStatsTotals` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowStatsTotals`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'issues_opened') + self.issues_opened = attributes[:'issues_opened'] + else + self.issues_opened = nil + end + + if attributes.key?(:'pull_requests_opened') + self.pull_requests_opened = attributes[:'pull_requests_opened'] + else + self.pull_requests_opened = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @issues_opened.nil? + invalid_properties.push('invalid value for "issues_opened", issues_opened cannot be nil.') + end + + if @pull_requests_opened.nil? + invalid_properties.push('invalid value for "pull_requests_opened", pull_requests_opened cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @issues_opened.nil? + return false if @pull_requests_opened.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] issues_opened Value to be assigned + def issues_opened=(issues_opened) + if issues_opened.nil? + fail ArgumentError, 'issues_opened cannot be nil' + end + + @issues_opened = issues_opened + end + + # Custom attribute writer method with validation + # @param [Object] pull_requests_opened Value to be assigned + def pull_requests_opened=(pull_requests_opened) + if pull_requests_opened.nil? + fail ArgumentError, 'pull_requests_opened cannot be nil' + end + + @pull_requests_opened = pull_requests_opened + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + issues_opened == o.issues_opened && + pull_requests_opened == o.pull_requests_opened + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [issues_opened, pull_requests_opened].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/lavaflow_workflow_source.rb b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_workflow_source.rb new file mode 100644 index 00000000..ffb0d486 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/lavaflow_workflow_source.rb @@ -0,0 +1,193 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A branch or commit whose workflows LavaFlow read, and the commit it read them at. + class LavaflowWorkflowSource < ApiModelBase + # The branch, or the commit SHA for a commit. + attr_accessor :source + + # The commit LavaFlow read the workflows at. + attr_accessor :commit_sha + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'source' => :'source', + :'commit_sha' => :'commit_sha' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'source' => :'String', + :'commit_sha' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LavaflowWorkflowSource` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LavaflowWorkflowSource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'source') + self.source = attributes[:'source'] + else + self.source = nil + end + + if attributes.key?(:'commit_sha') + self.commit_sha = attributes[:'commit_sha'] + else + self.commit_sha = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @source.nil? + invalid_properties.push('invalid value for "source", source cannot be nil.') + end + + if @commit_sha.nil? + invalid_properties.push('invalid value for "commit_sha", commit_sha cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @source.nil? + return false if @commit_sha.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] source Value to be assigned + def source=(source) + if source.nil? + fail ArgumentError, 'source cannot be nil' + end + + @source = source + end + + # Custom attribute writer method with validation + # @param [Object] commit_sha Value to be assigned + def commit_sha=(commit_sha) + if commit_sha.nil? + fail ArgumentError, 'commit_sha cannot be nil' + end + + @commit_sha = commit_sha + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + source == o.source && + commit_sha == o.commit_sha + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [source, commit_sha].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/list_anon_keys200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/list_anon_keys200_response.rb index b48aa537..4f0d43af 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/list_anon_keys200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/list_anon_keys200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/list_available_o_auth_providers200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/list_available_o_auth_providers200_response.rb index 1e8b7248..42a595a2 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/list_available_o_auth_providers200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/list_available_o_auth_providers200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/list_available_o_auth_providers200_response_providers_inner.rb b/lib/volcano/generated/lib/volcano-generated/models/list_available_o_auth_providers200_response_providers_inner.rb index 6bc38730..7b662c64 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/list_available_o_auth_providers200_response_providers_inner.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/list_available_o_auth_providers200_response_providers_inner.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/list_database_regions200_response_inner.rb b/lib/volcano/generated/lib/volcano-generated/models/list_database_regions200_response_inner.rb index 72bcbdfc..ee838727 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/list_database_regions200_response_inner.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/list_database_regions200_response_inner.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/list_email_templates200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/list_email_templates200_response.rb index 0f0aef62..7c4111d1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/list_email_templates200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/list_email_templates200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/list_o_auth_configs200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/list_o_auth_configs200_response.rb index 9ade294a..c7d5d929 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/list_o_auth_configs200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/list_o_auth_configs200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/list_postgres_versions200_response_inner.rb b/lib/volcano/generated/lib/volcano-generated/models/list_postgres_versions200_response_inner.rb index be63f4a8..cdbf14f6 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/list_postgres_versions200_response_inner.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/list_postgres_versions200_response_inner.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/list_storage_buckets200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/list_storage_buckets200_response.rb index c0b43ded..84971c71 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/list_storage_buckets200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/list_storage_buckets200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/list_storage_objects_admin200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/list_storage_objects_admin200_response.rb index bbebfe26..77bad07e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/list_storage_objects_admin200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/list_storage_objects_admin200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/live_log_level.rb b/lib/volcano/generated/lib/volcano-generated/models/live_log_level.rb index ec1080e6..5f2d1c97 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/live_log_level.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/live_log_level.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_activity_bucket.rb b/lib/volcano/generated/lib/volcano-generated/models/log_activity_bucket.rb index 5d5d23ce..8036d8d0 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_activity_bucket.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_activity_bucket.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_activity_bucket_counts.rb b/lib/volcano/generated/lib/volcano-generated/models/log_activity_bucket_counts.rb index 0f0cca78..f687a941 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_activity_bucket_counts.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_activity_bucket_counts.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_activity_request.rb b/lib/volcano/generated/lib/volcano-generated/models/log_activity_request.rb index 6f70f6e7..896acad5 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_activity_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_activity_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_activity_response.rb b/lib/volcano/generated/lib/volcano-generated/models/log_activity_response.rb index 068bfa4f..2cdd02c8 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_activity_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_activity_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_app_request_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/log_app_request_resource.rb new file mode 100644 index 00000000..c48957a9 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/log_app_request_resource.rb @@ -0,0 +1,221 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Selector for the entries a first-party app writes into this project's logs, such as the Builder's run lifecycle. Each app is one resource. Its ID is UUIDv5(`7374f5e9-35ff-4e46-ac13-a4717bae00e1`, slug), with the app's slug as UTF-8 bytes, and its name is the slug. The Builder (`builder`) is `b52fc8fa-8656-5141-adef-99d698ce6f3c`. Deployment logs are not supported for apps. + class LogAppRequestResource < ApiModelBase + # Resource type to read logs for. + attr_accessor :type + + # Optional app resource IDs, each UUIDv5 of an app's slug. Omit or send an empty array to include every app. + attr_accessor :ids + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'ids' => :'ids' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'ids' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::LogAppRequestResource` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::LogAppRequestResource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = nil + end + + if attributes.key?(:'ids') + if (value = attributes[:'ids']).is_a?(Array) + self.ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if !@ids.nil? && @ids.length > 25 + invalid_properties.push('invalid value for "ids", number of items must be less than or equal to 25.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @type.nil? + type_validator = EnumAttributeValidator.new('String', ["app"]) + return false unless type_validator.valid?(@type) + return false if !@ids.nil? && @ids.length > 25 + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["app"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] ids Value to be assigned + def ids=(ids) + if ids.nil? + fail ArgumentError, 'ids cannot be nil' + end + + if ids.length > 25 + fail ArgumentError, 'invalid value for "ids", number of items must be less than or equal to 25.' + end + + @ids = ids + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + ids == o.ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_database_request_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/log_database_request_resource.rb index deb7e42c..6c23c65b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_database_request_resource.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_database_request_resource.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_deployment.rb b/lib/volcano/generated/lib/volcano-generated/models/log_deployment.rb index acfd3dfe..023141ab 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_deployment.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_deployment.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_deployment_request_selector.rb b/lib/volcano/generated/lib/volcano-generated/models/log_deployment_request_selector.rb index d2fb68f1..0c567b87 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_deployment_request_selector.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_deployment_request_selector.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_event.rb b/lib/volcano/generated/lib/volcano-generated/models/log_event.rb index 27a2d406..7e294277 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_event.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_event.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_event_body.rb b/lib/volcano/generated/lib/volcano-generated/models/log_event_body.rb index ae09aa31..be620c81 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_event_body.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_event_body.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_frontend_request_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/log_frontend_request_resource.rb index ae5c9732..1cf1e4dd 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_frontend_request_resource.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_frontend_request_resource.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_function_request_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/log_function_request_resource.rb index fd1cf257..682a16c4 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_function_request_resource.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_function_request_resource.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_request_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/log_request_resource.rb index 7a42d92e..a11efe9b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_request_resource.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_request_resource.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -20,6 +20,7 @@ class << self # List of class defined in oneOf (OpenAPI v3) def openapi_one_of [ + :'LogAppRequestResource', :'LogDatabaseRequestResource', :'LogFrontendRequestResource', :'LogFunctionRequestResource' @@ -34,6 +35,7 @@ def openapi_discriminator_name # Discriminator's mapping (OpenAPI v3) def openapi_discriminator_mapping { + :'app' => :'LogAppRequestResource', :'database' => :'LogDatabaseRequestResource', :'frontend' => :'LogFrontendRequestResource', :'function' => :'LogFunctionRequestResource' diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/log_resource.rb index 7039c782..ca351601 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_resource.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_resource.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -19,10 +19,10 @@ class LogResource < ApiModelBase # Resource type that owns the log event. attr_accessor :type - # Resource ID that owns the log event. + # Resource ID that owns the log event. For type `app`, the ID is UUIDv5(`7374f5e9-35ff-4e46-ac13-a4717bae00e1`, slug), with the app's slug as UTF-8 bytes; the Builder (`builder`) is `b52fc8fa-8656-5141-adef-99d698ce6f3c`. attr_accessor :id - # Resource name associated with the log event, when available. + # Resource name associated with the log event, when available. For type `app`, the app's slug, such as `builder`. attr_accessor :name class EnumAttributeValidator @@ -135,7 +135,7 @@ def list_invalid_properties def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @type.nil? - type_validator = EnumAttributeValidator.new('String', ["function", "frontend", "database"]) + type_validator = EnumAttributeValidator.new('String', ["function", "frontend", "database", "app"]) return false unless type_validator.valid?(@type) return false if @id.nil? true @@ -144,7 +144,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["function", "frontend", "database"]) + validator = EnumAttributeValidator.new('String', ["function", "frontend", "database", "app"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_search_event.rb b/lib/volcano/generated/lib/volcano-generated/models/log_search_event.rb index f32a474a..41aa766f 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_search_event.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_search_event.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_search_request.rb b/lib/volcano/generated/lib/volcano-generated/models/log_search_request.rb index 297c7314..d3284b6e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_search_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_search_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_search_response.rb b/lib/volcano/generated/lib/volcano-generated/models/log_search_response.rb index 8530e615..efb70f71 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_search_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_search_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/log_stream_request.rb b/lib/volcano/generated/lib/volcano-generated/models/log_stream_request.rb index db242984..10ccb21e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/log_stream_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/log_stream_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/managed_project_config_frontend_custom_domain_tls_config.rb b/lib/volcano/generated/lib/volcano-generated/models/managed_project_config_frontend_custom_domain_tls_config.rb index 4fc8ddfc..ce511027 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/managed_project_config_frontend_custom_domain_tls_config.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/managed_project_config_frontend_custom_domain_tls_config.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/metric_usage_data.rb b/lib/volcano/generated/lib/volcano-generated/models/metric_usage_data.rb index 17aa38b2..08537f4a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/metric_usage_data.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/metric_usage_data.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_autofix_settings_request.rb b/lib/volcano/generated/lib/volcano-generated/models/notification_email_settings.rb similarity index 63% rename from lib/volcano/generated/lib/volcano-generated/models/update_autofix_settings_request.rb rename to lib/volcano/generated/lib/volcano-generated/models/notification_email_settings.rb index edd54773..2b513b44 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_autofix_settings_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/notification_email_settings.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -14,19 +14,14 @@ require 'time' module Volcano::Generated - class UpdateAutofixSettingsRequest < ApiModelBase + class NotificationEmailSettings < ApiModelBase + # Whether alerts are emailed. attr_accessor :enabled - attr_accessor :max_stage + # Empty. Alerts are emailed to the project owner's verified account email address, the only recipient supported. + attr_accessor :recipients - attr_accessor :auto_trigger - - attr_accessor :provider - - attr_accessor :model - - # Your own API key for `provider`, such as an Anthropic key for `anthropic`. Omit it to keep the stored key. Encrypted at rest and never returned. - attr_accessor :api_key + attr_accessor :status class EnumAttributeValidator attr_reader :datatype @@ -54,11 +49,8 @@ def valid?(value) def self.attribute_map { :'enabled' => :'enabled', - :'max_stage' => :'max_stage', - :'auto_trigger' => :'auto_trigger', - :'provider' => :'provider', - :'model' => :'model', - :'api_key' => :'api_key' + :'recipients' => :'recipients', + :'status' => :'status' } end @@ -76,11 +68,8 @@ def self.acceptable_attributes def self.openapi_types { :'enabled' => :'Boolean', - :'max_stage' => :'AutofixStage', - :'auto_trigger' => :'Boolean', - :'provider' => :'AutofixProvider', - :'model' => :'AutofixModel', - :'api_key' => :'String' + :'recipients' => :'Array', + :'status' => :'NotificationEmailStatus' } end @@ -94,14 +83,14 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::UpdateAutofixSettingsRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::NotificationEmailSettings` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::UpdateAutofixSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::NotificationEmailSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } @@ -112,26 +101,18 @@ def initialize(attributes = {}) self.enabled = nil end - if attributes.key?(:'max_stage') - self.max_stage = attributes[:'max_stage'] - end - - if attributes.key?(:'auto_trigger') - self.auto_trigger = attributes[:'auto_trigger'] + if attributes.key?(:'recipients') + if (value = attributes[:'recipients']).is_a?(Array) + self.recipients = value + end else - self.auto_trigger = false - end - - if attributes.key?(:'provider') - self.provider = attributes[:'provider'] - end - - if attributes.key?(:'model') - self.model = attributes[:'model'] + self.recipients = nil end - if attributes.key?(:'api_key') - self.api_key = attributes[:'api_key'] + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil end end @@ -144,17 +125,16 @@ def list_invalid_properties invalid_properties.push('invalid value for "enabled", enabled cannot be nil.') end - if !@api_key.nil? && @api_key.to_s.length > 512 - invalid_properties.push('invalid value for "api_key", the character length must be smaller than or equal to 512.') + if @recipients.nil? + invalid_properties.push('invalid value for "recipients", recipients cannot be nil.') end - if !@api_key.nil? && @api_key.to_s.length < 20 - invalid_properties.push('invalid value for "api_key", the character length must be greater than or equal to 20.') + if @recipients.length > 10 + invalid_properties.push('invalid value for "recipients", number of items must be less than or equal to 10.') end - pattern = Regexp.new(/^[!-~]+$/) - if !@api_key.nil? && @api_key !~ pattern - invalid_properties.push("invalid value for \"api_key\", must conform to the pattern #{pattern}.") + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') end invalid_properties @@ -165,9 +145,9 @@ def list_invalid_properties def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @enabled.nil? - return false if !@api_key.nil? && @api_key.to_s.length > 512 - return false if !@api_key.nil? && @api_key.to_s.length < 20 - return false if !@api_key.nil? && @api_key !~ Regexp.new(/^[!-~]+$/) + return false if @recipients.nil? + return false if @recipients.length > 10 + return false if @status.nil? true end @@ -182,26 +162,27 @@ def enabled=(enabled) end # Custom attribute writer method with validation - # @param [Object] api_key Value to be assigned - def api_key=(api_key) - if api_key.nil? - fail ArgumentError, 'api_key cannot be nil' + # @param [Object] recipients Value to be assigned + def recipients=(recipients) + if recipients.nil? + fail ArgumentError, 'recipients cannot be nil' end - if api_key.to_s.length > 512 - fail ArgumentError, 'invalid value for "api_key", the character length must be smaller than or equal to 512.' + if recipients.length > 10 + fail ArgumentError, 'invalid value for "recipients", number of items must be less than or equal to 10.' end - if api_key.to_s.length < 20 - fail ArgumentError, 'invalid value for "api_key", the character length must be greater than or equal to 20.' - end + @recipients = recipients + end - pattern = Regexp.new(/^[!-~]+$/) - if api_key !~ pattern - fail ArgumentError, "invalid value for \"api_key\", must conform to the pattern #{pattern}." + # Custom attribute writer method with validation + # @param [Object] status Value to be assigned + def status=(status) + if status.nil? + fail ArgumentError, 'status cannot be nil' end - @api_key = api_key + @status = status end # Checks equality by comparing each attribute. @@ -210,11 +191,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && enabled == o.enabled && - max_stage == o.max_stage && - auto_trigger == o.auto_trigger && - provider == o.provider && - model == o.model && - api_key == o.api_key + recipients == o.recipients && + status == o.status end # @see the `==` method @@ -226,7 +204,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [enabled, max_stage, auto_trigger, provider, model, api_key].hash + [enabled, recipients, status].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/notification_email_status.rb b/lib/volcano/generated/lib/volcano-generated/models/notification_email_status.rb new file mode 100644 index 00000000..5c8fad4c --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/notification_email_status.rb @@ -0,0 +1,41 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class NotificationEmailStatus + DELIVERING = "delivering".freeze + DISABLED = "disabled".freeze + OWNER_EMAIL_UNVERIFIED = "owner_email_unverified".freeze + + def self.all_vars + @all_vars ||= [DELIVERING, DISABLED, OWNER_EMAIL_UNVERIFIED].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if NotificationEmailStatus.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #NotificationEmailStatus" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/notification_settings.rb b/lib/volcano/generated/lib/volcano-generated/models/notification_settings.rb new file mode 100644 index 00000000..19e59544 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/notification_settings.rb @@ -0,0 +1,252 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class NotificationSettings < ApiModelBase + attr_accessor :project_id + + attr_accessor :email + + attr_accessor :webhook + + attr_accessor :scheduler_failures + + # When the settings were last saved. Absent until the first save. + attr_accessor :updated_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'project_id' => :'project_id', + :'email' => :'email', + :'webhook' => :'webhook', + :'scheduler_failures' => :'scheduler_failures', + :'updated_at' => :'updated_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'project_id' => :'String', + :'email' => :'NotificationEmailSettings', + :'webhook' => :'NotificationWebhookSettings', + :'scheduler_failures' => :'SchedulerFailureAlertPolicy', + :'updated_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::NotificationSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::NotificationSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + else + self.email = nil + end + + if attributes.key?(:'webhook') + self.webhook = attributes[:'webhook'] + else + self.webhook = nil + end + + if attributes.key?(:'scheduler_failures') + self.scheduler_failures = attributes[:'scheduler_failures'] + else + self.scheduler_failures = nil + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @email.nil? + invalid_properties.push('invalid value for "email", email cannot be nil.') + end + + if @webhook.nil? + invalid_properties.push('invalid value for "webhook", webhook cannot be nil.') + end + + if @scheduler_failures.nil? + invalid_properties.push('invalid value for "scheduler_failures", scheduler_failures cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + return false if @email.nil? + return false if @webhook.nil? + return false if @scheduler_failures.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] email Value to be assigned + def email=(email) + if email.nil? + fail ArgumentError, 'email cannot be nil' + end + + @email = email + end + + # Custom attribute writer method with validation + # @param [Object] webhook Value to be assigned + def webhook=(webhook) + if webhook.nil? + fail ArgumentError, 'webhook cannot be nil' + end + + @webhook = webhook + end + + # Custom attribute writer method with validation + # @param [Object] scheduler_failures Value to be assigned + def scheduler_failures=(scheduler_failures) + if scheduler_failures.nil? + fail ArgumentError, 'scheduler_failures cannot be nil' + end + + @scheduler_failures = scheduler_failures + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + project_id == o.project_id && + email == o.email && + webhook == o.webhook && + scheduler_failures == o.scheduler_failures && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [project_id, email, webhook, scheduler_failures, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/notification_test_delivery.rb b/lib/volcano/generated/lib/volcano-generated/models/notification_test_delivery.rb new file mode 100644 index 00000000..ce0bd51f --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/notification_test_delivery.rb @@ -0,0 +1,234 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class NotificationTestDelivery < ApiModelBase + attr_accessor :channel + + attr_accessor :delivered + + # The webhook's response status. Absent for email, and when no response arrived. + attr_accessor :status_code + + # Why the delivery failed. Absent when it arrived. + attr_accessor :error + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'channel' => :'channel', + :'delivered' => :'delivered', + :'status_code' => :'status_code', + :'error' => :'error' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'channel' => :'String', + :'delivered' => :'Boolean', + :'status_code' => :'Integer', + :'error' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::NotificationTestDelivery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::NotificationTestDelivery`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'channel') + self.channel = attributes[:'channel'] + else + self.channel = nil + end + + if attributes.key?(:'delivered') + self.delivered = attributes[:'delivered'] + else + self.delivered = nil + end + + if attributes.key?(:'status_code') + self.status_code = attributes[:'status_code'] + end + + if attributes.key?(:'error') + self.error = attributes[:'error'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @channel.nil? + invalid_properties.push('invalid value for "channel", channel cannot be nil.') + end + + if @delivered.nil? + invalid_properties.push('invalid value for "delivered", delivered cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @channel.nil? + channel_validator = EnumAttributeValidator.new('String', ["email", "webhook"]) + return false unless channel_validator.valid?(@channel) + return false if @delivered.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] channel Object to be assigned + def channel=(channel) + validator = EnumAttributeValidator.new('String', ["email", "webhook"]) + unless validator.valid?(channel) + fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}." + end + @channel = channel + end + + # Custom attribute writer method with validation + # @param [Object] delivered Value to be assigned + def delivered=(delivered) + if delivered.nil? + fail ArgumentError, 'delivered cannot be nil' + end + + @delivered = delivered + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + channel == o.channel && + delivered == o.delivered && + status_code == o.status_code && + error == o.error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [channel, delivered, status_code, error].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/notification_test_result.rb b/lib/volcano/generated/lib/volcano-generated/models/notification_test_result.rb new file mode 100644 index 00000000..836a840d --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/notification_test_result.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class NotificationTestResult < ApiModelBase + attr_accessor :deliveries + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'deliveries' => :'deliveries' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'deliveries' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::NotificationTestResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::NotificationTestResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'deliveries') + if (value = attributes[:'deliveries']).is_a?(Array) + self.deliveries = value + end + else + self.deliveries = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @deliveries.nil? + invalid_properties.push('invalid value for "deliveries", deliveries cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @deliveries.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] deliveries Value to be assigned + def deliveries=(deliveries) + if deliveries.nil? + fail ArgumentError, 'deliveries cannot be nil' + end + + @deliveries = deliveries + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + deliveries == o.deliveries + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [deliveries].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/notification_webhook_settings.rb b/lib/volcano/generated/lib/volcano-generated/models/notification_webhook_settings.rb new file mode 100644 index 00000000..d407b759 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/notification_webhook_settings.rb @@ -0,0 +1,185 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class NotificationWebhookSettings < ApiModelBase + # Where alerts are posted. Absent when no webhook is configured. + attr_accessor :url + + # Whether a signing secret is set. The secret itself is returned only once. + attr_accessor :secret_configured + + # The signing secret, starting with `whsec_`. Present only in the response that generated it: the update that first set `url`, or a rotation. Store it then; it cannot be read again. + attr_accessor :secret + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'url' => :'url', + :'secret_configured' => :'secret_configured', + :'secret' => :'secret' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'url' => :'String', + :'secret_configured' => :'Boolean', + :'secret' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::NotificationWebhookSettings` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::NotificationWebhookSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + + if attributes.key?(:'secret_configured') + self.secret_configured = attributes[:'secret_configured'] + else + self.secret_configured = nil + end + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @secret_configured.nil? + invalid_properties.push('invalid value for "secret_configured", secret_configured cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @secret_configured.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] secret_configured Value to be assigned + def secret_configured=(secret_configured) + if secret_configured.nil? + fail ArgumentError, 'secret_configured cannot be nil' + end + + @secret_configured = secret_configured + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + url == o.url && + secret_configured == o.secret_configured && + secret == o.secret + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [url, secret_configured, secret].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/o_auth_config.rb b/lib/volcano/generated/lib/volcano-generated/models/o_auth_config.rb index 53b1fe84..ecb3b1ac 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/o_auth_config.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/o_auth_config.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/o_auth_error_response.rb b/lib/volcano/generated/lib/volcano-generated/models/o_auth_error_response.rb index 3d3c9850..fbcb793c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/o_auth_error_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/o_auth_error_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/open_durable_message_session_request.rb b/lib/volcano/generated/lib/volcano-generated/models/open_durable_message_session_request.rb index f7f5eb83..4b071394 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/open_durable_message_session_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/open_durable_message_session_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_auth_users.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_auth_users.rb index 2b6232eb..c18a547e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_auth_users.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_auth_users.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_databases.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_databases.rb index 3e0aa465..a108026d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_databases.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_databases.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_durable_approvals.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_durable_approvals.rb index e9dffcc1..e1514f2a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_durable_approvals.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_durable_approvals.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_durable_executions.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_durable_executions.rb index 1c731c52..cd4dacc4 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_durable_executions.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_durable_executions.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_durable_functions.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_durable_functions.rb index 01597d99..ae9abbe9 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_durable_functions.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_durable_functions.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_frontend_deployments.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_frontend_deployments.rb index ec114b48..6027bff3 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_frontend_deployments.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_frontend_deployments.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_frontends.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_frontends.rb index b21c8742..355bd4ff 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_frontends.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_frontends.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_function_deployments.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_function_deployments.rb index 24fadc35..90ba6ce4 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_function_deployments.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_function_deployments.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_functions.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_functions.rb index afb0460c..62704018 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_functions.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_functions.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_git_deployment_runs.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_git_deployment_runs.rb new file mode 100644 index 00000000..ad995751 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_git_deployment_runs.rb @@ -0,0 +1,230 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class PaginatedGitDeploymentRuns < ApiModelBase + attr_accessor :data + + # Number of items per page + attr_accessor :limit + + # Whether a next page exists + attr_accessor :has_more + + # Opaque cursor for the next page (present if has_more is true) + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data', + :'limit' => :'limit', + :'has_more' => :'has_more', + :'next_cursor' => :'next_cursor' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array', + :'limit' => :'Integer', + :'has_more' => :'Boolean', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::PaginatedGitDeploymentRuns` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::PaginatedGitDeploymentRuns`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + else + self.data = nil + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + else + self.limit = nil + end + + if attributes.key?(:'has_more') + self.has_more = attributes[:'has_more'] + else + self.has_more = nil + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @data.nil? + invalid_properties.push('invalid value for "data", data cannot be nil.') + end + + if @limit.nil? + invalid_properties.push('invalid value for "limit", limit cannot be nil.') + end + + if @has_more.nil? + invalid_properties.push('invalid value for "has_more", has_more cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @data.nil? + return false if @limit.nil? + return false if @has_more.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] data Value to be assigned + def data=(data) + if data.nil? + fail ArgumentError, 'data cannot be nil' + end + + @data = data + end + + # Custom attribute writer method with validation + # @param [Object] limit Value to be assigned + def limit=(limit) + if limit.nil? + fail ArgumentError, 'limit cannot be nil' + end + + @limit = limit + end + + # Custom attribute writer method with validation + # @param [Object] has_more Value to be assigned + def has_more=(has_more) + if has_more.nil? + fail ArgumentError, 'has_more cannot be nil' + end + + @has_more = has_more + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + limit == o.limit && + has_more == o.has_more && + next_cursor == o.next_cursor + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data, limit, has_more, next_cursor].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_issues.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_issues.rb index 15e35742..4655b231 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_issues.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_issues.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_lavaflow_runs.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_lavaflow_runs.rb new file mode 100644 index 00000000..e30d638c --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_lavaflow_runs.rb @@ -0,0 +1,240 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class PaginatedLavaflowRuns < ApiModelBase + attr_accessor :data + + # Number of items per page + attr_accessor :limit + + # Whether a next page exists + attr_accessor :has_more + + # Opaque cursor for the next page, present if has_more is true. It works only for the same project_id, caller and order. + attr_accessor :next_cursor + + # Present with `include=counts`. + attr_accessor :counts + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data', + :'limit' => :'limit', + :'has_more' => :'has_more', + :'next_cursor' => :'next_cursor', + :'counts' => :'counts' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array', + :'limit' => :'Integer', + :'has_more' => :'Boolean', + :'next_cursor' => :'String', + :'counts' => :'LavaflowRunCounts' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::PaginatedLavaflowRuns` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::PaginatedLavaflowRuns`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + else + self.data = nil + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + else + self.limit = nil + end + + if attributes.key?(:'has_more') + self.has_more = attributes[:'has_more'] + else + self.has_more = nil + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + end + + if attributes.key?(:'counts') + self.counts = attributes[:'counts'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @data.nil? + invalid_properties.push('invalid value for "data", data cannot be nil.') + end + + if @limit.nil? + invalid_properties.push('invalid value for "limit", limit cannot be nil.') + end + + if @has_more.nil? + invalid_properties.push('invalid value for "has_more", has_more cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @data.nil? + return false if @limit.nil? + return false if @has_more.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] data Value to be assigned + def data=(data) + if data.nil? + fail ArgumentError, 'data cannot be nil' + end + + @data = data + end + + # Custom attribute writer method with validation + # @param [Object] limit Value to be assigned + def limit=(limit) + if limit.nil? + fail ArgumentError, 'limit cannot be nil' + end + + @limit = limit + end + + # Custom attribute writer method with validation + # @param [Object] has_more Value to be assigned + def has_more=(has_more) + if has_more.nil? + fail ArgumentError, 'has_more cannot be nil' + end + + @has_more = has_more + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + limit == o.limit && + has_more == o.has_more && + next_cursor == o.next_cursor && + counts == o.counts + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data, limit, has_more, next_cursor, counts].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_lavaflow_scans.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_lavaflow_scans.rb new file mode 100644 index 00000000..b2678070 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_lavaflow_scans.rb @@ -0,0 +1,230 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class PaginatedLavaflowScans < ApiModelBase + attr_accessor :data + + # Number of items per page + attr_accessor :limit + + # Whether a next page exists + attr_accessor :has_more + + # Opaque cursor for the next page, present if has_more is true. It works only for the same project_id and caller. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data', + :'limit' => :'limit', + :'has_more' => :'has_more', + :'next_cursor' => :'next_cursor' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array', + :'limit' => :'Integer', + :'has_more' => :'Boolean', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::PaginatedLavaflowScans` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::PaginatedLavaflowScans`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + else + self.data = nil + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + else + self.limit = nil + end + + if attributes.key?(:'has_more') + self.has_more = attributes[:'has_more'] + else + self.has_more = nil + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @data.nil? + invalid_properties.push('invalid value for "data", data cannot be nil.') + end + + if @limit.nil? + invalid_properties.push('invalid value for "limit", limit cannot be nil.') + end + + if @has_more.nil? + invalid_properties.push('invalid value for "has_more", has_more cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @data.nil? + return false if @limit.nil? + return false if @has_more.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] data Value to be assigned + def data=(data) + if data.nil? + fail ArgumentError, 'data cannot be nil' + end + + @data = data + end + + # Custom attribute writer method with validation + # @param [Object] limit Value to be assigned + def limit=(limit) + if limit.nil? + fail ArgumentError, 'limit cannot be nil' + end + + @limit = limit + end + + # Custom attribute writer method with validation + # @param [Object] has_more Value to be assigned + def has_more=(has_more) + if has_more.nil? + fail ArgumentError, 'has_more cannot be nil' + end + + @has_more = has_more + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + limit == o.limit && + has_more == o.has_more && + next_cursor == o.next_cursor + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data, limit, has_more, next_cursor].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_project_access_tokens.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_project_access_tokens.rb index 23bb5875..bcad3e11 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_project_access_tokens.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_project_access_tokens.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_project_custom_domains.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_project_custom_domains.rb index 58f3d2d6..65fc10e1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_project_custom_domains.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_project_custom_domains.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_project_deployments.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_project_deployments.rb index 3ad1f9b2..8f6d03b7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_project_deployments.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_project_deployments.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_projects.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_projects.rb index b0111666..3d59c44c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_projects.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_projects.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_service_keys.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_service_keys.rb index fb4c60b0..08fc88d1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_service_keys.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_service_keys.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_share_releases.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_share_releases.rb new file mode 100644 index 00000000..e6351b39 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_share_releases.rb @@ -0,0 +1,230 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class PaginatedShareReleases < ApiModelBase + attr_accessor :data + + # Number of items per page + attr_accessor :limit + + # Whether a next page exists + attr_accessor :has_more + + # Opaque cursor for the next page, present if has_more is true. It works only for the same share_id and limit. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data', + :'limit' => :'limit', + :'has_more' => :'has_more', + :'next_cursor' => :'next_cursor' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array', + :'limit' => :'Integer', + :'has_more' => :'Boolean', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::PaginatedShareReleases` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::PaginatedShareReleases`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + else + self.data = nil + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + else + self.limit = nil + end + + if attributes.key?(:'has_more') + self.has_more = attributes[:'has_more'] + else + self.has_more = nil + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @data.nil? + invalid_properties.push('invalid value for "data", data cannot be nil.') + end + + if @limit.nil? + invalid_properties.push('invalid value for "limit", limit cannot be nil.') + end + + if @has_more.nil? + invalid_properties.push('invalid value for "has_more", has_more cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @data.nil? + return false if @limit.nil? + return false if @has_more.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] data Value to be assigned + def data=(data) + if data.nil? + fail ArgumentError, 'data cannot be nil' + end + + @data = data + end + + # Custom attribute writer method with validation + # @param [Object] limit Value to be assigned + def limit=(limit) + if limit.nil? + fail ArgumentError, 'limit cannot be nil' + end + + @limit = limit + end + + # Custom attribute writer method with validation + # @param [Object] has_more Value to be assigned + def has_more=(has_more) + if has_more.nil? + fail ArgumentError, 'has_more cannot be nil' + end + + @has_more = has_more + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + limit == o.limit && + has_more == o.has_more && + next_cursor == o.next_cursor + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data, limit, has_more, next_cursor].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_storage_buckets.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_storage_buckets.rb index 26beecde..b155db22 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_storage_buckets.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_storage_buckets.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/paginated_variables.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_variables.rb index 5cdb618d..13ed2967 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/paginated_variables.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_variables.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/platform_exchange_response.rb b/lib/volcano/generated/lib/volcano-generated/models/platform_exchange_response.rb index feaf1f01..d2eeec1e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/platform_exchange_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/platform_exchange_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/preview_auth_page_request.rb b/lib/volcano/generated/lib/volcano-generated/models/preview_auth_page_request.rb index 5c392e8f..7cd1df0a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/preview_auth_page_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/preview_auth_page_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/preview_auth_page_response.rb b/lib/volcano/generated/lib/volcano-generated/models/preview_auth_page_response.rb index 0c3878e7..0edc30f8 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/preview_auth_page_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/preview_auth_page_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project.rb b/lib/volcano/generated/lib/volcano-generated/models/project.rb index 2b9340fd..19e90228 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_access_token.rb b/lib/volcano/generated/lib/volcano-generated/models/project_access_token.rb index 3fc43efd..9b414648 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_access_token.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_access_token.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -101,7 +101,7 @@ def self.openapi_types :'project_id' => :'String', :'name' => :'String', :'token_prefix' => :'String', - :'scope' => :'ProjectAccessTokenScope', + :'scope' => :'ProjectAccessTokenListedScope', :'status' => :'String', :'token_source' => :'String', :'expires_at' => :'Time', diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_access_token_listed_scope.rb b/lib/volcano/generated/lib/volcano-generated/models/project_access_token_listed_scope.rb new file mode 100644 index 00000000..32aa9d5c --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/project_access_token_listed_scope.rb @@ -0,0 +1,41 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ProjectAccessTokenListedScope + ProjectAccessTokenListedScopeFull = "full".freeze + ProjectAccessTokenListedScopeReadOnly = "read_only".freeze + ProjectAccessTokenListedScopeDelegated = "delegated".freeze + + def self.all_vars + @all_vars ||= [ProjectAccessTokenListedScopeFull, ProjectAccessTokenListedScopeReadOnly, ProjectAccessTokenListedScopeDelegated].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if ProjectAccessTokenListedScope.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #ProjectAccessTokenListedScope" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_access_token_scope.rb b/lib/volcano/generated/lib/volcano-generated/models/project_access_token_scope.rb index 2aee7db4..fb6fbc44 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_access_token_scope.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_access_token_scope.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_access_token_usage.rb b/lib/volcano/generated/lib/volcano-generated/models/project_access_token_usage.rb index f3d8b67b..49fbba66 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_access_token_usage.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_access_token_usage.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_access_token_usage_daily_entry.rb b/lib/volcano/generated/lib/volcano-generated/models/project_access_token_usage_daily_entry.rb index e06a74b6..78604cc5 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_access_token_usage_daily_entry.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_access_token_usage_daily_entry.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config.rb index d1c516ab..df0a6323 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -36,7 +36,10 @@ class ProjectConfig < ApiModelBase attr_accessor :realtime - attr_accessor :autofix + # Ignored. The manifest doesn't configure LavaFlow. A manifest that still declares this section applies as before, without it, and the result reports it as `unchanged` with a notice. Export never includes it. + attr_accessor :lavaflow + + attr_accessor :notifications attr_accessor :auth @@ -80,7 +83,8 @@ def self.attribute_map :'variables' => :'variables', :'buckets' => :'buckets', :'realtime' => :'realtime', - :'autofix' => :'autofix', + :'lavaflow' => :'lavaflow', + :'notifications' => :'notifications', :'auth' => :'auth', :'functions' => :'functions', :'frontends' => :'frontends', @@ -109,7 +113,8 @@ def self.openapi_types :'variables' => :'Array', :'buckets' => :'Array', :'realtime' => :'ProjectConfigRealtime', - :'autofix' => :'ProjectConfigAutofix', + :'lavaflow' => :'Object', + :'notifications' => :'ProjectConfigNotifications', :'auth' => :'ProjectConfigAuth', :'functions' => :'Array', :'frontends' => :'Array', @@ -183,8 +188,12 @@ def initialize(attributes = {}) self.realtime = attributes[:'realtime'] end - if attributes.key?(:'autofix') - self.autofix = attributes[:'autofix'] + if attributes.key?(:'lavaflow') + self.lavaflow = attributes[:'lavaflow'] + end + + if attributes.key?(:'notifications') + self.notifications = attributes[:'notifications'] end if attributes.key?(:'auth') @@ -275,7 +284,8 @@ def ==(o) variables == o.variables && buckets == o.buckets && realtime == o.realtime && - autofix == o.autofix && + lavaflow == o.lavaflow && + notifications == o.notifications && auth == o.auth && functions == o.functions && frontends == o.frontends && @@ -291,7 +301,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [version, project, databases, shared_variables, frontend_shared_variables, variables, buckets, realtime, autofix, auth, functions, frontends, sandboxes].hash + [version, project, databases, shared_variables, frontend_shared_variables, variables, buckets, realtime, lavaflow, notifications, auth, functions, frontends, sandboxes].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_result.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_result.rb index b136d268..735b4478 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_result.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_result.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_result_entry.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_result_entry.rb index fac663d8..ce76c000 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_result_entry.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_result_entry.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -26,6 +26,9 @@ class ProjectConfigApplyResultEntry < ApiModelBase # Error detail when action is `error`. attr_accessor :error + # Machine-readable reason for a `notice`, when it has one. Clients must accept codes not listed here. `function_served_by_candidate` - a promoted preview serves the function and keeps the variables it was built with, so the apply did not synchronize the function's variables; the entry's action is `unchanged`, and the rest of the apply succeeded. + attr_accessor :code + # Optional operational note (e.g. disabling realtime drops active connections). attr_accessor :notice @@ -58,6 +61,7 @@ def self.attribute_map :'name' => :'name', :'action' => :'action', :'error' => :'error', + :'code' => :'code', :'notice' => :'notice' } end @@ -79,6 +83,7 @@ def self.openapi_types :'name' => :'String', :'action' => :'String', :'error' => :'String', + :'code' => :'String', :'notice' => :'String' } end @@ -125,6 +130,10 @@ def initialize(attributes = {}) self.error = attributes[:'error'] end + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + if attributes.key?(:'notice') self.notice = attributes[:'notice'] end @@ -186,6 +195,7 @@ def ==(o) name == o.name && action == o.action && error == o.error && + code == o.code && notice == o.notice end @@ -198,7 +208,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [section, name, action, error, notice].hash + [section, name, action, error, code, notice].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_summary.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_summary.rb index 8d622930..66a25dd7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_summary.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_summary.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth.rb index 1abfd93f..6f4edacd 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_cors.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_cors.rb index 23b841db..b5dddbf7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_cors.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_cors.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -23,13 +23,17 @@ class ProjectConfigAuthCORS < ApiModelBase attr_accessor :max_age + # Allow the origins of the project's own live frontend previews. + attr_accessor :allow_frontend_previews + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'enabled' => :'enabled', :'allowed_origins' => :'allowed_origins', :'allow_credentials' => :'allow_credentials', - :'max_age' => :'max_age' + :'max_age' => :'max_age', + :'allow_frontend_previews' => :'allow_frontend_previews' } end @@ -49,7 +53,8 @@ def self.openapi_types :'enabled' => :'Boolean', :'allowed_origins' => :'Array', :'allow_credentials' => :'Boolean', - :'max_age' => :'Integer' + :'max_age' => :'Integer', + :'allow_frontend_previews' => :'Boolean' } end @@ -92,6 +97,10 @@ def initialize(attributes = {}) if attributes.key?(:'max_age') self.max_age = attributes[:'max_age'] end + + if attributes.key?(:'allow_frontend_previews') + self.allow_frontend_previews = attributes[:'allow_frontend_previews'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -117,7 +126,8 @@ def ==(o) enabled == o.enabled && allowed_origins == o.allowed_origins && allow_credentials == o.allow_credentials && - max_age == o.max_age + max_age == o.max_age && + allow_frontend_previews == o.allow_frontend_previews end # @see the `==` method @@ -129,7 +139,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [enabled, allowed_origins, allow_credentials, max_age].hash + [enabled, allowed_origins, allow_credentials, max_age, allow_frontend_previews].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email.rb index 999e549f..76ce24c9 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_from.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_from.rb index 78782a8a..76116345 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_from.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_from.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -15,8 +15,10 @@ module Volcano::Generated class ProjectConfigAuthEmailFrom < ApiModelBase + # Sender email address. New or changed values containing carriage returns or newlines return 422. Unchanged exported values are preserved. attr_accessor :address + # Sender display name; supports punctuation and Unicode. New or changed values containing carriage returns or newlines return 422. Unchanged exported values are preserved. attr_accessor :name # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_password_provider.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_password_provider.rb index 280b51b3..55ed5473 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_password_provider.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_password_provider.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_smtp.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_smtp.rb index 8e9cbbbc..a04a2cae 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_smtp.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_smtp.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_verification.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_verification.rb index 08e37231..54cec058 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_verification.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_verification.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_managed_pages.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_managed_pages.rb index 0ee506b2..1262df2d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_managed_pages.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_managed_pages.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_page_appearance.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_page_appearance.rb index 6b633f9e..f610f022 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_page_appearance.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_page_appearance.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_page_layouts.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_page_layouts.rb index 1899c165..8d2dbdb0 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_page_layouts.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_page_layouts.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_password.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_password.rb index a284403d..268e8879 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_password.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_password.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_password_reset.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_password_reset.rb index b91f2658..1535c6cf 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_password_reset.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_password_reset.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_providers.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_providers.rb index d70471bf..fc00b86d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_providers.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_providers.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_rate_limits.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_rate_limits.rb index 165b90e9..3bb1aea1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_rate_limits.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_rate_limits.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_redirects.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_redirects.rb index 677ad6ad..f637da3a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_redirects.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_redirects.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_sessions.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_sessions.rb index 622a75b5..02882810 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_sessions.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_sessions.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_signup.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_signup.rb index 0ec4cbb7..8a983b56 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_signup.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_signup.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_tokens.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_tokens.rb index 51536f7f..81481a11 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_tokens.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_tokens.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_bucket.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_bucket.rb index a57d68a8..b0f07b28 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_bucket.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_bucket.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_bucket_policy.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_bucket_policy.rb index 27184954..c7fb7199 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_bucket_policy.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_bucket_policy.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain.rb index cfbc3495..ce415ed1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain_redirect.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain_redirect.rb new file mode 100644 index 00000000..7fe0a253 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain_redirect.rb @@ -0,0 +1,228 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ProjectConfigCustomDomainRedirect < ApiModelBase + # Another domain in the same `custom_domains` list, without `redirect`. + attr_accessor :to + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'to' => :'to', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'to' => :'String', + :'status' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ProjectConfigCustomDomainRedirect` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ProjectConfigCustomDomainRedirect`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'to') + self.to = attributes[:'to'] + else + self.to = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = STATUS::N308 + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @to.nil? + invalid_properties.push('invalid value for "to", to cannot be nil.') + end + + if @to.to_s.length > 253 + invalid_properties.push('invalid value for "to", the character length must be smaller than or equal to 253.') + end + + if @to.to_s.length < 1 + invalid_properties.push('invalid value for "to", the character length must be greater than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @to.nil? + return false if @to.to_s.length > 253 + return false if @to.to_s.length < 1 + status_validator = EnumAttributeValidator.new('Integer', [301, 302, 307, 308]) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method with validation + # @param [Object] to Value to be assigned + def to=(to) + if to.nil? + fail ArgumentError, 'to cannot be nil' + end + + if to.to_s.length > 253 + fail ArgumentError, 'invalid value for "to", the character length must be smaller than or equal to 253.' + end + + if to.to_s.length < 1 + fail ArgumentError, 'invalid value for "to", the character length must be greater than or equal to 1.' + end + + @to = to + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('Integer', [301, 302, 307, 308]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + to == o.to && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [to, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_database.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_database.rb index 0858016e..ebec9bb7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_database.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_database.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_email_template.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_email_template.rb index 279c583c..26182a0d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_email_template.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_email_template.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -15,6 +15,7 @@ module Volcano::Generated class ProjectConfigEmailTemplate < ApiModelBase + # Subject template. For new or changed values, literal interior carriage returns or newlines after Go template whitespace trimming return 422. Outer whitespace and trailing block-scalar newlines are allowed. Unchanged stored subjects are preserved. attr_accessor :subject # HTML body. Max 256 KiB. SUPERAGENT plan required for custom bodies. diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_email_templates.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_email_templates.rb index 2004965a..5c1354b4 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_email_templates.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_email_templates.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend.rb index 40bc28f9..baf56049 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -14,7 +14,7 @@ require 'time' module Volcano::Generated - # Configuration for an existing (deployed) frontend. Frontends are never created or deleted through the manifest. A declared frontend entry without `custom_domain` deletes an existing custom domain. + # Configuration for an existing (deployed) frontend. Frontends are never created or deleted through the manifest. class ProjectConfigFrontend < ApiModelBase # All preserves access to all project variables. Shared includes the project frontend_shared_variables list. Scoped includes only explicitly declared variables in builds and runtime. Omission preserves the stored selection. attr_accessor :variable_scope @@ -24,11 +24,18 @@ class ProjectConfigFrontend < ApiModelBase attr_accessor :name + # The frontend's custom domain. Omission leaves an existing domain untouched; null deletes it. For a frontend with more than one domain, or a redirect, use `custom_domains`; an entry may not set both. attr_accessor :custom_domain + # Complete set of the frontend's custom domains when declared. Domains not listed are deleted; an empty list deletes all of them. Omission leaves existing domains untouched. More than one domain needs a plan that allows it. + attr_accessor :custom_domains + # Complete set of same-origin Function path mappings when declared. Omission preserves existing mappings; an empty list deletes all mappings. attr_accessor :function_routes + # Complete set of paths this frontend serves from another frontend in the project when declared. Omission preserves existing routes; an empty list deletes all of them. Function and Frontend routes share one path namespace and the 64-route limit. + attr_accessor :frontend_routes + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -58,7 +65,9 @@ def self.attribute_map :'variables' => :'variables', :'name' => :'name', :'custom_domain' => :'custom_domain', - :'function_routes' => :'function_routes' + :'custom_domains' => :'custom_domains', + :'function_routes' => :'function_routes', + :'frontend_routes' => :'frontend_routes' } end @@ -79,13 +88,16 @@ def self.openapi_types :'variables' => :'Array', :'name' => :'String', :'custom_domain' => :'ProjectConfigCustomDomain', - :'function_routes' => :'Array' + :'custom_domains' => :'Array', + :'function_routes' => :'Array', + :'frontend_routes' => :'Array' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'custom_domain', ]) end @@ -125,11 +137,23 @@ def initialize(attributes = {}) self.custom_domain = attributes[:'custom_domain'] end + if attributes.key?(:'custom_domains') + if (value = attributes[:'custom_domains']).is_a?(Array) + self.custom_domains = value + end + end + if attributes.key?(:'function_routes') if (value = attributes[:'function_routes']).is_a?(Array) self.function_routes = value end end + + if attributes.key?(:'frontend_routes') + if (value = attributes[:'frontend_routes']).is_a?(Array) + self.frontend_routes = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -145,10 +169,18 @@ def list_invalid_properties invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.') end + if !@custom_domains.nil? && @custom_domains.length > 100 + invalid_properties.push('invalid value for "custom_domains", number of items must be less than or equal to 100.') + end + if !@function_routes.nil? && @function_routes.length > 64 invalid_properties.push('invalid value for "function_routes", number of items must be less than or equal to 64.') end + if !@frontend_routes.nil? && @frontend_routes.length > 64 + invalid_properties.push('invalid value for "frontend_routes", number of items must be less than or equal to 64.') + end + invalid_properties end @@ -160,7 +192,9 @@ def valid? return false unless variable_scope_validator.valid?(@variable_scope) return false if @name.nil? return false if @name.to_s.length < 1 + return false if !@custom_domains.nil? && @custom_domains.length > 100 return false if !@function_routes.nil? && @function_routes.length > 64 + return false if !@frontend_routes.nil? && @frontend_routes.length > 64 true end @@ -198,6 +232,20 @@ def name=(name) @name = name end + # Custom attribute writer method with validation + # @param [Object] custom_domains Value to be assigned + def custom_domains=(custom_domains) + if custom_domains.nil? + fail ArgumentError, 'custom_domains cannot be nil' + end + + if custom_domains.length > 100 + fail ArgumentError, 'invalid value for "custom_domains", number of items must be less than or equal to 100.' + end + + @custom_domains = custom_domains + end + # Custom attribute writer method with validation # @param [Object] function_routes Value to be assigned def function_routes=(function_routes) @@ -212,6 +260,20 @@ def function_routes=(function_routes) @function_routes = function_routes end + # Custom attribute writer method with validation + # @param [Object] frontend_routes Value to be assigned + def frontend_routes=(frontend_routes) + if frontend_routes.nil? + fail ArgumentError, 'frontend_routes cannot be nil' + end + + if frontend_routes.length > 64 + fail ArgumentError, 'invalid value for "frontend_routes", number of items must be less than or equal to 64.' + end + + @frontend_routes = frontend_routes + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -221,7 +283,9 @@ def ==(o) variables == o.variables && name == o.name && custom_domain == o.custom_domain && - function_routes == o.function_routes + custom_domains == o.custom_domains && + function_routes == o.function_routes && + frontend_routes == o.frontend_routes end # @see the `==` method @@ -233,7 +297,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [variable_scope, variables, name, custom_domain, function_routes].hash + [variable_scope, variables, name, custom_domain, custom_domains, function_routes, frontend_routes].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_custom_domain.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_custom_domain.rb new file mode 100644 index 00000000..5162b49c --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_custom_domain.rb @@ -0,0 +1,193 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # One of the frontend's custom domains. `domain` and `tls` behave as in `custom_domain`. With `redirect`, the domain redirects every request to another listed domain that serves the frontend. + class ProjectConfigFrontendCustomDomain < ApiModelBase + # Fully-qualified domain name (hostname only, no scheme/path). Managed TLS (`tls.mode: managed`) accepts at most 219 characters; BYOC accepts 253. + attr_accessor :domain + + attr_accessor :tls + + attr_accessor :redirect + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'domain' => :'domain', + :'tls' => :'tls', + :'redirect' => :'redirect' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'domain' => :'String', + :'tls' => :'ProjectConfigFrontendCustomDomainTLSConfig', + :'redirect' => :'ProjectConfigCustomDomainRedirect' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ProjectConfigFrontendCustomDomain` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ProjectConfigFrontendCustomDomain`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + else + self.domain = nil + end + + if attributes.key?(:'tls') + self.tls = attributes[:'tls'] + end + + if attributes.key?(:'redirect') + self.redirect = attributes[:'redirect'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @domain.nil? + invalid_properties.push('invalid value for "domain", domain cannot be nil.') + end + + if @domain.to_s.length > 253 + invalid_properties.push('invalid value for "domain", the character length must be smaller than or equal to 253.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @domain.nil? + return false if @domain.to_s.length > 253 + true + end + + # Custom attribute writer method with validation + # @param [Object] domain Value to be assigned + def domain=(domain) + if domain.nil? + fail ArgumentError, 'domain cannot be nil' + end + + if domain.to_s.length > 253 + fail ArgumentError, 'invalid value for "domain", the character length must be smaller than or equal to 253.' + end + + @domain = domain + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + domain == o.domain && + tls == o.tls && + redirect == o.redirect + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [domain, tls, redirect].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_custom_domain_tls_config.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_custom_domain_tls_config.rb index c7d5c6d3..8bafff9d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_custom_domain_tls_config.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_custom_domain_tls_config.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_function_route.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_function_route.rb index d9a281ca..df7a5af1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_function_route.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_function_route.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_route.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_route.rb new file mode 100644 index 00000000..d5c06778 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend_route.rb @@ -0,0 +1,229 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ProjectConfigFrontendRoute < ApiModelBase + # Name of another existing frontend in the project to mount. Paths are forwarded unchanged. + attr_accessor :frontend + + attr_accessor :path_prefix + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'frontend' => :'frontend', + :'path_prefix' => :'path_prefix' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'frontend' => :'String', + :'path_prefix' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ProjectConfigFrontendRoute` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ProjectConfigFrontendRoute`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'frontend') + self.frontend = attributes[:'frontend'] + else + self.frontend = nil + end + + if attributes.key?(:'path_prefix') + self.path_prefix = attributes[:'path_prefix'] + else + self.path_prefix = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @frontend.nil? + invalid_properties.push('invalid value for "frontend", frontend cannot be nil.') + end + + if @frontend.to_s.length < 1 + invalid_properties.push('invalid value for "frontend", the character length must be greater than or equal to 1.') + end + + if @path_prefix.nil? + invalid_properties.push('invalid value for "path_prefix", path_prefix cannot be nil.') + end + + if @path_prefix.to_s.length > 512 + invalid_properties.push('invalid value for "path_prefix", the character length must be smaller than or equal to 512.') + end + + if @path_prefix.to_s.length < 2 + invalid_properties.push('invalid value for "path_prefix", the character length must be greater than or equal to 2.') + end + + pattern = Regexp.new(/^\/[^?#\\]*[^\/?#\\]$/) + if @path_prefix !~ pattern + invalid_properties.push("invalid value for \"path_prefix\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @frontend.nil? + return false if @frontend.to_s.length < 1 + return false if @path_prefix.nil? + return false if @path_prefix.to_s.length > 512 + return false if @path_prefix.to_s.length < 2 + return false if @path_prefix !~ Regexp.new(/^\/[^?#\\]*[^\/?#\\]$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] frontend Value to be assigned + def frontend=(frontend) + if frontend.nil? + fail ArgumentError, 'frontend cannot be nil' + end + + if frontend.to_s.length < 1 + fail ArgumentError, 'invalid value for "frontend", the character length must be greater than or equal to 1.' + end + + @frontend = frontend + end + + # Custom attribute writer method with validation + # @param [Object] path_prefix Value to be assigned + def path_prefix=(path_prefix) + if path_prefix.nil? + fail ArgumentError, 'path_prefix cannot be nil' + end + + if path_prefix.to_s.length > 512 + fail ArgumentError, 'invalid value for "path_prefix", the character length must be smaller than or equal to 512.' + end + + if path_prefix.to_s.length < 2 + fail ArgumentError, 'invalid value for "path_prefix", the character length must be greater than or equal to 2.' + end + + pattern = Regexp.new(/^\/[^?#\\]*[^\/?#\\]$/) + if path_prefix !~ pattern + fail ArgumentError, "invalid value for \"path_prefix\", must conform to the pattern #{pattern}." + end + + @path_prefix = path_prefix + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + frontend == o.frontend && + path_prefix == o.path_prefix + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [frontend, path_prefix].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_function.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_function.rb index 17e88610..ab9a3a87 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_function.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_function.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_page.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_page.rb index bf8203db..9d0f5cd0 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_page.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_page.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_pages.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_pages.rb index df7ac953..4d3ed532 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_pages.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_pages.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_missing_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_missing_resource.rb index a9cff299..a7c0a176 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_missing_resource.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_missing_resource.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_notifications.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_notifications.rb new file mode 100644 index 00000000..f3e3da16 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_notifications.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Where the project's alerts go and when a failing scheduler is announced. Omitted fields keep their current value. The webhook signing secret is never part of the manifest: setting `webhook.url` on a project without a webhook generates one that is never shown. Rotate it with `POST /projects/{id}/notifications/webhook-secret` to get a secret you can use. + class ProjectConfigNotifications < ApiModelBase + attr_accessor :email + + attr_accessor :webhook + + attr_accessor :scheduler_failures + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email' => :'email', + :'webhook' => :'webhook', + :'scheduler_failures' => :'scheduler_failures' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'email' => :'UpdateNotificationEmail', + :'webhook' => :'UpdateNotificationWebhook', + :'scheduler_failures' => :'UpdateSchedulerFailureAlertPolicy' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ProjectConfigNotifications` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ProjectConfigNotifications`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'webhook') + self.webhook = attributes[:'webhook'] + end + + if attributes.key?(:'scheduler_failures') + self.scheduler_failures = attributes[:'scheduler_failures'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + webhook == o.webhook && + scheduler_failures == o.scheduler_failures + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [email, webhook, scheduler_failures].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_o_auth_provider.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_o_auth_provider.rb index f088fb2e..65868ada 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_o_auth_provider.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_o_auth_provider.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_project.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_project.rb index 4bebd8dd..ed307378 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_project.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_project.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_realtime.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_realtime.rb index 609ce19e..6ba5468b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_realtime.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_realtime.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_sandbox.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_sandbox.rb index 321ee307..eafcd9df 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_sandbox.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_sandbox.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_scheduler.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_scheduler.rb index 87682bb0..6b7545eb 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_scheduler.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_scheduler.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_skipped_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_skipped_resource.rb index 59dc10b8..324bb575 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_skipped_resource.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_skipped_resource.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_validation_error.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_validation_error.rb index d102ec5d..8827d349 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_validation_error.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_validation_error.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_validation_error_response.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_validation_error_response.rb index f7018315..44aa1e2d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_validation_error_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_validation_error_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_config_variable.rb b/lib/volcano/generated/lib/volcano-generated/models/project_config_variable.rb index 71787387..9699906d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_config_variable.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_config_variable.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_deployment.rb b/lib/volcano/generated/lib/volcano-generated/models/project_deployment.rb index eeb9d410..38d9b645 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_deployment.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_deployment.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -35,6 +35,8 @@ class ProjectDeployment < ApiModelBase attr_accessor :progress + attr_accessor :commit + attr_accessor :created_at attr_accessor :updated_at @@ -73,6 +75,7 @@ def self.attribute_map :'error_message' => :'error_message', :'completed_at' => :'completed_at', :'progress' => :'progress', + :'commit' => :'commit', :'created_at' => :'created_at', :'updated_at' => :'updated_at' } @@ -100,6 +103,7 @@ def self.openapi_types :'error_message' => :'String', :'completed_at' => :'Time', :'progress' => :'DeploymentProgress', + :'commit' => :'DeploymentCommit', :'created_at' => :'Time', :'updated_at' => :'Time' } @@ -175,6 +179,10 @@ def initialize(attributes = {}) self.progress = attributes[:'progress'] end + if attributes.key?(:'commit') + self.commit = attributes[:'commit'] + end + if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] else @@ -343,6 +351,7 @@ def ==(o) error_message == o.error_message && completed_at == o.completed_at && progress == o.progress && + commit == o.commit && created_at == o.created_at && updated_at == o.updated_at end @@ -356,7 +365,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, project_id, resource, operation, status, deploy_source, error_message, completed_at, progress, created_at, updated_at].hash + [id, project_id, resource, operation, status, deploy_source, error_message, completed_at, progress, commit, created_at, updated_at].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_deployment_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/project_deployment_resource.rb index 967b5e63..b5e3ba1e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_deployment_resource.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_deployment_resource.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_deployment_summary.rb b/lib/volcano/generated/lib/volcano-generated/models/project_deployment_summary.rb index 6100af8e..b2f38849 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_deployment_summary.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_deployment_summary.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain.rb b/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain.rb index 7056e547..d49300d1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -41,6 +41,9 @@ class ProjectFrontendCustomDomain < ApiModelBase attr_accessor :effective_urls + # Where the domain redirects every request, or null when it serves the frontend. + attr_accessor :redirect + attr_accessor :created_at attr_accessor :updated_at @@ -82,6 +85,7 @@ def self.attribute_map :'required_routing_record' => :'required_routing_record', :'routing_target_hostname' => :'routing_target_hostname', :'effective_urls' => :'effective_urls', + :'redirect' => :'redirect', :'created_at' => :'created_at', :'updated_at' => :'updated_at', :'frontend' => :'frontend' @@ -111,6 +115,7 @@ def self.openapi_types :'required_routing_record' => :'FrontendDomainRoutingRecord', :'routing_target_hostname' => :'String', :'effective_urls' => :'Array', + :'redirect' => :'FrontendCustomDomainRedirect', :'created_at' => :'Time', :'updated_at' => :'Time', :'frontend' => :'ProjectFrontendCustomDomainAllOfFrontend' @@ -120,6 +125,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'redirect', ]) end @@ -200,6 +206,12 @@ def initialize(attributes = {}) self.effective_urls = nil end + if attributes.key?(:'redirect') + self.redirect = attributes[:'redirect'] + else + self.redirect = nil + end + if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] else @@ -387,6 +399,7 @@ def ==(o) required_routing_record == o.required_routing_record && routing_target_hostname == o.routing_target_hostname && effective_urls == o.effective_urls && + redirect == o.redirect && created_at == o.created_at && updated_at == o.updated_at && frontend == o.frontend @@ -401,7 +414,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [domain, tls_mode, domain_status, verification_status, serving_certificate, failure_reason, verification_records, required_routing_record, routing_target_hostname, effective_urls, created_at, updated_at, frontend].hash + [domain, tls_mode, domain_status, verification_status, serving_certificate, failure_reason, verification_records, required_routing_record, routing_target_hostname, effective_urls, redirect, created_at, updated_at, frontend].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain_all_of_frontend.rb b/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain_all_of_frontend.rb index bf6a3dff..a9eb3ed2 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain_all_of_frontend.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain_all_of_frontend.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_git_connection.rb b/lib/volcano/generated/lib/volcano-generated/models/project_git_connection.rb index 7536fa42..787e1b8c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_git_connection.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_git_connection.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -27,6 +27,10 @@ class ProjectGitConnection < ApiModelBase # The branch a push must land on to deploy. Follows the repository's GitHub default branch unless the project set its own, which a default-branch rename on GitHub then leaves alone. attr_accessor :production_branch + # True when `production_branch` follows the repository's default branch and moves with a default-branch rename on GitHub. False when the project pinned a branch, even one that matches the current default. Pin a branch with `PUT /projects/{id}/git-connection/production-branch`; send an empty `production_branch` there to follow the default again. + attr_accessor :production_branch_follows_default + + # When the connection last changed: its repository, root directory or production branch. Naming the branch it already uses, and other changes to the project, leave it alone. A connection that has not changed since Volcano began tracking this reports the project's last change before then. attr_accessor :updated_at # Attribute mapping from ruby-style variable name to JSON key. @@ -37,6 +41,7 @@ def self.attribute_map :'repo_full_name' => :'repo_full_name', :'root_directory' => :'root_directory', :'production_branch' => :'production_branch', + :'production_branch_follows_default' => :'production_branch_follows_default', :'updated_at' => :'updated_at' } end @@ -59,6 +64,7 @@ def self.openapi_types :'repo_full_name' => :'String', :'root_directory' => :'String', :'production_branch' => :'String', + :'production_branch_follows_default' => :'Boolean', :'updated_at' => :'Time' } end @@ -115,6 +121,12 @@ def initialize(attributes = {}) self.production_branch = nil end + if attributes.key?(:'production_branch_follows_default') + self.production_branch_follows_default = attributes[:'production_branch_follows_default'] + else + self.production_branch_follows_default = nil + end + if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] else @@ -147,6 +159,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "production_branch", production_branch cannot be nil.') end + if @production_branch_follows_default.nil? + invalid_properties.push('invalid value for "production_branch_follows_default", production_branch_follows_default cannot be nil.') + end + if @updated_at.nil? invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') end @@ -163,6 +179,7 @@ def valid? return false if @repo_full_name.nil? return false if @root_directory.nil? return false if @production_branch.nil? + return false if @production_branch_follows_default.nil? return false if @updated_at.nil? true end @@ -217,6 +234,16 @@ def production_branch=(production_branch) @production_branch = production_branch end + # Custom attribute writer method with validation + # @param [Object] production_branch_follows_default Value to be assigned + def production_branch_follows_default=(production_branch_follows_default) + if production_branch_follows_default.nil? + fail ArgumentError, 'production_branch_follows_default cannot be nil' + end + + @production_branch_follows_default = production_branch_follows_default + end + # Custom attribute writer method with validation # @param [Object] updated_at Value to be assigned def updated_at=(updated_at) @@ -237,6 +264,7 @@ def ==(o) repo_full_name == o.repo_full_name && root_directory == o.root_directory && production_branch == o.production_branch && + production_branch_follows_default == o.production_branch_follows_default && updated_at == o.updated_at end @@ -249,7 +277,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [repo_installation_id, repo_id, repo_full_name, root_directory, production_branch, updated_at].hash + [repo_installation_id, repo_id, repo_full_name, root_directory, production_branch, production_branch_follows_default, updated_at].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_git_connection_summary.rb b/lib/volcano/generated/lib/volcano-generated/models/project_git_connection_summary.rb index fec445f0..0838ba42 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_git_connection_summary.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_git_connection_summary.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -25,6 +25,7 @@ class ProjectGitConnectionSummary < ApiModelBase attr_accessor :production_branch + # When the connection last changed: its repository, root directory or production branch. Naming the branch it already uses, and other changes to the project, leave it alone. A connection that has not changed since Volcano began tracking this reports the project's last change before then. attr_accessor :updated_at # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_git_deploy_settings.rb b/lib/volcano/generated/lib/volcano-generated/models/project_git_deploy_settings.rb index 4d0898f9..70661fb9 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_git_deploy_settings.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_git_deploy_settings.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -28,6 +28,10 @@ class ProjectGitDeploySettings < ApiModelBase # App root (subdirectory) the frontend builds from. Omitted for the repo root. attr_accessor :frontend_app_root + # Whether a push applies the commit's pending migrations, the SQL files under volcano/migrations, before it deploys anything. Each database gets a migration run with source `git_deploy`; when one fails, nothing from the push deploys and the live version keeps serving. A push starts a migration run only while the project owner's account is `active`; otherwise it starts none, deploys nothing, and fails with code `owner_not_active`. A run an earlier attempt of the push started before the account changed keeps its outcome, but the push still deploys none of its code and fails with `owner_not_active`; its message says the schema changes stay. Nothing retries that push; push again once the account is `active`, and that push skips the migrations already applied. Reads back as saved even where the `databases.migrations` capability is unavailable; there, a push whose commit has migrations deploys nothing. + attr_accessor :apply_migrations + + # When the settings were last saved, or last changed by connecting a repository. Other changes to the project leave it alone. Settings a connection turned on before Volcano began tracking this report the project's last change before then; settings never saved or changed report when the project was created. attr_accessor :updated_at # Attribute mapping from ruby-style variable name to JSON key. @@ -37,6 +41,7 @@ def self.attribute_map :'deploy_functions' => :'deploy_functions', :'frontend_name' => :'frontend_name', :'frontend_app_root' => :'frontend_app_root', + :'apply_migrations' => :'apply_migrations', :'updated_at' => :'updated_at' } end @@ -58,6 +63,7 @@ def self.openapi_types :'deploy_functions' => :'Boolean', :'frontend_name' => :'String', :'frontend_app_root' => :'String', + :'apply_migrations' => :'Boolean', :'updated_at' => :'Time' } end @@ -104,6 +110,12 @@ def initialize(attributes = {}) self.frontend_app_root = attributes[:'frontend_app_root'] end + if attributes.key?(:'apply_migrations') + self.apply_migrations = attributes[:'apply_migrations'] + else + self.apply_migrations = nil + end + if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] else @@ -124,6 +136,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "deploy_functions", deploy_functions cannot be nil.') end + if @apply_migrations.nil? + invalid_properties.push('invalid value for "apply_migrations", apply_migrations cannot be nil.') + end + if @updated_at.nil? invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') end @@ -137,6 +153,7 @@ def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @auto_deploy_enabled.nil? return false if @deploy_functions.nil? + return false if @apply_migrations.nil? return false if @updated_at.nil? true end @@ -161,6 +178,16 @@ def deploy_functions=(deploy_functions) @deploy_functions = deploy_functions end + # Custom attribute writer method with validation + # @param [Object] apply_migrations Value to be assigned + def apply_migrations=(apply_migrations) + if apply_migrations.nil? + fail ArgumentError, 'apply_migrations cannot be nil' + end + + @apply_migrations = apply_migrations + end + # Custom attribute writer method with validation # @param [Object] updated_at Value to be assigned def updated_at=(updated_at) @@ -180,6 +207,7 @@ def ==(o) deploy_functions == o.deploy_functions && frontend_name == o.frontend_name && frontend_app_root == o.frontend_app_root && + apply_migrations == o.apply_migrations && updated_at == o.updated_at end @@ -192,7 +220,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [auto_deploy_enabled, deploy_functions, frontend_name, frontend_app_root, updated_at].hash + [auto_deploy_enabled, deploy_functions, frontend_name, frontend_app_root, apply_migrations, updated_at].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_git_owner_push.rb b/lib/volcano/generated/lib/volcano-generated/models/project_git_owner_push.rb new file mode 100644 index 00000000..6d1085b6 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/project_git_owner_push.rb @@ -0,0 +1,237 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Whether the project owner can push to the project's connected repository. + class ProjectGitOwnerPush < ApiModelBase + # Stable GitHub repository id of the connected repository, the `repo_id` of the project's git connection. + attr_accessor :repository_id + + # True when the project owner's GitHub account can push to the repository. + attr_accessor :can_push + + # Why `can_push` is false; absent when it is true. `owner_not_connected`: the owner has not connected a GitHub account. `owner_reconnect_required`: the owner's GitHub connection expired or was revoked; the owner reconnects GitHub. `repository_access_lost`: the owner's GitHub account can no longer see the repository. `no_push_permission`: the owner's GitHub account can read the repository but not push to it. + attr_accessor :reason + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'repository_id' => :'repository_id', + :'can_push' => :'can_push', + :'reason' => :'reason' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'repository_id' => :'Integer', + :'can_push' => :'Boolean', + :'reason' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ProjectGitOwnerPush` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ProjectGitOwnerPush`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'repository_id') + self.repository_id = attributes[:'repository_id'] + else + self.repository_id = nil + end + + if attributes.key?(:'can_push') + self.can_push = attributes[:'can_push'] + else + self.can_push = nil + end + + if attributes.key?(:'reason') + self.reason = attributes[:'reason'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @repository_id.nil? + invalid_properties.push('invalid value for "repository_id", repository_id cannot be nil.') + end + + if @can_push.nil? + invalid_properties.push('invalid value for "can_push", can_push cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @repository_id.nil? + return false if @can_push.nil? + reason_validator = EnumAttributeValidator.new('String', ["owner_not_connected", "owner_reconnect_required", "repository_access_lost", "no_push_permission"]) + return false unless reason_validator.valid?(@reason) + true + end + + # Custom attribute writer method with validation + # @param [Object] repository_id Value to be assigned + def repository_id=(repository_id) + if repository_id.nil? + fail ArgumentError, 'repository_id cannot be nil' + end + + @repository_id = repository_id + end + + # Custom attribute writer method with validation + # @param [Object] can_push Value to be assigned + def can_push=(can_push) + if can_push.nil? + fail ArgumentError, 'can_push cannot be nil' + end + + @can_push = can_push + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] reason Object to be assigned + def reason=(reason) + validator = EnumAttributeValidator.new('String', ["owner_not_connected", "owner_reconnect_required", "repository_access_lost", "no_push_permission"]) + unless validator.valid?(reason) + fail ArgumentError, "invalid value for \"reason\", must be one of #{validator.allowable_values}." + end + @reason = reason + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + repository_id == o.repository_id && + can_push == o.can_push && + reason == o.reason + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [repository_id, can_push, reason].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_health_category.rb b/lib/volcano/generated/lib/volcano-generated/models/project_health_category.rb index 53fa09da..4863d9cd 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_health_category.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_health_category.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_health_check.rb b/lib/volcano/generated/lib/volcano-generated/models/project_health_check.rb index b49fc98f..454fdf66 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_health_check.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_health_check.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_health_data_status.rb b/lib/volcano/generated/lib/volcano-generated/models/project_health_data_status.rb index e064b5e3..05ebc6fe 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_health_data_status.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_health_data_status.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_health_evidence.rb b/lib/volcano/generated/lib/volcano-generated/models/project_health_evidence.rb index 153656ce..b211b9f7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_health_evidence.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_health_evidence.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_health_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/project_health_resource.rb index 82099652..4c2100fc 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_health_resource.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_health_resource.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -146,7 +146,7 @@ def list_invalid_properties def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @type.nil? - type_validator = EnumAttributeValidator.new('String', ["project", "function", "frontend", "database"]) + type_validator = EnumAttributeValidator.new('String', ["project", "function", "frontend", "database", "database_branch"]) return false unless type_validator.valid?(@type) return false if @id.nil? return false if @name.nil? @@ -156,7 +156,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["project", "function", "frontend", "database"]) + validator = EnumAttributeValidator.new('String', ["project", "function", "frontend", "database", "database_branch"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_health_response.rb b/lib/volcano/generated/lib/volcano-generated/models/project_health_response.rb index 6f0fcc13..acdcfac3 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_health_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_health_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_health_scope.rb b/lib/volcano/generated/lib/volcano-generated/models/project_health_scope.rb index 26ef709c..6a1b9ede 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_health_scope.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_health_scope.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_health_status.rb b/lib/volcano/generated/lib/volcano-generated/models/project_health_status.rb index 4d7dbddf..e8e93adc 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_health_status.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_health_status.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -15,13 +15,15 @@ module Volcano::Generated class ProjectHealthStatus + EMPTY = "empty".freeze HEALTHY = "healthy".freeze + NEEDS_ATTENTION = "needs_attention".freeze DEGRADED = "degraded".freeze CRITICAL = "critical".freeze UNKNOWN = "unknown".freeze def self.all_vars - @all_vars ||= [HEALTHY, DEGRADED, CRITICAL, UNKNOWN].freeze + @all_vars ||= [EMPTY, HEALTHY, NEEDS_ATTENTION, DEGRADED, CRITICAL, UNKNOWN].freeze end # Builds the enum from string diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_health_summary.rb b/lib/volcano/generated/lib/volcano-generated/models/project_health_summary.rb index a5e1cdc1..8935c027 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_health_summary.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_health_summary.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_action.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_action.rb index 7150e1b4..4a7bad03 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_action.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_action.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_action_code.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_action_code.rb index 2f0c7115..2faaf5ae 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_action_code.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_action_code.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_destination.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_destination.rb index ce682cbc..091eaa2c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_destination.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_destination.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_destination_mode.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_destination_mode.rb index a819225d..bc44356f 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_destination_mode.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_destination_mode.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_disposition.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_disposition.rb index 7a223405..19e21e24 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_disposition.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_disposition.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_finding.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_finding.rb index 40aee029..8e79c7df 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_finding.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_finding.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_impact.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_impact.rb index b61abcd7..6a6e18f8 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_impact.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_impact.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_preflight_request.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_preflight_request.rb index 7e3418e0..4209ba4b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_preflight_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_preflight_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_readiness.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_readiness.rb index af7abd6e..bbc656ea 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_readiness.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_readiness.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_report.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_report.rb index 4537f67c..2b38961d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_report.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_report.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_resource.rb index 672baa0c..25f20805 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_resource.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_resource.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_resource_kind.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_resource_kind.rb index 6527b070..8785b7e2 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_resource_kind.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_resource_kind.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_run.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_run.rb index f835eb49..d8fef224 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_run.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_run.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -29,6 +29,7 @@ class ProjectImportRun < ApiModelBase attr_accessor :status + # Set when `status` is `failed`: `import.deployment_skipped` when the import's deployment was skipped, otherwise the error code of the Git deployment run the import started (see `GitDeploymentRunError.code`), such as `source_invalid`, `deploy_refused`, `child_deploy_failed`, `child_deploy_not_started`, or `deploy_failed`. Treat a code you do not know as a failure. attr_accessor :error_code attr_accessor :error_message diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_run_status.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_run_status.rb index 77cc23fb..127ad718 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_run_status.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_run_status.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_start_request.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_start_request.rb index 90663294..1af9ccf7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_start_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_start_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_summary.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_summary.rb index d5f75f0e..297b36bf 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_summary.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_summary.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_import_target.rb b/lib/volcano/generated/lib/volcano-generated/models/project_import_target.rb index 3fce8613..3301d51d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_import_target.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_import_target.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_lock_lease.rb b/lib/volcano/generated/lib/volcano-generated/models/project_lock_lease.rb index ab27e72d..abd368d2 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_lock_lease.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_lock_lease.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_lock_lease_request.rb b/lib/volcano/generated/lib/volcano-generated/models/project_lock_lease_request.rb index ca35c91e..d51d5db7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_lock_lease_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_lock_lease_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_lock_state.rb b/lib/volcano/generated/lib/volcano-generated/models/project_lock_state.rb index 47b35820..05be8b58 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_lock_state.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_lock_state.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_data_status.rb b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_data_status.rb index 8c72c374..b570db96 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_data_status.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_data_status.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_dimensions.rb b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_dimensions.rb index 7b1b4aa1..5e95917b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_dimensions.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_dimensions.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_group_by.rb b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_group_by.rb index aea4290e..0c3c1fad 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_group_by.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_group_by.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_metric.rb b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_metric.rb index 057444e5..387fd3b7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_metric.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_metric.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query.rb b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query.rb index 8ae493a2..2118c280 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_request.rb b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_request.rb index d0c1e7c2..5e1df888 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_response.rb b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_response.rb index 732d5319..0bef7256 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_time_range.rb b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_time_range.rb index 5fc5ebf8..f0719249 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_time_range.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_time_range.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_result.rb b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_result.rb index ebcd7491..30a58cdc 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_result.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_result.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_unit.rb b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_unit.rb index 9dd5b48b..c23a211b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_unit.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_unit.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_value.rb b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_value.rb index a3bebfb1..83022841 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_value.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_value.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_window.rb b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_window.rb index 57f2b6ec..673978e7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_metrics_window.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_metrics_window.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_source_export.rb b/lib/volcano/generated/lib/volcano-generated/models/project_source_export.rb index f5574b78..131ae555 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_source_export.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_source_export.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_source_export_omission.rb b/lib/volcano/generated/lib/volcano-generated/models/project_source_export_omission.rb index ad30887e..e9e98d8a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_source_export_omission.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_source_export_omission.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_source_export_skip.rb b/lib/volcano/generated/lib/volcano-generated/models/project_source_export_skip.rb index 93937c5e..e4242b14 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_source_export_skip.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_source_export_skip.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_source_export_state.rb b/lib/volcano/generated/lib/volcano-generated/models/project_source_export_state.rb index c6c0da9f..2cad29f5 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_source_export_state.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_source_export_state.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_template_installation.rb b/lib/volcano/generated/lib/volcano-generated/models/project_template_installation.rb index da39922a..3518fb34 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_template_installation.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_template_installation.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -20,6 +20,11 @@ class ProjectTemplateInstallation < ApiModelBase attr_accessor :phase + attr_accessor :source + + # Why the installation failed. Present only when `status` is `failed`, and absent for installations that failed before Volcano recorded a reason. New codes can be added, so treat an unknown one as a generic failure. `source_withdrawn`: the deploy link was switched off or deleted, or its project is being deleted. `source_invalid`: the source failed Volcano's checks, such as a release archive whose digest, size or contents are wrong. `source_access_lost`: Volcano can no longer read the source repository. `invalid_source_configuration`: the source's `volcano-config.yaml` is invalid, or it declares a variable the new project does not have. `nothing_to_deploy`: the source has no function or frontend. `database_not_supported`: the source ships database SQL. `function_deploy_refused`: a function in the source cannot be deployed as defined. `function_quota_exceeded`, `durable_function_quota_exceeded`, `frontend_quota_exceeded`, `frontend_deploy_limit` and `build_minutes_exceeded`: the project reached a plan limit. `build_failed`: a function or frontend from the source failed to build or deploy; its deployment's build logs say why. `retry_budget_exhausted`: the installation kept failing and Volcano stopped retrying. `internal_error`: Volcano failed for a reason of its own. + attr_accessor :failure_code + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -46,7 +51,9 @@ def valid?(value) def self.attribute_map { :'status' => :'status', - :'phase' => :'phase' + :'phase' => :'phase', + :'source' => :'source', + :'failure_code' => :'failure_code' } end @@ -64,7 +71,9 @@ def self.acceptable_attributes def self.openapi_types { :'status' => :'String', - :'phase' => :'String' + :'phase' => :'String', + :'source' => :'ProjectTemplateInstallationSource', + :'failure_code' => :'String' } end @@ -101,6 +110,14 @@ def initialize(attributes = {}) else self.phase = nil end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'failure_code') + self.failure_code = attributes[:'failure_code'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -158,7 +175,9 @@ def ==(o) return true if self.equal?(o) self.class == o.class && status == o.status && - phase == o.phase + phase == o.phase && + source == o.source && + failure_code == o.failure_code end # @see the `==` method @@ -170,7 +189,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [status, phase].hash + [status, phase, source, failure_code].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_template_installation_source.rb b/lib/volcano/generated/lib/volcano-generated/models/project_template_installation_source.rb new file mode 100644 index 00000000..8853d25a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/project_template_installation_source.rb @@ -0,0 +1,243 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The share release a fork was installed from. + class ProjectTemplateInstallationSource < ApiModelBase + attr_accessor :kind + + # The share the release belongs to. + attr_accessor :share_id + + # The release the project was installed from. + attr_accessor :release_id + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'kind' => :'kind', + :'share_id' => :'share_id', + :'release_id' => :'release_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'kind' => :'String', + :'share_id' => :'String', + :'release_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ProjectTemplateInstallationSource` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ProjectTemplateInstallationSource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'kind') + self.kind = attributes[:'kind'] + else + self.kind = nil + end + + if attributes.key?(:'share_id') + self.share_id = attributes[:'share_id'] + else + self.share_id = nil + end + + if attributes.key?(:'release_id') + self.release_id = attributes[:'release_id'] + else + self.release_id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @kind.nil? + invalid_properties.push('invalid value for "kind", kind cannot be nil.') + end + + if @share_id.nil? + invalid_properties.push('invalid value for "share_id", share_id cannot be nil.') + end + + if @release_id.nil? + invalid_properties.push('invalid value for "release_id", release_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @kind.nil? + kind_validator = EnumAttributeValidator.new('String', ["share_release"]) + return false unless kind_validator.valid?(@kind) + return false if @share_id.nil? + return false if @release_id.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] kind Object to be assigned + def kind=(kind) + validator = EnumAttributeValidator.new('String', ["share_release"]) + unless validator.valid?(kind) + fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}." + end + @kind = kind + end + + # Custom attribute writer method with validation + # @param [Object] share_id Value to be assigned + def share_id=(share_id) + if share_id.nil? + fail ArgumentError, 'share_id cannot be nil' + end + + @share_id = share_id + end + + # Custom attribute writer method with validation + # @param [Object] release_id Value to be assigned + def release_id=(release_id) + if release_id.nil? + fail ArgumentError, 'release_id cannot be nil' + end + + @release_id = release_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + kind == o.kind && + share_id == o.share_id && + release_id == o.release_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [kind, share_id, release_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/project_usage_response.rb b/lib/volcano/generated/lib/volcano-generated/models/project_usage_response.rb index c8a22f5a..6551dae9 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/project_usage_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/project_usage_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/promote_frontend_candidate_request.rb b/lib/volcano/generated/lib/volcano-generated/models/promote_frontend_candidate_request.rb new file mode 100644 index 00000000..b5b14057 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/promote_frontend_candidate_request.rb @@ -0,0 +1,173 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class PromoteFrontendCandidateRequest < ApiModelBase + attr_accessor :expected_revision + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'expected_revision' => :'expected_revision' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'expected_revision' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::PromoteFrontendCandidateRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::PromoteFrontendCandidateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'expected_revision') + self.expected_revision = attributes[:'expected_revision'] + else + self.expected_revision = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @expected_revision.nil? + invalid_properties.push('invalid value for "expected_revision", expected_revision cannot be nil.') + end + + if @expected_revision < 0 + invalid_properties.push('invalid value for "expected_revision", must be greater than or equal to 0.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @expected_revision.nil? + return false if @expected_revision < 0 + true + end + + # Custom attribute writer method with validation + # @param [Object] expected_revision Value to be assigned + def expected_revision=(expected_revision) + if expected_revision.nil? + fail ArgumentError, 'expected_revision cannot be nil' + end + + if expected_revision < 0 + fail ArgumentError, 'invalid value for "expected_revision", must be greater than or equal to 0.' + end + + @expected_revision = expected_revision + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + expected_revision == o.expected_revision + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [expected_revision].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/publish_durable_message_request.rb b/lib/volcano/generated/lib/volcano-generated/models/publish_durable_message_request.rb index 4d0da9e2..43f06289 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/publish_durable_message_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/publish_durable_message_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/publish_sandbox_preset_request.rb b/lib/volcano/generated/lib/volcano-generated/models/publish_sandbox_preset_request.rb index 3af9f6f7..5fd58b6d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/publish_sandbox_preset_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/publish_sandbox_preset_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/realtime_config.rb b/lib/volcano/generated/lib/volcano-generated/models/realtime_config.rb index 2a63994d..5e4e16e5 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/realtime_config.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/realtime_config.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/realtime_plan_limits.rb b/lib/volcano/generated/lib/volcano-generated/models/realtime_plan_limits.rb index 5bdb7b35..ba5e3a16 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/realtime_plan_limits.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/realtime_plan_limits.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/realtime_publish_request.rb b/lib/volcano/generated/lib/volcano-generated/models/realtime_publish_request.rb new file mode 100644 index 00000000..35e2c34e --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/realtime_publish_request.rb @@ -0,0 +1,236 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class RealtimePublishRequest < ApiModelBase + # The client channel, `broadcast:` or `grant:`, with a name of at most 64 characters. + attr_accessor :channel + + # The message type subscribers match on. + attr_accessor :event + + # Any JSON value, sent to subscribers as `payload`. + attr_accessor :payload + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'channel' => :'channel', + :'event' => :'event', + :'payload' => :'payload' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'channel' => :'String', + :'event' => :'String', + :'payload' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'payload' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::RealtimePublishRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::RealtimePublishRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'channel') + self.channel = attributes[:'channel'] + else + self.channel = nil + end + + if attributes.key?(:'event') + self.event = attributes[:'event'] + else + self.event = nil + end + + if attributes.key?(:'payload') + self.payload = attributes[:'payload'] + else + self.payload = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @channel.nil? + invalid_properties.push('invalid value for "channel", channel cannot be nil.') + end + + if @channel.to_s.length > 75 + invalid_properties.push('invalid value for "channel", the character length must be smaller than or equal to 75.') + end + + pattern = Regexp.new(/^(broadcast|grant):[A-Za-z0-9_-]+(:[A-Za-z0-9_-]+)*$/) + if @channel !~ pattern + invalid_properties.push("invalid value for \"channel\", must conform to the pattern #{pattern}.") + end + + if @event.nil? + invalid_properties.push('invalid value for "event", event cannot be nil.') + end + + pattern = Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/) + if @event !~ pattern + invalid_properties.push("invalid value for \"event\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @channel.nil? + return false if @channel.to_s.length > 75 + return false if @channel !~ Regexp.new(/^(broadcast|grant):[A-Za-z0-9_-]+(:[A-Za-z0-9_-]+)*$/) + return false if @event.nil? + return false if @event !~ Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] channel Value to be assigned + def channel=(channel) + if channel.nil? + fail ArgumentError, 'channel cannot be nil' + end + + if channel.to_s.length > 75 + fail ArgumentError, 'invalid value for "channel", the character length must be smaller than or equal to 75.' + end + + pattern = Regexp.new(/^(broadcast|grant):[A-Za-z0-9_-]+(:[A-Za-z0-9_-]+)*$/) + if channel !~ pattern + fail ArgumentError, "invalid value for \"channel\", must conform to the pattern #{pattern}." + end + + @channel = channel + end + + # Custom attribute writer method with validation + # @param [Object] event Value to be assigned + def event=(event) + if event.nil? + fail ArgumentError, 'event cannot be nil' + end + + pattern = Regexp.new(/^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/) + if event !~ pattern + fail ArgumentError, "invalid value for \"event\", must conform to the pattern #{pattern}." + end + + @event = event + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + channel == o.channel && + event == o.event && + payload == o.payload + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [channel, event, payload].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/realtime_publish_result.rb b/lib/volcano/generated/lib/volcano-generated/models/realtime_publish_result.rb new file mode 100644 index 00000000..6a71c011 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/realtime_publish_result.rb @@ -0,0 +1,165 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class RealtimePublishResult < ApiModelBase + # The channel the message was sent to. + attr_accessor :channel + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'channel' => :'channel' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'channel' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::RealtimePublishResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::RealtimePublishResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'channel') + self.channel = attributes[:'channel'] + else + self.channel = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @channel.nil? + invalid_properties.push('invalid value for "channel", channel cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @channel.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] channel Value to be assigned + def channel=(channel) + if channel.nil? + fail ArgumentError, 'channel cannot be nil' + end + + @channel = channel + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + channel == o.channel + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [channel].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/realtime_stats.rb b/lib/volcano/generated/lib/volcano-generated/models/realtime_stats.rb index c26e7fa2..448ed5ea 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/realtime_stats.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/realtime_stats.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/refresh_o_auth_provider_token200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/refresh_o_auth_provider_token200_response.rb index c43aacde..d8e22cc1 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/refresh_o_auth_provider_token200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/refresh_o_auth_provider_token200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/register_durable_callback_request.rb b/lib/volcano/generated/lib/volcano-generated/models/register_durable_callback_request.rb new file mode 100644 index 00000000..63ff9a8e --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/register_durable_callback_request.rb @@ -0,0 +1,333 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class RegisterDurableCallbackRequest < ApiModelBase + # Opaque reference to the running execution, supplied by the SDK. + attr_accessor :execution_ref + + # Opaque reference to the waiting step, supplied by the SDK. + attr_accessor :callback_id + + # The waiting step's name, up to 237 printable ASCII characters. + attr_accessor :name + + # The operation an earlier run of the workflow opened the waiting step under, supplied by the SDK when a replay registers it. Volcano then looks for the step further back in the execution's history than a first registration reads. + attr_accessor :operation_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'execution_ref' => :'execution_ref', + :'callback_id' => :'callback_id', + :'name' => :'name', + :'operation_id' => :'operation_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'execution_ref' => :'String', + :'callback_id' => :'String', + :'name' => :'String', + :'operation_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::RegisterDurableCallbackRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::RegisterDurableCallbackRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'execution_ref') + self.execution_ref = attributes[:'execution_ref'] + else + self.execution_ref = nil + end + + if attributes.key?(:'callback_id') + self.callback_id = attributes[:'callback_id'] + else + self.callback_id = nil + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'operation_id') + self.operation_id = attributes[:'operation_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @execution_ref.nil? + invalid_properties.push('invalid value for "execution_ref", execution_ref cannot be nil.') + end + + if @execution_ref.to_s.length > 2048 + invalid_properties.push('invalid value for "execution_ref", the character length must be smaller than or equal to 2048.') + end + + if @execution_ref.to_s.length < 1 + invalid_properties.push('invalid value for "execution_ref", the character length must be greater than or equal to 1.') + end + + if @callback_id.nil? + invalid_properties.push('invalid value for "callback_id", callback_id cannot be nil.') + end + + if @callback_id.to_s.length > 1024 + invalid_properties.push('invalid value for "callback_id", the character length must be smaller than or equal to 1024.') + end + + if @callback_id.to_s.length < 1 + invalid_properties.push('invalid value for "callback_id", the character length must be greater than or equal to 1.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @name.to_s.length > 237 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 237.') + end + + if @name.to_s.length < 1 + invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.') + end + + pattern = Regexp.new(/^[ -~]+$/) + if @name !~ pattern + invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.") + end + + if !@operation_id.nil? && @operation_id.to_s.length > 64 + invalid_properties.push('invalid value for "operation_id", the character length must be smaller than or equal to 64.') + end + + if !@operation_id.nil? && @operation_id.to_s.length < 1 + invalid_properties.push('invalid value for "operation_id", the character length must be greater than or equal to 1.') + end + + pattern = Regexp.new(/^[0-9a-f]+$/) + if !@operation_id.nil? && @operation_id !~ pattern + invalid_properties.push("invalid value for \"operation_id\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @execution_ref.nil? + return false if @execution_ref.to_s.length > 2048 + return false if @execution_ref.to_s.length < 1 + return false if @callback_id.nil? + return false if @callback_id.to_s.length > 1024 + return false if @callback_id.to_s.length < 1 + return false if @name.nil? + return false if @name.to_s.length > 237 + return false if @name.to_s.length < 1 + return false if @name !~ Regexp.new(/^[ -~]+$/) + return false if !@operation_id.nil? && @operation_id.to_s.length > 64 + return false if !@operation_id.nil? && @operation_id.to_s.length < 1 + return false if !@operation_id.nil? && @operation_id !~ Regexp.new(/^[0-9a-f]+$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] execution_ref Value to be assigned + def execution_ref=(execution_ref) + if execution_ref.nil? + fail ArgumentError, 'execution_ref cannot be nil' + end + + if execution_ref.to_s.length > 2048 + fail ArgumentError, 'invalid value for "execution_ref", the character length must be smaller than or equal to 2048.' + end + + if execution_ref.to_s.length < 1 + fail ArgumentError, 'invalid value for "execution_ref", the character length must be greater than or equal to 1.' + end + + @execution_ref = execution_ref + end + + # Custom attribute writer method with validation + # @param [Object] callback_id Value to be assigned + def callback_id=(callback_id) + if callback_id.nil? + fail ArgumentError, 'callback_id cannot be nil' + end + + if callback_id.to_s.length > 1024 + fail ArgumentError, 'invalid value for "callback_id", the character length must be smaller than or equal to 1024.' + end + + if callback_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "callback_id", the character length must be greater than or equal to 1.' + end + + @callback_id = callback_id + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + if name.to_s.length > 237 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 237.' + end + + if name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 1.' + end + + pattern = Regexp.new(/^[ -~]+$/) + if name !~ pattern + fail ArgumentError, "invalid value for \"name\", must conform to the pattern #{pattern}." + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] operation_id Value to be assigned + def operation_id=(operation_id) + if operation_id.nil? + fail ArgumentError, 'operation_id cannot be nil' + end + + if operation_id.to_s.length > 64 + fail ArgumentError, 'invalid value for "operation_id", the character length must be smaller than or equal to 64.' + end + + if operation_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "operation_id", the character length must be greater than or equal to 1.' + end + + pattern = Regexp.new(/^[0-9a-f]+$/) + if operation_id !~ pattern + fail ArgumentError, "invalid value for \"operation_id\", must conform to the pattern #{pattern}." + end + + @operation_id = operation_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + execution_ref == o.execution_ref && + callback_id == o.callback_id && + name == o.name && + operation_id == o.operation_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [execution_ref, callback_id, name, operation_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/register_durable_message_wait_request.rb b/lib/volcano/generated/lib/volcano-generated/models/register_durable_message_wait_request.rb index b3e16773..4c7418ff 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/register_durable_message_wait_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/register_durable_message_wait_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/rename_variable_environment_request.rb b/lib/volcano/generated/lib/volcano-generated/models/rename_variable_environment_request.rb index 82c411b9..4b1ec96f 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/rename_variable_environment_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/rename_variable_environment_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/replace_frontend_shared_variables_request.rb b/lib/volcano/generated/lib/volcano-generated/models/replace_frontend_shared_variables_request.rb index 13e87318..601a0128 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/replace_frontend_shared_variables_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/replace_frontend_shared_variables_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/replace_shared_variables_request.rb b/lib/volcano/generated/lib/volcano-generated/models/replace_shared_variables_request.rb index 9c57f2da..4cb00f6d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/replace_shared_variables_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/replace_shared_variables_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/request_durable_approval_request.rb b/lib/volcano/generated/lib/volcano-generated/models/request_durable_approval_request.rb index bd35c244..31057f6d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/request_durable_approval_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/request_durable_approval_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/reset_database_password200_response.rb b/lib/volcano/generated/lib/volcano-generated/models/reset_database_password200_response.rb index e054a408..4d3414f6 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/reset_database_password200_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/reset_database_password200_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/resolve_function_response.rb b/lib/volcano/generated/lib/volcano-generated/models/resolve_function_response.rb index db7ce18e..3c1739c8 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/resolve_function_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/resolve_function_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -21,7 +21,7 @@ class ResolveFunctionResponse < ApiModelBase # Canonical function ID used for invocation routing attr_accessor :function_id - # Canonical HTTPS endpoint for invoking this function. Use it as-is: it does not share a domain with the API, so a host derived from the API URL will not reach the function. Omitted when the deployment serves no public invocation domain, as in local development; invoke through POST /functions/{functionId}/invoke instead. + # Canonical HTTPS endpoint for invoking this function. Use it as-is: it does not share a domain with the API, so a host derived from the API URL will not reach the function. Omitted in local development and when the deployment serves no public invocation domain; invoke through POST /functions/{functionId}/invoke instead. attr_accessor :invoke_url # Suggested SDK cache TTL for this name-to-ID mapping diff --git a/lib/volcano/generated/lib/volcano-generated/models/resource_reference.rb b/lib/volcano/generated/lib/volcano-generated/models/resource_reference.rb index 6e08359f..d293b518 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/resource_reference.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/resource_reference.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/rollback_frontend_serving_request.rb b/lib/volcano/generated/lib/volcano-generated/models/rollback_frontend_serving_request.rb new file mode 100644 index 00000000..72e1efc3 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/rollback_frontend_serving_request.rb @@ -0,0 +1,185 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class RollbackFrontendServingRequest < ApiModelBase + attr_accessor :expected_revision + + # Return to the frontend's own runtime whatever it served before. + attr_accessor :to_production + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'expected_revision' => :'expected_revision', + :'to_production' => :'to_production' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'expected_revision' => :'Integer', + :'to_production' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::RollbackFrontendServingRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::RollbackFrontendServingRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'expected_revision') + self.expected_revision = attributes[:'expected_revision'] + else + self.expected_revision = nil + end + + if attributes.key?(:'to_production') + self.to_production = attributes[:'to_production'] + else + self.to_production = false + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @expected_revision.nil? + invalid_properties.push('invalid value for "expected_revision", expected_revision cannot be nil.') + end + + if @expected_revision < 0 + invalid_properties.push('invalid value for "expected_revision", must be greater than or equal to 0.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @expected_revision.nil? + return false if @expected_revision < 0 + true + end + + # Custom attribute writer method with validation + # @param [Object] expected_revision Value to be assigned + def expected_revision=(expected_revision) + if expected_revision.nil? + fail ArgumentError, 'expected_revision cannot be nil' + end + + if expected_revision < 0 + fail ArgumentError, 'invalid value for "expected_revision", must be greater than or equal to 0.' + end + + @expected_revision = expected_revision + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + expected_revision == o.expected_revision && + to_production == o.to_production + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [expected_revision, to_production].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_access.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_access.rb index 003283ca..db711541 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_access.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_access.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_access_request.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_access_request.rb index 3596b2fb..72e4631c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_access_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_access_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_build_log_page.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_build_log_page.rb index 084e075d..6ba1a675 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_build_log_page.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_build_log_page.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_build_log_page_data_inner.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_build_log_page_data_inner.rb index 18f6ec36..0566600d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_build_log_page_data_inner.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_build_log_page_data_inner.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_capacity.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_capacity.rb index fe16a85a..7139058f 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_capacity.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_capacity.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_capacity_list.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_capacity_list.rb index df121f44..51750fe5 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_capacity_list.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_capacity_list.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_request.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_request.rb index be710790..88005070 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -22,12 +22,16 @@ class SandboxCommandRequest < ApiModelBase attr_accessor :environment + # Set false to keep no output. stdout and stderr are returned once in this response, and Volcano's control plane never stores them in the execution journal, database, logs or traces. This does not cover the Sandbox's memory or a suspended session's snapshot. A retry with the same Idempotency-Key returns the exit code with `output_kept` false and empty streams, without running the command again. Omit it to use the session's `executions.keep_output`. True in a session that keeps no output is refused with 400 and code `sandbox_session_keeps_no_output`. False is refused with 400 and code `feature_unavailable` while the `sandboxes.output_not_kept` capability is unavailable. + attr_accessor :keep_output + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'command' => :'command', :'timeout_seconds' => :'timeout_seconds', - :'environment' => :'environment' + :'environment' => :'environment', + :'keep_output' => :'keep_output' } end @@ -46,7 +50,8 @@ def self.openapi_types { :'command' => :'String', :'timeout_seconds' => :'Integer', - :'environment' => :'Hash' + :'environment' => :'Hash', + :'keep_output' => :'Boolean' } end @@ -87,6 +92,10 @@ def initialize(attributes = {}) self.environment = value end end + + if attributes.key?(:'keep_output') + self.keep_output = attributes[:'keep_output'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -191,7 +200,8 @@ def ==(o) self.class == o.class && command == o.command && timeout_seconds == o.timeout_seconds && - environment == o.environment + environment == o.environment && + keep_output == o.keep_output end # @see the `==` method @@ -203,7 +213,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [command, timeout_seconds, environment].hash + [command, timeout_seconds, environment, keep_output].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_result.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_result.rb index c4e322eb..36783ff4 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_result.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_result.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -15,18 +15,25 @@ module Volcano::Generated class SandboxCommandResult < ApiModelBase + # The first 1 MiB (1,048,576 bytes) the command wrote to stdout. Empty in a replay of a command that kept no output. attr_accessor :stdout + # The first 1 MiB (1,048,576 bytes) the command wrote to stderr. Empty in a replay of a command that kept no output. attr_accessor :stderr attr_accessor :exit_code + # True when the command wrote more than 1 MiB to stdout. False in a replay of a command that kept no output. attr_accessor :stdout_truncated + # True when the command wrote more than 1 MiB to stderr. False in a replay of a command that kept no output. attr_accessor :stderr_truncated attr_accessor :timed_out + # False when the command kept no output. Its streams appear only in the response to the request that ran it, and Volcano's control plane never stores them in the execution journal, database, logs or traces. This does not cover the Sandbox's memory or a suspended session's snapshot. A retry with the same Idempotency-Key returns them empty. + attr_accessor :output_kept + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -35,7 +42,8 @@ def self.attribute_map :'exit_code' => :'exit_code', :'stdout_truncated' => :'stdout_truncated', :'stderr_truncated' => :'stderr_truncated', - :'timed_out' => :'timed_out' + :'timed_out' => :'timed_out', + :'output_kept' => :'output_kept' } end @@ -57,7 +65,8 @@ def self.openapi_types :'exit_code' => :'Integer', :'stdout_truncated' => :'Boolean', :'stderr_truncated' => :'Boolean', - :'timed_out' => :'Boolean' + :'timed_out' => :'Boolean', + :'output_kept' => :'Boolean' } end @@ -118,6 +127,12 @@ def initialize(attributes = {}) else self.timed_out = nil end + + if attributes.key?(:'output_kept') + self.output_kept = attributes[:'output_kept'] + else + self.output_kept = nil + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -149,6 +164,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "timed_out", timed_out cannot be nil.') end + if @output_kept.nil? + invalid_properties.push('invalid value for "output_kept", output_kept cannot be nil.') + end + invalid_properties end @@ -162,6 +181,7 @@ def valid? return false if @stdout_truncated.nil? return false if @stderr_truncated.nil? return false if @timed_out.nil? + return false if @output_kept.nil? true end @@ -225,6 +245,16 @@ def timed_out=(timed_out) @timed_out = timed_out end + # Custom attribute writer method with validation + # @param [Object] output_kept Value to be assigned + def output_kept=(output_kept) + if output_kept.nil? + fail ArgumentError, 'output_kept cannot be nil' + end + + @output_kept = output_kept + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -235,7 +265,8 @@ def ==(o) exit_code == o.exit_code && stdout_truncated == o.stdout_truncated && stderr_truncated == o.stderr_truncated && - timed_out == o.timed_out + timed_out == o.timed_out && + output_kept == o.output_kept end # @see the `==` method @@ -247,7 +278,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [stdout, stderr, exit_code, stdout_truncated, stderr_truncated, timed_out].hash + [stdout, stderr, exit_code, stdout_truncated, stderr_truncated, timed_out, output_kept].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_deployment.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_deployment.rb index c10503e2..5a41a96d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_deployment.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_deployment.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_deployment_page.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_deployment_page.rb index 81e1c995..18e7d426 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_deployment_page.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_deployment_page.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_request.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_request.rb index 2837d9e0..a4681489 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -23,7 +23,7 @@ class SandboxExecutionRequest < ApiModelBase # Baseline memory in MiB. Cloud HOBBY supports 1024; SUPERAGENT supports 1024 or 2048. Omission uses the preset or template default; a template requiring more than the plan permits is rejected. Local sessions are exempt from cloud plan limits. attr_accessor :memory_mb - # Region such as `us-east-1`. Region IDs issued by earlier versions of the API are still accepted. + # Region such as `us-east-1`, from the preset catalog. Region IDs issued by earlier versions of the API are still accepted. A temporarily unavailable region answers 400 with code `sandbox_region_unavailable`. attr_accessor :region # Absolute VM lifetime including startup, bounded by environment capacity policy. Inherits the template TTL when omitted (cloud default 3600 seconds; local default 0, unlimited). Cloud HOBBY accepts 30–3600 seconds; SUPERAGENT accepts 30–28800 seconds. Inherited template defaults are clamped to the plan limit; explicit values above it are rejected. Local accepts 0 for unlimited or a positive lifetime. The VM is reclaimed early when the command finishes. @@ -36,6 +36,11 @@ class SandboxExecutionRequest < ApiModelBase attr_accessor :environment + attr_accessor :network + + # Set false to keep no output. stdout and stderr are returned once in this response, and Volcano's control plane never stores them in the execution journal, database, logs or traces. This does not cover the Sandbox's memory or a suspended session's snapshot. A retry with the same Idempotency-Key returns the exit code with `output_kept` false and empty streams, without running the command again. False is refused with 400 and code `feature_unavailable` while the `sandboxes.output_not_kept` capability is unavailable. + attr_accessor :keep_output + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -46,7 +51,9 @@ def self.attribute_map :'max_duration_seconds' => :'max_duration_seconds', :'command' => :'command', :'timeout_seconds' => :'timeout_seconds', - :'environment' => :'environment' + :'environment' => :'environment', + :'network' => :'network', + :'keep_output' => :'keep_output' } end @@ -70,7 +77,9 @@ def self.openapi_types :'max_duration_seconds' => :'Integer', :'command' => :'String', :'timeout_seconds' => :'Integer', - :'environment' => :'Hash' + :'environment' => :'Hash', + :'network' => :'SandboxSessionNetworkRequest', + :'keep_output' => :'Boolean' } end @@ -133,6 +142,16 @@ def initialize(attributes = {}) self.environment = value end end + + if attributes.key?(:'network') + self.network = attributes[:'network'] + end + + if attributes.key?(:'keep_output') + self.keep_output = attributes[:'keep_output'] + else + self.keep_output = true + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -308,7 +327,9 @@ def ==(o) max_duration_seconds == o.max_duration_seconds && command == o.command && timeout_seconds == o.timeout_seconds && - environment == o.environment + environment == o.environment && + network == o.network && + keep_output == o.keep_output end # @see the `==` method @@ -320,7 +341,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [preset, sandbox_id, memory_mb, region, max_duration_seconds, command, timeout_seconds, environment].hash + [preset, sandbox_id, memory_mb, region, max_duration_seconds, command, timeout_seconds, environment, network, keep_output].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_result.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_result.rb index 3536c52d..abd7f08a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_result.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_result.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -15,18 +15,25 @@ module Volcano::Generated class SandboxExecutionResult < ApiModelBase + # The first 1 MiB (1,048,576 bytes) the command wrote to stdout. Empty in a replay of a command that kept no output. attr_accessor :stdout + # The first 1 MiB (1,048,576 bytes) the command wrote to stderr. Empty in a replay of a command that kept no output. attr_accessor :stderr attr_accessor :exit_code + # True when the command wrote more than 1 MiB to stdout. False in a replay of a command that kept no output. attr_accessor :stdout_truncated + # True when the command wrote more than 1 MiB to stderr. False in a replay of a command that kept no output. attr_accessor :stderr_truncated attr_accessor :timed_out + # False when the command kept no output. Its streams appear only in the response to the request that ran it, and Volcano's control plane never stores them in the execution journal, database, logs or traces. This does not cover the Sandbox's memory or a suspended session's snapshot. A retry with the same Idempotency-Key returns them empty. + attr_accessor :output_kept + attr_accessor :session_id attr_accessor :region @@ -42,6 +49,7 @@ def self.attribute_map :'stdout_truncated' => :'stdout_truncated', :'stderr_truncated' => :'stderr_truncated', :'timed_out' => :'timed_out', + :'output_kept' => :'output_kept', :'session_id' => :'session_id', :'region' => :'region', :'duration_ms' => :'duration_ms' @@ -67,6 +75,7 @@ def self.openapi_types :'stdout_truncated' => :'Boolean', :'stderr_truncated' => :'Boolean', :'timed_out' => :'Boolean', + :'output_kept' => :'Boolean', :'session_id' => :'String', :'region' => :'String', :'duration_ms' => :'Integer' @@ -131,6 +140,12 @@ def initialize(attributes = {}) self.timed_out = nil end + if attributes.key?(:'output_kept') + self.output_kept = attributes[:'output_kept'] + else + self.output_kept = nil + end + if attributes.key?(:'session_id') self.session_id = attributes[:'session_id'] else @@ -179,6 +194,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "timed_out", timed_out cannot be nil.') end + if @output_kept.nil? + invalid_properties.push('invalid value for "output_kept", output_kept cannot be nil.') + end + if @session_id.nil? invalid_properties.push('invalid value for "session_id", session_id cannot be nil.') end @@ -208,6 +227,7 @@ def valid? return false if @stdout_truncated.nil? return false if @stderr_truncated.nil? return false if @timed_out.nil? + return false if @output_kept.nil? return false if @session_id.nil? return false if @region.nil? return false if @duration_ms.nil? @@ -275,6 +295,16 @@ def timed_out=(timed_out) @timed_out = timed_out end + # Custom attribute writer method with validation + # @param [Object] output_kept Value to be assigned + def output_kept=(output_kept) + if output_kept.nil? + fail ArgumentError, 'output_kept cannot be nil' + end + + @output_kept = output_kept + end + # Custom attribute writer method with validation # @param [Object] session_id Value to be assigned def session_id=(session_id) @@ -320,6 +350,7 @@ def ==(o) stdout_truncated == o.stdout_truncated && stderr_truncated == o.stderr_truncated && timed_out == o.timed_out && + output_kept == o.output_kept && session_id == o.session_id && region == o.region && duration_ms == o.duration_ms @@ -334,7 +365,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [stdout, stderr, exit_code, stdout_truncated, stderr_truncated, timed_out, session_id, region, duration_ms].hash + [stdout, stderr, exit_code, stdout_truncated, stderr_truncated, timed_out, output_kept, session_id, region, duration_ms].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_archive.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_archive.rb new file mode 100644 index 00000000..63e8bc38 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_archive.rb @@ -0,0 +1,288 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SandboxFileArchive < ApiModelBase + attr_accessor :project_id + + attr_accessor :session_id + + attr_accessor :path + + # Regular files written. + attr_accessor :files + + # Bytes of file content written. + attr_accessor :bytes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'project_id' => :'project_id', + :'session_id' => :'session_id', + :'path' => :'path', + :'files' => :'files', + :'bytes' => :'bytes' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'project_id' => :'String', + :'session_id' => :'String', + :'path' => :'String', + :'files' => :'Integer', + :'bytes' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxFileArchive` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxFileArchive`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'session_id') + self.session_id = attributes[:'session_id'] + else + self.session_id = nil + end + + if attributes.key?(:'path') + self.path = attributes[:'path'] + else + self.path = nil + end + + if attributes.key?(:'files') + self.files = attributes[:'files'] + else + self.files = nil + end + + if attributes.key?(:'bytes') + self.bytes = attributes[:'bytes'] + else + self.bytes = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @session_id.nil? + invalid_properties.push('invalid value for "session_id", session_id cannot be nil.') + end + + if @path.nil? + invalid_properties.push('invalid value for "path", path cannot be nil.') + end + + if @files.nil? + invalid_properties.push('invalid value for "files", files cannot be nil.') + end + + if @files < 0 + invalid_properties.push('invalid value for "files", must be greater than or equal to 0.') + end + + if @bytes.nil? + invalid_properties.push('invalid value for "bytes", bytes cannot be nil.') + end + + if @bytes < 0 + invalid_properties.push('invalid value for "bytes", must be greater than or equal to 0.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + return false if @session_id.nil? + return false if @path.nil? + return false if @files.nil? + return false if @files < 0 + return false if @bytes.nil? + return false if @bytes < 0 + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] session_id Value to be assigned + def session_id=(session_id) + if session_id.nil? + fail ArgumentError, 'session_id cannot be nil' + end + + @session_id = session_id + end + + # Custom attribute writer method with validation + # @param [Object] path Value to be assigned + def path=(path) + if path.nil? + fail ArgumentError, 'path cannot be nil' + end + + @path = path + end + + # Custom attribute writer method with validation + # @param [Object] files Value to be assigned + def files=(files) + if files.nil? + fail ArgumentError, 'files cannot be nil' + end + + if files < 0 + fail ArgumentError, 'invalid value for "files", must be greater than or equal to 0.' + end + + @files = files + end + + # Custom attribute writer method with validation + # @param [Object] bytes Value to be assigned + def bytes=(bytes) + if bytes.nil? + fail ArgumentError, 'bytes cannot be nil' + end + + if bytes < 0 + fail ArgumentError, 'invalid value for "bytes", must be greater than or equal to 0.' + end + + @bytes = bytes + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + project_id == o.project_id && + session_id == o.session_id && + path == o.path && + files == o.files && + bytes == o.bytes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [project_id, session_id, path, files, bytes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_entry.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_entry.rb new file mode 100644 index 00000000..e83a0e06 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_entry.rb @@ -0,0 +1,389 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SandboxFileEntry < ApiModelBase + # Path relative to the workspace root, usable with the read and write file routes. + attr_accessor :path + + # Entry type from the entry itself. A symlink is reported, never followed. + attr_accessor :type + + # Size in bytes of a regular file; 0 for every other type. + attr_accessor :size + + # Permission bits, including setuid, setgid and sticky (`st_mode & 07777`). For example, 420 is `0644` and 493 is `0755`. + attr_accessor :mode + + # Lowercase hex SHA-256 of a regular file's content, present only when `include_sha256` is true and the file could be hashed. + attr_accessor :sha256 + + # Why a regular file has no `sha256` when `include_sha256` is true. `budget` is a file over 256 MiB. `changing` is a file that changed while it was hashed or kept changing; list it again later. `unreadable` is a file the session user doesn't own, whose owner-read bit (`0400`) is clear, or that has more than one hard link. Treat such a file as unverified. + attr_accessor :sha256_skipped + + # True on a directory the session user can't list; the listing doesn't enter it. The user's permission bits on the directory lack read or execute: the owner bits when the user owns it, the group bits when it belongs to the user's group, and the other bits otherwise. Absent on every other entry. + attr_accessor :unreadable + + # In a recursive listing, how many names directly inside this directory no entry can carry: names that are not UTF-8, or whose path would pass 4096 bytes. The listing skips them and everything below them. Absent when there are none. + attr_accessor :unsupported_names + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'path' => :'path', + :'type' => :'type', + :'size' => :'size', + :'mode' => :'mode', + :'sha256' => :'sha256', + :'sha256_skipped' => :'sha256_skipped', + :'unreadable' => :'unreadable', + :'unsupported_names' => :'unsupported_names' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'path' => :'String', + :'type' => :'String', + :'size' => :'Integer', + :'mode' => :'Integer', + :'sha256' => :'String', + :'sha256_skipped' => :'String', + :'unreadable' => :'Boolean', + :'unsupported_names' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxFileEntry` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxFileEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'path') + self.path = attributes[:'path'] + else + self.path = nil + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = nil + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + else + self.size = nil + end + + if attributes.key?(:'mode') + self.mode = attributes[:'mode'] + else + self.mode = nil + end + + if attributes.key?(:'sha256') + self.sha256 = attributes[:'sha256'] + end + + if attributes.key?(:'sha256_skipped') + self.sha256_skipped = attributes[:'sha256_skipped'] + end + + if attributes.key?(:'unreadable') + self.unreadable = attributes[:'unreadable'] + end + + if attributes.key?(:'unsupported_names') + self.unsupported_names = attributes[:'unsupported_names'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @path.nil? + invalid_properties.push('invalid value for "path", path cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @size.nil? + invalid_properties.push('invalid value for "size", size cannot be nil.') + end + + if @size < 0 + invalid_properties.push('invalid value for "size", must be greater than or equal to 0.') + end + + if @mode.nil? + invalid_properties.push('invalid value for "mode", mode cannot be nil.') + end + + if @mode > 4095 + invalid_properties.push('invalid value for "mode", must be smaller than or equal to 4095.') + end + + if @mode < 0 + invalid_properties.push('invalid value for "mode", must be greater than or equal to 0.') + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if !@sha256.nil? && @sha256 !~ pattern + invalid_properties.push("invalid value for \"sha256\", must conform to the pattern #{pattern}.") + end + + if !@unsupported_names.nil? && @unsupported_names < 1 + invalid_properties.push('invalid value for "unsupported_names", must be greater than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @path.nil? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('String', ["file", "directory", "symlink", "other"]) + return false unless type_validator.valid?(@type) + return false if @size.nil? + return false if @size < 0 + return false if @mode.nil? + return false if @mode > 4095 + return false if @mode < 0 + return false if !@sha256.nil? && @sha256 !~ Regexp.new(/^[0-9a-f]{64}$/) + sha256_skipped_validator = EnumAttributeValidator.new('String', ["budget", "changing", "unreadable"]) + return false unless sha256_skipped_validator.valid?(@sha256_skipped) + return false if !@unsupported_names.nil? && @unsupported_names < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] path Value to be assigned + def path=(path) + if path.nil? + fail ArgumentError, 'path cannot be nil' + end + + @path = path + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["file", "directory", "symlink", "other"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] size Value to be assigned + def size=(size) + if size.nil? + fail ArgumentError, 'size cannot be nil' + end + + if size < 0 + fail ArgumentError, 'invalid value for "size", must be greater than or equal to 0.' + end + + @size = size + end + + # Custom attribute writer method with validation + # @param [Object] mode Value to be assigned + def mode=(mode) + if mode.nil? + fail ArgumentError, 'mode cannot be nil' + end + + if mode > 4095 + fail ArgumentError, 'invalid value for "mode", must be smaller than or equal to 4095.' + end + + if mode < 0 + fail ArgumentError, 'invalid value for "mode", must be greater than or equal to 0.' + end + + @mode = mode + end + + # Custom attribute writer method with validation + # @param [Object] sha256 Value to be assigned + def sha256=(sha256) + if sha256.nil? + fail ArgumentError, 'sha256 cannot be nil' + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if sha256 !~ pattern + fail ArgumentError, "invalid value for \"sha256\", must conform to the pattern #{pattern}." + end + + @sha256 = sha256 + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] sha256_skipped Object to be assigned + def sha256_skipped=(sha256_skipped) + validator = EnumAttributeValidator.new('String', ["budget", "changing", "unreadable"]) + unless validator.valid?(sha256_skipped) + fail ArgumentError, "invalid value for \"sha256_skipped\", must be one of #{validator.allowable_values}." + end + @sha256_skipped = sha256_skipped + end + + # Custom attribute writer method with validation + # @param [Object] unsupported_names Value to be assigned + def unsupported_names=(unsupported_names) + if unsupported_names.nil? + fail ArgumentError, 'unsupported_names cannot be nil' + end + + if unsupported_names < 1 + fail ArgumentError, 'invalid value for "unsupported_names", must be greater than or equal to 1.' + end + + @unsupported_names = unsupported_names + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + path == o.path && + type == o.type && + size == o.size && + mode == o.mode && + sha256 == o.sha256 && + sha256_skipped == o.sha256_skipped && + unreadable == o.unreadable && + unsupported_names == o.unsupported_names + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [path, type, size, mode, sha256, sha256_skipped, unreadable, unsupported_names].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_list_result.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_list_result.rb new file mode 100644 index 00000000..bbdfa13a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_list_result.rb @@ -0,0 +1,260 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SandboxFileListResult < ApiModelBase + # The project the session belongs to. + attr_accessor :project_id + + # The session listed. + attr_accessor :session_id + + # Entries sorted by path, compared one path element at a time by bytes, so a directory comes right before its contents. + attr_accessor :entries + + # How many names directly inside the listed directory no entry can carry: names that are not UTF-8, or whose path would pass 4096 bytes. The listing skips them and everything below them. Every page reports it. Absent when there are none. + attr_accessor :unsupported_names + + # Present when more entries remain. Pass it as `cursor` to get the next page. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'project_id' => :'project_id', + :'session_id' => :'session_id', + :'entries' => :'entries', + :'unsupported_names' => :'unsupported_names', + :'next_cursor' => :'next_cursor' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'project_id' => :'String', + :'session_id' => :'String', + :'entries' => :'Array', + :'unsupported_names' => :'Integer', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxFileListResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxFileListResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'session_id') + self.session_id = attributes[:'session_id'] + else + self.session_id = nil + end + + if attributes.key?(:'entries') + if (value = attributes[:'entries']).is_a?(Array) + self.entries = value + end + else + self.entries = nil + end + + if attributes.key?(:'unsupported_names') + self.unsupported_names = attributes[:'unsupported_names'] + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @session_id.nil? + invalid_properties.push('invalid value for "session_id", session_id cannot be nil.') + end + + if @entries.nil? + invalid_properties.push('invalid value for "entries", entries cannot be nil.') + end + + if !@unsupported_names.nil? && @unsupported_names < 1 + invalid_properties.push('invalid value for "unsupported_names", must be greater than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + return false if @session_id.nil? + return false if @entries.nil? + return false if !@unsupported_names.nil? && @unsupported_names < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] session_id Value to be assigned + def session_id=(session_id) + if session_id.nil? + fail ArgumentError, 'session_id cannot be nil' + end + + @session_id = session_id + end + + # Custom attribute writer method with validation + # @param [Object] entries Value to be assigned + def entries=(entries) + if entries.nil? + fail ArgumentError, 'entries cannot be nil' + end + + @entries = entries + end + + # Custom attribute writer method with validation + # @param [Object] unsupported_names Value to be assigned + def unsupported_names=(unsupported_names) + if unsupported_names.nil? + fail ArgumentError, 'unsupported_names cannot be nil' + end + + if unsupported_names < 1 + fail ArgumentError, 'invalid value for "unsupported_names", must be greater than or equal to 1.' + end + + @unsupported_names = unsupported_names + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + project_id == o.project_id && + session_id == o.session_id && + entries == o.entries && + unsupported_names == o.unsupported_names && + next_cursor == o.next_cursor + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [project_id, session_id, entries, unsupported_names, next_cursor].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_part.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_part.rb new file mode 100644 index 00000000..48d6c1d9 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_part.rb @@ -0,0 +1,349 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SandboxFilePart < ApiModelBase + attr_accessor :project_id + + attr_accessor :session_id + + attr_accessor :path + + attr_accessor :offset + + attr_accessor :size + + # Bytes of the file received through the end of this part. + attr_accessor :received + + # True when this part finished the file and it is now at `path`. + attr_accessor :complete + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'project_id' => :'project_id', + :'session_id' => :'session_id', + :'path' => :'path', + :'offset' => :'offset', + :'size' => :'size', + :'received' => :'received', + :'complete' => :'complete' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'project_id' => :'String', + :'session_id' => :'String', + :'path' => :'String', + :'offset' => :'Integer', + :'size' => :'Integer', + :'received' => :'Integer', + :'complete' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxFilePart` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxFilePart`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'session_id') + self.session_id = attributes[:'session_id'] + else + self.session_id = nil + end + + if attributes.key?(:'path') + self.path = attributes[:'path'] + else + self.path = nil + end + + if attributes.key?(:'offset') + self.offset = attributes[:'offset'] + else + self.offset = nil + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + else + self.size = nil + end + + if attributes.key?(:'received') + self.received = attributes[:'received'] + else + self.received = nil + end + + if attributes.key?(:'complete') + self.complete = attributes[:'complete'] + else + self.complete = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @session_id.nil? + invalid_properties.push('invalid value for "session_id", session_id cannot be nil.') + end + + if @path.nil? + invalid_properties.push('invalid value for "path", path cannot be nil.') + end + + if @offset.nil? + invalid_properties.push('invalid value for "offset", offset cannot be nil.') + end + + if @offset < 0 + invalid_properties.push('invalid value for "offset", must be greater than or equal to 0.') + end + + if @size.nil? + invalid_properties.push('invalid value for "size", size cannot be nil.') + end + + if @size < 1 + invalid_properties.push('invalid value for "size", must be greater than or equal to 1.') + end + + if @received.nil? + invalid_properties.push('invalid value for "received", received cannot be nil.') + end + + if @received < 1 + invalid_properties.push('invalid value for "received", must be greater than or equal to 1.') + end + + if @complete.nil? + invalid_properties.push('invalid value for "complete", complete cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + return false if @session_id.nil? + return false if @path.nil? + return false if @offset.nil? + return false if @offset < 0 + return false if @size.nil? + return false if @size < 1 + return false if @received.nil? + return false if @received < 1 + return false if @complete.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] session_id Value to be assigned + def session_id=(session_id) + if session_id.nil? + fail ArgumentError, 'session_id cannot be nil' + end + + @session_id = session_id + end + + # Custom attribute writer method with validation + # @param [Object] path Value to be assigned + def path=(path) + if path.nil? + fail ArgumentError, 'path cannot be nil' + end + + @path = path + end + + # Custom attribute writer method with validation + # @param [Object] offset Value to be assigned + def offset=(offset) + if offset.nil? + fail ArgumentError, 'offset cannot be nil' + end + + if offset < 0 + fail ArgumentError, 'invalid value for "offset", must be greater than or equal to 0.' + end + + @offset = offset + end + + # Custom attribute writer method with validation + # @param [Object] size Value to be assigned + def size=(size) + if size.nil? + fail ArgumentError, 'size cannot be nil' + end + + if size < 1 + fail ArgumentError, 'invalid value for "size", must be greater than or equal to 1.' + end + + @size = size + end + + # Custom attribute writer method with validation + # @param [Object] received Value to be assigned + def received=(received) + if received.nil? + fail ArgumentError, 'received cannot be nil' + end + + if received < 1 + fail ArgumentError, 'invalid value for "received", must be greater than or equal to 1.' + end + + @received = received + end + + # Custom attribute writer method with validation + # @param [Object] complete Value to be assigned + def complete=(complete) + if complete.nil? + fail ArgumentError, 'complete cannot be nil' + end + + @complete = complete + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + project_id == o.project_id && + session_id == o.session_id && + path == o.path && + offset == o.offset && + size == o.size && + received == o.received && + complete == o.complete + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [project_id, session_id, path, offset, size, received, complete].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_part_request.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_part_request.rb new file mode 100644 index 00000000..fef3be9b --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_part_request.rb @@ -0,0 +1,399 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SandboxFilePartRequest < ApiModelBase + attr_accessor :project_id + + attr_accessor :session_id + + # Workspace file to write, relative to `/workspace`. + attr_accessor :path + + # Byte offset of this part's data in the file. + attr_accessor :offset + + # Size of the whole file in bytes, at most 1 GiB. + attr_accessor :size + + # Lowercase hex SHA-256 of the whole file. + attr_accessor :sha256 + + # This part's bytes, at most 8 MiB. + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'project_id' => :'project_id', + :'session_id' => :'session_id', + :'path' => :'path', + :'offset' => :'offset', + :'size' => :'size', + :'sha256' => :'sha256', + :'data' => :'data' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'project_id' => :'String', + :'session_id' => :'String', + :'path' => :'String', + :'offset' => :'Integer', + :'size' => :'Integer', + :'sha256' => :'String', + :'data' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxFilePartRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxFilePartRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'session_id') + self.session_id = attributes[:'session_id'] + else + self.session_id = nil + end + + if attributes.key?(:'path') + self.path = attributes[:'path'] + else + self.path = nil + end + + if attributes.key?(:'offset') + self.offset = attributes[:'offset'] + else + self.offset = nil + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + else + self.size = nil + end + + if attributes.key?(:'sha256') + self.sha256 = attributes[:'sha256'] + else + self.sha256 = nil + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + else + self.data = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @session_id.nil? + invalid_properties.push('invalid value for "session_id", session_id cannot be nil.') + end + + if @path.nil? + invalid_properties.push('invalid value for "path", path cannot be nil.') + end + + if @path.to_s.length > 4096 + invalid_properties.push('invalid value for "path", the character length must be smaller than or equal to 4096.') + end + + if @path.to_s.length < 1 + invalid_properties.push('invalid value for "path", the character length must be greater than or equal to 1.') + end + + if @offset.nil? + invalid_properties.push('invalid value for "offset", offset cannot be nil.') + end + + if @offset < 0 + invalid_properties.push('invalid value for "offset", must be greater than or equal to 0.') + end + + if @size.nil? + invalid_properties.push('invalid value for "size", size cannot be nil.') + end + + if @size > 1073741824 + invalid_properties.push('invalid value for "size", must be smaller than or equal to 1073741824.') + end + + if @size < 1 + invalid_properties.push('invalid value for "size", must be greater than or equal to 1.') + end + + if @sha256.nil? + invalid_properties.push('invalid value for "sha256", sha256 cannot be nil.') + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if @sha256 !~ pattern + invalid_properties.push("invalid value for \"sha256\", must conform to the pattern #{pattern}.") + end + + if @data.nil? + invalid_properties.push('invalid value for "data", data cannot be nil.') + end + + if @data.to_s.length > 11184812 + invalid_properties.push('invalid value for "data", the character length must be smaller than or equal to 11184812.') + end + + if @data.to_s.length < 4 + invalid_properties.push('invalid value for "data", the character length must be greater than or equal to 4.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + return false if @session_id.nil? + return false if @path.nil? + return false if @path.to_s.length > 4096 + return false if @path.to_s.length < 1 + return false if @offset.nil? + return false if @offset < 0 + return false if @size.nil? + return false if @size > 1073741824 + return false if @size < 1 + return false if @sha256.nil? + return false if @sha256 !~ Regexp.new(/^[0-9a-f]{64}$/) + return false if @data.nil? + return false if @data.to_s.length > 11184812 + return false if @data.to_s.length < 4 + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] session_id Value to be assigned + def session_id=(session_id) + if session_id.nil? + fail ArgumentError, 'session_id cannot be nil' + end + + @session_id = session_id + end + + # Custom attribute writer method with validation + # @param [Object] path Value to be assigned + def path=(path) + if path.nil? + fail ArgumentError, 'path cannot be nil' + end + + if path.to_s.length > 4096 + fail ArgumentError, 'invalid value for "path", the character length must be smaller than or equal to 4096.' + end + + if path.to_s.length < 1 + fail ArgumentError, 'invalid value for "path", the character length must be greater than or equal to 1.' + end + + @path = path + end + + # Custom attribute writer method with validation + # @param [Object] offset Value to be assigned + def offset=(offset) + if offset.nil? + fail ArgumentError, 'offset cannot be nil' + end + + if offset < 0 + fail ArgumentError, 'invalid value for "offset", must be greater than or equal to 0.' + end + + @offset = offset + end + + # Custom attribute writer method with validation + # @param [Object] size Value to be assigned + def size=(size) + if size.nil? + fail ArgumentError, 'size cannot be nil' + end + + if size > 1073741824 + fail ArgumentError, 'invalid value for "size", must be smaller than or equal to 1073741824.' + end + + if size < 1 + fail ArgumentError, 'invalid value for "size", must be greater than or equal to 1.' + end + + @size = size + end + + # Custom attribute writer method with validation + # @param [Object] sha256 Value to be assigned + def sha256=(sha256) + if sha256.nil? + fail ArgumentError, 'sha256 cannot be nil' + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if sha256 !~ pattern + fail ArgumentError, "invalid value for \"sha256\", must conform to the pattern #{pattern}." + end + + @sha256 = sha256 + end + + # Custom attribute writer method with validation + # @param [Object] data Value to be assigned + def data=(data) + if data.nil? + fail ArgumentError, 'data cannot be nil' + end + + if data.to_s.length > 11184812 + fail ArgumentError, 'invalid value for "data", the character length must be smaller than or equal to 11184812.' + end + + if data.to_s.length < 4 + fail ArgumentError, 'invalid value for "data", the character length must be greater than or equal to 4.' + end + + @data = data + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + project_id == o.project_id && + session_id == o.session_id && + path == o.path && + offset == o.offset && + size == o.size && + sha256 == o.sha256 && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [project_id, session_id, path, offset, size, sha256, data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_read_request.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_read_request.rb index 9a29e8dd..d4479a38 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_read_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_read_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_result.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_result.rb index bcb39c85..ef2b5669 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_result.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_result.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_write_request.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_write_request.rb index 0051fe45..32323e21 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_write_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_write_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_limits_applied.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_limits_applied.rb new file mode 100644 index 00000000..52a6757e --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_limits_applied.rb @@ -0,0 +1,41 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SandboxLimitsApplied + SandboxLimitsEnforced = "enforced".freeze + SandboxLimitsNotEnforced = "not_enforced".freeze + SandboxLimitsUnknown = "unknown".freeze + + def self.all_vars + @all_vars ||= [SandboxLimitsEnforced, SandboxLimitsNotEnforced, SandboxLimitsUnknown].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if SandboxLimitsApplied.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #SandboxLimitsApplied" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_pagination.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_pagination.rb index bd018bd3..483515a4 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_pagination.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_pagination.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_preset.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_preset.rb index 65b2500c..6ec32bc7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_preset.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_preset.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_preset_list.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_preset_list.rb index 99f4b0d4..0b9cde87 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_preset_list.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_preset_list.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_session.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_session.rb index 03c67f74..9a61968e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_session.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_session.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -19,6 +19,9 @@ class SandboxSession < ApiModelBase attr_accessor :project_id + # Last recorded lifecycle reason, such as sandbox_run_hook_timeout or sandbox_authority_or_expiry. Historical information, not a current error; use state for the current session state. Retained when later observations supply no reason, including after termination or recovery. Omitted when no reason is known. Values may be added; this field does not imply whether a command ran or whether it can be retried. + attr_accessor :last_error_code + # Explicit template used to create the session. Null when created directly from a preset. attr_accessor :sandbox_id @@ -37,6 +40,12 @@ class SandboxSession < ApiModelBase # Absolute VM expiry. Null means unlimited in local mode. attr_accessor :expires_at + attr_accessor :network + + attr_accessor :executions + + attr_accessor :limits + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -64,6 +73,7 @@ def self.attribute_map { :'id' => :'id', :'project_id' => :'project_id', + :'last_error_code' => :'last_error_code', :'sandbox_id' => :'sandbox_id', :'state' => :'state', :'desired_state' => :'desired_state', @@ -71,7 +81,10 @@ def self.attribute_map :'memory_mb' => :'memory_mb', :'created_at' => :'created_at', :'started_at' => :'started_at', - :'expires_at' => :'expires_at' + :'expires_at' => :'expires_at', + :'network' => :'network', + :'executions' => :'executions', + :'limits' => :'limits' } end @@ -90,6 +103,7 @@ def self.openapi_types { :'id' => :'String', :'project_id' => :'String', + :'last_error_code' => :'String', :'sandbox_id' => :'String', :'state' => :'String', :'desired_state' => :'String', @@ -97,7 +111,10 @@ def self.openapi_types :'memory_mb' => :'Integer', :'created_at' => :'Time', :'started_at' => :'Time', - :'expires_at' => :'Time' + :'expires_at' => :'Time', + :'network' => :'SandboxSessionNetwork', + :'executions' => :'SandboxSessionExecutions', + :'limits' => :'SandboxSessionAppliedLimits' } end @@ -105,7 +122,7 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'sandbox_id', - :'expires_at' + :'expires_at', ]) end @@ -137,6 +154,10 @@ def initialize(attributes = {}) self.project_id = nil end + if attributes.key?(:'last_error_code') + self.last_error_code = attributes[:'last_error_code'] + end + if attributes.key?(:'sandbox_id') self.sandbox_id = attributes[:'sandbox_id'] else @@ -182,6 +203,22 @@ def initialize(attributes = {}) else self.expires_at = nil end + + if attributes.key?(:'network') + self.network = attributes[:'network'] + else + self.network = nil + end + + if attributes.key?(:'executions') + self.executions = attributes[:'executions'] + else + self.executions = nil + end + + if attributes.key?(:'limits') + self.limits = attributes[:'limits'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -217,6 +254,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') end + if @network.nil? + invalid_properties.push('invalid value for "network", network cannot be nil.') + end + + if @executions.nil? + invalid_properties.push('invalid value for "executions", executions cannot be nil.') + end + invalid_properties end @@ -235,6 +280,8 @@ def valid? return false if @region.nil? return false if @memory_mb.nil? return false if @created_at.nil? + return false if @network.nil? + return false if @executions.nil? true end @@ -308,6 +355,26 @@ def created_at=(created_at) @created_at = created_at end + # Custom attribute writer method with validation + # @param [Object] network Value to be assigned + def network=(network) + if network.nil? + fail ArgumentError, 'network cannot be nil' + end + + @network = network + end + + # Custom attribute writer method with validation + # @param [Object] executions Value to be assigned + def executions=(executions) + if executions.nil? + fail ArgumentError, 'executions cannot be nil' + end + + @executions = executions + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -315,6 +382,7 @@ def ==(o) self.class == o.class && id == o.id && project_id == o.project_id && + last_error_code == o.last_error_code && sandbox_id == o.sandbox_id && state == o.state && desired_state == o.desired_state && @@ -322,7 +390,10 @@ def ==(o) memory_mb == o.memory_mb && created_at == o.created_at && started_at == o.started_at && - expires_at == o.expires_at + expires_at == o.expires_at && + network == o.network && + executions == o.executions && + limits == o.limits end # @see the `==` method @@ -334,7 +405,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, project_id, sandbox_id, state, desired_state, region, memory_mb, created_at, started_at, expires_at].hash + [id, project_id, last_error_code, sandbox_id, state, desired_state, region, memory_mb, created_at, started_at, expires_at, network, executions, limits].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_applied_limits.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_applied_limits.rb new file mode 100644 index 00000000..76ac9ac4 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_applied_limits.rb @@ -0,0 +1,207 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The caps the session enforces, as the session reports them. Present only when the session was created with `limits`. The session stays `starting` until `applied` is known. + class SandboxSessionAppliedLimits < ApiModelBase + # Enforced vCPU cap. Never higher than requested; lower when the session has fewer vCPUs. + attr_accessor :vcpus + + # Enforced disk cap in MiB. Never higher than requested; lower when the session's disk has less free space. + attr_accessor :disk_mib + + attr_accessor :applied + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'vcpus' => :'vcpus', + :'disk_mib' => :'disk_mib', + :'applied' => :'applied' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'vcpus' => :'Integer', + :'disk_mib' => :'Integer', + :'applied' => :'SandboxLimitsApplied' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxSessionAppliedLimits` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxSessionAppliedLimits`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'vcpus') + self.vcpus = attributes[:'vcpus'] + end + + if attributes.key?(:'disk_mib') + self.disk_mib = attributes[:'disk_mib'] + end + + if attributes.key?(:'applied') + self.applied = attributes[:'applied'] + else + self.applied = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @applied.nil? + invalid_properties.push('invalid value for "applied", applied cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @applied.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] applied Value to be assigned + def applied=(applied) + if applied.nil? + fail ArgumentError, 'applied cannot be nil' + end + + @applied = applied + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + vcpus == o.vcpus && + disk_mib == o.disk_mib && + applied == o.applied + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [vcpus, disk_mib, applied].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_executions.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_executions.rb new file mode 100644 index 00000000..4cc4788a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_executions.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # How the session's command executions are kept. Fixed when the session is created. + class SandboxSessionExecutions < ApiModelBase + # When false, every command in the session keeps no output. stdout and stderr are returned once in the command's response, and Volcano's control plane never stores them in the execution journal, database, logs or traces. This does not cover the Sandbox's memory or a suspended session's snapshot. A retry with the same Idempotency-Key returns the exit code with empty streams. A command in such a session that sets `keep_output` to true is refused with 400 and code `sandbox_session_keeps_no_output`. False is refused with 400 and code `feature_unavailable` while the `sandboxes.output_not_kept` capability is unavailable. + attr_accessor :keep_output + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'keep_output' => :'keep_output' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'keep_output' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxSessionExecutions` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxSessionExecutions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'keep_output') + self.keep_output = attributes[:'keep_output'] + else + self.keep_output = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @keep_output.nil? + invalid_properties.push('invalid value for "keep_output", keep_output cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @keep_output.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] keep_output Value to be assigned + def keep_output=(keep_output) + if keep_output.nil? + fail ArgumentError, 'keep_output cannot be nil' + end + + @keep_output = keep_output + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + keep_output == o.keep_output + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [keep_output].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_limits.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_limits.rb new file mode 100644 index 00000000..62ac5a06 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_limits.rb @@ -0,0 +1,215 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Caps the session's code runs under, enforced inside the session. Each cap is an upper bound; the session's own size still bounds both. + class SandboxSessionLimits < ApiModelBase + # CPU time the session's commands and template service may use together, in vCPUs. A 1024 MiB session has 2 vCPUs and a 2048 MiB session has 4; asking for more answers 400 with code `sandbox_limits_exceed_session`. + attr_accessor :vcpus + + # Space the session can write beyond its image's contents, in MiB. It covers every path commands and the template service can write, including `/workspace` and `/tmp`. A write past it fails with `ENOSPC`. `/dev/shm` is memory, capped separately at 64 MiB. + attr_accessor :disk_mib + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'vcpus' => :'vcpus', + :'disk_mib' => :'disk_mib' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'vcpus' => :'Integer', + :'disk_mib' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxSessionLimits` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxSessionLimits`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'vcpus') + self.vcpus = attributes[:'vcpus'] + end + + if attributes.key?(:'disk_mib') + self.disk_mib = attributes[:'disk_mib'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@vcpus.nil? && @vcpus > 4 + invalid_properties.push('invalid value for "vcpus", must be smaller than or equal to 4.') + end + + if !@vcpus.nil? && @vcpus < 1 + invalid_properties.push('invalid value for "vcpus", must be greater than or equal to 1.') + end + + if !@disk_mib.nil? && @disk_mib > 6144 + invalid_properties.push('invalid value for "disk_mib", must be smaller than or equal to 6144.') + end + + if !@disk_mib.nil? && @disk_mib < 64 + invalid_properties.push('invalid value for "disk_mib", must be greater than or equal to 64.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@vcpus.nil? && @vcpus > 4 + return false if !@vcpus.nil? && @vcpus < 1 + return false if !@disk_mib.nil? && @disk_mib > 6144 + return false if !@disk_mib.nil? && @disk_mib < 64 + true + end + + # Custom attribute writer method with validation + # @param [Object] vcpus Value to be assigned + def vcpus=(vcpus) + if vcpus.nil? + fail ArgumentError, 'vcpus cannot be nil' + end + + if vcpus > 4 + fail ArgumentError, 'invalid value for "vcpus", must be smaller than or equal to 4.' + end + + if vcpus < 1 + fail ArgumentError, 'invalid value for "vcpus", must be greater than or equal to 1.' + end + + @vcpus = vcpus + end + + # Custom attribute writer method with validation + # @param [Object] disk_mib Value to be assigned + def disk_mib=(disk_mib) + if disk_mib.nil? + fail ArgumentError, 'disk_mib cannot be nil' + end + + if disk_mib > 6144 + fail ArgumentError, 'invalid value for "disk_mib", must be smaller than or equal to 6144.' + end + + if disk_mib < 64 + fail ArgumentError, 'invalid value for "disk_mib", must be greater than or equal to 64.' + end + + @disk_mib = disk_mib + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + vcpus == o.vcpus && + disk_mib == o.disk_mib + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [vcpus, disk_mib].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_network.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_network.rb new file mode 100644 index 00000000..2cdf353f --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_network.rb @@ -0,0 +1,218 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SandboxSessionNetwork < ApiModelBase + # The outbound network policy the session was created with. It never changes. + attr_accessor :egress + + # The outbound network policy Volcano last observed on the session's VM, never the request alone. It is `unknown` until the session is first observed, from a suspend or resume request until it is observed again, briefly while Volcano rolls out an update, and whenever the observation does not match the request. A terminated session keeps what Volcano last observed, so a `deny_all` session ended because Volcano observed outbound access reads `default`. A session first reports `state` `running` only once its network has been observed. To depend on `deny_all`, wait for `running`, then terminate the session unless `applied` is `deny_all`. Act on `applied` only while the session is `running`, and on a later `unknown` only while `desired_state` is `running`. + attr_accessor :applied + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'egress' => :'egress', + :'applied' => :'applied' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'egress' => :'String', + :'applied' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxSessionNetwork` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxSessionNetwork`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'egress') + self.egress = attributes[:'egress'] + else + self.egress = nil + end + + if attributes.key?(:'applied') + self.applied = attributes[:'applied'] + else + self.applied = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @egress.nil? + invalid_properties.push('invalid value for "egress", egress cannot be nil.') + end + + if @applied.nil? + invalid_properties.push('invalid value for "applied", applied cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @egress.nil? + egress_validator = EnumAttributeValidator.new('String', ["default", "deny_all"]) + return false unless egress_validator.valid?(@egress) + return false if @applied.nil? + applied_validator = EnumAttributeValidator.new('String', ["default", "deny_all", "unknown"]) + return false unless applied_validator.valid?(@applied) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] egress Object to be assigned + def egress=(egress) + validator = EnumAttributeValidator.new('String', ["default", "deny_all"]) + unless validator.valid?(egress) + fail ArgumentError, "invalid value for \"egress\", must be one of #{validator.allowable_values}." + end + @egress = egress + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] applied Object to be assigned + def applied=(applied) + validator = EnumAttributeValidator.new('String', ["default", "deny_all", "unknown"]) + unless validator.valid?(applied) + fail ArgumentError, "invalid value for \"applied\", must be one of #{validator.allowable_values}." + end + @applied = applied + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + egress == o.egress && + applied == o.applied + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [egress, applied].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_network_request.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_network_request.rb new file mode 100644 index 00000000..6d25eeb8 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_network_request.rb @@ -0,0 +1,190 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Outbound network policy for the session. Omitting `network` is the same as `egress` `default`. + class SandboxSessionNetworkRequest < ApiModelBase + # `default` gives the session the region's standard outbound internet access. `deny_all` gives it no outbound network for its whole lifetime: DNS lookups, internet and link-local addresses, and connections back out through Volcano all fail, and the session accepts no port access. Commands, files and the rest of the session API work as usual. The policy cannot be changed after creation; suspend and resume keep it. Check `network.applied` before relying on it. Where `GET /capabilities` lists `sandboxes.network_isolation` as unavailable, `deny_all` answers `400` with code `feature_unavailable`. + attr_accessor :egress + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'egress' => :'egress' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'egress' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxSessionNetworkRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxSessionNetworkRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'egress') + self.egress = attributes[:'egress'] + else + self.egress = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @egress.nil? + invalid_properties.push('invalid value for "egress", egress cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @egress.nil? + egress_validator = EnumAttributeValidator.new('String', ["default", "deny_all"]) + return false unless egress_validator.valid?(@egress) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] egress Object to be assigned + def egress=(egress) + validator = EnumAttributeValidator.new('String', ["default", "deny_all"]) + unless validator.valid?(egress) + fail ArgumentError, "invalid value for \"egress\", must be one of #{validator.allowable_values}." + end + @egress = egress + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + egress == o.egress + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [egress].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_page.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_page.rb index b787f62a..bfce0c6f 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_page.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_page.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_subject_grant_request.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_subject_grant_request.rb index a8c46f46..90a5c17c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_subject_grant_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_subject_grant_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_template.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_template.rb index af5e5f98..4efaecd2 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_template.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_template.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/sandbox_template_page.rb b/lib/volcano/generated/lib/volcano-generated/models/sandbox_template_page.rb index e77f3e5c..5c46e6ea 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/sandbox_template_page.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/sandbox_template_page.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/schedule_request.rb b/lib/volcano/generated/lib/volcano-generated/models/schedule_request.rb index 90f91c94..0cfad0b7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/schedule_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/schedule_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/scheduler_failure_alert_policy.rb b/lib/volcano/generated/lib/volcano-generated/models/scheduler_failure_alert_policy.rb new file mode 100644 index 00000000..c05d6d69 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/scheduler_failure_alert_policy.rb @@ -0,0 +1,258 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SchedulerFailureAlertPolicy < ApiModelBase + attr_accessor :notify_on + + # How many runs in a row have to fail before a `consecutive_failures` alert. Ignored for `first_failure`. + attr_accessor :threshold + + # Whether a successful run after an alerted failure streak sends a `scheduler.recovered` alert. + attr_accessor :notify_on_recovery + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'notify_on' => :'notify_on', + :'threshold' => :'threshold', + :'notify_on_recovery' => :'notify_on_recovery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'notify_on' => :'SchedulerFailureNotifyOn', + :'threshold' => :'Integer', + :'notify_on_recovery' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SchedulerFailureAlertPolicy` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SchedulerFailureAlertPolicy`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'notify_on') + self.notify_on = attributes[:'notify_on'] + else + self.notify_on = nil + end + + if attributes.key?(:'threshold') + self.threshold = attributes[:'threshold'] + else + self.threshold = nil + end + + if attributes.key?(:'notify_on_recovery') + self.notify_on_recovery = attributes[:'notify_on_recovery'] + else + self.notify_on_recovery = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @notify_on.nil? + invalid_properties.push('invalid value for "notify_on", notify_on cannot be nil.') + end + + if @threshold.nil? + invalid_properties.push('invalid value for "threshold", threshold cannot be nil.') + end + + if @threshold > 100 + invalid_properties.push('invalid value for "threshold", must be smaller than or equal to 100.') + end + + if @threshold < 1 + invalid_properties.push('invalid value for "threshold", must be greater than or equal to 1.') + end + + if @notify_on_recovery.nil? + invalid_properties.push('invalid value for "notify_on_recovery", notify_on_recovery cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @notify_on.nil? + return false if @threshold.nil? + return false if @threshold > 100 + return false if @threshold < 1 + return false if @notify_on_recovery.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] notify_on Value to be assigned + def notify_on=(notify_on) + if notify_on.nil? + fail ArgumentError, 'notify_on cannot be nil' + end + + @notify_on = notify_on + end + + # Custom attribute writer method with validation + # @param [Object] threshold Value to be assigned + def threshold=(threshold) + if threshold.nil? + fail ArgumentError, 'threshold cannot be nil' + end + + if threshold > 100 + fail ArgumentError, 'invalid value for "threshold", must be smaller than or equal to 100.' + end + + if threshold < 1 + fail ArgumentError, 'invalid value for "threshold", must be greater than or equal to 1.' + end + + @threshold = threshold + end + + # Custom attribute writer method with validation + # @param [Object] notify_on_recovery Value to be assigned + def notify_on_recovery=(notify_on_recovery) + if notify_on_recovery.nil? + fail ArgumentError, 'notify_on_recovery cannot be nil' + end + + @notify_on_recovery = notify_on_recovery + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + notify_on == o.notify_on && + threshold == o.threshold && + notify_on_recovery == o.notify_on_recovery + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [notify_on, threshold, notify_on_recovery].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/scheduler_failure_notify_on.rb b/lib/volcano/generated/lib/volcano-generated/models/scheduler_failure_notify_on.rb new file mode 100644 index 00000000..da8fecb2 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/scheduler_failure_notify_on.rb @@ -0,0 +1,40 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SchedulerFailureNotifyOn + SchedulerFailureNotifyOnFirstFailure = "first_failure".freeze + SchedulerFailureNotifyOnConsecutiveFailures = "consecutive_failures".freeze + + def self.all_vars + @all_vars ||= [SchedulerFailureNotifyOnFirstFailure, SchedulerFailureNotifyOnConsecutiveFailures].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if SchedulerFailureNotifyOn.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #SchedulerFailureNotifyOn" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/send_durable_message_request.rb b/lib/volcano/generated/lib/volcano-generated/models/send_durable_message_request.rb index 93602cf1..b72140d3 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/send_durable_message_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/send_durable_message_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/service_key.rb b/lib/volcano/generated/lib/volcano-generated/models/service_key.rb index 5aeea7a6..2cdf9ccf 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/service_key.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/service_key.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -23,7 +23,7 @@ class ServiceKey < ApiModelBase # Descriptive name for the key attr_accessor :name - # Full JWT token for Authorization header. Returned on create, get, and list (decrypted from storage). **Store securely - NEVER expose in frontend code!** + # Full JWT token for Authorization header. Returned on create, get, and list (decrypted from storage). List responses leave it out for a key that holds `ai.invoke` or `grants.mint`. **Store securely - NEVER expose in frontend code!** attr_accessor :key_value # First 12 characters of the key for display/identification diff --git a/lib/volcano/generated/lib/volcano-generated/models/set_project_git_production_branch_request.rb b/lib/volcano/generated/lib/volcano-generated/models/set_project_git_production_branch_request.rb index 95e130f0..43d23072 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/set_project_git_production_branch_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/set_project_git_production_branch_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -15,7 +15,7 @@ module Volcano::Generated class SetProjectGitProductionBranchRequest < ApiModelBase - # The branch a push must land on to deploy. Validated as a Git branch name only — it does not have to exist yet. + # The branch a push must land on to deploy. Validated as a Git branch name only — it does not have to exist yet. An empty string follows the repository's default branch, including later renames. attr_accessor :production_branch # Attribute mapping from ruby-style variable name to JSON key. @@ -84,10 +84,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "production_branch", the character length must be smaller than or equal to 255.') end - if @production_branch.to_s.length < 1 - invalid_properties.push('invalid value for "production_branch", the character length must be greater than or equal to 1.') - end - invalid_properties end @@ -97,7 +93,6 @@ def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @production_branch.nil? return false if @production_branch.to_s.length > 255 - return false if @production_branch.to_s.length < 1 true end @@ -112,10 +107,6 @@ def production_branch=(production_branch) fail ArgumentError, 'invalid value for "production_branch", the character length must be smaller than or equal to 255.' end - if production_branch.to_s.length < 1 - fail ArgumentError, 'invalid value for "production_branch", the character length must be greater than or equal to 1.' - end - @production_branch = production_branch end diff --git a/lib/volcano/generated/lib/volcano-generated/models/set_project_git_root_directory_request.rb b/lib/volcano/generated/lib/volcano-generated/models/set_project_git_root_directory_request.rb new file mode 100644 index 00000000..42a4558b --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/set_project_git_root_directory_request.rb @@ -0,0 +1,174 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SetProjectGitRootDirectoryRequest < ApiModelBase + # Monorepo subdirectory the project builds from, relative to the repository root. An empty string means the repository root. + attr_accessor :root_directory + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'root_directory' => :'root_directory' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'root_directory' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SetProjectGitRootDirectoryRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SetProjectGitRootDirectoryRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'root_directory') + self.root_directory = attributes[:'root_directory'] + else + self.root_directory = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @root_directory.nil? + invalid_properties.push('invalid value for "root_directory", root_directory cannot be nil.') + end + + if @root_directory.to_s.length > 1024 + invalid_properties.push('invalid value for "root_directory", the character length must be smaller than or equal to 1024.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @root_directory.nil? + return false if @root_directory.to_s.length > 1024 + true + end + + # Custom attribute writer method with validation + # @param [Object] root_directory Value to be assigned + def root_directory=(root_directory) + if root_directory.nil? + fail ArgumentError, 'root_directory cannot be nil' + end + + if root_directory.to_s.length > 1024 + fail ArgumentError, 'invalid value for "root_directory", the character length must be smaller than or equal to 1024.' + end + + @root_directory = root_directory + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + root_directory == o.root_directory + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [root_directory].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share.rb b/lib/volcano/generated/lib/volcano-generated/models/share.rb new file mode 100644 index 00000000..678bc42f --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share.rb @@ -0,0 +1,446 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class Share < ApiModelBase + # The link's public identifier. Its address is `https://volcano.dev/deploy/`. + attr_accessor :id + + attr_accessor :project_id + + # A project name for clients to offer a visitor as the default. The create request still carries its own `name`; Volcano does not fill one in from the link. + attr_accessor :suggested_name + + # What the project does, in the owner's words, shown to visitors before they deploy. One line of plain text; empty when the owner wrote none. + attr_accessor :description + + # Whether the projects made from this link, and the projects made from those, may be shared again by their owners. False by default, so a copy of this project cannot create, draft, publish or switch on a deploy link of its own, and its links serve nothing. Read at each request, so switching it off stops copies' links that are already on. + attr_accessor :allow_reshare + + # Whether the owner, or Volcano, has the link on. An `active` link can still not serve; see `serving`. + attr_accessor :status + + # Whether the link's address serves its current release now: it is `active`, published, and nothing stops it, such as deploy links not being available in this environment, the project being deleted, the owner's account not allowing traffic, or the project being a copy that may no longer be shared. An `active` link that is not serving answers visitors as one switched off, and switching it on again changes nothing until what stops it is resolved. + attr_accessor :serving + + # Why the link is off. Set only while it is disabled. New reasons can be added, so treat an unknown one as disabled. `owner`: its owner switched it off. `operator`: Volcano took it down; its owner cannot switch it back on or delete it (`PATCH` and `DELETE` answer `403` with code `operator_disabled`), but can still edit it. While it is down, its project cannot be shared any more (no new link, draft or publish, and no link switched on), and no project made from it, or from a copy of it, can be shared either. + attr_accessor :disabled_reason + + # The release visitors are offered. Null until the first publish; until then the link's preview answers `404`. + attr_accessor :current_release + + attr_accessor :created_at + + attr_accessor :updated_at + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'project_id' => :'project_id', + :'suggested_name' => :'suggested_name', + :'description' => :'description', + :'allow_reshare' => :'allow_reshare', + :'status' => :'status', + :'serving' => :'serving', + :'disabled_reason' => :'disabled_reason', + :'current_release' => :'current_release', + :'created_at' => :'created_at', + :'updated_at' => :'updated_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'project_id' => :'String', + :'suggested_name' => :'String', + :'description' => :'String', + :'allow_reshare' => :'Boolean', + :'status' => :'String', + :'serving' => :'Boolean', + :'disabled_reason' => :'String', + :'current_release' => :'ShareReleaseRef', + :'created_at' => :'Time', + :'updated_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'disabled_reason', + :'current_release', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::Share` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::Share`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'suggested_name') + self.suggested_name = attributes[:'suggested_name'] + else + self.suggested_name = nil + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + else + self.description = nil + end + + if attributes.key?(:'allow_reshare') + self.allow_reshare = attributes[:'allow_reshare'] + else + self.allow_reshare = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'serving') + self.serving = attributes[:'serving'] + else + self.serving = nil + end + + if attributes.key?(:'disabled_reason') + self.disabled_reason = attributes[:'disabled_reason'] + end + + if attributes.key?(:'current_release') + self.current_release = attributes[:'current_release'] + else + self.current_release = nil + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + else + self.updated_at = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if @id !~ pattern + invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.") + end + + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @suggested_name.nil? + invalid_properties.push('invalid value for "suggested_name", suggested_name cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @description.to_s.length > 280 + invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 280.') + end + + if @allow_reshare.nil? + invalid_properties.push('invalid value for "allow_reshare", allow_reshare cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @serving.nil? + invalid_properties.push('invalid value for "serving", serving cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @id !~ Regexp.new(/^[A-Za-z0-9]{12}$/) + return false if @project_id.nil? + return false if @suggested_name.nil? + return false if @description.nil? + return false if @description.to_s.length > 280 + return false if @allow_reshare.nil? + return false if @status.nil? + status_validator = EnumAttributeValidator.new('String', ["active", "disabled"]) + return false unless status_validator.valid?(@status) + return false if @serving.nil? + return false if @created_at.nil? + return false if @updated_at.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if id !~ pattern + fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}." + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] suggested_name Value to be assigned + def suggested_name=(suggested_name) + if suggested_name.nil? + fail ArgumentError, 'suggested_name cannot be nil' + end + + @suggested_name = suggested_name + end + + # Custom attribute writer method with validation + # @param [Object] description Value to be assigned + def description=(description) + if description.nil? + fail ArgumentError, 'description cannot be nil' + end + + if description.to_s.length > 280 + fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 280.' + end + + @description = description + end + + # Custom attribute writer method with validation + # @param [Object] allow_reshare Value to be assigned + def allow_reshare=(allow_reshare) + if allow_reshare.nil? + fail ArgumentError, 'allow_reshare cannot be nil' + end + + @allow_reshare = allow_reshare + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["active", "disabled"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Custom attribute writer method with validation + # @param [Object] serving Value to be assigned + def serving=(serving) + if serving.nil? + fail ArgumentError, 'serving cannot be nil' + end + + @serving = serving + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param [Object] updated_at Value to be assigned + def updated_at=(updated_at) + if updated_at.nil? + fail ArgumentError, 'updated_at cannot be nil' + end + + @updated_at = updated_at + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + project_id == o.project_id && + suggested_name == o.suggested_name && + description == o.description && + allow_reshare == o.allow_reshare && + status == o.status && + serving == o.serving && + disabled_reason == o.disabled_reason && + current_release == o.current_release && + created_at == o.created_at && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, project_id, suggested_name, description, allow_reshare, status, serving, disabled_reason, current_release, created_at, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_create_request.rb b/lib/volcano/generated/lib/volcano-generated/models/share_create_request.rb new file mode 100644 index 00000000..16210ddf --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_create_request.rb @@ -0,0 +1,244 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ShareCreateRequest < ApiModelBase + # The project to share. A project the caller can't share answers like one that doesn't exist. + attr_accessor :project_id + + # A project name for clients to offer visitors as the default; the create request still carries its own `name`. It may contain only letters, numbers, underscores and hyphens. + attr_accessor :suggested_name + + # What the project does, shown to visitors before they deploy. One line of plain text with no control characters; surrounding spaces are trimmed. + attr_accessor :description + + # Lets the projects made from this link be shared again by their owners. Defaults to false. + attr_accessor :allow_reshare + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'project_id' => :'project_id', + :'suggested_name' => :'suggested_name', + :'description' => :'description', + :'allow_reshare' => :'allow_reshare' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'project_id' => :'String', + :'suggested_name' => :'String', + :'description' => :'String', + :'allow_reshare' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ShareCreateRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ShareCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'suggested_name') + self.suggested_name = attributes[:'suggested_name'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'allow_reshare') + self.allow_reshare = attributes[:'allow_reshare'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if !@suggested_name.nil? && @suggested_name.to_s.length > 64 + invalid_properties.push('invalid value for "suggested_name", the character length must be smaller than or equal to 64.') + end + + pattern = Regexp.new(/^[A-Za-z0-9_-]*$/) + if !@suggested_name.nil? && @suggested_name !~ pattern + invalid_properties.push("invalid value for \"suggested_name\", must conform to the pattern #{pattern}.") + end + + if !@description.nil? && @description.to_s.length > 280 + invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 280.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @project_id.nil? + return false if !@suggested_name.nil? && @suggested_name.to_s.length > 64 + return false if !@suggested_name.nil? && @suggested_name !~ Regexp.new(/^[A-Za-z0-9_-]*$/) + return false if !@description.nil? && @description.to_s.length > 280 + true + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] suggested_name Value to be assigned + def suggested_name=(suggested_name) + if suggested_name.nil? + fail ArgumentError, 'suggested_name cannot be nil' + end + + if suggested_name.to_s.length > 64 + fail ArgumentError, 'invalid value for "suggested_name", the character length must be smaller than or equal to 64.' + end + + pattern = Regexp.new(/^[A-Za-z0-9_-]*$/) + if suggested_name !~ pattern + fail ArgumentError, "invalid value for \"suggested_name\", must conform to the pattern #{pattern}." + end + + @suggested_name = suggested_name + end + + # Custom attribute writer method with validation + # @param [Object] description Value to be assigned + def description=(description) + if description.nil? + fail ArgumentError, 'description cannot be nil' + end + + if description.to_s.length > 280 + fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 280.' + end + + @description = description + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + project_id == o.project_id && + suggested_name == o.suggested_name && + description == o.description && + allow_reshare == o.allow_reshare + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [project_id, suggested_name, description, allow_reshare].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_daily_count.rb b/lib/volcano/generated/lib/volcano-generated/models/share_daily_count.rb new file mode 100644 index 00000000..6b1be46b --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_daily_count.rb @@ -0,0 +1,241 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ShareDailyCount < ApiModelBase + # UTC day. + attr_accessor :day + + attr_accessor :kind + + attr_accessor :events + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'day' => :'day', + :'kind' => :'kind', + :'events' => :'events' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'day' => :'Date', + :'kind' => :'String', + :'events' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ShareDailyCount` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ShareDailyCount`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'day') + self.day = attributes[:'day'] + else + self.day = nil + end + + if attributes.key?(:'kind') + self.kind = attributes[:'kind'] + else + self.kind = nil + end + + if attributes.key?(:'events') + self.events = attributes[:'events'] + else + self.events = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @day.nil? + invalid_properties.push('invalid value for "day", day cannot be nil.') + end + + if @kind.nil? + invalid_properties.push('invalid value for "kind", kind cannot be nil.') + end + + if @events.nil? + invalid_properties.push('invalid value for "events", events cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @day.nil? + return false if @kind.nil? + kind_validator = EnumAttributeValidator.new('String', ["click", "preview", "confirm", "accepted", "ready", "failed"]) + return false unless kind_validator.valid?(@kind) + return false if @events.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] day Value to be assigned + def day=(day) + if day.nil? + fail ArgumentError, 'day cannot be nil' + end + + @day = day + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] kind Object to be assigned + def kind=(kind) + validator = EnumAttributeValidator.new('String', ["click", "preview", "confirm", "accepted", "ready", "failed"]) + unless validator.valid?(kind) + fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}." + end + @kind = kind + end + + # Custom attribute writer method with validation + # @param [Object] events Value to be assigned + def events=(events) + if events.nil? + fail ArgumentError, 'events cannot be nil' + end + + @events = events + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + day == o.day && + kind == o.kind && + events == o.events + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [day, kind, events].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_draft_changed_error.rb b/lib/volcano/generated/lib/volcano-generated/models/share_draft_changed_error.rb new file mode 100644 index 00000000..e5e44ebf --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_draft_changed_error.rb @@ -0,0 +1,240 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ShareDraftChangedError < ApiModelBase + attr_accessor :error + + attr_accessor :code + + attr_accessor :draft + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'error' => :'error', + :'code' => :'code', + :'draft' => :'draft' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'error' => :'String', + :'code' => :'String', + :'draft' => :'ShareReleaseDraft' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ShareDraftChangedError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ShareDraftChangedError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'error') + self.error = attributes[:'error'] + else + self.error = nil + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + else + self.code = nil + end + + if attributes.key?(:'draft') + self.draft = attributes[:'draft'] + else + self.draft = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @error.nil? + invalid_properties.push('invalid value for "error", error cannot be nil.') + end + + if @code.nil? + invalid_properties.push('invalid value for "code", code cannot be nil.') + end + + if @draft.nil? + invalid_properties.push('invalid value for "draft", draft cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @error.nil? + return false if @code.nil? + code_validator = EnumAttributeValidator.new('String', ["draft_changed"]) + return false unless code_validator.valid?(@code) + return false if @draft.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] error Value to be assigned + def error=(error) + if error.nil? + fail ArgumentError, 'error cannot be nil' + end + + @error = error + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["draft_changed"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + end + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] draft Value to be assigned + def draft=(draft) + if draft.nil? + fail ArgumentError, 'draft cannot be nil' + end + + @draft = draft + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error == o.error && + code == o.code && + draft == o.draft + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [error, code, draft].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_kind_count.rb b/lib/volcano/generated/lib/volcano-generated/models/share_kind_count.rb new file mode 100644 index 00000000..cbc64d6d --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_kind_count.rb @@ -0,0 +1,241 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ShareKindCount < ApiModelBase + attr_accessor :kind + + attr_accessor :events + + # Unique daily visitors among the events that carried one. A visitor is pseudonymised per day, so one who returns on another day counts again. + attr_accessor :visitors + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'kind' => :'kind', + :'events' => :'events', + :'visitors' => :'visitors' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'kind' => :'String', + :'events' => :'Integer', + :'visitors' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ShareKindCount` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ShareKindCount`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'kind') + self.kind = attributes[:'kind'] + else + self.kind = nil + end + + if attributes.key?(:'events') + self.events = attributes[:'events'] + else + self.events = nil + end + + if attributes.key?(:'visitors') + self.visitors = attributes[:'visitors'] + else + self.visitors = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @kind.nil? + invalid_properties.push('invalid value for "kind", kind cannot be nil.') + end + + if @events.nil? + invalid_properties.push('invalid value for "events", events cannot be nil.') + end + + if @visitors.nil? + invalid_properties.push('invalid value for "visitors", visitors cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @kind.nil? + kind_validator = EnumAttributeValidator.new('String', ["click", "preview", "confirm", "accepted", "ready", "failed"]) + return false unless kind_validator.valid?(@kind) + return false if @events.nil? + return false if @visitors.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] kind Object to be assigned + def kind=(kind) + validator = EnumAttributeValidator.new('String', ["click", "preview", "confirm", "accepted", "ready", "failed"]) + unless validator.valid?(kind) + fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}." + end + @kind = kind + end + + # Custom attribute writer method with validation + # @param [Object] events Value to be assigned + def events=(events) + if events.nil? + fail ArgumentError, 'events cannot be nil' + end + + @events = events + end + + # Custom attribute writer method with validation + # @param [Object] visitors Value to be assigned + def visitors=(visitors) + if visitors.nil? + fail ArgumentError, 'visitors cannot be nil' + end + + @visitors = visitors + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + kind == o.kind && + events == o.events && + visitors == o.visitors + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [kind, events, visitors].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_preview.rb b/lib/volcano/generated/lib/volcano-generated/models/share_preview.rb new file mode 100644 index 00000000..fffdc243 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_preview.rb @@ -0,0 +1,255 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SharePreview < ApiModelBase + attr_accessor :id + + # A project name the link's owner suggests, for clients to offer as the default. The create request still carries its own `name`; Volcano does not fill one in from the link. + attr_accessor :suggested_name + + # What the project does, in the owner's words. Plain text; empty when the owner wrote none. + attr_accessor :description + + attr_accessor :release + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'suggested_name' => :'suggested_name', + :'description' => :'description', + :'release' => :'release' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'suggested_name' => :'String', + :'description' => :'String', + :'release' => :'SharePreviewRelease' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SharePreview` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SharePreview`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'suggested_name') + self.suggested_name = attributes[:'suggested_name'] + else + self.suggested_name = nil + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + else + self.description = nil + end + + if attributes.key?(:'release') + self.release = attributes[:'release'] + else + self.release = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if @id !~ pattern + invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.") + end + + if @suggested_name.nil? + invalid_properties.push('invalid value for "suggested_name", suggested_name cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @release.nil? + invalid_properties.push('invalid value for "release", release cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @id !~ Regexp.new(/^[A-Za-z0-9]{12}$/) + return false if @suggested_name.nil? + return false if @description.nil? + return false if @release.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if id !~ pattern + fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}." + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] suggested_name Value to be assigned + def suggested_name=(suggested_name) + if suggested_name.nil? + fail ArgumentError, 'suggested_name cannot be nil' + end + + @suggested_name = suggested_name + end + + # Custom attribute writer method with validation + # @param [Object] description Value to be assigned + def description=(description) + if description.nil? + fail ArgumentError, 'description cannot be nil' + end + + @description = description + end + + # Custom attribute writer method with validation + # @param [Object] release Value to be assigned + def release=(release) + if release.nil? + fail ArgumentError, 'release cannot be nil' + end + + @release = release + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + suggested_name == o.suggested_name && + description == o.description && + release == o.release + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, suggested_name, description, release].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_preview_release.rb b/lib/volcano/generated/lib/volcano-generated/models/share_preview_release.rb new file mode 100644 index 00000000..3090eaec --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_preview_release.rb @@ -0,0 +1,375 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # The release a project created from the link installs. + class SharePreviewRelease < ApiModelBase + # Send it as `release_id` in `POST /forks` to confirm this release. + attr_accessor :id + + attr_accessor :published_at + + # The digest of the stored release archive. + attr_accessor :sha256 + + # Names of the frontends installing the release creates. + attr_accessor :frontends + + # Names of the functions installing the release creates. + attr_accessor :functions + + # Names of the functions that receive the new project's `VOLCANO_SERVICE_KEY`, which bypasses row-level security. Show them to the visitor before they confirm. Empty when no function receives it. + attr_accessor :service_key_functions + + # The project variables the new project gets, sorted by name. A visitor may give a value for any of them as `variables` when creating the fork with `POST /forks`; each one left out is created empty, for the visitor to set later. Volcano's own variables, such as `VOLCANO_API_URL`, are never listed: the install sets them. + attr_accessor :variables + + # What the release does not carry. A `database` entry means the new project starts without that database. + attr_accessor :omissions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'published_at' => :'published_at', + :'sha256' => :'sha256', + :'frontends' => :'frontends', + :'functions' => :'functions', + :'service_key_functions' => :'service_key_functions', + :'variables' => :'variables', + :'omissions' => :'omissions' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'published_at' => :'Time', + :'sha256' => :'String', + :'frontends' => :'Array', + :'functions' => :'Array', + :'service_key_functions' => :'Array', + :'variables' => :'Array', + :'omissions' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SharePreviewRelease` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SharePreviewRelease`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'published_at') + self.published_at = attributes[:'published_at'] + else + self.published_at = nil + end + + if attributes.key?(:'sha256') + self.sha256 = attributes[:'sha256'] + else + self.sha256 = nil + end + + if attributes.key?(:'frontends') + if (value = attributes[:'frontends']).is_a?(Array) + self.frontends = value + end + else + self.frontends = nil + end + + if attributes.key?(:'functions') + if (value = attributes[:'functions']).is_a?(Array) + self.functions = value + end + else + self.functions = nil + end + + if attributes.key?(:'service_key_functions') + if (value = attributes[:'service_key_functions']).is_a?(Array) + self.service_key_functions = value + end + else + self.service_key_functions = nil + end + + if attributes.key?(:'variables') + if (value = attributes[:'variables']).is_a?(Array) + self.variables = value + end + else + self.variables = nil + end + + if attributes.key?(:'omissions') + if (value = attributes[:'omissions']).is_a?(Array) + self.omissions = value + end + else + self.omissions = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @published_at.nil? + invalid_properties.push('invalid value for "published_at", published_at cannot be nil.') + end + + if @sha256.nil? + invalid_properties.push('invalid value for "sha256", sha256 cannot be nil.') + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if @sha256 !~ pattern + invalid_properties.push("invalid value for \"sha256\", must conform to the pattern #{pattern}.") + end + + if @frontends.nil? + invalid_properties.push('invalid value for "frontends", frontends cannot be nil.') + end + + if @functions.nil? + invalid_properties.push('invalid value for "functions", functions cannot be nil.') + end + + if @service_key_functions.nil? + invalid_properties.push('invalid value for "service_key_functions", service_key_functions cannot be nil.') + end + + if @variables.nil? + invalid_properties.push('invalid value for "variables", variables cannot be nil.') + end + + if @omissions.nil? + invalid_properties.push('invalid value for "omissions", omissions cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @published_at.nil? + return false if @sha256.nil? + return false if @sha256 !~ Regexp.new(/^[0-9a-f]{64}$/) + return false if @frontends.nil? + return false if @functions.nil? + return false if @service_key_functions.nil? + return false if @variables.nil? + return false if @omissions.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] published_at Value to be assigned + def published_at=(published_at) + if published_at.nil? + fail ArgumentError, 'published_at cannot be nil' + end + + @published_at = published_at + end + + # Custom attribute writer method with validation + # @param [Object] sha256 Value to be assigned + def sha256=(sha256) + if sha256.nil? + fail ArgumentError, 'sha256 cannot be nil' + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if sha256 !~ pattern + fail ArgumentError, "invalid value for \"sha256\", must conform to the pattern #{pattern}." + end + + @sha256 = sha256 + end + + # Custom attribute writer method with validation + # @param [Object] frontends Value to be assigned + def frontends=(frontends) + if frontends.nil? + fail ArgumentError, 'frontends cannot be nil' + end + + @frontends = frontends + end + + # Custom attribute writer method with validation + # @param [Object] functions Value to be assigned + def functions=(functions) + if functions.nil? + fail ArgumentError, 'functions cannot be nil' + end + + @functions = functions + end + + # Custom attribute writer method with validation + # @param [Object] service_key_functions Value to be assigned + def service_key_functions=(service_key_functions) + if service_key_functions.nil? + fail ArgumentError, 'service_key_functions cannot be nil' + end + + @service_key_functions = service_key_functions + end + + # Custom attribute writer method with validation + # @param [Object] variables Value to be assigned + def variables=(variables) + if variables.nil? + fail ArgumentError, 'variables cannot be nil' + end + + @variables = variables + end + + # Custom attribute writer method with validation + # @param [Object] omissions Value to be assigned + def omissions=(omissions) + if omissions.nil? + fail ArgumentError, 'omissions cannot be nil' + end + + @omissions = omissions + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + published_at == o.published_at && + sha256 == o.sha256 && + frontends == o.frontends && + functions == o.functions && + service_key_functions == o.service_key_functions && + variables == o.variables && + omissions == o.omissions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, published_at, sha256, frontends, functions, service_key_functions, variables, omissions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_release.rb b/lib/volcano/generated/lib/volcano-generated/models/share_release.rb new file mode 100644 index 00000000..350661d9 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_release.rb @@ -0,0 +1,484 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ShareRelease < ApiModelBase + attr_accessor :id + + attr_accessor :share_id + + attr_accessor :project_id + + attr_accessor :published_at + + # The id of the user who published the release. + attr_accessor :published_by + + # The digest of the stored release archive. An install refuses an archive that does not match it. + attr_accessor :sha256 + + attr_accessor :size_bytes + + attr_accessor :functions + + attr_accessor :frontends + + attr_accessor :variables + + attr_accessor :service_key_functions + + attr_accessor :omissions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'share_id' => :'share_id', + :'project_id' => :'project_id', + :'published_at' => :'published_at', + :'published_by' => :'published_by', + :'sha256' => :'sha256', + :'size_bytes' => :'size_bytes', + :'functions' => :'functions', + :'frontends' => :'frontends', + :'variables' => :'variables', + :'service_key_functions' => :'service_key_functions', + :'omissions' => :'omissions' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'share_id' => :'String', + :'project_id' => :'String', + :'published_at' => :'Time', + :'published_by' => :'String', + :'sha256' => :'String', + :'size_bytes' => :'Integer', + :'functions' => :'Array', + :'frontends' => :'Array', + :'variables' => :'Array', + :'service_key_functions' => :'Array', + :'omissions' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ShareRelease` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ShareRelease`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'share_id') + self.share_id = attributes[:'share_id'] + else + self.share_id = nil + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + else + self.project_id = nil + end + + if attributes.key?(:'published_at') + self.published_at = attributes[:'published_at'] + else + self.published_at = nil + end + + if attributes.key?(:'published_by') + self.published_by = attributes[:'published_by'] + else + self.published_by = nil + end + + if attributes.key?(:'sha256') + self.sha256 = attributes[:'sha256'] + else + self.sha256 = nil + end + + if attributes.key?(:'size_bytes') + self.size_bytes = attributes[:'size_bytes'] + else + self.size_bytes = nil + end + + if attributes.key?(:'functions') + if (value = attributes[:'functions']).is_a?(Array) + self.functions = value + end + else + self.functions = nil + end + + if attributes.key?(:'frontends') + if (value = attributes[:'frontends']).is_a?(Array) + self.frontends = value + end + else + self.frontends = nil + end + + if attributes.key?(:'variables') + if (value = attributes[:'variables']).is_a?(Array) + self.variables = value + end + else + self.variables = nil + end + + if attributes.key?(:'service_key_functions') + if (value = attributes[:'service_key_functions']).is_a?(Array) + self.service_key_functions = value + end + else + self.service_key_functions = nil + end + + if attributes.key?(:'omissions') + if (value = attributes[:'omissions']).is_a?(Array) + self.omissions = value + end + else + self.omissions = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @share_id.nil? + invalid_properties.push('invalid value for "share_id", share_id cannot be nil.') + end + + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if @share_id !~ pattern + invalid_properties.push("invalid value for \"share_id\", must conform to the pattern #{pattern}.") + end + + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + end + + if @published_at.nil? + invalid_properties.push('invalid value for "published_at", published_at cannot be nil.') + end + + if @published_by.nil? + invalid_properties.push('invalid value for "published_by", published_by cannot be nil.') + end + + if @sha256.nil? + invalid_properties.push('invalid value for "sha256", sha256 cannot be nil.') + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if @sha256 !~ pattern + invalid_properties.push("invalid value for \"sha256\", must conform to the pattern #{pattern}.") + end + + if @size_bytes.nil? + invalid_properties.push('invalid value for "size_bytes", size_bytes cannot be nil.') + end + + if @functions.nil? + invalid_properties.push('invalid value for "functions", functions cannot be nil.') + end + + if @frontends.nil? + invalid_properties.push('invalid value for "frontends", frontends cannot be nil.') + end + + if @variables.nil? + invalid_properties.push('invalid value for "variables", variables cannot be nil.') + end + + if @service_key_functions.nil? + invalid_properties.push('invalid value for "service_key_functions", service_key_functions cannot be nil.') + end + + if @omissions.nil? + invalid_properties.push('invalid value for "omissions", omissions cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @share_id.nil? + return false if @share_id !~ Regexp.new(/^[A-Za-z0-9]{12}$/) + return false if @project_id.nil? + return false if @published_at.nil? + return false if @published_by.nil? + return false if @sha256.nil? + return false if @sha256 !~ Regexp.new(/^[0-9a-f]{64}$/) + return false if @size_bytes.nil? + return false if @functions.nil? + return false if @frontends.nil? + return false if @variables.nil? + return false if @service_key_functions.nil? + return false if @omissions.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] share_id Value to be assigned + def share_id=(share_id) + if share_id.nil? + fail ArgumentError, 'share_id cannot be nil' + end + + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if share_id !~ pattern + fail ArgumentError, "invalid value for \"share_id\", must conform to the pattern #{pattern}." + end + + @share_id = share_id + end + + # Custom attribute writer method with validation + # @param [Object] project_id Value to be assigned + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'project_id cannot be nil' + end + + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param [Object] published_at Value to be assigned + def published_at=(published_at) + if published_at.nil? + fail ArgumentError, 'published_at cannot be nil' + end + + @published_at = published_at + end + + # Custom attribute writer method with validation + # @param [Object] published_by Value to be assigned + def published_by=(published_by) + if published_by.nil? + fail ArgumentError, 'published_by cannot be nil' + end + + @published_by = published_by + end + + # Custom attribute writer method with validation + # @param [Object] sha256 Value to be assigned + def sha256=(sha256) + if sha256.nil? + fail ArgumentError, 'sha256 cannot be nil' + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if sha256 !~ pattern + fail ArgumentError, "invalid value for \"sha256\", must conform to the pattern #{pattern}." + end + + @sha256 = sha256 + end + + # Custom attribute writer method with validation + # @param [Object] size_bytes Value to be assigned + def size_bytes=(size_bytes) + if size_bytes.nil? + fail ArgumentError, 'size_bytes cannot be nil' + end + + @size_bytes = size_bytes + end + + # Custom attribute writer method with validation + # @param [Object] functions Value to be assigned + def functions=(functions) + if functions.nil? + fail ArgumentError, 'functions cannot be nil' + end + + @functions = functions + end + + # Custom attribute writer method with validation + # @param [Object] frontends Value to be assigned + def frontends=(frontends) + if frontends.nil? + fail ArgumentError, 'frontends cannot be nil' + end + + @frontends = frontends + end + + # Custom attribute writer method with validation + # @param [Object] variables Value to be assigned + def variables=(variables) + if variables.nil? + fail ArgumentError, 'variables cannot be nil' + end + + @variables = variables + end + + # Custom attribute writer method with validation + # @param [Object] service_key_functions Value to be assigned + def service_key_functions=(service_key_functions) + if service_key_functions.nil? + fail ArgumentError, 'service_key_functions cannot be nil' + end + + @service_key_functions = service_key_functions + end + + # Custom attribute writer method with validation + # @param [Object] omissions Value to be assigned + def omissions=(omissions) + if omissions.nil? + fail ArgumentError, 'omissions cannot be nil' + end + + @omissions = omissions + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + share_id == o.share_id && + project_id == o.project_id && + published_at == o.published_at && + published_by == o.published_by && + sha256 == o.sha256 && + size_bytes == o.size_bytes && + functions == o.functions && + frontends == o.frontends && + variables == o.variables && + service_key_functions == o.service_key_functions && + omissions == o.omissions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, share_id, project_id, published_at, published_by, sha256, size_bytes, functions, frontends, variables, service_key_functions, omissions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_release_create_request.rb b/lib/volcano/generated/lib/volcano-generated/models/share_release_create_request.rb new file mode 100644 index 00000000..e87da647 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_release_create_request.rb @@ -0,0 +1,297 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ShareReleaseCreateRequest < ApiModelBase + # The share to publish to. Its own project authorizes the publish. + attr_accessor :share_id + + # The `draft_id` of the draft the owner reviewed. If a fresh build of the project is not that draft, nothing is published and the answer is `409` `draft_changed` with the new draft. + attr_accessor :draft_id + + # Every name in the draft's `variables`, which a project created from the release gets. Values are never carried: each is created empty unless the visitor gives one. + attr_accessor :variables + + # The functions that receive the new project's `VOLCANO_SERVICE_KEY`, which bypasses row-level security. Must be exactly the draft's `service_key_functions`. + attr_accessor :service_key_functions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'share_id' => :'share_id', + :'draft_id' => :'draft_id', + :'variables' => :'variables', + :'service_key_functions' => :'service_key_functions' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'share_id' => :'String', + :'draft_id' => :'String', + :'variables' => :'Array', + :'service_key_functions' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ShareReleaseCreateRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ShareReleaseCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'share_id') + self.share_id = attributes[:'share_id'] + else + self.share_id = nil + end + + if attributes.key?(:'draft_id') + self.draft_id = attributes[:'draft_id'] + else + self.draft_id = nil + end + + if attributes.key?(:'variables') + if (value = attributes[:'variables']).is_a?(Array) + self.variables = value + end + else + self.variables = nil + end + + if attributes.key?(:'service_key_functions') + if (value = attributes[:'service_key_functions']).is_a?(Array) + self.service_key_functions = value + end + else + self.service_key_functions = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @share_id.nil? + invalid_properties.push('invalid value for "share_id", share_id cannot be nil.') + end + + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if @share_id !~ pattern + invalid_properties.push("invalid value for \"share_id\", must conform to the pattern #{pattern}.") + end + + if @draft_id.nil? + invalid_properties.push('invalid value for "draft_id", draft_id cannot be nil.') + end + + if @draft_id.to_s.length > 128 + invalid_properties.push('invalid value for "draft_id", the character length must be smaller than or equal to 128.') + end + + if @draft_id.to_s.length < 1 + invalid_properties.push('invalid value for "draft_id", the character length must be greater than or equal to 1.') + end + + if @variables.nil? + invalid_properties.push('invalid value for "variables", variables cannot be nil.') + end + + if @variables.length > 100 + invalid_properties.push('invalid value for "variables", number of items must be less than or equal to 100.') + end + + if @service_key_functions.nil? + invalid_properties.push('invalid value for "service_key_functions", service_key_functions cannot be nil.') + end + + if @service_key_functions.length > 100 + invalid_properties.push('invalid value for "service_key_functions", number of items must be less than or equal to 100.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @share_id.nil? + return false if @share_id !~ Regexp.new(/^[A-Za-z0-9]{12}$/) + return false if @draft_id.nil? + return false if @draft_id.to_s.length > 128 + return false if @draft_id.to_s.length < 1 + return false if @variables.nil? + return false if @variables.length > 100 + return false if @service_key_functions.nil? + return false if @service_key_functions.length > 100 + true + end + + # Custom attribute writer method with validation + # @param [Object] share_id Value to be assigned + def share_id=(share_id) + if share_id.nil? + fail ArgumentError, 'share_id cannot be nil' + end + + pattern = Regexp.new(/^[A-Za-z0-9]{12}$/) + if share_id !~ pattern + fail ArgumentError, "invalid value for \"share_id\", must conform to the pattern #{pattern}." + end + + @share_id = share_id + end + + # Custom attribute writer method with validation + # @param [Object] draft_id Value to be assigned + def draft_id=(draft_id) + if draft_id.nil? + fail ArgumentError, 'draft_id cannot be nil' + end + + if draft_id.to_s.length > 128 + fail ArgumentError, 'invalid value for "draft_id", the character length must be smaller than or equal to 128.' + end + + if draft_id.to_s.length < 1 + fail ArgumentError, 'invalid value for "draft_id", the character length must be greater than or equal to 1.' + end + + @draft_id = draft_id + end + + # Custom attribute writer method with validation + # @param [Object] variables Value to be assigned + def variables=(variables) + if variables.nil? + fail ArgumentError, 'variables cannot be nil' + end + + if variables.length > 100 + fail ArgumentError, 'invalid value for "variables", number of items must be less than or equal to 100.' + end + + @variables = variables + end + + # Custom attribute writer method with validation + # @param [Object] service_key_functions Value to be assigned + def service_key_functions=(service_key_functions) + if service_key_functions.nil? + fail ArgumentError, 'service_key_functions cannot be nil' + end + + if service_key_functions.length > 100 + fail ArgumentError, 'invalid value for "service_key_functions", number of items must be less than or equal to 100.' + end + + @service_key_functions = service_key_functions + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + share_id == o.share_id && + draft_id == o.draft_id && + variables == o.variables && + service_key_functions == o.service_key_functions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [share_id, draft_id, variables, service_key_functions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_release_draft.rb b/lib/volcano/generated/lib/volcano-generated/models/share_release_draft.rb new file mode 100644 index 00000000..3cb619f7 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_release_draft.rb @@ -0,0 +1,336 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ShareReleaseDraft < ApiModelBase + # Opaque. Names exactly what a release built now would carry: each function's and frontend's current deployment, and everything the draft lists, including each function's settings (`http_auth_mode`, `openapi_spec_sha256`, `variable_scope`), the `variables`, the `frontend_variables` and the `omissions`. It stays the same while those do, and changes when a function or frontend is redeployed or anything the draft lists changes. A sandbox is not part of it, since a release does not carry one: rebuilding only a sandbox leaves it unchanged. Send it with the publish. + attr_accessor :draft_id + + attr_accessor :functions + + attr_accessor :frontends + + # The project's variables a visitor could be asked to supply. Volcano's own, such as `VOLCANO_API_URL`, are never listed. + attr_accessor :variables + + # The functions whose code reads `VOLCANO_SERVICE_KEY`. A release gives them the visitor project's service key once the owner confirms them. + attr_accessor :service_key_functions + + attr_accessor :omissions + + # The draft's variables each frontend receives, by frontend name, as your project's frontend of that name selects them by its variable scope now. A frontend receives no others. + attr_accessor :frontend_variables + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'draft_id' => :'draft_id', + :'functions' => :'functions', + :'frontends' => :'frontends', + :'variables' => :'variables', + :'service_key_functions' => :'service_key_functions', + :'omissions' => :'omissions', + :'frontend_variables' => :'frontend_variables' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'draft_id' => :'String', + :'functions' => :'Array', + :'frontends' => :'Array', + :'variables' => :'Array', + :'service_key_functions' => :'Array', + :'omissions' => :'Array', + :'frontend_variables' => :'Hash>' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ShareReleaseDraft` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ShareReleaseDraft`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'draft_id') + self.draft_id = attributes[:'draft_id'] + else + self.draft_id = nil + end + + if attributes.key?(:'functions') + if (value = attributes[:'functions']).is_a?(Array) + self.functions = value + end + else + self.functions = nil + end + + if attributes.key?(:'frontends') + if (value = attributes[:'frontends']).is_a?(Array) + self.frontends = value + end + else + self.frontends = nil + end + + if attributes.key?(:'variables') + if (value = attributes[:'variables']).is_a?(Array) + self.variables = value + end + else + self.variables = nil + end + + if attributes.key?(:'service_key_functions') + if (value = attributes[:'service_key_functions']).is_a?(Array) + self.service_key_functions = value + end + else + self.service_key_functions = nil + end + + if attributes.key?(:'omissions') + if (value = attributes[:'omissions']).is_a?(Array) + self.omissions = value + end + else + self.omissions = nil + end + + if attributes.key?(:'frontend_variables') + if (value = attributes[:'frontend_variables']).is_a?(Hash) + self.frontend_variables = value + end + else + self.frontend_variables = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @draft_id.nil? + invalid_properties.push('invalid value for "draft_id", draft_id cannot be nil.') + end + + if @functions.nil? + invalid_properties.push('invalid value for "functions", functions cannot be nil.') + end + + if @frontends.nil? + invalid_properties.push('invalid value for "frontends", frontends cannot be nil.') + end + + if @variables.nil? + invalid_properties.push('invalid value for "variables", variables cannot be nil.') + end + + if @service_key_functions.nil? + invalid_properties.push('invalid value for "service_key_functions", service_key_functions cannot be nil.') + end + + if @omissions.nil? + invalid_properties.push('invalid value for "omissions", omissions cannot be nil.') + end + + if @frontend_variables.nil? + invalid_properties.push('invalid value for "frontend_variables", frontend_variables cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @draft_id.nil? + return false if @functions.nil? + return false if @frontends.nil? + return false if @variables.nil? + return false if @service_key_functions.nil? + return false if @omissions.nil? + return false if @frontend_variables.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] draft_id Value to be assigned + def draft_id=(draft_id) + if draft_id.nil? + fail ArgumentError, 'draft_id cannot be nil' + end + + @draft_id = draft_id + end + + # Custom attribute writer method with validation + # @param [Object] functions Value to be assigned + def functions=(functions) + if functions.nil? + fail ArgumentError, 'functions cannot be nil' + end + + @functions = functions + end + + # Custom attribute writer method with validation + # @param [Object] frontends Value to be assigned + def frontends=(frontends) + if frontends.nil? + fail ArgumentError, 'frontends cannot be nil' + end + + @frontends = frontends + end + + # Custom attribute writer method with validation + # @param [Object] variables Value to be assigned + def variables=(variables) + if variables.nil? + fail ArgumentError, 'variables cannot be nil' + end + + @variables = variables + end + + # Custom attribute writer method with validation + # @param [Object] service_key_functions Value to be assigned + def service_key_functions=(service_key_functions) + if service_key_functions.nil? + fail ArgumentError, 'service_key_functions cannot be nil' + end + + @service_key_functions = service_key_functions + end + + # Custom attribute writer method with validation + # @param [Object] omissions Value to be assigned + def omissions=(omissions) + if omissions.nil? + fail ArgumentError, 'omissions cannot be nil' + end + + @omissions = omissions + end + + # Custom attribute writer method with validation + # @param [Object] frontend_variables Value to be assigned + def frontend_variables=(frontend_variables) + if frontend_variables.nil? + fail ArgumentError, 'frontend_variables cannot be nil' + end + + @frontend_variables = frontend_variables + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + draft_id == o.draft_id && + functions == o.functions && + frontends == o.frontends && + variables == o.variables && + service_key_functions == o.service_key_functions && + omissions == o.omissions && + frontend_variables == o.frontend_variables + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [draft_id, functions, frontends, variables, service_key_functions, omissions, frontend_variables].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_release_function.rb b/lib/volcano/generated/lib/volcano-generated/models/share_release_function.rb new file mode 100644 index 00000000..fa5654f5 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_release_function.rb @@ -0,0 +1,309 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ShareReleaseFunction < ApiModelBase + attr_accessor :name + + attr_accessor :kind + + # The function's invocation visibility, as installed. + attr_accessor :visibility + + # The function's invocation mode, when it is not the default. + attr_accessor :invocation_mode + + # How the function's HTTP invocations authenticate, when its invocation settings are not the default; omitted means `volcano`. `none` lets anyone call the function without a credential in every project made from the release. Releases published before this was recorded omit it. + attr_accessor :http_auth_mode + + # The SHA-256 of the function's OpenAPI document as the release carries it, when it has one, so a draft shows when the document changed. Releases published before this was recorded omit it. + attr_accessor :openapi_spec_sha256 + + # `scoped` when the function receives only the variables it declares, as your project's function does, listed in `variables`. Omitted when it receives every variable shared with functions. The service key is not part of it: `service_key_functions` says which functions receive that. Releases published before this was recorded omit it. + attr_accessor :variable_scope + + # For a `scoped` function, the variables it declares that a project made from the release has. + attr_accessor :variables + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'kind' => :'kind', + :'visibility' => :'visibility', + :'invocation_mode' => :'invocation_mode', + :'http_auth_mode' => :'http_auth_mode', + :'openapi_spec_sha256' => :'openapi_spec_sha256', + :'variable_scope' => :'variable_scope', + :'variables' => :'variables' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'kind' => :'String', + :'visibility' => :'String', + :'invocation_mode' => :'String', + :'http_auth_mode' => :'String', + :'openapi_spec_sha256' => :'String', + :'variable_scope' => :'String', + :'variables' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ShareReleaseFunction` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ShareReleaseFunction`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'kind') + self.kind = attributes[:'kind'] + else + self.kind = nil + end + + if attributes.key?(:'visibility') + self.visibility = attributes[:'visibility'] + end + + if attributes.key?(:'invocation_mode') + self.invocation_mode = attributes[:'invocation_mode'] + end + + if attributes.key?(:'http_auth_mode') + self.http_auth_mode = attributes[:'http_auth_mode'] + end + + if attributes.key?(:'openapi_spec_sha256') + self.openapi_spec_sha256 = attributes[:'openapi_spec_sha256'] + end + + if attributes.key?(:'variable_scope') + self.variable_scope = attributes[:'variable_scope'] + end + + if attributes.key?(:'variables') + if (value = attributes[:'variables']).is_a?(Array) + self.variables = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @kind.nil? + invalid_properties.push('invalid value for "kind", kind cannot be nil.') + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if !@openapi_spec_sha256.nil? && @openapi_spec_sha256 !~ pattern + invalid_properties.push("invalid value for \"openapi_spec_sha256\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @name.nil? + return false if @kind.nil? + kind_validator = EnumAttributeValidator.new('String', ["standard", "durable"]) + return false unless kind_validator.valid?(@kind) + return false if !@openapi_spec_sha256.nil? && @openapi_spec_sha256 !~ Regexp.new(/^[0-9a-f]{64}$/) + variable_scope_validator = EnumAttributeValidator.new('String', ["scoped"]) + return false unless variable_scope_validator.valid?(@variable_scope) + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] kind Object to be assigned + def kind=(kind) + validator = EnumAttributeValidator.new('String', ["standard", "durable"]) + unless validator.valid?(kind) + fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}." + end + @kind = kind + end + + # Custom attribute writer method with validation + # @param [Object] openapi_spec_sha256 Value to be assigned + def openapi_spec_sha256=(openapi_spec_sha256) + if openapi_spec_sha256.nil? + fail ArgumentError, 'openapi_spec_sha256 cannot be nil' + end + + pattern = Regexp.new(/^[0-9a-f]{64}$/) + if openapi_spec_sha256 !~ pattern + fail ArgumentError, "invalid value for \"openapi_spec_sha256\", must conform to the pattern #{pattern}." + end + + @openapi_spec_sha256 = openapi_spec_sha256 + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] variable_scope Object to be assigned + def variable_scope=(variable_scope) + validator = EnumAttributeValidator.new('String', ["scoped"]) + unless validator.valid?(variable_scope) + fail ArgumentError, "invalid value for \"variable_scope\", must be one of #{validator.allowable_values}." + end + @variable_scope = variable_scope + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + kind == o.kind && + visibility == o.visibility && + invocation_mode == o.invocation_mode && + http_auth_mode == o.http_auth_mode && + openapi_spec_sha256 == o.openapi_spec_sha256 && + variable_scope == o.variable_scope && + variables == o.variables + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, kind, visibility, invocation_mode, http_auth_mode, openapi_spec_sha256, variable_scope, variables].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_release_omission.rb b/lib/volcano/generated/lib/volcano-generated/models/share_release_omission.rb new file mode 100644 index 00000000..c78166fb --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_release_omission.rb @@ -0,0 +1,210 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Something a release does not carry. + class ShareReleaseOmission < ApiModelBase + # `no_source`: a function or frontend whose current deployment has no stored source to carry. `database`: a database; a visitor's project starts without one. `sandbox`: a sandbox, which releases do not deploy. `secret_file`: a file that may hold credentials, such as a dotenv or `.envrc` file, a tool's token file like `.netrc` or an `.npmrc` holding a registry credential, a private key, a credential JSON or a Terraform variables file. `unsupported_entry`: a file that is not a regular file, such as a symbolic link. + attr_accessor :kind + + # The function, frontend, database or sandbox, when there is one. + attr_accessor :resource + + # The file left out, for a file. + attr_accessor :path + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'kind' => :'kind', + :'resource' => :'resource', + :'path' => :'path' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'kind' => :'String', + :'resource' => :'String', + :'path' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ShareReleaseOmission` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ShareReleaseOmission`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'kind') + self.kind = attributes[:'kind'] + else + self.kind = nil + end + + if attributes.key?(:'resource') + self.resource = attributes[:'resource'] + end + + if attributes.key?(:'path') + self.path = attributes[:'path'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @kind.nil? + invalid_properties.push('invalid value for "kind", kind cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @kind.nil? + kind_validator = EnumAttributeValidator.new('String', ["no_source", "database", "sandbox", "secret_file", "unsupported_entry"]) + return false unless kind_validator.valid?(@kind) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] kind Object to be assigned + def kind=(kind) + validator = EnumAttributeValidator.new('String', ["no_source", "database", "sandbox", "secret_file", "unsupported_entry"]) + unless validator.valid?(kind) + fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}." + end + @kind = kind + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + kind == o.kind && + resource == o.resource && + path == o.path + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [kind, resource, path].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_release_ref.rb b/lib/volcano/generated/lib/volcano-generated/models/share_release_ref.rb new file mode 100644 index 00000000..fbad3597 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_release_ref.rb @@ -0,0 +1,190 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ShareReleaseRef < ApiModelBase + attr_accessor :id + + attr_accessor :published_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'published_at' => :'published_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'published_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ShareReleaseRef` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ShareReleaseRef`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'published_at') + self.published_at = attributes[:'published_at'] + else + self.published_at = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @published_at.nil? + invalid_properties.push('invalid value for "published_at", published_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @published_at.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] published_at Value to be assigned + def published_at=(published_at) + if published_at.nil? + fail ArgumentError, 'published_at cannot be nil' + end + + @published_at = published_at + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + published_at == o.published_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, published_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_stats.rb b/lib/volcano/generated/lib/volcano-generated/models/share_stats.rb new file mode 100644 index 00000000..b69c0631 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_stats.rb @@ -0,0 +1,221 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ShareStats < ApiModelBase + # Start of the counted window. + attr_accessor :since + + attr_accessor :totals + + attr_accessor :daily + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'since' => :'since', + :'totals' => :'totals', + :'daily' => :'daily' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'since' => :'Time', + :'totals' => :'Array', + :'daily' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ShareStats` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ShareStats`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'since') + self.since = attributes[:'since'] + else + self.since = nil + end + + if attributes.key?(:'totals') + if (value = attributes[:'totals']).is_a?(Array) + self.totals = value + end + else + self.totals = nil + end + + if attributes.key?(:'daily') + if (value = attributes[:'daily']).is_a?(Array) + self.daily = value + end + else + self.daily = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @since.nil? + invalid_properties.push('invalid value for "since", since cannot be nil.') + end + + if @totals.nil? + invalid_properties.push('invalid value for "totals", totals cannot be nil.') + end + + if @daily.nil? + invalid_properties.push('invalid value for "daily", daily cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @since.nil? + return false if @totals.nil? + return false if @daily.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] since Value to be assigned + def since=(since) + if since.nil? + fail ArgumentError, 'since cannot be nil' + end + + @since = since + end + + # Custom attribute writer method with validation + # @param [Object] totals Value to be assigned + def totals=(totals) + if totals.nil? + fail ArgumentError, 'totals cannot be nil' + end + + @totals = totals + end + + # Custom attribute writer method with validation + # @param [Object] daily Value to be assigned + def daily=(daily) + if daily.nil? + fail ArgumentError, 'daily cannot be nil' + end + + @daily = daily + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + since == o.since && + totals == o.totals && + daily == o.daily + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [since, totals, daily].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_update_request.rb b/lib/volcano/generated/lib/volcano-generated/models/share_update_request.rb new file mode 100644 index 00000000..0978e20a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_update_request.rb @@ -0,0 +1,259 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class ShareUpdateRequest < ApiModelBase + attr_accessor :suggested_name + + # What the project does, shown to visitors before they deploy. One line of plain text with no control characters; surrounding spaces are trimmed. Send an empty string to remove it. + attr_accessor :description + + # Lets the projects made from this link be shared again by their owners. Switching it off stops their copies, and copies of those, from sharing again, read at each request, including links of theirs that are already on. + attr_accessor :allow_reshare + + attr_accessor :status + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'suggested_name' => :'suggested_name', + :'description' => :'description', + :'allow_reshare' => :'allow_reshare', + :'status' => :'status' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'suggested_name' => :'String', + :'description' => :'String', + :'allow_reshare' => :'Boolean', + :'status' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ShareUpdateRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ShareUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'suggested_name') + self.suggested_name = attributes[:'suggested_name'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'allow_reshare') + self.allow_reshare = attributes[:'allow_reshare'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@suggested_name.nil? && @suggested_name.to_s.length > 64 + invalid_properties.push('invalid value for "suggested_name", the character length must be smaller than or equal to 64.') + end + + pattern = Regexp.new(/^[A-Za-z0-9_-]*$/) + if !@suggested_name.nil? && @suggested_name !~ pattern + invalid_properties.push("invalid value for \"suggested_name\", must conform to the pattern #{pattern}.") + end + + if !@description.nil? && @description.to_s.length > 280 + invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 280.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@suggested_name.nil? && @suggested_name.to_s.length > 64 + return false if !@suggested_name.nil? && @suggested_name !~ Regexp.new(/^[A-Za-z0-9_-]*$/) + return false if !@description.nil? && @description.to_s.length > 280 + status_validator = EnumAttributeValidator.new('String', ["active", "disabled"]) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method with validation + # @param [Object] suggested_name Value to be assigned + def suggested_name=(suggested_name) + if suggested_name.nil? + fail ArgumentError, 'suggested_name cannot be nil' + end + + if suggested_name.to_s.length > 64 + fail ArgumentError, 'invalid value for "suggested_name", the character length must be smaller than or equal to 64.' + end + + pattern = Regexp.new(/^[A-Za-z0-9_-]*$/) + if suggested_name !~ pattern + fail ArgumentError, "invalid value for \"suggested_name\", must conform to the pattern #{pattern}." + end + + @suggested_name = suggested_name + end + + # Custom attribute writer method with validation + # @param [Object] description Value to be assigned + def description=(description) + if description.nil? + fail ArgumentError, 'description cannot be nil' + end + + if description.to_s.length > 280 + fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 280.' + end + + @description = description + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["active", "disabled"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + suggested_name == o.suggested_name && + description == o.description && + allow_reshare == o.allow_reshare && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [suggested_name, description, allow_reshare, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/share_variable.rb b/lib/volcano/generated/lib/volcano-generated/models/share_variable.rb new file mode 100644 index 00000000..748e6eca --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/share_variable.rb @@ -0,0 +1,230 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A project variable a deploy link's release declares. A project created from the link always gets it. + class ShareVariable < ApiModelBase + # The variable's name. + attr_accessor :name + + # Always true: a project created from the link always gets this variable, created empty when the visitor gives no value. It never means a value must be given. + attr_accessor :required + + # Whether to treat the value as a secret: take it masked and never show it back. Only a `NEXT_PUBLIC_` name, which a Next.js build copies into the browser, is not secret. + attr_accessor :secret + + # True when the source project gives the variable only to the scoped functions that declare it, not to every function, and so does a project made from the release. Omitted when false. + attr_accessor :unshared + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'required' => :'required', + :'secret' => :'secret', + :'unshared' => :'unshared' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'required' => :'Boolean', + :'secret' => :'Boolean', + :'unshared' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ShareVariable` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ShareVariable`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'required') + self.required = attributes[:'required'] + else + self.required = nil + end + + if attributes.key?(:'secret') + self.secret = attributes[:'secret'] + else + self.secret = nil + end + + if attributes.key?(:'unshared') + self.unshared = attributes[:'unshared'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @required.nil? + invalid_properties.push('invalid value for "required", required cannot be nil.') + end + + if @secret.nil? + invalid_properties.push('invalid value for "secret", secret cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @name.nil? + return false if @required.nil? + return false if @secret.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] required Value to be assigned + def required=(required) + if required.nil? + fail ArgumentError, 'required cannot be nil' + end + + @required = required + end + + # Custom attribute writer method with validation + # @param [Object] secret Value to be assigned + def secret=(secret) + if secret.nil? + fail ArgumentError, 'secret cannot be nil' + end + + @secret = secret + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + required == o.required && + secret == o.secret && + unshared == o.unshared + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, required, secret, unshared].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/shared_variables_replace_result.rb b/lib/volcano/generated/lib/volcano-generated/models/shared_variables_replace_result.rb new file mode 100644 index 00000000..51bbc0ce --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/shared_variables_replace_result.rb @@ -0,0 +1,167 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SharedVariablesReplaceResult < ApiModelBase + # Functions the replacement changes whose variables were not synchronized. + attr_accessor :skipped_functions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'skipped_functions' => :'skipped_functions' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'skipped_functions' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SharedVariablesReplaceResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SharedVariablesReplaceResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'skipped_functions') + if (value = attributes[:'skipped_functions']).is_a?(Array) + self.skipped_functions = value + end + else + self.skipped_functions = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @skipped_functions.nil? + invalid_properties.push('invalid value for "skipped_functions", skipped_functions cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @skipped_functions.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] skipped_functions Value to be assigned + def skipped_functions=(skipped_functions) + if skipped_functions.nil? + fail ArgumentError, 'skipped_functions cannot be nil' + end + + @skipped_functions = skipped_functions + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + skipped_functions == o.skipped_functions + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [skipped_functions].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/shares_response.rb b/lib/volcano/generated/lib/volcano-generated/models/shares_response.rb new file mode 100644 index 00000000..e71c0c45 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/shares_response.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SharesResponse < ApiModelBase + attr_accessor :shares + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'shares' => :'shares' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'shares' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SharesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SharesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'shares') + if (value = attributes[:'shares']).is_a?(Array) + self.shares = value + end + else + self.shares = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @shares.nil? + invalid_properties.push('invalid value for "shares", shares cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @shares.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] shares Value to be assigned + def shares=(shares) + if shares.nil? + fail ArgumentError, 'shares cannot be nil' + end + + @shares = shares + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + shares == o.shares + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [shares].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/skipped_served_function.rb b/lib/volcano/generated/lib/volcano-generated/models/skipped_served_function.rb new file mode 100644 index 00000000..1734afb0 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/skipped_served_function.rb @@ -0,0 +1,246 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SkippedServedFunction < ApiModelBase + # Function ID. + attr_accessor :id + + # Function name. + attr_accessor :name + + # Why the function was left out. Clients must accept codes not listed here. `function_served_by_candidate` - a promoted preview serves the function and keeps the variables it was built with. + attr_accessor :code + + # What brings the function in line. + attr_accessor :message + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'code' => :'code', + :'message' => :'message' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'code' => :'String', + :'message' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SkippedServedFunction` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SkippedServedFunction`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + else + self.code = nil + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + else + self.message = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @code.nil? + invalid_properties.push('invalid value for "code", code cannot be nil.') + end + + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @name.nil? + return false if @code.nil? + return false if @message.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] code Value to be assigned + def code=(code) + if code.nil? + fail ArgumentError, 'code cannot be nil' + end + + @code = code + end + + # Custom attribute writer method with validation + # @param [Object] message Value to be assigned + def message=(message) + if message.nil? + fail ArgumentError, 'message cannot be nil' + end + + @message = message + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + code == o.code && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, code, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/slack_authorization_response.rb b/lib/volcano/generated/lib/volcano-generated/models/slack_authorization_response.rb new file mode 100644 index 00000000..d36667bf --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/slack_authorization_response.rb @@ -0,0 +1,165 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SlackAuthorizationResponse < ApiModelBase + # The Slack page to send the browser to. + attr_accessor :authorization_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'authorization_url' => :'authorization_url' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'authorization_url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SlackAuthorizationResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SlackAuthorizationResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'authorization_url') + self.authorization_url = attributes[:'authorization_url'] + else + self.authorization_url = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @authorization_url.nil? + invalid_properties.push('invalid value for "authorization_url", authorization_url cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @authorization_url.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] authorization_url Value to be assigned + def authorization_url=(authorization_url) + if authorization_url.nil? + fail ArgumentError, 'authorization_url cannot be nil' + end + + @authorization_url = authorization_url + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authorization_url == o.authorization_url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [authorization_url].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/slack_channel.rb b/lib/volcano/generated/lib/volcano-generated/models/slack_channel.rb new file mode 100644 index 00000000..957d4a4d --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/slack_channel.rb @@ -0,0 +1,228 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SlackChannel < ApiModelBase + # A Slack channel ID, such as `C0123ABCD`. + attr_accessor :id + + attr_accessor :name + + attr_accessor :is_private + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'is_private' => :'is_private' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'is_private' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SlackChannel` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SlackChannel`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'is_private') + self.is_private = attributes[:'is_private'] + else + self.is_private = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + pattern = Regexp.new(/^[CG][A-Z0-9]{2,31}$/) + if @id !~ pattern + invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.") + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @is_private.nil? + invalid_properties.push('invalid value for "is_private", is_private cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @id !~ Regexp.new(/^[CG][A-Z0-9]{2,31}$/) + return false if @name.nil? + return false if @is_private.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + pattern = Regexp.new(/^[CG][A-Z0-9]{2,31}$/) + if id !~ pattern + fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}." + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] is_private Value to be assigned + def is_private=(is_private) + if is_private.nil? + fail ArgumentError, 'is_private cannot be nil' + end + + @is_private = is_private + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + is_private == o.is_private + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, is_private].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/slack_channels_response.rb b/lib/volcano/generated/lib/volcano-generated/models/slack_channels_response.rb new file mode 100644 index 00000000..bc253481 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/slack_channels_response.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SlackChannelsResponse < ApiModelBase + attr_accessor :channels + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'channels' => :'channels' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'channels' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SlackChannelsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SlackChannelsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'channels') + if (value = attributes[:'channels']).is_a?(Array) + self.channels = value + end + else + self.channels = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @channels.nil? + invalid_properties.push('invalid value for "channels", channels cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @channels.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] channels Value to be assigned + def channels=(channels) + if channels.nil? + fail ArgumentError, 'channels cannot be nil' + end + + @channels = channels + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + channels == o.channels + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [channels].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/slack_connection.rb b/lib/volcano/generated/lib/volcano-generated/models/slack_connection.rb new file mode 100644 index 00000000..655e5ec8 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/slack_connection.rb @@ -0,0 +1,310 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A Slack identity connected to the caller's Volcano account. + class SlackConnection < ApiModelBase + attr_accessor :id + + # A Slack workspace ID, such as `T0123ABCD`. + attr_accessor :team_id + + # The workspace's name, or empty until the Volcano app is installed in it. + attr_accessor :team_name + + # The Slack user ID Slack verified. + attr_accessor :slack_user_id + + # Whether the Volcano app is installed in the workspace. + attr_accessor :installed + + attr_accessor :created_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'team_id' => :'team_id', + :'team_name' => :'team_name', + :'slack_user_id' => :'slack_user_id', + :'installed' => :'installed', + :'created_at' => :'created_at' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'team_id' => :'String', + :'team_name' => :'String', + :'slack_user_id' => :'String', + :'installed' => :'Boolean', + :'created_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SlackConnection` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SlackConnection`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'team_id') + self.team_id = attributes[:'team_id'] + else + self.team_id = nil + end + + if attributes.key?(:'team_name') + self.team_name = attributes[:'team_name'] + else + self.team_name = nil + end + + if attributes.key?(:'slack_user_id') + self.slack_user_id = attributes[:'slack_user_id'] + else + self.slack_user_id = nil + end + + if attributes.key?(:'installed') + self.installed = attributes[:'installed'] + else + self.installed = nil + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @team_id.nil? + invalid_properties.push('invalid value for "team_id", team_id cannot be nil.') + end + + pattern = Regexp.new(/^T[A-Z0-9]{2,31}$/) + if @team_id !~ pattern + invalid_properties.push("invalid value for \"team_id\", must conform to the pattern #{pattern}.") + end + + if @team_name.nil? + invalid_properties.push('invalid value for "team_name", team_name cannot be nil.') + end + + if @slack_user_id.nil? + invalid_properties.push('invalid value for "slack_user_id", slack_user_id cannot be nil.') + end + + if @installed.nil? + invalid_properties.push('invalid value for "installed", installed cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @team_id.nil? + return false if @team_id !~ Regexp.new(/^T[A-Z0-9]{2,31}$/) + return false if @team_name.nil? + return false if @slack_user_id.nil? + return false if @installed.nil? + return false if @created_at.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] team_id Value to be assigned + def team_id=(team_id) + if team_id.nil? + fail ArgumentError, 'team_id cannot be nil' + end + + pattern = Regexp.new(/^T[A-Z0-9]{2,31}$/) + if team_id !~ pattern + fail ArgumentError, "invalid value for \"team_id\", must conform to the pattern #{pattern}." + end + + @team_id = team_id + end + + # Custom attribute writer method with validation + # @param [Object] team_name Value to be assigned + def team_name=(team_name) + if team_name.nil? + fail ArgumentError, 'team_name cannot be nil' + end + + @team_name = team_name + end + + # Custom attribute writer method with validation + # @param [Object] slack_user_id Value to be assigned + def slack_user_id=(slack_user_id) + if slack_user_id.nil? + fail ArgumentError, 'slack_user_id cannot be nil' + end + + @slack_user_id = slack_user_id + end + + # Custom attribute writer method with validation + # @param [Object] installed Value to be assigned + def installed=(installed) + if installed.nil? + fail ArgumentError, 'installed cannot be nil' + end + + @installed = installed + end + + # Custom attribute writer method with validation + # @param [Object] created_at Value to be assigned + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'created_at cannot be nil' + end + + @created_at = created_at + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + team_id == o.team_id && + team_name == o.team_name && + slack_user_id == o.slack_user_id && + installed == o.installed && + created_at == o.created_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, team_id, team_name, slack_user_id, installed, created_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/slack_connections_response.rb b/lib/volcano/generated/lib/volcano-generated/models/slack_connections_response.rb new file mode 100644 index 00000000..67dbfdf0 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/slack_connections_response.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SlackConnectionsResponse < ApiModelBase + attr_accessor :connections + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'connections' => :'connections' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'connections' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SlackConnectionsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SlackConnectionsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'connections') + if (value = attributes[:'connections']).is_a?(Array) + self.connections = value + end + else + self.connections = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @connections.nil? + invalid_properties.push('invalid value for "connections", connections cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @connections.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] connections Value to be assigned + def connections=(connections) + if connections.nil? + fail ArgumentError, 'connections cannot be nil' + end + + @connections = connections + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + connections == o.connections + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [connections].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/slack_connector.rb b/lib/volcano/generated/lib/volcano-generated/models/slack_connector.rb new file mode 100644 index 00000000..3258b18a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/slack_connector.rb @@ -0,0 +1,177 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # A `slack` connector's workspace. Present when `type` is `slack`. + class SlackConnector < ApiModelBase + # A Slack workspace ID, such as `T0123ABCD`. + attr_accessor :team_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'team_id' => :'team_id' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'team_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SlackConnector` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SlackConnector`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'team_id') + self.team_id = attributes[:'team_id'] + else + self.team_id = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @team_id.nil? + invalid_properties.push('invalid value for "team_id", team_id cannot be nil.') + end + + pattern = Regexp.new(/^T[A-Z0-9]{2,31}$/) + if @team_id !~ pattern + invalid_properties.push("invalid value for \"team_id\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @team_id.nil? + return false if @team_id !~ Regexp.new(/^T[A-Z0-9]{2,31}$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] team_id Value to be assigned + def team_id=(team_id) + if team_id.nil? + fail ArgumentError, 'team_id cannot be nil' + end + + pattern = Regexp.new(/^T[A-Z0-9]{2,31}$/) + if team_id !~ pattern + fail ArgumentError, "invalid value for \"team_id\", must conform to the pattern #{pattern}." + end + + @team_id = team_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + team_id == o.team_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [team_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/storage_bucket.rb b/lib/volcano/generated/lib/volcano-generated/models/storage_bucket.rb index 91db3e82..ea38e393 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/storage_bucket.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/storage_bucket.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/storage_copy_request.rb b/lib/volcano/generated/lib/volcano-generated/models/storage_copy_request.rb index 114201dc..af065251 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/storage_copy_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/storage_copy_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/storage_list_response.rb b/lib/volcano/generated/lib/volcano-generated/models/storage_list_response.rb index fddffa99..b4c7b952 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/storage_list_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/storage_list_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/storage_move_request.rb b/lib/volcano/generated/lib/volcano-generated/models/storage_move_request.rb index e56be1d6..ec2f463d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/storage_move_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/storage_move_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/storage_object.rb b/lib/volcano/generated/lib/volcano-generated/models/storage_object.rb index 83634445..539d5e33 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/storage_object.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/storage_object.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/storage_object_with_bucket.rb b/lib/volcano/generated/lib/volcano-generated/models/storage_object_with_bucket.rb index 345391f1..d243e48d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/storage_object_with_bucket.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/storage_object_with_bucket.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/storage_policy.rb b/lib/volcano/generated/lib/volcano-generated/models/storage_policy.rb index 0650c9ae..6f427046 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/storage_policy.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/storage_policy.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/storage_stats.rb b/lib/volcano/generated/lib/volcano-generated/models/storage_stats.rb index 460e7470..d535b119 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/storage_stats.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/storage_stats.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/storage_visibility_request.rb b/lib/volcano/generated/lib/volcano-generated/models/storage_visibility_request.rb index c15a56de..9dff1a93 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/storage_visibility_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/storage_visibility_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/succeed_durable_callback_request.rb b/lib/volcano/generated/lib/volcano-generated/models/succeed_durable_callback_request.rb new file mode 100644 index 00000000..c80188a1 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/succeed_durable_callback_request.rb @@ -0,0 +1,207 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class SucceedDurableCallbackRequest < ApiModelBase + # The `vcb_` token the workflow handed out. It is the only credential the callback operations take, so treat it as a secret. + attr_accessor :token + + # Any JSON value other than null, up to 64 KiB. The waiting step resolves with it. Null is refused because a timeout resolves the step with null. + attr_accessor :result + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'token' => :'token', + :'result' => :'result' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'token' => :'String', + :'result' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'result' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SucceedDurableCallbackRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SucceedDurableCallbackRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'token') + self.token = attributes[:'token'] + else + self.token = nil + end + + if attributes.key?(:'result') + self.result = attributes[:'result'] + else + self.result = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @token.nil? + invalid_properties.push('invalid value for "token", token cannot be nil.') + end + + if @token.to_s.length > 128 + invalid_properties.push('invalid value for "token", the character length must be smaller than or equal to 128.') + end + + if @token.to_s.length < 5 + invalid_properties.push('invalid value for "token", the character length must be greater than or equal to 5.') + end + + pattern = Regexp.new(/^vcb_[A-Za-z0-9_-]+$/) + if @token !~ pattern + invalid_properties.push("invalid value for \"token\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @token.nil? + return false if @token.to_s.length > 128 + return false if @token.to_s.length < 5 + return false if @token !~ Regexp.new(/^vcb_[A-Za-z0-9_-]+$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] token Value to be assigned + def token=(token) + if token.nil? + fail ArgumentError, 'token cannot be nil' + end + + if token.to_s.length > 128 + fail ArgumentError, 'invalid value for "token", the character length must be smaller than or equal to 128.' + end + + if token.to_s.length < 5 + fail ArgumentError, 'invalid value for "token", the character length must be greater than or equal to 5.' + end + + pattern = Regexp.new(/^vcb_[A-Za-z0-9_-]+$/) + if token !~ pattern + fail ArgumentError, "invalid value for \"token\", must conform to the pattern #{pattern}." + end + + @token = token + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + token == o.token && + result == o.result + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [token, result].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/test_email_request.rb b/lib/volcano/generated/lib/volcano-generated/models/test_email_request.rb index 39dca589..dde00ec9 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/test_email_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/test_email_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/test_email_response.rb b/lib/volcano/generated/lib/volcano-generated/models/test_email_response.rb index 90d0aa0d..5f05f174 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/test_email_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/test_email_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/unban_user_response.rb b/lib/volcano/generated/lib/volcano-generated/models/unban_user_response.rb index def58bbe..34d47314 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/unban_user_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/unban_user_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_auth_config_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_auth_config_request.rb index 74a1d6d5..8e0c558a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_auth_config_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_auth_config_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -63,6 +63,9 @@ class UpdateAuthConfigRequest < ApiModelBase attr_accessor :cors_max_age + # Allow the origins of the project's own live frontend previews. + attr_accessor :cors_allow_frontend_previews + attr_accessor :enable_anonymous_signins # Replaces the email domain allowlist. Empty array removes the restriction so any domain can sign up. Entries must be bare domains such as `domain1.com` and are stored normalized (lowercase, no `@` prefix); matching is exact, so subdomains need their own entry. At most 100 entries. Restricting signups is a SUPERAGENT feature to configure and to enforce: a HOBBY project can only remove the restriction and gets 403 for any other change, and the list it keeps is parked until it upgrades. @@ -89,8 +92,10 @@ class UpdateAuthConfigRequest < ApiModelBase # Enable transactional email sending. Cannot be false while require_email_confirmation is true. attr_accessor :email_enabled + # Sender email address. New or changed values containing carriage returns or newlines return 400. Unchanged stored or exported values are preserved. Leading and trailing whitespace in previously saved settings is ignored when sending. attr_accessor :email_from_address + # Sender display name; supports punctuation and Unicode. New or changed values containing carriage returns or newlines return 400. Unchanged stored or exported values are preserved. Leading and trailing whitespace in previously saved settings is ignored when sending. attr_accessor :email_from_name attr_accessor :smtp_host @@ -104,10 +109,13 @@ class UpdateAuthConfigRequest < ApiModelBase attr_accessor :smtp_use_tls + # Subject template. For new or changed values, literal interior carriage returns or newlines after Go template whitespace trimming return 400. Outer whitespace and trailing block-scalar newlines are allowed. Unchanged stored subjects are preserved. attr_accessor :email_confirmation_subject + # Subject template. For new or changed values, literal interior carriage returns or newlines after Go template whitespace trimming return 400. Outer whitespace and trailing block-scalar newlines are allowed. Unchanged stored subjects are preserved. attr_accessor :email_password_reset_subject + # Subject template. For new or changed values, literal interior carriage returns or newlines after Go template whitespace trimming return 400. Outer whitespace and trailing block-scalar newlines are allowed. Unchanged stored subjects are preserved. attr_accessor :email_password_changed_subject # Enable or disable managed auth hosted pages for the project. @@ -171,6 +179,7 @@ def self.attribute_map :'cors_allowed_origins' => :'cors_allowed_origins', :'cors_allow_credentials' => :'cors_allow_credentials', :'cors_max_age' => :'cors_max_age', + :'cors_allow_frontend_previews' => :'cors_allow_frontend_previews', :'enable_anonymous_signins' => :'enable_anonymous_signins', :'allowed_email_domains' => :'allowed_email_domains', :'allowed_email_domains_mode' => :'allowed_email_domains_mode', @@ -233,6 +242,7 @@ def self.openapi_types :'cors_allowed_origins' => :'Array', :'cors_allow_credentials' => :'Boolean', :'cors_max_age' => :'Integer', + :'cors_allow_frontend_previews' => :'Boolean', :'enable_anonymous_signins' => :'Boolean', :'allowed_email_domains' => :'Array', :'allowed_email_domains_mode' => :'String', @@ -369,6 +379,10 @@ def initialize(attributes = {}) self.cors_max_age = attributes[:'cors_max_age'] end + if attributes.key?(:'cors_allow_frontend_previews') + self.cors_allow_frontend_previews = attributes[:'cors_allow_frontend_previews'] + end + if attributes.key?(:'enable_anonymous_signins') self.enable_anonymous_signins = attributes[:'enable_anonymous_signins'] end @@ -621,6 +635,7 @@ def ==(o) cors_allowed_origins == o.cors_allowed_origins && cors_allow_credentials == o.cors_allow_credentials && cors_max_age == o.cors_max_age && + cors_allow_frontend_previews == o.cors_allow_frontend_previews && enable_anonymous_signins == o.enable_anonymous_signins && allowed_email_domains == o.allowed_email_domains && allowed_email_domains_mode == o.allowed_email_domains_mode && @@ -657,7 +672,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [access_token_lifetime, refresh_token_lifetime, refresh_token_reuse_interval, inactivity_timeout, max_session_duration, platform_token_ttl, min_password_length, require_uppercase, require_lowercase, require_numbers, require_special_chars, enable_signup, enable_email_password, rate_limit_signup, rate_limit_signin, rate_limit_token_refresh, rate_limit_password_reset, cors_enabled, cors_allowed_origins, cors_allow_credentials, cors_max_age, enable_anonymous_signins, allowed_email_domains, allowed_email_domains_mode, allow_password_reset, password_reset_timeout, max_password_history, require_email_confirmation, email_confirmation_timeout, auto_link_verified_oauth, email_enabled, email_from_address, email_from_name, smtp_host, smtp_port, smtp_username, smtp_password, smtp_use_tls, email_confirmation_subject, email_password_reset_subject, email_password_changed_subject, managed_auth_enabled, post_auth_redirect_url, allowed_redirect_urls, post_logout_redirect_url, device_verification_url].hash + [access_token_lifetime, refresh_token_lifetime, refresh_token_reuse_interval, inactivity_timeout, max_session_duration, platform_token_ttl, min_password_length, require_uppercase, require_lowercase, require_numbers, require_special_chars, enable_signup, enable_email_password, rate_limit_signup, rate_limit_signin, rate_limit_token_refresh, rate_limit_password_reset, cors_enabled, cors_allowed_origins, cors_allow_credentials, cors_max_age, cors_allow_frontend_previews, enable_anonymous_signins, allowed_email_domains, allowed_email_domains_mode, allow_password_reset, password_reset_timeout, max_password_history, require_email_confirmation, email_confirmation_timeout, auto_link_verified_oauth, email_enabled, email_from_address, email_from_name, smtp_host, smtp_port, smtp_username, smtp_password, smtp_use_tls, email_confirmation_subject, email_password_reset_subject, email_password_changed_subject, managed_auth_enabled, post_auth_redirect_url, allowed_redirect_urls, post_logout_redirect_url, device_verification_url].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_auth_hosted_page_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_auth_hosted_page_request.rb index 89ca8737..2539fcc6 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_auth_hosted_page_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_auth_hosted_page_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_auth_page_layout_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_auth_page_layout_request.rb index 3a240d90..88a48609 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_auth_page_layout_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_auth_page_layout_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_auth_page_theme_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_auth_page_theme_request.rb index d107e761..41bb810b 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_auth_page_theme_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_auth_page_theme_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_database_branch_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_database_branch_request.rb index 18d04f63..af3fc361 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_database_branch_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_database_branch_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_database_type_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_database_type_request.rb index 503f0f36..cc39d490 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_database_type_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_database_type_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_email_template_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_email_template_request.rb index 15600ae5..7891a047 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_email_template_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_email_template_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -15,6 +15,7 @@ module Volcano::Generated class UpdateEmailTemplateRequest < ApiModelBase + # Subject template. For new or changed values, literal interior carriage returns or newlines after Go template whitespace trimming return 400. Outer whitespace and trailing block-scalar newlines are allowed. Unchanged stored subjects are preserved. attr_accessor :subject attr_accessor :html_body diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_frontend_custom_domain_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_frontend_custom_domain_request.rb new file mode 100644 index 00000000..08264209 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/update_frontend_custom_domain_request.rb @@ -0,0 +1,151 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class UpdateFrontendCustomDomainRequest < ApiModelBase + # The redirect to set, or null to make the domain serve the frontend. + attr_accessor :redirect + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'redirect' => :'redirect' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'redirect' => :'FrontendCustomDomainRedirectRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'redirect' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::UpdateFrontendCustomDomainRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::UpdateFrontendCustomDomainRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'redirect') + self.redirect = attributes[:'redirect'] + else + self.redirect = nil + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + redirect == o.redirect + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [redirect].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_function_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_function_request.rb index d4bdd82e..252958d0 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_function_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_function_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_function_scheduler_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_function_scheduler_request.rb index 92cf6002..4ff39577 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_function_scheduler_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_function_scheduler_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_issue_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_issue_request.rb index b9e8f8cb..39d3fad9 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_issue_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_issue_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_notification_email.rb b/lib/volcano/generated/lib/volcano-generated/models/update_notification_email.rb new file mode 100644 index 00000000..ddf41abf --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/update_notification_email.rb @@ -0,0 +1,178 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class UpdateNotificationEmail < ApiModelBase + attr_accessor :enabled + + # Only the project owner's verified account email address is supported. An empty list, or one naming only that address, emails the owner and is saved as an empty list. Any other list is refused as invalid. + attr_accessor :recipients + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enabled' => :'enabled', + :'recipients' => :'recipients' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'enabled' => :'Boolean', + :'recipients' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::UpdateNotificationEmail` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::UpdateNotificationEmail`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'recipients') + if (value = attributes[:'recipients']).is_a?(Array) + self.recipients = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@recipients.nil? && @recipients.length > 10 + invalid_properties.push('invalid value for "recipients", number of items must be less than or equal to 10.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@recipients.nil? && @recipients.length > 10 + true + end + + # Custom attribute writer method with validation + # @param [Object] recipients Value to be assigned + def recipients=(recipients) + if recipients.nil? + fail ArgumentError, 'recipients cannot be nil' + end + + if recipients.length > 10 + fail ArgumentError, 'invalid value for "recipients", number of items must be less than or equal to 10.' + end + + @recipients = recipients + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + recipients == o.recipients + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [enabled, recipients].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_notification_settings_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_notification_settings_request.rb new file mode 100644 index 00000000..f348533a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/update_notification_settings_request.rb @@ -0,0 +1,166 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + # Omitted fields keep their current values. + class UpdateNotificationSettingsRequest < ApiModelBase + attr_accessor :email + + attr_accessor :webhook + + attr_accessor :scheduler_failures + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email' => :'email', + :'webhook' => :'webhook', + :'scheduler_failures' => :'scheduler_failures' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'email' => :'UpdateNotificationEmail', + :'webhook' => :'UpdateNotificationWebhook', + :'scheduler_failures' => :'UpdateSchedulerFailureAlertPolicy' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::UpdateNotificationSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::UpdateNotificationSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'webhook') + self.webhook = attributes[:'webhook'] + end + + if attributes.key?(:'scheduler_failures') + self.scheduler_failures = attributes[:'scheduler_failures'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + webhook == o.webhook && + scheduler_failures == o.scheduler_failures + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [email, webhook, scheduler_failures].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_notification_webhook.rb b/lib/volcano/generated/lib/volcano-generated/models/update_notification_webhook.rb new file mode 100644 index 00000000..60d2d2d4 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/update_notification_webhook.rb @@ -0,0 +1,178 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class UpdateNotificationWebhook < ApiModelBase + # An `http` or `https` URL. Surrounding whitespace is trimmed. An empty string removes the webhook and its secret. + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'url' => :'url' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::UpdateNotificationWebhook` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::UpdateNotificationWebhook`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@url.nil? && @url.to_s.length > 2048 + invalid_properties.push('invalid value for "url", the character length must be smaller than or equal to 2048.') + end + + pattern = Regexp.new(/^\s*(|[hH][tT][tT][pP][sS]?:\/\/.+)\s*$/) + if !@url.nil? && @url !~ pattern + invalid_properties.push("invalid value for \"url\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@url.nil? && @url.to_s.length > 2048 + return false if !@url.nil? && @url !~ Regexp.new(/^\s*(|[hH][tT][tT][pP][sS]?:\/\/.+)\s*$/) + true + end + + # Custom attribute writer method with validation + # @param [Object] url Value to be assigned + def url=(url) + if url.nil? + fail ArgumentError, 'url cannot be nil' + end + + if url.to_s.length > 2048 + fail ArgumentError, 'invalid value for "url", the character length must be smaller than or equal to 2048.' + end + + pattern = Regexp.new(/^\s*(|[hH][tT][tT][pP][sS]?:\/\/.+)\s*$/) + if url !~ pattern + fail ArgumentError, "invalid value for \"url\", must conform to the pattern #{pattern}." + end + + @url = url + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + url == o.url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [url].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_o_auth_config_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_o_auth_config_request.rb index 37f59d2b..c5b3ff6a 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_o_auth_config_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_o_auth_config_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_project_git_deploy_settings_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_project_git_deploy_settings_request.rb index db35d7f1..4b64954c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_project_git_deploy_settings_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_project_git_deploy_settings_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -14,25 +14,29 @@ require 'time' module Volcano::Generated - # Full replace of a project's Git auto-deploy settings. + # Full replace of a project's Git auto-deploy settings, except apply_migrations, which keeps its saved value when omitted. class UpdateProjectGitDeploySettingsRequest < ApiModelBase attr_accessor :auto_deploy_enabled attr_accessor :deploy_functions - # Frontend to deploy on push. Omit or empty to deploy no frontend. + # Legacy frontend to deploy on push. In Git mode, explicitly send an empty string to stop deploying the selected frontend; omit frontend_app_root too. This keeps the serving frontend and Git handover intact. Omitting an existing selection or renaming it is refused in Git mode. In platform mode, omit or empty to deploy no frontend. Explicit source-layout mappings are independent of this legacy selection. attr_accessor :frontend_name # App root the frontend builds from. Requires frontend_name; omit for the repo root. attr_accessor :frontend_app_root + # Apply the commit's pending migrations before each push deploys. Anyone who can push to the production branch can then run any SQL as the database owner, so protect that branch first. Off until set. Omit to leave the saved value unchanged. Turning it on answers `400` with code `feature_unavailable` where the `databases.migrations` capability is unavailable; `false`, or the saved `true` sent back, is accepted even there. While the project owner's account is `read_only`, the request answers `403` whatever it sends; an `inactive` owner's credentials answer `401`. + attr_accessor :apply_migrations + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'auto_deploy_enabled' => :'auto_deploy_enabled', :'deploy_functions' => :'deploy_functions', :'frontend_name' => :'frontend_name', - :'frontend_app_root' => :'frontend_app_root' + :'frontend_app_root' => :'frontend_app_root', + :'apply_migrations' => :'apply_migrations' } end @@ -52,7 +56,8 @@ def self.openapi_types :'auto_deploy_enabled' => :'Boolean', :'deploy_functions' => :'Boolean', :'frontend_name' => :'String', - :'frontend_app_root' => :'String' + :'frontend_app_root' => :'String', + :'apply_migrations' => :'Boolean' } end @@ -97,6 +102,10 @@ def initialize(attributes = {}) if attributes.key?(:'frontend_app_root') self.frontend_app_root = attributes[:'frontend_app_root'] end + + if attributes.key?(:'apply_migrations') + self.apply_migrations = attributes[:'apply_migrations'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -152,7 +161,8 @@ def ==(o) auto_deploy_enabled == o.auto_deploy_enabled && deploy_functions == o.deploy_functions && frontend_name == o.frontend_name && - frontend_app_root == o.frontend_app_root + frontend_app_root == o.frontend_app_root && + apply_migrations == o.apply_migrations end # @see the `==` method @@ -164,7 +174,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [auto_deploy_enabled, deploy_functions, frontend_name, frontend_app_root].hash + [auto_deploy_enabled, deploy_functions, frontend_name, frontend_app_root, apply_migrations].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_project_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_project_request.rb index b6435731..4a7e86fb 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_project_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_project_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_realtime_config_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_realtime_config_request.rb index 23e8e0c5..a3f3cc3c 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_realtime_config_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_realtime_config_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_sandbox_template_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_sandbox_template_request.rb index 98906ce5..10c9f3ef 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_sandbox_template_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_sandbox_template_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_scheduler_failure_alert_policy.rb b/lib/volcano/generated/lib/volcano-generated/models/update_scheduler_failure_alert_policy.rb new file mode 100644 index 00000000..402c2cc7 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/update_scheduler_failure_alert_policy.rb @@ -0,0 +1,215 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. + +The version of the OpenAPI document: 3.0.0 +Contact: support@volcano.dev +Generated by: https://openapi-generator.tech +Generator version: 7.17.0 + +=end + +require 'date' +require 'time' + +module Volcano::Generated + class UpdateSchedulerFailureAlertPolicy < ApiModelBase + attr_accessor :notify_on + + attr_accessor :threshold + + attr_accessor :notify_on_recovery + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'notify_on' => :'notify_on', + :'threshold' => :'threshold', + :'notify_on_recovery' => :'notify_on_recovery' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'notify_on' => :'SchedulerFailureNotifyOn', + :'threshold' => :'Integer', + :'notify_on_recovery' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::UpdateSchedulerFailureAlertPolicy` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::UpdateSchedulerFailureAlertPolicy`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'notify_on') + self.notify_on = attributes[:'notify_on'] + end + + if attributes.key?(:'threshold') + self.threshold = attributes[:'threshold'] + end + + if attributes.key?(:'notify_on_recovery') + self.notify_on_recovery = attributes[:'notify_on_recovery'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if !@threshold.nil? && @threshold > 100 + invalid_properties.push('invalid value for "threshold", must be smaller than or equal to 100.') + end + + if !@threshold.nil? && @threshold < 1 + invalid_properties.push('invalid value for "threshold", must be greater than or equal to 1.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if !@threshold.nil? && @threshold > 100 + return false if !@threshold.nil? && @threshold < 1 + true + end + + # Custom attribute writer method with validation + # @param [Object] threshold Value to be assigned + def threshold=(threshold) + if threshold.nil? + fail ArgumentError, 'threshold cannot be nil' + end + + if threshold > 100 + fail ArgumentError, 'invalid value for "threshold", must be smaller than or equal to 100.' + end + + if threshold < 1 + fail ArgumentError, 'invalid value for "threshold", must be greater than or equal to 1.' + end + + @threshold = threshold + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + notify_on == o.notify_on && + threshold == o.threshold && + notify_on_recovery == o.notify_on_recovery + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [notify_on, threshold, notify_on_recovery].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + end + +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_storage_bucket_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_storage_bucket_request.rb index f0d4874d..37ef9a3d 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_storage_bucket_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_storage_bucket_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/update_variable_request.rb b/lib/volcano/generated/lib/volcano-generated/models/update_variable_request.rb index d2ef289b..5f77cfdd 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/update_variable_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/update_variable_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/upload_session_part.rb b/lib/volcano/generated/lib/volcano-generated/models/upload_session_part.rb index 28bb5113..d994c9e7 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/upload_session_part.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/upload_session_part.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/upload_session_status_response.rb b/lib/volcano/generated/lib/volcano-generated/models/upload_session_status_response.rb index 6ef4622f..6f5c46d8 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/upload_session_status_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/upload_session_status_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/upload_storage_object201_response.rb b/lib/volcano/generated/lib/volcano-generated/models/upload_storage_object201_response.rb index 0bb51df6..865326bc 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/upload_storage_object201_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/upload_storage_object201_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/usage_data_point.rb b/lib/volcano/generated/lib/volcano-generated/models/usage_data_point.rb index e9b7e694..95b9dd58 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/usage_data_point.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/usage_data_point.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/variable.rb b/lib/volcano/generated/lib/volcano-generated/models/variable.rb index 95d9a4dd..5e7c46fd 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/variable.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/variable.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/variable_environment.rb b/lib/volcano/generated/lib/volcano-generated/models/variable_environment.rb index 7ece1290..b047227e 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/variable_environment.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/variable_environment.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/variable_environment_list.rb b/lib/volcano/generated/lib/volcano-generated/models/variable_environment_list.rb index bdf77f7b..2adf1e39 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/variable_environment_list.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/variable_environment_list.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/verified_domain.rb b/lib/volcano/generated/lib/volcano-generated/models/verified_domain.rb index af852b79..6fd77841 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/verified_domain.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/verified_domain.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/verified_domains_response.rb b/lib/volcano/generated/lib/volcano-generated/models/verified_domains_response.rb index da91821d..47ff8612 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/verified_domains_response.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/verified_domains_response.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/models/verify_domain_request.rb b/lib/volcano/generated/lib/volcano-generated/models/verify_domain_request.rb index 3a0bcdb6..fd37a571 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/verify_domain_request.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/verify_domain_request.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/lib/volcano-generated/version.rb b/lib/volcano/generated/lib/volcano-generated/version.rb index 095fd850..32b1a580 100644 --- a/lib/volcano/generated/lib/volcano-generated/version.rb +++ b/lib/volcano/generated/lib/volcano-generated/version.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/spec/spec_helper.rb b/lib/volcano/generated/spec/spec_helper.rb index 6e3083ca..88d2749d 100644 --- a/lib/volcano/generated/spec/spec_helper.rb +++ b/lib/volcano/generated/spec/spec_helper.rb @@ -1,7 +1,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev diff --git a/lib/volcano/generated/volcano-generated.gemspec b/lib/volcano/generated/volcano-generated.gemspec index 845d9fba..2a9e7799 100644 --- a/lib/volcano/generated/volcano-generated.gemspec +++ b/lib/volcano/generated/volcano-generated.gemspec @@ -3,7 +3,7 @@ =begin #Volcano API -#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. +#Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. The version of the OpenAPI document: 3.0.0 Contact: support@volcano.dev @@ -23,7 +23,7 @@ Gem::Specification.new do |s| s.email = ["support@volcano.dev"] s.homepage = "https://github.com/Kong/volcano-sdk-ruby" s.summary = "Generated internal HTTP boundary for the Volcano Ruby SDK" - s.description = "Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations." + s.description = "Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations." s.license = "Apache-2.0" s.required_ruby_version = ">= 2.7" s.metadata = {} diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index f0e902d2..c5d652ce 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -4,7 +4,7 @@ info: description: |- Public API for Volcano clients, SDKs, and CLI tooling (Port 8000). - This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations. + This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal operations. version: 3.0.0 contact: name: Volcano @@ -22,9 +22,9 @@ tags: - name: Logs description: Project-scoped log search and activity APIs - name: Issues - description: 'Preview, not generally available: runtime errors grouped into issues. Where issues are not available, every endpoint answers `404` with code `feature_unavailable`.' - - name: Autofix - description: 'Preview, not generally available: AI diagnosis of a project''s issues and draft pull requests that fix them. Where autofix is not available, turning it on, or any request for a project that never saved settings, answers `404` with code `feature_unavailable`. Autofix is not available in local mode.' + description: 'Preview, not generally available: runtime errors grouped into issues, LavaFlow Code Quality findings, and problems reported for a project. Where issues are not available, every endpoint answers `404` with code `feature_unavailable`.' + - name: LavaFlow + description: 'Preview, not generally available: LavaFlow diagnoses a project''s issues and opens pull requests that fix them. It merges a fix only under `autonomy: merge`, where the project''s `lavaflow.merge` capability is available, once the fix passes review and its required checks and nothing holds it. LavaFlow sends this project''s logs and source code to an AI service that Volcano operates. Every endpoint names one project with `project_id`. Where LavaFlow is not available, every endpoint refuses a project that has no LavaFlow records: `404` with code `feature_unavailable` while LavaFlow is not offered to the project, and `403` with code `plan_required` when it is but the owner''s plan does not include it. A project with records keeps reading them and can still turn LavaFlow off.' - name: Functions description: Function deployment and management - name: Durable Functions @@ -35,6 +35,8 @@ tags: a start returns is an execution to poll and stop, not a result. Durable work is metered on its own allowances: executions, and the operations each execution performs while it runs. + - name: Notifications + description: Where a project's alerts go, by email and by a signed webhook, and when a failing function scheduler is announced. - name: Frontends description: Frontend deployment and management. Supports Next.js 15.x and 16.x with Node.js 22.x or 24.x inferred from package.json engines.node when the selected Node.js family satisfies the installed Next.js package engines.node constraint. - name: Tokens @@ -47,6 +49,8 @@ tags: description: PostgreSQL database provisioning and management - name: Database Branches description: Short-lived forks of a database for development and testing + - name: Database Migrations + description: A database's migration history and the runs that apply migration files to it. Where migration runs are not available, starting a run or recording a baseline answers `404` with code `feature_unavailable`; history and runs stay readable. - name: Database Queries description: REST API for querying databases (SELECT, INSERT, UPDATE, DELETE) - name: Authentication @@ -67,10 +71,20 @@ tags: description: OAuth login flows and provider management for end users - name: Git Connections description: Platform-user git provider connections for deployment source integrations + - name: Shares + description: A project's owner shares it through a link that lets anyone fork a release the owner published into a project of their own + - name: Forks + description: A visitor's own project, created from a release a share offers + - name: Connectors + description: Links from Volcano to outside services, such as Slack workspaces the Volcano app is installed in + - name: Slack Connections + description: The Volcano Slack app's installations, and Slack identities connected to Volcano accounts, which LavaFlow takes reported problems through - name: Project Imports description: Read-only project source discovery and import readiness checks - name: Verified Domains description: Domains an account has proven it owns, so it can attach any custom domain below them + - name: Account Sessions + description: Your account's own sign-ins, so a CLI login can end itself without the dashboard - name: Storage Buckets description: Storage bucket management (platform admin) - name: Storage Policies @@ -101,7 +115,7 @@ paths: security: [] responses: '200': - description: List available sandbox presets + description: List available sandbox presets. Temporarily unavailable regions are omitted. content: application/json: schema: @@ -357,7 +371,7 @@ paths: schema: $ref: '#/components/schemas/SandboxDeployment' default: - description: Invalid source (400), denied access (401, 403), conflicting retry (409), or a temporarily unavailable deployment service (503). Code `feature_unavailable` with 404 means sandboxes or custom templates are not available in this environment. + description: Invalid source (400), denied access (401, 403), conflicting retry (409), or a temporarily unavailable deployment service (503). Code `feature_unavailable` with 404 means sandboxes or custom templates are not available in this environment. A deployment builds no image in a temporarily unavailable region; code `sandbox_region_unavailable` (400) means every region is unavailable. content: application/json: schema: @@ -612,7 +626,7 @@ paths: schema: $ref: '#/components/schemas/SandboxSession' default: - description: Request refused or unavailable. Errors include invalid input (400), unauthenticated (401), forbidden (403), not found (404), conflicting retry (409), capacity exhausted (429), and temporarily unavailable (503). Code `feature_unavailable` with 404 means sandboxes are not available in this environment. Code `sandbox_plan_limit_exceeded` (403) means the requested resources exceed the plan. Code `sandbox_allowance_exhausted` (429) means the remaining allowance or credits cannot admit the operation. + description: Request refused or unavailable. Errors include invalid input (400), unauthenticated (401), forbidden (403), not found (404), conflicting retry (409), capacity exhausted (429), and temporarily unavailable (503). Code `feature_unavailable` with 404 means sandboxes are not available in this environment. Code `sandbox_plan_limit_exceeded` (403) means the requested resources exceed the plan. Code `sandbox_allowance_exhausted` (429) means the remaining allowance or credits cannot admit the operation. Code `sandbox_region_unavailable` (400) means the region is temporarily unavailable for Sandboxes; choose another from `GET /sandboxes/presets`. Code `feature_unavailable` with 400 means `network.egress` `deny_all` is not available in this environment; `GET /capabilities` lists it as `sandboxes.network_isolation`. Code `feature_unavailable` with 400 means the request keeps no output while the `sandboxes.output_not_kept` capability is unavailable. Code `sandbox_limits_unsupported` (400) means the selected image predates `limits`; redeploy the template or recreate the named Sandbox, or retry once the preset is updated. Code `sandbox_limits_exceed_session` (400) means `limits.vcpus` is more than the session has; use a larger preset size or template, or lower `limits.vcpus`. content: application/json: schema: @@ -654,7 +668,80 @@ paths: schema: $ref: '#/components/schemas/SandboxExecutionResult' default: - description: Request refused or unavailable. Errors include invalid input (400), unauthenticated (401), forbidden (403), not found (404), conflicting retry (409), capacity exhausted (429), and temporarily unavailable (503). Code `feature_unavailable` with 404 means sandboxes are not available in this environment. Code `sandbox_plan_limit_exceeded` (403) means the requested resources exceed the plan. Code `sandbox_allowance_exhausted` (429) means the remaining allowance or credits cannot admit the operation. + description: Request refused or unavailable. Errors include invalid input (400), unauthenticated (401), forbidden (403), not found (404), conflicting retry (409), startup hook timeout (422), capacity exhausted (429), and temporarily unavailable (503). Code `feature_unavailable` with 404 means sandboxes are not available in this environment. Code `sandbox_plan_limit_exceeded` (403) means the requested resources exceed the plan. Code `sandbox_allowance_exhausted` (429) means the remaining allowance or credits cannot admit the operation. Code `sandbox_region_unavailable` (400) means the region is temporarily unavailable for Sandboxes; choose another from `GET /sandboxes/presets`. Code `feature_unavailable` with 400 means `network.egress` `deny_all` is not available in this environment; `GET /capabilities` lists it as `sandboxes.network_isolation`. Code `sandbox_image_outdated` (409) means the template's image predates what the request needs, such as `deny_all` on a template deployed to local mode before this version; redeploy the template. No command was sent. Code `feature_unavailable` with 400 means the request keeps no output while the `sandboxes.output_not_kept` capability is unavailable. Code `sandbox_start_failed` means startup failed or timed out before the command was sent. Its status is 422 for sandbox_run_hook_timeout on a custom deployment, 429 for sandbox_allowance_exhausted or sandbox_allowance_retention_expired, and 503 for managed-preset run-hook timeouts or other or unknown startup reasons. sandbox_start_timeout means the startup wait expired; sandbox_session_expired means the session lifetime ended before dispatch. For sandbox_launch_outcome_unknown, the session isn't billed. Its startup command may already have started and can run until the session would have expired; Volcano can't reach it. Start a new session with a new key. A session whose launch outcome was unknown when it ended for an earlier reason keeps that reason, with the same caveat. Its error message includes the recorded startup reason when known, including on replay. The message is diagnostic text, not a stable machine-readable retry classification; investigate the reason before starting another billed attempt. Admission refusals include response code `sandbox_capacity_unavailable` (429), `sandbox_allowance_exhausted` (429), and `sandbox_plan_limit_exceeded` (403); no command was sent. Reusing the same Idempotency-Key replays these refusals or startup failure even after recovery; use a new key for a new attempt. A 403 or 429 without an explicit admission-refusal code or sandbox_start_failed does not prove no dispatch. Other failures may have an unknown execution outcome; do not use a new key to repeat a command with side effects. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sandbox-session-files: + get: + tags: + - Sandboxes + summary: List workspace files + description: 'Lists a directory in a Sandbox session''s workspace, one page at a time. The listing never follows a symlink and never leaves the workspace. It is not a snapshot: a file that changes while it runs can appear before or after the change. Sessions started on an image built before file listing answer 409 with code `sandbox_image_outdated`; start a new session, after redeploying a custom template.' + operationId: listSandboxSessionFiles + security: + - UserToken: [] + - ServiceRoleKey: [] + - ProjectAccessToken: [] + - AuthUserAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectIdQuery' + - name: session_id + in: query + required: true + description: The session to list. A session outside `project_id` answers like one that doesn't exist. + schema: + type: string + format: uuid + - name: path + in: query + required: false + description: Workspace directory to list, such as `src` or `/workspace/src`. Omit it, or pass `.` or `/workspace`, to list the workspace root. The path must be a directory; it is never reached through a symlink. + schema: + type: string + minLength: 1 + maxLength: 4096 + - name: recursive + in: query + required: false + description: List every entry below the directory. When false, list only its direct entries. + schema: + type: boolean + default: true + - name: include_sha256 + in: query + required: false + description: Add the SHA-256 digest of each regular file's content. A call reads at most 256 MiB to hash; a page ends early, with `next_cursor`, before a file that would pass that budget. A file without a digest says why in `sha256_skipped`. + schema: + type: boolean + default: false + - name: limit + in: query + required: false + description: Most entries to return. A page can hold fewer, so continue while `next_cursor` is present. + schema: + type: integer + minimum: 1 + maximum: 10000 + default: 10000 + - name: cursor + in: query + required: false + description: Opaque cursor from the previous page's `next_cursor`. It is valid only for the same project and session; send the same `path` and `recursive` with it. + schema: + type: string + minLength: 1 + maxLength: 8192 + responses: + '200': + description: One page of workspace entries + content: + application/json: + schema: + $ref: '#/components/schemas/SandboxFileListResult' + default: + description: Request refused or unavailable. Errors include invalid input (400), unauthenticated (401), forbidden (403), not found (404), conflict (409), capacity exhausted (429), and temporarily unavailable (503). A project the caller can't read answers 404 exactly like one that doesn't exist, and a session outside the project answers like an unknown session. A credential for the project that lacks the `sandboxes.files.read` permission answers 403. Code `sandbox_path_not_directory` with 400 means the path is missing, is not a directory, or passes through a symlink. Code `sandbox_path_unreadable` with 400 means the session user can't list the path or pass through a directory above it. Code `sandbox_image_outdated` with 409 means the session's image predates file listing. Code `feature_unavailable` with 404 means sandboxes are not available in this environment. content: application/json: schema: @@ -817,7 +904,7 @@ paths: schema: $ref: '#/components/schemas/SandboxCommandResult' default: - description: Request refused or unavailable. Errors include invalid input (400), unauthenticated (401), forbidden (403), not found (404), conflicting retry (409), capacity exhausted (429), and temporarily unavailable (503). Code `feature_unavailable` with 404 means sandboxes are not available in this environment. + description: Request refused or unavailable. Errors include invalid input (400), unauthenticated (401), forbidden (403), not found (404), conflicting retry (409), capacity exhausted (429), and temporarily unavailable (503). Code `feature_unavailable` with 404 means sandboxes are not available in this environment. Code `sandbox_session_not_running` (409) means the session cannot accept commands and the command was not sent. The same Idempotency-Key replays this refusal even after the session resumes; use a new key once the session is running. Other failures may have an unknown outcome; reuse the original key. Code `sandbox_command_capacity` with 429 means the session is already running its maximum number of commands and started nothing; retry with the same Idempotency-Key once one finishes. Code `sandbox_session_keeps_no_output` with 400 means the session keeps no command output and the request set `keep_output` to true. Code `feature_unavailable` with 400 means the command keeps no output, by its own `keep_output` or its session's, while the `sandboxes.output_not_kept` capability is unavailable. Code `sandbox_disk_full` (409) means the session's disk had no room to record the command and it started nothing; retry with the same Idempotency-Key once there is room. content: application/json: schema: @@ -854,7 +941,7 @@ paths: schema: $ref: '#/components/schemas/SandboxFileResult' default: - description: Request refused or unavailable. Errors include invalid input (400), unauthenticated (401), forbidden (403), not found (404), conflicting retry (409), capacity exhausted (429), and temporarily unavailable (503). Code `feature_unavailable` with 404 means sandboxes are not available in this environment. + description: Request refused or unavailable. Errors include invalid input (400), unauthenticated (401), forbidden (403), not found or terminated session (404), conflicting retry (409), capacity exhausted (429), and temporarily unavailable (503). Code `feature_unavailable` with 404 means sandboxes are not available in this environment. content: application/json: schema: @@ -887,7 +974,127 @@ paths: '204': description: Write a workspace file default: - description: Request refused or unavailable. Errors include invalid input (400), unauthenticated (401), forbidden (403), not found (404), conflicting retry (409), capacity exhausted (429), and temporarily unavailable (503). Code `feature_unavailable` with 404 means sandboxes are not available in this environment. + description: Request refused or unavailable. Errors include invalid input (400), unauthenticated (401), forbidden (403), not found or terminated session (404), conflicting retry (409), capacity exhausted (429), and temporarily unavailable (503). Code `feature_unavailable` with 404 means sandboxes are not available in this environment. Code `sandbox_disk_full` (409) means the write did not fit on the session's disk; delete files in the session, or, for a session started with `limits.disk_mib`, start one with a larger cap. Code `sandbox_path_conflict` (409) means a cloud session has `limits.disk_mib`, whose writes run as the session user, and that user cannot write the file's directory. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sandbox-file-archives: + post: + tags: + - Sandboxes + summary: Extract a tar archive into a session's workspace + description: | + Extracts a tar archive into a directory of a session's workspace. Send `multipart/form-data` + with `project_id`, `session_id` and `path`, in any order, then the archive as the file part + `archive`. The archive may be gzip-compressed; Volcano detects compression from its first bytes. + The request streams to the session, so the archive is never held whole in memory. + + Each call accepts at most 32 MiB of archive, 10,000 files and directories, and 256 MiB of + uncompressed archive, counting tar headers, and has 2 minutes to send its archive; a slower + call fails and writes nothing. Split larger trees into several archives and create one after + another. For a single file larger than 8 MiB, use `POST /sandbox-file-parts`. + + `path` must name a directory below the workspace root; a path that resolves to the root or to + `/`, such as `.`, `./`, `/`, `/workspace` or `/workspace/.`, is refused with + `sandbox_archive_invalid`. The archive may contain only regular files and directories. Entry + names are relative to `path`, which is created when missing; an absolute name, a `..` + component, a symbolic link, a + hard link, a sparse file, or a device refuses the whole archive. File and directory modes keep their + permission bits; setuid, setgid and sticky bits are dropped. A file replaces an existing file or + symbolic link at its path. Existing directories keep their modes. A symbolic link in the + destination is never followed. + + The archive is checked and staged before the workspace changes, so a refused archive writes + nothing, and one that fails part way is undone. If a session process moves or removes a + directory while the archive is written, the call answers `409`, a file the archive replaced + there is kept in a `.sandbox-archive-*` directory at the workspace root, and files the + archive already placed can stay. Read-only directories the session user + owns still take new entries and keep their modes. Code `sandbox_archive_invalid` (400) means the archive or form is malformed or holds an + entry that is not allowed. Code `sandbox_archive_too_large` (413) means it exceeds a limit + above. Code `sandbox_path_conflict` (409) means the destination has a symbolic link or a file + where the archive needs a directory, a directory where it has a file, or a directory the + session user cannot write. Code + `sandbox_disk_full` (409) means the session's disk has no room for it; free space and retry. Code + `sandbox_image_outdated` (409) means the session started from an image that predates archive + writes; start a new session from a current preset, or redeploy the template. A session outside + `project_id`, or a project the caller cannot reach, answers 404 like an unknown session. + operationId: createSandboxFileArchive + security: + - UserToken: [] + - ServiceRoleKey: [] + - ProjectAccessToken: [] + - AuthUserAccessToken: [] + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/SandboxFileArchiveForm' + responses: + '201': + description: The archive was extracted + content: + application/json: + schema: + $ref: '#/components/schemas/SandboxFileArchive' + default: + description: Request refused or unavailable. Errors include an invalid form or archive (400), unauthenticated (401), forbidden (403), an unknown project or session (404), a conflicting destination, an outdated session image or a full disk (409), an archive over a limit (413), and temporarily unavailable (503). Code `feature_unavailable` with 404 means sandboxes are not available in this environment. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /sandbox-file-parts: + post: + tags: + - Sandboxes + summary: Write one part of a large workspace file + description: | + Writes a file of up to 1 GiB into a session's workspace in parts of at most 8 MiB. Each part + names its `offset` in the file, the whole file's `size`, and the whole file's lowercase hex + `sha256`. Parts collect in a hidden staging file beside `path`; nothing appears at `path` until + the part that ends at `size` arrives. That part checks the whole file's size and SHA-256, then + moves the file into place in one step, so a partial file is never visible at `path`. The + response's `complete` says which part finished the file. Missing parent directories are created, + and a symbolic link among them is never followed. The finished file is readable and writable + only by the session user. + + A part may start anywhere up to the bytes already received, so a failed part can be resent. A + part at offset 0 starts the file again. Resending the part that finished the file answers the + same completion while the file at `path` still matches `size` and `sha256`. Code `sandbox_file_part_out_of_order` (409) means the + part starts past the bytes received; resend from the last part that succeeded. Code + `sandbox_file_part_mismatch` (409) means the finished file differs from `size` or `sha256`; its + parts are discarded, so start again at offset 0. Code `sandbox_path_conflict` (409) means a + directory is at `path`, a file or symbolic link is where a parent directory belongs, or the + session user cannot write the parent directory, or, when parents are missing, the nearest + one that exists. Read-only directories the session user owns still take new entries and + keep their modes. Code + `sandbox_disk_full` (409) means the session's disk has no room; free space and retry. Code + `sandbox_image_outdated` (409) means the session started from an image that predates parted + writes. A staging file stays until its file completes, a part at offset 0 restarts it, or the + session ends. A session outside `project_id`, or a project the caller cannot reach, answers 404 + like an unknown session. + operationId: createSandboxFilePart + security: + - UserToken: [] + - ServiceRoleKey: [] + - ProjectAccessToken: [] + - AuthUserAccessToken: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SandboxFilePartRequest' + responses: + '201': + description: The part was written + content: + application/json: + schema: + $ref: '#/components/schemas/SandboxFilePart' + default: + description: Request refused or unavailable. Errors include invalid input (400), unauthenticated (401), forbidden (403), an unknown project or session (404), a part out of order, a mismatched file, a conflicting destination, an outdated session image or a full disk (409), a request body over its limit (413), and temporarily unavailable (503). Code `feature_unavailable` with 404 means sandboxes are not available in this environment. content: application/json: schema: @@ -990,7 +1197,7 @@ paths: schema: $ref: '#/components/schemas/SandboxAccess' default: - description: Request refused or unavailable. Errors include invalid input (400), unauthenticated (401), forbidden (403), not found (404), conflicting retry (409), capacity exhausted (429), and temporarily unavailable (503). Code `feature_unavailable` with 404 means sandboxes are not available in this environment. + description: Request refused or unavailable. Errors include invalid input (400), unauthenticated (401), forbidden (403), not found (404), conflicting retry (409), capacity exhausted (429), and temporarily unavailable (503). Code `feature_unavailable` with 404 means sandboxes are not available in this environment. Code `sandbox_network_isolated` (400) means the session was created with `network.egress` `deny_all`, which accepts no port access. content: application/json: schema: @@ -1018,7 +1225,7 @@ paths: - name: redirect in: query required: false - description: Validated application URL used after the provider callback. + description: Application URL used after the provider callback. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. schema: type: string format: uri @@ -1026,7 +1233,7 @@ paths: - name: callback_url in: query required: false - description: Same-origin browser callback used to relay provider parameters before completing the connection. + description: Same-origin browser callback used to relay provider parameters before completing the connection. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. schema: type: string format: uri @@ -1566,13 +1773,13 @@ paths: - name: redirect in: query required: false - description: URL to redirect the browser to after the provider callback completes. + description: URL to redirect the browser to after the provider callback completes. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. schema: type: string - name: callback_url in: query required: false - description: Same-origin browser callback used to relay provider parameters before completing the connection. + description: Same-origin browser callback used to relay provider parameters before completing the connection. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. schema: type: string format: uri @@ -1990,960 +2197,938 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /github/callback: - get: + /user/tokens/current: + delete: tags: - - Git Connections - summary: Complete a GitHub App connection callback + - Account Sessions + summary: Revoke the calling platform token description: | - Public GitHub App callback. The signed state and callback binding cookie - bind the provider authorization to the browser that started the flow. - operationId: gitConnectCallback - security: [] - parameters: - - name: code - in: query - required: false - description: GitHub user authorization code. - schema: - type: string - - name: state - in: query - required: true - description: Signed connect state generated by startGitConnect. - schema: - type: string - - name: error - in: query - required: false - description: Provider error returned by GitHub. - schema: - type: string + Revokes the platform token that authenticates this request, and ends + the sign-in session it was created from, if any. Ending the session + also revokes every other token created from it. Every later request + with the token answers `401`. + + Only a platform token (`pk-`) can call it. A project access token is + refused with `403`. + operationId: revokeCurrentUserToken + security: + - UserToken: [] responses: - '303': - description: Redirect back to the app after a successful or failed connect attempt - headers: - Location: - description: Redirect target - schema: - type: string - '400': - description: Invalid callback request or state + '204': + description: Token revoked + '401': + description: Not authenticated, or not a platform token content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - description: Too many callback attempts from this client + '403': + description: Forbidden - a project access token cannot revoke a platform token content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Failed to complete the connection + description: Failed to revoke the token content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: Git provider integration is not configured + '501': + description: Account sessions are unavailable in local mode content: application/json: schema: $ref: '#/components/schemas/Error' - /projects: + /user/sessions: get: tags: - - Projects - summary: List all projects for authenticated user + - Account Sessions + summary: List your account's sign-in sessions description: | - Returns projects that are not deleting or deleted, newest first. - Supports two mutually exclusive pagination modes. Offset mode uses - `page` and `limit`. Cursor mode uses `cursor` or `ending_before` with - `limit`, returns `next_cursor`/`prev_cursor`, and supports a bounded - `offset` past the cursor anchor. Supplying `limit` without `page` - selects cursor mode. `search` applies a case-insensitive project-name - filter in either mode. `include` optionally expands each returned - project with its Git connection and/or aggregate health summary using - `git_connection` and `health`. Sending `page` with `cursor` or `ending_before`, - or sending both cursor directions, returns 400. - operationId: listProjects + Lists the sign-in sessions of the account that owns the calling + platform token: dashboard sign-ins (`kind: browser`) and CLI logins + (`kind: cli`). The session the calling token was exchanged from is + marked `is_current: true`. A token created in the dashboard or through + the management API, rather than by signing in, has no session, so no + session is current. + + Ordering and pagination match `GET /auth/user/sessions`. + + Only a platform token (`pk-`) can call it. A project access token is + refused with `403`. + operationId: listAccountSessions security: - UserToken: [] parameters: - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Cursor' - - $ref: '#/components/parameters/EndingBefore' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Search' - - name: include - in: query - required: false - description: Optional comma-separated project metadata expansions. - style: form - explode: false - schema: - type: array - uniqueItems: true - items: - type: string - enum: - - git_connection - - health + - $ref: '#/components/parameters/SessionListPage' + - $ref: '#/components/parameters/SessionListLimit' + - $ref: '#/components/parameters/SessionListSort' + - $ref: '#/components/parameters/SessionListStatus' + - $ref: '#/components/parameters/SessionListCursor' + - $ref: '#/components/parameters/SessionListEndingBefore' + - $ref: '#/components/parameters/SessionListOffset' responses: '200': - description: Successful response + description: A page of the account's sessions content: application/json: schema: - $ref: '#/components/schemas/PaginatedProjects' + $ref: '#/components/schemas/AccountSessionList' '400': description: Invalid or conflicting pagination parameters content: application/json: schema: $ref: '#/components/schemas/Error' - post: - tags: - - Projects - summary: Create a new project - description: | - Creates a project for the authenticated user. - Each user can create up to 1,000 projects. Requests over this cap return 403. - operationId: createProject - security: - - UserToken: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateProjectRequest' - responses: - '201': - description: Project created + '401': + description: Not authenticated, or not a platform token content: application/json: schema: - $ref: '#/components/schemas/Project' - '400': - description: Bad request + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - a project access token cannot read account sessions content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Project limit exceeded for the user + '500': + description: Failed to list sessions content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: The selected project template is not configured in this environment + '501': + description: Account sessions are unavailable in local mode content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}: - get: + delete: tags: - - Projects - summary: Get project by ID - operationId: getProject + - Account Sessions + summary: Sign out every other session + description: | + Ends every session of the account except the one the calling token + was exchanged from, and revokes the platform tokens exchanged from + them. When the calling token has no session, every session ends. + + Platform tokens that were never linked to a session, such as one + created in the dashboard or through the management API, keep working. + Revoke each with `DELETE /user/tokens/current`. + operationId: revokeOtherAccountSessions security: - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' responses: - '200': - description: Successful response + '204': + description: Every other session ended + '401': + description: Not authenticated, or not a platform token content: application/json: schema: - $ref: '#/components/schemas/Project' - '404': - description: Project not found + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - a project access token cannot end account sessions content: application/json: schema: $ref: '#/components/schemas/Error' - patch: + '500': + description: Failed to end sessions + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '501': + description: Account sessions are unavailable in local mode + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /user/sessions/{sessionId}: + delete: tags: - - Projects - summary: Update project metadata and region policy - operationId: updateProject + - Account Sessions + summary: Sign out one session + description: | + Ends one of the account's sessions and revokes the platform tokens + exchanged from it. A session that is not the account's, or does not + exist, answers `404`. + operationId: revokeAccountSession security: - UserToken: [] - - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateProjectRequest' + - name: sessionId + in: path + required: true + description: The session ID, from `GET /user/sessions` + schema: + type: string responses: - '200': - description: Project updated - content: - application/json: - schema: - $ref: '#/components/schemas/Project' - '400': - description: | - Bad request (no region selected, an unknown region, or — for a - project holding durable functions — a region that does not offer - durable execution) + '204': + description: Session ended + '401': + description: Not authenticated, or not a platform token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Forbidden (for example, selecting subset regions on plan other than SUPERAGENT) + description: Forbidden - a project access token cannot end account sessions content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found + description: Session not found content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: Conflict (project name already exists or a resource deployment blocks a region change) + '500': + description: Failed to end the session content: application/json: schema: $ref: '#/components/schemas/Error' - delete: - tags: - - Projects - summary: Delete a project - description: | - Starts asynchronous project deletion. The project remains available from - `GET /projects/{id}` with `status: deleting` until cleanup finishes, but is - removed from project lists as soon as deletion starts. After cleanup it - returns 404. - operationId: deleteProject - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - responses: - '202': - description: Project deletion started - '404': - description: Project not found + '501': + description: Account sessions are unavailable in local mode content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/health: + /github/callback: get: tags: - - Projects - summary: Get project health + - Git Connections + summary: Complete a GitHub App connection callback description: | - Returns a fast control-plane health snapshot for the project and its - deployed resources. The endpoint does not run live provider probes. - A successful request returns 200 even when the project status is - `unhealthy`; transport and authorization failures use HTTP errors. - operationId: getProjectHealth - security: - - UserToken: [] - - ProjectAccessToken: [] + Public GitHub App callback. The signed state and callback binding cookie + bind the provider authorization to the browser that started the flow. + + GitHub also sends a browser here without `state` when someone installs + the App, changes its repository access, or asks an organization owner + to install it, on GitHub itself. That request connects nothing: Volcano + ignores `code` and `installation_id`, and redirects to the dashboard's + Git settings page when `setup_action` is `install`, `update`, or + `request`. Any other request without `state` returns 400. An empty or + invalid `state` is refused as before and never redirects there. + operationId: gitConnectCallback + security: [] parameters: - - $ref: '#/components/parameters/ProjectId' + - name: code + in: query + required: false + description: GitHub user authorization code. Ignored when `state` is absent. + schema: + type: string + - name: state + in: query + required: false + description: | + Signed connect state generated by startGitConnect. Absent when the + install started on GitHub rather than in Volcano. + schema: + type: string + - name: error + in: query + required: false + description: Provider error returned by GitHub. + schema: + type: string + - name: installation_id + in: query + required: false + description: | + The GitHub App installation ID GitHub adds to the redirect. Volcano + does not read it; a repository is connected through startGitConnect. + schema: + type: string + - name: setup_action + in: query + required: false + description: | + What happened on GitHub: `install`, `update`, or `request`. Without + `state`, one of these values redirects to the dashboard; any other + value, or none, returns 400. With `state`, it is ignored. + schema: + type: string responses: - '200': - description: Project health snapshot retrieved + '302': + description: | + Sent only when `state` is absent and `setup_action` is `install`, + `update`, or `request`. Redirects to the dashboard's Git settings + page without connecting anything, setting a cookie, or echoing the + request's query. + headers: + Location: + required: true + description: | + The dashboard's Git settings page with the fixed query + `github_install=1`. + schema: + type: string + format: uri + Cache-Control: + required: true + description: Always `no-store`. + schema: + type: string + Referrer-Policy: + required: true + description: Always `no-referrer`, so the dashboard never receives the callback URL. + schema: + type: string + '303': + description: Redirect back to the app after a successful or failed connect attempt + headers: + Location: + description: Redirect target + schema: + type: string + '400': + description: | + Invalid callback request or state, including a request without + `state` whose `setup_action` is missing or not `install`, `update`, + or `request` content: application/json: schema: - $ref: '#/components/schemas/ProjectHealthResponse' - '401': - description: Unauthorized - invalid or missing token + $ref: '#/components/schemas/Error' + '429': + description: Too many callback attempts from this client content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Access denied + '500': + description: Failed to complete the connection content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project not found + '503': + description: Git provider integration is not configured content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Internal server error + /connectors: + get: + tags: + - Connectors + summary: List connectors + description: | + Lists the connectors the caller can use. A connector links Volcano to + an outside service. A `slack` connector is a Slack workspace the + Volcano app is installed in: it is listed to the person who installed + it there, and to anyone with a Slack identity in that workspace + connected to their Volcano account. Add one with + `POST /user/slack/installations`. An `aikido` connector is an Aikido + workspace the caller connected with `POST /connectors`; it holds their + Aikido credentials, so it is listed to them alone. The list answers + whether or not reporting problems from either service is available in + this environment, so turning it off strands no connector. + operationId: listConnectors + security: + - UserToken: [] + - AuthUserAccessToken: [] + responses: + '200': + description: The caller's connectors + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectorsResponse' + '401': + description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/metrics/query: post: tags: - - Projects - summary: Query project runtime metrics + - Connectors + summary: Connect a service description: | - Evaluates a batch of named, curated runtime metric queries over one - trailing time range. Query IDs correlate each request with its result; - raw backend query languages are intentionally not exposed. - operationId: queryProjectMetrics + Connects an outside service with credentials the caller created there, + and answers `201` with the connector. Today that is an `aikido` + workspace, so LavaFlow can fix the security issues Aikido finds on the + caller's projects. Install the Volcano Slack app with + `POST /user/slack/installations` instead: it needs the browser. + + For Aikido, create a REST API client in Aikido's settings with read + access to issues, repositories and the workspace, and a webhook + signing secret on its webhooks page. Volcano checks the client with + Aikido, reads which workspace it belongs to, and stores all three + values encrypted; it never returns them. Then point an Aikido webhook + for new issues at `https:///webhooks/aikido`, and bind + projects with `POST /lavaflow/connector-bindings`. Volcano writes + nothing back to Aikido. A workspace connects to one Volcano account at + a time. + + Connecting Aikido needs LavaFlow and Aikido reports to be available in + this environment, as the `lavaflow.aikido` capability reports; + otherwise this answers `404` with code `feature_unavailable`. + operationId: createConnector security: - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' + - AuthUserAccessToken: [] requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/ProjectMetricsQueryRequest' + $ref: '#/components/schemas/ConnectorCreate' responses: - '200': - description: Project runtime metric queries evaluated + '201': + description: The service is connected content: application/json: schema: - $ref: '#/components/schemas/ProjectMetricsQueryResponse' + $ref: '#/components/schemas/Connector' '400': - description: Invalid metric query + description: The body is invalid content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Unauthorized - invalid or missing token + description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Access denied + '404': + description: Code `feature_unavailable` means Aikido reports are not available in this environment. content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project not found + '409': + description: The Aikido workspace is already connected, by the caller or another Volcano account. content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Internal server error + '422': + description: Aikido refused the client ID and secret, or the client cannot read the workspace. Check the region, the credentials and the client's read access. content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: Runtime metrics backend unavailable + '502': + description: Aikido did not answer; nothing was saved, so try again content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/logo: + /connectors/{connector_id}: get: tags: - - Projects - summary: Get the project logo image + - Connectors + summary: Get a connector description: | - Returns the raw logo image stored in the project's storage folder. This - endpoint is unauthenticated so the asset can be rendered directly in an - `` tag; project IDs are unguessable UUIDs and logos are - non-sensitive branding. The `Project.logo_url` field exposes a versioned - path to this endpoint. - operationId: getProjectLogo - security: [] + Returns one connector the caller can use, as listing connectors shows + it. A connector the caller cannot see answers like one that doesn't + exist. + operationId: getConnector + security: + - UserToken: [] + - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/ConnectorId' responses: '200': - description: Logo image + description: The connector content: - image/png: - schema: - type: string - format: binary - image/jpeg: - schema: - type: string - format: binary - image/gif: + application/json: schema: - type: string - format: binary - image/webp: + $ref: '#/components/schemas/Connector' + '400': + description: Malformed connector ID + content: + application/json: schema: - type: string - format: binary - image/svg+xml: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/Error' '404': - description: Project or logo not found + description: No such connector. One the caller cannot see answers the same way. content: application/json: schema: $ref: '#/components/schemas/Error' - post: + delete: tags: - - Projects - summary: Upload or replace the project logo + - Connectors + summary: Remove a connector description: | - Uploads an image as the project's logo, storing it in the project's - storage folder. Accepts PNG, JPEG, GIF, WebP, or SVG up to 2 MB. Replaces any - existing logo. Returns the updated project, whose `logo_url` reflects - the new logo. - operationId: uploadProjectLogo + Removes a connector. Removing a `slack` connector uninstalls the + Volcano app from the Slack workspace, for every Volcano account that + uses it. Only the person who installed the app there can remove it + (`removable` is `true` for them); anyone else can uninstall the app in + Slack. The workspace's channels stop reporting problems at their next + check, which also cancels reports still queued. The channel bindings + stay, and report again if the app is installed in the workspace again. + + Removing an `aikido` connector deletes its credentials and its project + bindings, and cancels its queued reports at their next check. Remove + the webhook in Aikido too: Volcano refuses its deliveries from then on. + + Removing works whether or not reporting problems from either service + is available in this environment. + operationId: deleteConnector security: - UserToken: [] - - ProjectAccessToken: [] + - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' - requestBody: - required: true - content: - multipart/form-data: - schema: - type: object - required: - - logo - properties: - logo: - type: string - format: binary - description: Logo image (PNG, JPEG, GIF, WebP, or SVG; max 2 MB) + - $ref: '#/components/parameters/ConnectorId' responses: - '200': - description: Logo uploaded - content: - application/json: - schema: - $ref: '#/components/schemas/Project' + '204': + description: Removed '400': - description: Bad request (missing file, unsupported type, or too large) + description: Malformed connector ID content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Access denied + '401': + description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project not found + '403': + description: Someone else installed the Volcano app in this Slack workspace; only they can remove it. content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: Project is being deleted + '404': + description: No such connector. One the caller cannot see answers the same way. content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: Logo storage is not configured + '502': + description: Slack did not answer the uninstall; the connector is unchanged, so try again content: application/json: schema: $ref: '#/components/schemas/Error' - delete: + /user/slack/installations: + post: tags: - - Projects - summary: Remove the project logo + - Slack Connections + summary: Start installing the Volcano Slack app description: | - Deletes the project logo from the project's storage folder and clears its - record. Returns the updated project with no `logo_url`. - operationId: deleteProjectLogo + Starts an installation of the Volcano app in a Slack workspace, so + LavaFlow can take problems reported there, and returns its Add to Slack + URL. Send the browser to it; Slack returns it to `GET /slack/callback`, + which saves the installation as a `slack` connector (`GET /connectors`). + Installing again replaces the workspace's installation. Enterprise Grid org-wide installs are refused. The + callback finishes only in the browser that started the installation. + + The response also sets a short-lived HttpOnly cookie that binds the + callback to this browser. Installing and connecting each set their + own, so starting one leaves the other's callback working. + operationId: startSlackInstall security: - UserToken: [] - - ProjectAccessToken: [] + - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/SlackRedirect' responses: '200': - description: Logo removed - content: - application/json: - schema: - $ref: '#/components/schemas/Project' - '403': - description: Access denied + description: Slack authorization URL content: application/json: schema: - $ref: '#/components/schemas/Error' - '404': - description: Project not found + $ref: '#/components/schemas/SlackAuthorizationResponse' + '400': + description: '`redirect` is not on the Volcano dashboard''s origin' content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: Project is being deleted + '401': + description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: Logo storage is not configured + '404': + description: Code `feature_unavailable`; reporting problems from Slack is not available in this environment content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/usage: + /user/slack/connections: get: tags: - - Projects - summary: Get usage metrics for a project + - Slack Connections + summary: List connected Slack identities description: | - Returns project usage totals for the current usage month plus - recent hourly and daily time series for each tracked metric. - operationId: getProjectUsage + Lists the caller's connected Slack identities. It answers whether or + not reporting problems from Slack is available in this environment, so + turning it off strands no connection. + operationId: listSlackConnections security: - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' + - AuthUserAccessToken: [] responses: '200': - description: Usage metrics retrieved - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectUsageResponse' - '403': - description: Access denied + description: The caller's connected Slack identities content: application/json: schema: - $ref: '#/components/schemas/Error' - '404': - description: Project not found + $ref: '#/components/schemas/SlackConnectionsResponse' + '401': + description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/shared-variables: - put: + post: tags: - - Projects - summary: Replace shared variable names - description: | - Atomically replaces the complete shared function-variable list without - changing values. Names must already exist. Validates final affected - function environments before membership or propagation side effects. - An empty list clears membership. Omitted names remain stored as non-shared variables. - operationId: replaceSharedVariables + - Slack Connections + summary: Start connecting a Slack identity + description: | + Starts connecting the caller's Slack identity to their Volcano account + and returns its Sign in with Slack URL. LavaFlow acts on a person's + Slack mention only for projects owned by an account their identity is + connected to. The callback finishes only in the browser that started + the connection, so a link forwarded to anyone else connects no one. + One Slack identity may connect to several accounts, and one account may + have several identities connected. The identity is also tied to the + caller's sign-in session: the channel picker and binding act only as + the identities this session signed in as, so on an account several + people share, nobody picks or binds as another person's identity. An + API token has no session, so it can connect an identity that reports, + but not pick or bind channels with it. Volcano stores the workspace and + user IDs, and no Slack token. + + The response also sets a short-lived HttpOnly cookie that binds the + callback to this browser. Installing and connecting each set their + own, so starting one leaves the other's callback working. + operationId: startSlackConnect security: - UserToken: [] - - ProjectAccessToken: [] + - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - shared_variables - not: - required: - - expected_shared_variables - - expected_shared_variables_digest - properties: - shared_variables: - type: array - uniqueItems: true - items: - type: string - maxLength: 256 - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - expected_shared_variables: - type: array - uniqueItems: true - description: When present, replace only if the current complete shared list matches this list. - items: - type: string - maxLength: 256 - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - expected_shared_variables_digest: - type: string - minLength: 64 - maxLength: 64 - pattern: ^[a-f0-9]{64}$ - description: SHA-256 of the sorted unique current shared names joined by a newline. Use instead of expected_shared_variables for a compact conditional replacement. + - $ref: '#/components/parameters/SlackRedirect' responses: - '204': - description: Shared list replaced and affected function synchronization started. - '400': - description: Invalid names or final function environment. + '200': + description: Slack authorization URL content: application/json: schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - '404': - description: Project not found - '409': - description: Shared list changed since it was read. + $ref: '#/components/schemas/SlackAuthorizationResponse' + '400': + description: '`redirect` is not on the Volcano dashboard''s origin' content: application/json: schema: $ref: '#/components/schemas/Error' - '413': - description: Request body exceeds 4,194,304 bytes + '401': + description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Persistence or synchronization failed - '503': - description: Shared variable membership writes are disabled during rollout + '404': + description: Code `feature_unavailable`; reporting problems from Slack is not available in this environment content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/frontend-shared-variables: - put: + /user/slack/connections/{connectionId}: + delete: tags: - - Projects - summary: Replace frontend shared variable names + - Slack Connections + summary: Disconnect a Slack identity description: | - Atomically replaces the complete shared frontend-variable list without - changing values. Names must already exist. Validates final affected - frontend environments before membership or propagation side effects. - An empty list clears membership. Omitted names remain stored outside the frontend shared list. - operationId: replaceFrontendSharedVariables + Disconnects one Slack identity from the caller's account. LavaFlow + stops acting on its mentions for the account's projects at its next + check, which also cancels reports still queued. It works whether or not + reporting problems from Slack is available in this environment. + operationId: deleteSlackConnection security: - UserToken: [] + - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' - requestBody: - required: true - content: - application/json: - schema: - type: object - additionalProperties: false - required: - - frontend_shared_variables - not: - required: - - expected_frontend_shared_variables - - expected_frontend_shared_variables_digest - properties: - frontend_shared_variables: - type: array - uniqueItems: true - items: - type: string - maxLength: 256 - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - expected_frontend_shared_variables: - type: array - uniqueItems: true - description: When present, replace only if the current complete frontend shared list matches this list. - items: - type: string - maxLength: 256 - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - expected_frontend_shared_variables_digest: - type: string - minLength: 64 - maxLength: 64 - pattern: ^[a-f0-9]{64}$ - description: SHA-256 of the sorted unique current shared names joined by a newline. Use instead of expected_frontend_shared_variables for a compact conditional replacement. + - name: connectionId + in: path + required: true + description: The connection to remove + schema: + type: string + format: uuid responses: '204': - description: Frontend shared list replaced and affected frontend synchronization started. + description: Disconnected '400': - description: Invalid names or final frontend environment. + description: Malformed connection ID content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Unauthorized - '404': - description: Project not found - '409': - description: Frontend shared list changed since it was read. + description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' - '413': - description: Request body exceeds 4,194,304 bytes + '404': + description: The caller has no such connection. content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Persistence or synchronization failed - /projects/{id}/config: + /user/slack/channels: get: tags: - - Projects - summary: Export project configuration + - Slack Connections + summary: List a workspace's channels for binding description: | - Exports the project's current user-facing configuration as a - declarative manifest. Returns JSON by default. Request the canonical - volcano-config.yaml rendering with `Accept: application/yaml` or - `?format=yaml`; the YAML is returned verbatim as the raw response body - (`Content-Type: application/yaml`) and is meant to be saved as-is. - Variable values and write-only secrets (SMTP password, OAuth client secrets, TLS material) - are omitted from the export; shared_variables and frontend_shared_variables contain names only; the YAML rendering adds a header comment - describing how to set them via CLI environment interpolation. - operationId: getProjectConfig + Lists the channels in a workspace, public and private, that the Volcano + app and one of the Slack identities the caller's sign-in session signed + in as are both in, to choose which ones report problems to LavaFlow. + Invite the app to a channel in Slack to list it. Slack Connect, shared + and archived channels are left out. + operationId: listSlackChannels security: - UserToken: [] - - ProjectAccessToken: [] + - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' - - name: format + - name: team_id in: query - required: false - description: Response format override. Takes precedence over the Accept header. + required: true + description: The Slack workspace. The app must be installed in it, and one of the caller's connected Slack identities must belong to it. schema: - type: string - enum: - - json - - yaml + $ref: '#/components/schemas/SlackTeamId' responses: '200': - description: | - Current project configuration. JSON by default; when YAML is - requested the body is the canonical volcano-config.yaml document - served verbatim with `Content-Type: application/yaml`. + description: Channels the app and one of the caller's connected Slack identities are both in content: application/json: schema: - $ref: '#/components/schemas/ProjectConfig' - application/yaml: + $ref: '#/components/schemas/SlackChannelsResponse' + '400': + description: '`team_id` is missing or malformed' + content: + application/json: schema: - type: string - format: binary - description: | - Canonical volcano-config.yaml document returned verbatim, - ready to be saved as-is. The response body is limited to - 4,194,304 bytes, matching the configuration apply limit. + $ref: '#/components/schemas/Error' '401': - description: Unauthorized - invalid or missing token + description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found + description: The app is not installed in the workspace, or the caller's sign-in session signed in as no Slack identity there. Code `feature_unavailable` means reporting problems from Slack is not available in this environment. content: application/json: schema: $ref: '#/components/schemas/Error' - '413': - description: Canonical YAML export exceeds 4,194,304 bytes + '502': + description: Slack did not answer, or refused the app's token; try again or reinstall the app content: application/json: schema: $ref: '#/components/schemas/Error' - put: + /slack/callback: + get: tags: - - Projects - summary: Apply project configuration + - Slack Connections + summary: Complete a Slack install or connection description: | - Validates and applies a declarative configuration manifest to the - project, reconciling each declared section and returning a per-resource - report. Omitted sections are untouched. Declared collection keys - (`variables`, `buckets[].policies`, `auth.providers.oauth`, - `auth.email.templates`, `functions[].schedulers`) are fully synced: - resources absent from the manifest are deleted. Functions, frontends, - databases, and buckets are never created or deleted; manifest entries - for resources that do not exist are skipped and reported in `skipped`, - and existing resources missing from a declared section are reported in - `missing`. Validation failures (including plan-gate violations) return - 422 and nothing is applied. Set `dry_run=true` to get the projected - report without applying changes. Applies are serialized per project; - a concurrent apply returns 409. - operationId: applyProjectConfig - security: - - UserToken: [] - - ProjectAccessToken: [] + Public callback Slack sends the browser to after Add to Slack or Sign + in with Slack. The signed `state` names the flow and the Volcano user + who started it, and the callback cookie binds it to the browser that + started it. Redirects to the flow's `redirect`, or to the dashboard, + adding `slack_connect_error=1` when the flow failed. + operationId: slackCallback + security: [] parameters: - - $ref: '#/components/parameters/ProjectId' - - name: dry_run + - name: code in: query required: false - description: Validate and report projected actions without applying changes. + description: Slack's authorization code schema: - type: boolean - default: false - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectConfig' + type: string + - name: state + in: query + required: true + description: The signed state the flow's start returned + schema: + type: string + - name: error + in: query + required: false + description: Slack's error, such as `access_denied` + schema: + type: string responses: - '200': - description: | - Apply report. Individual entries may still carry `action: error` - for apply-phase failures (summary.errors > 0); already-applied - changes are not rolled back. - content: - application/json: + '303': + description: Redirect back to the dashboard after a successful or failed attempt + headers: + Location: + description: Redirect target schema: - $ref: '#/components/schemas/ProjectConfigApplyResult' + type: string '400': - description: Malformed request body - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + description: Invalid or expired state, or a browser that did not start the flow content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found + description: Code `feature_unavailable`; reporting problems from Slack is not available in this environment content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: Another apply is in progress for this project + '429': + description: Too many callback attempts from this client content: application/json: schema: $ref: '#/components/schemas/Error' - '422': - description: Manifest validation failed; nothing was applied + /projects: + get: + tags: + - Projects + summary: List all projects for authenticated user + description: | + Returns projects that are not deleting or deleted, newest first. + Supports two mutually exclusive pagination modes. Offset mode uses + `page` and `limit`. Cursor mode uses `cursor` or `ending_before` with + `limit`, returns `next_cursor`/`prev_cursor`, and supports a bounded + `offset` past the cursor anchor. Supplying `limit` without `page` + selects cursor mode. `search` applies a case-insensitive project-name + filter in either mode. `include` optionally expands each returned + project with its Git connection and/or aggregate health summary using + `git_connection` and `health`. Sending `page` with `cursor` or `ending_before`, + or sending both cursor directions, returns 400. + operationId: listProjects + security: + - UserToken: [] + parameters: + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/EndingBefore' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Search' + - name: include + in: query + required: false + description: Optional comma-separated project metadata expansions. + style: form + explode: false + schema: + type: array + uniqueItems: true + items: + type: string + enum: + - git_connection + - health + responses: + '200': + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/ProjectConfigValidationErrorResponse' - '503': - description: Shared variable membership writes are disabled during rollout + $ref: '#/components/schemas/PaginatedProjects' + '400': + description: Invalid or conflicting pagination parameters content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/source-export: - get: + post: tags: - Projects - - Git Connections - summary: Report the project's source-of-truth state - operationId: getProjectSourceExport + summary: Create a new project description: | - Volcano stores the source of the functions and frontend it runs for a - project. This reports whether that source has been written to the - connected repository, and whether the repository has taken over as the - project's source of truth. - - `mode` is `platform`, `git_exporting`, `git_pending`, or `git`. Export - enters `git_exporting` before reading stored source. GitHub's signed - push event confirms that the initial commit reached the production - branch. That push or a newer production push changes the mode to - `git_pending` when it starts a deployment. `exported_at` records that - transition. - - A successful Git run completes the transition when it matches the - recorded repository, production branch, and root directory and actually - dispatches every recorded resource. Ordinary production-branch pushes - deploy without changing a platform-managed project's source ownership. + Creates a project for the authenticated user. + Projects have no plan limit; usage allowances apply across all of a user's projects. + Accounts on an older paid pricing revision keep the project cap that revision set, and + requests over it return 403. + operationId: createProject security: - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateProjectRequest' responses: - '200': - description: The project's source-of-truth state + '201': + description: Project created content: application/json: schema: - $ref: '#/components/schemas/ProjectSourceExportState' - '401': - description: Unauthorized - invalid or missing token + $ref: '#/components/schemas/Project' + '400': + description: | + Bad request. A `template_source` other than `null` is refused: a project is created from a share with `POST /forks`. content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Forbidden - project not owned by the caller + description: Forbidden. The user reached a project cap (only on older paid pricing revisions that set one), the plan does not allow the requested region subset, or a template's frontend limit was reached content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project not found + '503': + description: The selected project template is not configured in this environment content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Internal server error + /projects/{id}: + get: + tags: + - Projects + summary: Get project by ID + operationId: getProject + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + responses: + '200': + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/Error' - '501': - description: Source export is not available in this deployment mode + $ref: '#/components/schemas/Project' + '404': + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - post: + patch: tags: - Projects - - Git Connections - summary: Initialize an empty repository with a project's stored source - operationId: exportProjectSource - description: | - Creates the first commit in the connected repository and pushes it - directly to the configured production branch. The push enters the - ordinary Git auto-deploy flow. Direct source writes remain frozen until - that deployment succeeds and the repository becomes the source of truth. - - The caller confirms the production branch shown before export. Starting - export pins that branch: later GitHub default-branch changes do not - repoint the project. If the configured branch changed after the caller - read it, the request fails without exporting so the caller can show and - confirm the new value. - - The response lists what the export could not carry: resources with no - successful deployment to take source from (`skipped`), and things no - export can hand back (`omitted`) — migrations, which Volcano stores no - copy of, and credential-shaped files, which are left for their owner to - add. - - Requires a connected repository with no commits or branches, and runs - once. Volcano never creates the repository. If GitHub did not confirm - the push, retrying creates the same commit and adopts it when it already - reached the repository. + summary: Update project metadata and region policy + operationId: updateProject security: - UserToken: [] - ProjectAccessToken: [] @@ -2954,100 +3139,89 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExportProjectSourceRequest' + $ref: '#/components/schemas/UpdateProjectRequest' responses: - '201': - description: The initial production-branch commit that was pushed + '200': + description: Project updated content: application/json: schema: - $ref: '#/components/schemas/ProjectSourceExport' + $ref: '#/components/schemas/Project' '400': - description: Malformed request body - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + description: | + Bad request (no region selected, an unknown region, or — for a + project holding durable functions — a region that does not offer + durable execution) content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Forbidden - project not owned by the caller + description: Forbidden (for example, selecting subset regions on plan other than SUPERAGENT) content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found, or it has no repository connected + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' '409': - description: | - The source has already been exported, the repository has already - taken over as the source of truth, the confirmed production branch - is stale, a function or frontend deployment is still in progress, - or the project has no stored source to export - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '422': - description: | - The repository refused the branch, or its contents cannot be laid - out as a repository — a stored file that only ever carries - credentials, or a layout Git auto-deploy would not read back + description: Conflict (project name already exists or a resource deployment blocks a region change) content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - description: GitHub rate limited the request - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '500': - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '501': - description: Source export is not available in this deployment mode - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '503': - description: GitHub integration is not configured + delete: + tags: + - Projects + summary: Delete a project + description: | + Starts asynchronous project deletion. The project remains available from + `GET /projects/{id}` with `status: deleting` until cleanup finishes, but is + removed from project lists as soon as deletion starts. After cleanup it + returns 404. + operationId: deleteProject + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + responses: + '202': + description: Project deletion started + '404': + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - delete: + /projects/{id}/health: + get: tags: - Projects - - Git Connections - summary: Cancel an incomplete source export - operationId: cancelProjectSourceExport + summary: Get project health description: | - Restores platform source writes while the project is in - `git_exporting` or `git_pending`. If Volcano reserved or deployed the - root commit, export remains consumed and cannot be run again. The - connected repository and any commit already pushed to it are unchanged. + Returns a fast control-plane health snapshot for the project and its + deployed resources. The endpoint does not run live provider probes. + A successful request returns 200 even when the project status is + `degraded` or `critical`; transport and authorization failures use HTTP + errors. + operationId: getProjectHealth security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' responses: - '204': - description: The incomplete source transition was canceled + '200': + description: Project health snapshot retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectHealthResponse' '401': description: Unauthorized - invalid or missing token content: @@ -3055,7 +3229,7 @@ paths: schema: $ref: '#/components/schemas/Error' '403': - description: Forbidden - project not owned by the caller + description: Access denied content: application/json: schema: @@ -3066,45 +3240,22 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: No incomplete transition exists, or Git already took ownership - content: - application/json: - schema: - $ref: '#/components/schemas/Error' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - '501': - description: Source export is not available in this deployment mode - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /projects/{id}/git-connection/production-branch: - put: + /projects/{id}/metrics/query: + post: tags: - Projects - - Git Connections - summary: Set the branch a project deploys from + summary: Query project runtime metrics description: | - Changes only the production branch, leaving the repository binding - alone. PUT /projects/{id}/git-connection can also set it, but that is a - full rebind: it needs connection_id, installation_id and a repository - selector resent, and re-resolves the repository against GitHub for a - field that does not depend on it. - - The branch does not have to exist. It is validated as a Git branch name - and nothing more, so a project can be pointed at a branch that is about - to be pushed — the case a repository created empty depends on. - - Setting the branch here marks it as the project's own choice, so a later - default-branch rename on GitHub no longer moves it. Projects that never - set one keep following the repository's default branch. - operationId: setProjectGitProductionBranch + Evaluates a batch of named, curated runtime metric queries over one + trailing time range. Query IDs correlate each request with its result; + raw backend query languages are intentionally not exposed. + operationId: queryProjectMetrics security: - UserToken: [] - ProjectAccessToken: [] @@ -3115,18 +3266,16 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SetProjectGitProductionBranchRequest' + $ref: '#/components/schemas/ProjectMetricsQueryRequest' responses: '200': - description: The project's repo connection, with the new branch + description: Project runtime metric queries evaluated content: application/json: schema: - $ref: '#/components/schemas/ProjectGitConnection' + $ref: '#/components/schemas/ProjectMetricsQueryResponse' '400': - description: | - Malformed request body, or a production_branch that is not a valid - Git branch name + description: Invalid metric query content: application/json: schema: @@ -3138,90 +3287,84 @@ paths: schema: $ref: '#/components/schemas/Error' '403': - description: Project not owned by the caller + description: Access denied content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: | - Project not found, or it has no repository connected. The branch is - part of the connection, so there is nothing to set it on until one - exists. + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: A Git source transition is pending + '500': + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Failed to set the production branch + '503': + description: Runtime metrics backend unavailable content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/git-connection: + /projects/{id}/logo: get: tags: - Projects - - Git Connections - summary: Get a project's repo connection - operationId: getProjectGitConnection - security: - - UserToken: [] - - ProjectAccessToken: [] + summary: Get the project logo image + description: | + Returns the raw logo image stored in the project's storage folder. This + endpoint is unauthenticated so the asset can be rendered directly in an + `` tag; project IDs are unguessable UUIDs and logos are + non-sensitive branding. The `Project.logo_url` field exposes a versioned + path to this endpoint. + operationId: getProjectLogo + security: [] parameters: - $ref: '#/components/parameters/ProjectId' responses: '200': - description: The project's current repo connection + description: Logo image content: - application/json: + image/png: schema: - $ref: '#/components/schemas/ProjectGitConnection' - '401': - description: Unauthorized - invalid or missing token - content: - application/json: + type: string + format: binary + image/jpeg: schema: - $ref: '#/components/schemas/Error' - '403': - description: Project not owned by the caller - content: - application/json: + type: string + format: binary + image/gif: schema: - $ref: '#/components/schemas/Error' - '404': - description: Project not found, or has no repo connection - content: - application/json: + type: string + format: binary + image/webp: schema: - $ref: '#/components/schemas/Error' - '500': - description: Failed to get project git connection + type: string + format: binary + image/svg+xml: + schema: + type: string + format: binary + '404': + description: Project or logo not found content: application/json: schema: $ref: '#/components/schemas/Error' - put: + post: tags: - Projects - - Git Connections - summary: Connect or update a project's repo connection + summary: Upload or replace the project logo description: | - Full replace, following Vercel's model: many projects may point at the - same repo, so this only binds the project — it never creates or - deletes git-provider state. Used for both the initial connect and - later edits (repo change, root directory, production branch). - Resolves the repository_id or repo_full_name selector against the repos - accessible through installation_id via connection_id's stored GitHub - user token, then persists repository metadata only from that validated - GitHub response. - operationId: connectProjectGit + Uploads an image as the project's logo, storing it in the project's + storage folder. Accepts PNG, JPEG, GIF, WebP, or SVG up to 2 MB. Replaces any + existing logo. Returns the updated project, whose `logo_url` reflects + the new logo. + operationId: uploadProjectLogo security: - UserToken: [] - ProjectAccessToken: [] @@ -3230,64 +3373,49 @@ paths: requestBody: required: true content: - application/json: + multipart/form-data: schema: - $ref: '#/components/schemas/ConnectProjectGitRequest' + type: object + required: + - logo + properties: + logo: + type: string + format: binary + description: Logo image (PNG, JPEG, GIF, WebP, or SVG; max 2 MB) responses: '200': - description: The project's repo connection + description: Logo uploaded content: application/json: schema: - $ref: '#/components/schemas/ProjectGitConnection' + $ref: '#/components/schemas/Project' '400': - description: | - Malformed request body, no repository selector, selectors that - identify different repositories, a production_branch that is not a - valid Git branch name, no production_branch on a repository with no - default branch to follow (name one to connect a repository that has - no commits yet), or a production_branch other than the new - repository's default in a request that also changes repository. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + description: Bad request (missing file, unsupported type, or too large) content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: | - Project not owned by the caller, or the selected repository is not - accessible through installation_id + description: Access denied content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project or connection not found + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' '409': - description: | - A Git source transition is pending or complete, so the recorded - repository and root cannot be changed - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '500': - description: Failed to connect project git + description: Project is being deleted content: application/json: schema: $ref: '#/components/schemas/Error' '503': - description: Git provider integration is not configured + description: Logo storage is not configured content: application/json: schema: @@ -3295,56 +3423,56 @@ paths: delete: tags: - Projects - - Git Connections - summary: Disconnect a project's repo connection - operationId: disconnectProjectGit + summary: Remove the project logo + description: | + Deletes the project logo from the project's storage folder and clears its + record. Returns the updated project with no `logo_url`. + operationId: deleteProjectLogo security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' responses: - '204': - description: Connection removed - '401': - description: Unauthorized - invalid or missing token + '200': + description: Logo removed content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/Project' '403': - description: Project not owned by the caller + description: Access denied content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found, or has no repo connection + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' '409': - description: | - A Git source transition is pending or complete, so the recorded - repository cannot be disconnected + description: Project is being deleted content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Failed to disconnect project git + '503': + description: Logo storage is not configured content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/git-deploy-settings: + /projects/{id}/usage: get: tags: - Projects - - Git Connections - summary: Get a project's Git auto-deploy settings - operationId: getProjectGitDeploySettings + summary: Get usage metrics for a project + description: | + Returns project usage totals for the current usage month plus + recent hourly and daily time series for each tracked metric. + operationId: getProjectUsage security: - UserToken: [] - ProjectAccessToken: [] @@ -3352,19 +3480,13 @@ paths: - $ref: '#/components/parameters/ProjectId' responses: '200': - description: The project's current Git auto-deploy settings - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectGitDeploySettings' - '401': - description: Unauthorized - invalid or missing token + description: Usage metrics retrieved content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/ProjectUsageResponse' '403': - description: Project not owned by the caller + description: Access denied content: application/json: schema: @@ -3375,30 +3497,17 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Failed to get project git deploy settings - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + /projects/{id}/shared-variables: put: tags: - Projects - - Git Connections - summary: Update a project's Git auto-deploy settings + summary: Replace shared variable names description: | - Full replace of the project's Git auto-deploy settings: what a push to - the connected repo's production branch deploys. - - Connecting a repository sets auto_deploy_enabled and deploy_functions - to true for a project that has never called this endpoint, so a push - deploys without any further setup. Once these settings have been saved - here they are the project's own: connecting, rebinding, disconnecting - and reconnecting all leave them untouched, including when they were - saved before any repository was connected. Frontend settings are off - until set here; the frontend need not exist when they are saved, since - frontend_name is resolved at deploy time. - operationId: updateProjectGitDeploySettings + Atomically replaces the complete shared function-variable list without + changing values. Names must already exist. Validates final affected + function environments before membership or propagation side effects. + An empty list clears membership. Omitted names remain stored as non-shared variables. + operationId: replaceSharedVariables security: - UserToken: [] - ProjectAccessToken: [] @@ -3409,197 +3518,270 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateProjectGitDeploySettingsRequest' + type: object + additionalProperties: false + required: + - shared_variables + not: + required: + - expected_shared_variables + - expected_shared_variables_digest + properties: + shared_variables: + type: array + uniqueItems: true + items: + type: string + maxLength: 256 + pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ + expected_shared_variables: + type: array + uniqueItems: true + description: When present, replace only if the current complete shared list matches this list. + items: + type: string + maxLength: 256 + pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ + expected_shared_variables_digest: + type: string + minLength: 64 + maxLength: 64 + pattern: ^[a-f0-9]{64}$ + description: SHA-256 of the sorted unique current shared names joined by a newline. Use instead of expected_shared_variables for a compact conditional replacement. responses: '200': - description: The project's updated Git auto-deploy settings + description: 'Shared list replaced and synchronization started for every affected function except the ones listed, which a promoted preview serves (`code: function_served_by_candidate`). The preview keeps the variables it was built with, so their variables were not synchronized; a rollback of a listed function to production synchronizes its own build, and so does deploying it.' content: application/json: schema: - $ref: '#/components/schemas/ProjectGitDeploySettings' + $ref: '#/components/schemas/SharedVariablesReplaceResult' + '204': + description: Shared list replaced and affected function synchronization started. '400': - description: Malformed request body, or frontend_app_root without frontend_name + description: Invalid names or final function environment. content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Unauthorized - invalid or missing token + description: Unauthorized + '404': + description: Project not found + '409': + description: Shared list changed since it was read. content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Project not owned by the caller + '413': + description: Request body exceeds 4,194,304 bytes content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project not found + '500': + description: Persistence or synchronization failed + '503': + description: Shared variable membership writes are disabled during rollout + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontend-shared-variables: + put: + tags: + - Projects + summary: Replace frontend shared variable names + description: | + Atomically replaces the complete shared frontend-variable list without + changing values. Names must already exist. Validates final affected + frontend environments before membership or propagation side effects. + An empty list clears membership. Omitted names remain stored outside the frontend shared list. + operationId: replaceFrontendSharedVariables + security: + - UserToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - frontend_shared_variables + not: + required: + - expected_frontend_shared_variables + - expected_frontend_shared_variables_digest + properties: + frontend_shared_variables: + type: array + uniqueItems: true + items: + type: string + maxLength: 256 + pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ + expected_frontend_shared_variables: + type: array + uniqueItems: true + description: When present, replace only if the current complete frontend shared list matches this list. + items: + type: string + maxLength: 256 + pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ + expected_frontend_shared_variables_digest: + type: string + minLength: 64 + maxLength: 64 + pattern: ^[a-f0-9]{64}$ + description: SHA-256 of the sorted unique current shared names joined by a newline. Use instead of expected_frontend_shared_variables for a compact conditional replacement. + responses: + '204': + description: Frontend shared list replaced and affected frontend synchronization started. + '400': + description: Invalid names or final frontend environment. content: application/json: schema: $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + '404': + description: Project not found '409': - description: | - A Git source transition is pending, or this change would remove - deploy coverage after Git has taken over + description: Frontend shared list changed since it was read. content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Failed to update project git deploy settings + '413': + description: Request body exceeds 4,194,304 bytes content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/databases/{databaseName}/queries: + '500': + description: Persistence or synchronization failed + /projects/{id}/config: get: tags: - - Databases - summary: Get database queries + - Projects + summary: Export project configuration description: | - Returns the database's current top queries from pg_stat_statements - ranked by total execution time. Only data statements (SELECT, INSERT, - UPDATE, DELETE, MERGE) are listed; statements Volcano runs to operate - the database are left out. - - **SUPERAGENT plan required.** This endpoint is only available to projects owned - by users on the SUPERAGENT billing plan. - operationId: getProjectDatabaseQueries + Exports the project's current user-facing configuration as a + declarative manifest. Returns JSON by default. Request the canonical + volcano-config.yaml rendering with `Accept: application/yaml` or + `?format=yaml`; the YAML is returned verbatim as the raw response body + (`Content-Type: application/yaml`) and is meant to be saved as-is. + Variable values and write-only secrets (SMTP password, OAuth client secrets, TLS material) + are omitted from the export; shared_variables and frontend_shared_variables contain names only; the YAML rendering adds a header comment + describing how to set them via CLI environment interpolation. + operationId: getProjectConfig security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' - - name: limit + - name: format in: query - description: Maximum number of queries to return. + required: false + description: Response format override. Takes precedence over the Accept header. schema: - type: integer - minimum: 1 - maximum: 100 - default: 10 + type: string + enum: + - json + - yaml responses: '200': - description: Database query performance retrieved + description: | + Current project configuration. JSON by default; when YAML is + requested the body is the canonical volcano-config.yaml document + served verbatim with `Content-Type: application/yaml`. content: application/json: schema: - $ref: '#/components/schemas/DatabaseQueryPerformanceResponse' - '400': - description: Bad request - invalid query parameters - content: - application/json: + $ref: '#/components/schemas/ProjectConfig' + application/yaml: schema: - $ref: '#/components/schemas/Error' + type: string + format: binary + description: | + Canonical volcano-config.yaml document returned verbatim, + ready to be saved as-is. The response body is limited to + 4,194,304 bytes, matching the configuration apply limit. '401': description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Access denied - content: - application/json: - schema: - $ref: '#/components/schemas/Error' '404': - description: Project or database not found + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Internal server error + '413': + description: Canonical YAML export exceeds 4,194,304 bytes content: application/json: schema: $ref: '#/components/schemas/Error' - /deployments: - get: + put: tags: - Projects - summary: List deployments across a user's projects + summary: Apply project configuration description: | - Lists Function and Frontend deployment attempts across every project the - user owns, newest first. Pass `project_id` to narrow the feed to a single - project. - - Scope is project **ownership** (`projects.user_id`). `owner_id` names - whose deployments to return, not who started them — the actor is - `initiated_by_user_id`, which this endpoint does not filter on. - - With a user token the scope is always the authenticated user: `owner_id` - may be omitted, or set to that same user, but naming anyone else is - refused with 403. Service callers on the management API must pass it, - since they have no authenticated user. - - The owner is not checked for existence: an id with no projects returns an - empty page rather than `404`. Unlike `/users/{id}/usage`, this endpoint is - polled to detect an event, so a caller needs `404` to keep meaning "this - route is not served here" — which is how a consumer notices it is running - against an older release. A mistyped owner therefore reads as "nothing - deployed"; callers that need to tell those apart should verify the user - through `GET /users/{id}` first. - - Ordering is selectable. The default is the feed order — most recent - attempt first. `completed_at.asc` orders by completion, oldest first, and - considers only attempts that finished; combined with `limit=1` and a - `status` filter it answers "when did this user first succeed" in one - bounded query. - - Both pagination modes are supported, selected exactly as - `/projects/{id}/deployments` selects them: `cursor`/`ending_before` (or a - `limit` with no `page`) uses keyset pagination; otherwise `page`/`limit` - offset pagination. `page` with a cursor, and `cursor` with - `ending_before`, are rejected. - - A cursor is bound to every filter *and* to `order`, so changing any of - them mid-pagination rejects the cursor rather than silently skipping or - repeating rows. The keyset position is `(created_at, id)` for - `created_at.desc` and `(completed_at, id)` for `completed_at.asc`. - operationId: listDeployments + Validates and applies a declarative configuration manifest to the + project, reconciling each declared section and returning a per-resource + report. Omitted sections are untouched. Declared collection keys + (`variables`, `buckets[].policies`, `auth.providers.oauth`, + `auth.email.templates`, `functions[].schedulers`) are fully synced: + resources absent from the manifest are deleted. Functions, frontends, + databases, and buckets are never created or deleted; manifest entries + for resources that do not exist are skipped and reported in `skipped`, + and existing resources missing from a declared section are reported in + `missing`. Validation failures (including plan-gate violations) return + 422 and nothing is applied. Set `dry_run=true` to get the projected + report without applying changes. Applies are serialized per project; + a concurrent apply returns 409. A function a promoted preview serves + keeps the variables the preview was built with: when the apply's + variable changes would reach it, it is reported as `unchanged` with + `code: function_served_by_candidate` and a `notice`, while every other + resource is applied and synchronized. That entry is not an error. + operationId: applyProjectConfig security: - UserToken: [] + - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Cursor' - - $ref: '#/components/parameters/EndingBefore' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/DeploymentOwnerId' - - name: project_id - in: query - required: false - description: Restrict the feed to a single project owned by the user. - schema: - type: string - format: uuid - - name: created_after + - $ref: '#/components/parameters/ProjectId' + - name: dry_run in: query required: false - description: Restrict results to attempts created at or after this timestamp. + description: Validate and report projected actions without applying changes. schema: - type: string - format: date-time - - $ref: '#/components/parameters/DeploymentResourceType' - - $ref: '#/components/parameters/DeploymentStatus' - - $ref: '#/components/parameters/DeploymentOperation' - - $ref: '#/components/parameters/DeploymentOrder' + type: boolean + default: false + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectConfig' responses: '200': - description: Successful response + description: | + Apply report. Individual entries may still carry `action: error` + for apply-phase failures (summary.errors > 0); already-applied + changes are not rolled back. content: application/json: schema: - $ref: '#/components/schemas/PaginatedProjectDeployments' + $ref: '#/components/schemas/ProjectConfigApplyResult' '400': - description: Bad request - invalid filter or pagination + description: Malformed request body, or, with code `feature_unavailable`, the manifest creates or changes something whose capability is unavailable in this environment, such as `frontends[].frontend_routes` while `frontend_routes` is unavailable in `GET /capabilities`. Nothing was applied. content: application/json: schema: @@ -3610,85 +3792,80 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Forbidden - owner_id names a different user + '404': + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Internal server error + '409': + description: Another apply is in progress for this project content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/deployments: + '422': + description: Manifest validation failed; nothing was applied + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectConfigValidationErrorResponse' + '503': + description: Shared variable membership writes are disabled during rollout + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/source-export: get: tags: - Projects - summary: List deployments in a project + - Git Connections + summary: Report the project's source-of-truth state + operationId: getProjectSourceExport description: | - Lists Function and Frontend deployment attempts across the project, - ordered most-recent first. Each item includes a normalized resource - reference so clients can render both resource types without extra - fetches. + Volcano stores the source of the functions and frontend it runs for a + project. This reports whether that source has been written to the + connected repository, and whether the repository has taken over as the + project's source of truth. - Standard and durable function deployments both appear under - `resource.type: function`, and `resource.kind` tells them apart. Pass - `function_kind` to list one kind only; frontends are then excluded. - Combining `function_kind` with `resource_type=frontend` is rejected. - operationId: listProjectDeployments + `mode` is `platform`, `git_exporting`, `git_pending`, or `git`. Export + enters `git_exporting` before reading stored source. GitHub's signed + push event confirms that the initial commit reached the production + branch. That push or a newer production push changes the mode to + `git_pending` when it starts a deployment. `exported_at` records that + transition. + + A successful Git run completes the transition when it matches the + recorded repository, production branch, and root directory and actually + dispatches every recorded resource. Ordinary production-branch pushes + deploy without changing a platform-managed project's source ownership. security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Cursor' - - $ref: '#/components/parameters/EndingBefore' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Search' - - name: created_after - in: query - required: false - description: Restrict results to attempts created at or after this timestamp. - schema: - type: string - format: date-time - - name: resource_type - in: query - required: false - description: | - Restrict the feed to a single resource type. Omit to return both - Function and Frontend deployments. - schema: - type: string - enum: - - function - - frontend - - $ref: '#/components/parameters/FunctionKindFilter' responses: '200': - description: Successful response + description: The project's source-of-truth state content: application/json: schema: - $ref: '#/components/schemas/PaginatedProjectDeployments' - '400': - description: Bad request - invalid identifier or filter, or `function_kind` combined with `resource_type=frontend` + $ref: '#/components/schemas/ProjectSourceExportState' + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + '403': + description: Forbidden - project not owned by the caller content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Forbidden - project ownership required + '404': + description: Project not found content: application/json: schema: @@ -3699,59 +3876,61 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/deployments/summary: - get: + '501': + description: Source export is not available in this deployment mode + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: tags: - Projects - summary: Summarize deployments in a project + - Git Connections + summary: Initialize an empty repository with a project's stored source + operationId: exportProjectSource description: | - Summarizes deployment attempts for one comparable resource pipeline. - Success rate uses conclusive outcomes only: active and deleted attempts - are successful; failed and degraded attempts are failures; in-progress - and superseded attempts are excluded. Median build duration includes - completed, non-superseded attempts with recorded build work, - including failed builds. + Creates the first commit in the connected repository and pushes it + directly to the configured production branch. The push enters the + ordinary Git auto-deploy flow. Direct source writes remain frozen until + that deployment succeeds and the repository becomes the source of truth. - With `resource_type=function`, pass `function_kind` to summarize one - kind of function only. It is rejected with `resource_type=frontend`. - operationId: summarizeProjectDeployments + The caller confirms the production branch shown before export, and + optionally the repository by its `repo_id`. Starting export pins that + branch: later GitHub default-branch changes do not repoint the project. + If the connected repository or the configured branch changed after the + caller read it, the request fails without exporting so the caller can + show and confirm the new value. + + The response lists what the export could not carry: resources with no + successful deployment to take source from (`skipped`), and things no + export can hand back (`omitted`) — migrations, which Volcano stores no + copy of, and credential-shaped files, which are left for their owner to + add. + + Requires a connected repository with no commits or branches, and runs + once. Volcano never creates the repository. If GitHub did not confirm + the push, retrying creates the same commit and adopts it when it already + reached the repository. security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: search - in: query - required: false - description: Restrict the summary to resource names containing this value. - schema: - type: string - - name: resource_type - in: query - required: true - description: Restrict the summary to one comparable deployment pipeline. - schema: - type: string - enum: - - function - - frontend - - $ref: '#/components/parameters/FunctionKindFilter' - - name: created_after - in: query - required: false - description: Restrict results to attempts created at or after this timestamp. - schema: - type: string - format: date-time + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ExportProjectSourceRequest' responses: - '200': - description: Successful response + '201': + description: The initial production-branch commit that was pushed content: application/json: schema: - $ref: '#/components/schemas/ProjectDeploymentSummary' + $ref: '#/components/schemas/ProjectSourceExport' '400': - description: Bad request - invalid identifier or filter, or `function_kind` combined with `resource_type=frontend` + description: Malformed request body content: application/json: schema: @@ -3763,60 +3942,39 @@ paths: schema: $ref: '#/components/schemas/Error' '403': - description: Forbidden - project ownership required + description: Forbidden - project not owned by the caller content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Internal server error + '404': + description: Project not found, or it has no repository connected content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/domains: - get: - tags: - - Frontends - summary: List all custom domains in a project - description: | - Project-scoped custom-domain list. Returns every active custom - domain across every frontend in the project (excludes soft-deleted - rows). Each item inlines the linked frontend's id and name so the - UI does not need a second fetch to render the "Linked to" column. - operationId: listProjectCustomDomains - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Cursor' - - $ref: '#/components/parameters/EndingBefore' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Search' - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/PaginatedProjectCustomDomains' - '400': - description: Bad request - invalid identifier + '409': + description: | + The source has already been exported, the repository has already + taken over as the source of truth, the confirmed production branch + or repository is stale, a function or frontend deployment is still in progress, + a promoted preview is serving one of the project's functions or frontends, or the project + has no stored source to export content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + '422': + description: | + The repository refused the branch, or its contents cannot be laid + out as a repository — a stored file that only ever carries + credentials, or a layout Git auto-deploy would not read back content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Forbidden - project ownership required + '429': + description: GitHub rate limited the request content: application/json: schema: @@ -3827,451 +3985,224 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/functions: - get: - tags: - - Functions - summary: List all functions in a project - description: | - Supports two mutually exclusive pagination modes. Offset mode uses `page` - and `limit` and returns `next` (URL). Cursor mode uses `cursor` and - `limit`, supports `search` (case-insensitive name match), and returns - `next_cursor`/`prev_cursor`. Sending both `page` and `cursor` (or `page` - and `search`) returns 400. - operationId: listFunctions - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Cursor' - - $ref: '#/components/parameters/EndingBefore' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Search' - responses: - '200': - description: Successful response + '501': + description: Source export is not available in this deployment mode content: application/json: schema: - $ref: '#/components/schemas/PaginatedFunctions' - '404': - description: Project not found + $ref: '#/components/schemas/Error' + '503': + description: GitHub integration is not configured content: application/json: schema: $ref: '#/components/schemas/Error' - post: + delete: tags: - - Functions - summary: Create or update function code + - Projects + - Git Connections + summary: Cancel an incomplete source export + operationId: cancelProjectSourceExport description: | - Upload a function source bundle. Direct API clients may send the function code - as a ZIP or tar.gz archive via multipart/form-data. The API stores a normalized tar.gz - source archive. - Cloud deploys should include source files and dependency manifests/lockfiles, not installed - dependency directories. Volcano installs Node.js, Python, and Ruby dependencies during the - function compile build. - Source archive size is enforced by the API with `SOURCE_ARCHIVE_SIZE_LIMIT_MB`; the CLI - does not apply its own source archive size limit. After the final container image is - built, the publish build enforces `LAMBDA_TARGET_CONTAINER_SIZE_LIMIT_MB` before pushing. - Uploaded source archives cannot contain symlink entries. Safe symlinks created during - the cloud build are materialized before publish. - Volcano builds and deploys the function asynchronously after upload. A deployment that starts - immediately returns a Function resource with `status: provisioning`, then transitions to - `active` or `failed`. If another deployment is running, the response preserves the resource's - current status and exposes the queued deployment through `pending_deployment_id`. - Existing function traffic continues to use the last known-good runtime during an update. A failed - update keeps that runtime available and records the attempted deployment as failed. - Only one deployment runs for a given function. A newer request supersedes any queued request - and starts after the running deployment. Different functions and projects deploy concurrently. - If a function with the same name already exists in the project, this operation updates that - function's runtime, handler, and source bundle and returns `200 OK`. - Each project can contain up to 10,000 functions. Creating a new function over this cap returns 403. - operationId: createFunction + Restores platform source writes while the project is in + `git_exporting` or `git_pending`. If Volcano reserved or deployed the + root commit, export remains consumed and cannot be run again. The + connected repository and any commit already pushed to it are unchanged. security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - requestBody: - required: true - content: - multipart/form-data: - schema: - type: object - required: - - name - - code - - runtime - properties: - name: - type: string - description: DNS-safe function name (lowercase letters, numbers, hyphens; cannot start or end with hyphen) - maxLength: 63 - pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ - example: my-api-function - code: - type: string - format: binary - description: ZIP or tar.gz archive containing function source code plus dependency manifests/lockfiles. The API enforces SOURCE_ARCHIVE_SIZE_LIMIT_MB and stores a normalized tar.gz source archive. - runtime: - type: string - enum: - - nodejs22.x - - nodejs24.x - - python3.10 - - python3.11 - - python3.12 - - python3.13 - - python3.14 - - ruby3.3 - - ruby3.4 - - ruby4.0 - description: | - Runtime environment. Required. - - Node.js: nodejs22.x, nodejs24.x - - Python: python3.10, python3.11, python3.12, python3.13, python3.14 - - Ruby: ruby3.3, ruby3.4, ruby4.0 - example: nodejs24.x - handler: - type: string - description: | - The name of the function to invoke. Defaults to "handler" if not specified. - Your code must export/define a function with this name: - - Node.js: exports.handler (in index.js) - - Python: def handler() (in main.py) - - Ruby: def handler() (in main.rb) - default: handler - example: handler - visibility: - allOf: - - $ref: '#/components/schemas/FunctionVisibility' - description: | - Who can invoke the function. Omit it to keep the function's - current visibility; a new function starts `private`. - is_public: - type: boolean - deprecated: true - description: | - Deprecated alias for `visibility`: `true` means `public` and - `false` means `authenticated`. Sending both with different - meanings returns 400. - invocation_mode: - $ref: '#/components/schemas/FunctionInvocationMode' - http_auth_mode: - $ref: '#/components/schemas/FunctionHTTPAuthMode' - openapi_spec: - type: string - description: JSON-encoded OpenAPI 3.0 or 3.1 metadata for an HTTP-mode function. - variable_scope: - type: string - enum: - - all - - scoped - x-enum-varnames: - - CreateFunctionMultipartBodyVariableScopeAll - - CreateFunctionMultipartBodyVariableScopeScoped - description: | - Which project variables this function receives. `all` (the default) gives it only project variables marked `shared: true`; `scoped` gives it only the variables it selects. Omitting this leaves an existing function's scope unchanged. - variables: - type: string - description: | - JSON-encoded array of project variable names this function requires, on top of the ones detected in its source. A declared name the project does not define is rejected with 400; a detected name it does not define is ignored. Only used when `variable_scope` is `scoped`. Omitting this leaves an existing function's declared names unchanged. responses: - '200': - description: Existing function updated; its deployment was started or queued - content: - application/json: - schema: - $ref: '#/components/schemas/Function' - '201': - description: Function created and deployment workflow started - content: - application/json: - schema: - $ref: '#/components/schemas/Function' - '400': - description: | - Bad request (invalid file, too large, etc.), an unknown - `visibility`, or `visibility` and `is_public` disagree + '204': + description: The incomplete source transition was canceled + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Function limit exceeded for the project + description: Forbidden - project not owned by the caller content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: | - Function deletion is queued or running, the name is already held - by a durable function — a function cannot change kind — or the - redeploy would take a function with Frontend Function routes out - of `public` or out of HTTP invocation mode. The request is refused - before the deploy starts, so nothing is deployed. + '404': + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - description: | - The owner's billing-cycle build-minutes allowance is spent. The - error names the allowance and carries a link to the usage page. + '409': + description: No incomplete transition exists, or Git already took ownership content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Internal server error (function deployment failed) + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: | - Build usage could not be read, so the allowance could not be - checked. The same request succeeds once it can be. + '501': + description: Source export is not available in this deployment mode content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/functions/{functionId}: + /share-previews/{share_id}: get: tags: - - Functions - summary: Get function by ID - operationId: getFunction - security: - - UserToken: [] - - ProjectAccessToken: [] + - Shares + summary: Preview what a deploy link deploys + description: | + Public: needs no credential, because the link id is the credential. Answers + the link's current release: when it was published, its digest, the functions + and frontends installing it creates, the variables the visitor supplies, and + the functions that receive the new project's service key. Show it to a + visitor before they confirm, and send its `release.id` when creating the + project. + + Counts the visit for the link's owner, unless the request comes from a + crawler or link preview. A link that does not exist, was switched off, or has + not been published yet all answer the same `404`. + operationId: getSharePreview + security: [] parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FunctionId' + - $ref: '#/components/parameters/ShareId' responses: '200': - description: Successful response + description: The link's current release content: application/json: schema: - $ref: '#/components/schemas/Function' + $ref: '#/components/schemas/SharePreview' + '400': + description: The link id is malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: | + The request carried the dashboard proxy's visitor headers without a valid proof + from the proxy (code `proxy_credential_rejected`, the same for every kind of + failed proof). It is never about the caller's session. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Function not found + description: The link is not available, or deploy links are not available in this environment (code `feature_unavailable`; see `GET /capabilities`). A link of a project copied from a link that no longer allows re-sharing answers the same. content: application/json: schema: $ref: '#/components/schemas/Error' - patch: - tags: - - Functions - summary: Update function settings - operationId: updateFunction - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FunctionId' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateFunctionRequest' - examples: - makePublic: - summary: Let anon keys invoke the function - value: - visibility: public - allowSignedInUsers: - summary: Let signed-in users of the project invoke the function - value: - visibility: authenticated - makePrivate: - summary: Allow only service keys and schedulers (the default) - value: - visibility: private - responses: - '200': - description: Function updated + '429': + description: Too many previews from this address; try again after `Retry-After` + headers: + Retry-After: + description: Seconds until the clock hour the limit counts in ends. + schema: + type: integer content: application/json: schema: - $ref: '#/components/schemas/Function' - '400': - description: | - Invalid settings: an unknown `visibility`, `visibility` and - `is_public` disagree, or `http_auth_mode: none` on a function that - is not `public` + $ref: '#/components/schemas/Error' + '451': + description: Volcano cannot serve requests from the visitor's location under US sanctions content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Function not found + '500': + description: Failed to preview the deploy link content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: | - Function settings conflict with attached Frontend Function routes: - a routed function must stay `public` and in HTTP invocation mode. + '503': + description: The dashboard proxy's own project is not being served right now (code `service_unavailable`); try again shortly. content: application/json: schema: $ref: '#/components/schemas/Error' - delete: + /shares: + get: tags: - - Functions - summary: Delete a function + - Shares + summary: List a project's deploy links description: | - Schedules asynchronous function deletion. If another deployment is running, the function - preserves its current status and exposes the queued deletion through `pending_deployment_id`. - Its status changes to `deleting` when cleanup starts. After cleanup, it returns 404 and no - longer appears in function lists. - operationId: deleteFunction + Deploy links let anyone deploy a release the project's owner published as + their own new project. A link's public address is + `https://volcano.dev/deploy/`; the address carries no release, so it + cannot be edited to point at other code. + operationId: listShares security: - UserToken: [] - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FunctionId' + - $ref: '#/components/parameters/ProjectIdQuery' responses: - '202': - description: Function deletion started or queued + '200': + description: The project's deploy links, newest first + content: + application/json: + schema: + $ref: '#/components/schemas/SharesResponse' + '400': + description: The `project_id` query parameter is missing or is not a project UUID + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Function not found + description: Project not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to list deploy links content: application/json: schema: $ref: '#/components/schemas/Error' - /functions/{functionId}/invoke: post: tags: - - Functions - summary: Invoke a function + - Shares + summary: Create a deploy link description: | - Invoke a function. The function's `visibility` decides which credentials - may call it, and the function does not run for any other. A `private` - function answers every credential but a service key exactly as a - missing one, with 404, so its name and id cannot be discovered; an anon - key on an `authenticated` function gets 403. An SDK calling by name - resolves it first through `GET /functions/resolve`, which answers that - anon key with 404 instead. - - **With Service Key** (admin/background operations, every visibility): - - Use for background jobs, webhooks, cron, admin operations - - Function receives payload only (no user context) - - Database queries bypass RLS (admin access) - - **With Auth User Token** (user-facing, `authenticated` or `public` functions): - - Use for user-initiated actions - - Includes users from anonymous sign-ins - - Function receives payload + `__volcano_auth` context: - ```javascript - { - user_id: "uuid", - email: "user@example.com", - project_id: "uuid", - role: "authenticated" or "anonymous" - } - ``` - - Database queries enforce RLS (user-scoped data) - - **With Anon Key** (`public` functions only): - - Requires anon key permission: `functions.invoke` - - Function must have `visibility: public` - - Function receives payload only (no `__volcano_auth`) - - **Transport and CORS:** - - This operation is the authenticated direct RPC endpoint and always uses the - POST `{payload: ...}` contract, including for functions whose DNS ingress is - configured in HTTP mode. - - The geo-routed DNS ingress is the function's `invoke_url`. It is on a - different domain from this API, so it cannot be derived from the API host. - - RPC-mode DNS ingress accepts POST at `/`. HTTP-mode DNS ingress accepts GET, - HEAD, POST, PUT, PATCH, and DELETE at `/` and nested paths. - - Direct and RPC-mode CORS preflight advertises `POST, OPTIONS`. HTTP-mode DNS - preflight advertises `GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS`. - - `http_auth_mode: none` applies only to public HTTP-mode DNS ingress; this - direct operation always requires a Volcano credential. - - **Durable functions are not invocable here.** A durable function's id - answers 404, whatever its visibility, because a synchronous call would - run it with no execution record, no idempotency and no concurrency - accounting. Start one with - `POST /durable-functions/{functionId}/executions`. - operationId: invokeFunction + Creates a draft link for the project. It offers nothing to visitors, and its + preview answers `404`, until its owner publishes a release to it with + `POST /share-releases`. Any project can have + links, whether it deploys from the CLI, the dashboard or Git. + operationId: createShare security: - - AnonKey: [] - - ServiceRoleKey: [] - - AuthUserAccessToken: [] - parameters: - - $ref: '#/components/parameters/FunctionId' + - UserToken: [] requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/FunctionInvocationRequest' - examples: - serviceCall: - summary: Admin/background operation (service key) - value: - payload: - action: process_batch - items: - - 1 - - 2 - - 3 - userCall: - summary: User-initiated call (auth token) - value: - payload: - action: get_profile - anonCall: - summary: Public function call (anon key) - value: - payload: - action: ping_public_endpoint + $ref: '#/components/schemas/ShareCreateRequest' responses: - '200': - description: Function response (passthrough from function runtime) - headers: - X-Volcano-Version: - description: Volcano API/runtime version that served this invocation (`` in production, `-` in non-production) - schema: - type: string - X-Volcano-Region: - description: Region the function ran in (for example `us-east-1`) - schema: - type: string - X-Volcano-Proxy-Ms: - description: Milliseconds Volcano spent preparing the invocation, counted from the request arriving until the function was dispatched. Present only when the function was invoked. Does not include function execution. - schema: - type: integer - minimum: 0 - X-Volcano-Proxy-Handler-Ms: - description: The part of `X-Volcano-Proxy-Ms` spent in the invoke endpoint itself. Subtract it from `X-Volcano-Proxy-Ms` to see what authentication and request validation cost. Present only when the function was invoked. - schema: - type: integer - minimum: 0 - X-Volcano-Compute-Ms: - description: Milliseconds spent running the function, from dispatch until it returned. Present only when the function was invoked. Does not include proxy preparation. - schema: - type: integer - minimum: 0 + '201': + description: The new deploy link content: application/json: schema: - $ref: '#/components/schemas/FunctionInvocationResponse' + $ref: '#/components/schemas/Share' '400': - description: Bad request - invalid payload or function in failed state + description: Malformed request body or an invalid suggested name content: application/json: schema: @@ -4284,767 +4215,789 @@ paths: $ref: '#/components/schemas/Error' '403': description: | - Forbidden - CORS blocked, missing `functions.invoke`, or an anon key - on an `authenticated` function + A project access token was used. + A person creates, changes, publishes and deletes deploy links. Code + `reshare_not_allowed` means the project is a copy made from someone else's + deploy link, and that link, or a link it was made from in turn, does not + allow re-sharing or no longer exists. Code `source_unavailable` means the + project is a copy, and a link it was made from is not available to share + from right now. Code `operator_disabled` means + Volcano took one of the project's links down (`disabled_reason` + `operator`), so the project cannot be shared until that is lifted. content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: | - Function not found. Also returned for a `private` function to any - credential but a service key. + Project not found or not the caller's, or deploy links are not available + in this environment + (code `feature_unavailable`; see `GET /capabilities`) content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - description: | - Rate limit exceeded (per-function or project-wide limit), or the - owning platform user's billing-cycle bandwidth allowance (aggregate ingress + - egress) was exceeded. + '409': + description: The project has reached its deploy link limit content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: | - Function still provisioning or rate limiting service unavailable. - A freshly deployed (or updated) function may briefly report - `provisioning` and reject invocations until the background status - reconciler observes its deployment workflow completing and transitions - it to `active`. This is expected for a few seconds after deploy; clients - should retry. + '500': + description: Failed to create the deploy link content: application/json: schema: $ref: '#/components/schemas/Error' - default: - description: Function response (passthrough; status code/body/headers come from the function) - headers: - X-Volcano-Version: - description: Volcano API/runtime version that served this invocation (`` in production, `-` in non-production) + /shares/{share_id}: + get: + tags: + - Shares + summary: Get a deploy link + operationId: getShare + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ShareId' + - $ref: '#/components/parameters/ItemProjectIdQuery' + responses: + '200': + description: The deploy link + content: + application/json: schema: - type: string - X-Volcano-Region: - description: Region the function ran in (for example `us-east-1`) - schema: - type: string - X-Volcano-Proxy-Ms: - description: Milliseconds Volcano spent preparing the invocation, counted from the request arriving until the function was dispatched. Present only when the function was invoked. Does not include function execution. + $ref: '#/components/schemas/Share' + '400': + description: | + `project_id` is malformed, or `project_id` is given and the link id is + malformed. Without `project_id`, a malformed link id answers 404, as an + unknown link does. + content: + application/json: schema: - type: integer - minimum: 0 - X-Volcano-Proxy-Handler-Ms: - description: The part of `X-Volcano-Proxy-Ms` spent in the invoke endpoint itself. Subtract it from `X-Volcano-Proxy-Ms` to see what authentication and request validation cost. Present only when the function was invoked. + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized - invalid or missing token + content: + application/json: schema: - type: integer - minimum: 0 - X-Volcano-Compute-Ms: - description: Milliseconds spent running the function, from dispatch until it returned. Present only when the function was invoked. Does not include proxy preparation. + $ref: '#/components/schemas/Error' + '404': + description: Project or deploy link not found + content: + application/json: schema: - type: integer - minimum: 0 + $ref: '#/components/schemas/Error' + '500': + description: Failed to get the deploy link content: application/json: schema: - $ref: '#/components/schemas/FunctionInvocationResponse' - /durable-functions/{functionId}/executions: - post: + $ref: '#/components/schemas/Error' + patch: tags: - - Durable Functions - summary: Start a durable execution from an application - description: | - Starts an execution of a durable function using an application - credential, and returns its handle. - - This is the durable counterpart of `POST /functions/{functionId}/invoke`, - and it is the endpoint an application calls. Like that one, it is not - project-scoped: an anon key, a service key and an auth user token each - carry their own project. The project-scoped collection under - `/projects/{id}/durable-functions/...` remains the owner's management - surface. - - **With a service key:** any durable function in the project. + - Shares + summary: Edit or switch a deploy link on or off + description: | + Changes the suggested name, the status, or both. An owner can always switch a + link off: it works even while deploy links are not available in this + environment, and while the owner's account is read-only. Setting + `allow_reshare` to false also works in both cases, alone or with a + switch-off, since like a switch-off it only shares less; for a read-only + account these are the only changes allowed. While deploy links are not + available, a request that sends back the values the link already has, + including `status` `active` on an active link, changes nothing and answers + `200`. - **With an auth user token:** a durable function whose `visibility` is - `authenticated` or `public`. - - **With an anon key:** requires the `functions.invoke` permission, and - the function must have `visibility: public`. - - A `private` durable function answers every credential but a service key - exactly as a missing one, with 404. + Switching a link off also stops the installs it started that have not + finished, including ones still queued: each fails at its next step. The + visitor keeps the project, with its installation failed. Switching the link + back on lets only installs that have not failed yet go ahead. - The start returns a `client_token`. An anon key, or a user who did not - start the execution, sends it as `X-Volcano-Client-Token` to read the - execution, stop it, and reach its messages. A service key scoped to a - list without `*` sends it to read and stop the execution. An anon key is shared by - everyone who loads the page, so the id alone never reaches an - execution. Listing executions takes the project owner's token or a - project access token. - - Send `X-Volcano-Execution-Name` to make the start idempotent: repeating - a start with the same name returns the existing execution instead of - beginning a second one. + A link Volcano took down (`disabled_reason` `operator`) cannot be switched + back on; other edits still work, and it stays down. While any of the + project's links is taken down, no link of the project can be switched on or + allowed to be re-shared. - Each execution counts once against the project's durable execution - allowance, however many times the start is retried under the same - execution name, and the number in flight at once is capped by the plan. - The operations the execution performs are counted against the durable - operations allowance when it finishes. - operationId: startDurableExecutionFromApplication + A request that switches the link off together with an edit while deploy links + are not available, or that also allows re-sharing on a copy whose source does + not allow it, still switches the link off, but answers `400` with code + `edit_dropped`: the link is off and the edit was not applied. While the + account is read-only, a request that switches the link off or sets + `allow_reshare` to false together with another edit is answered the same way: + the switch-off and the re-sharing change are saved, and the other edit is not. + A `status` the link already has is no edit, so sending the fetched link back + with `allow_reshare` false answers `200`; a switch-on is such another edit. + operationId: updateShare security: - - AnonKey: [] - - ServiceRoleKey: [] - - AuthUserAccessToken: [] + - UserToken: [] parameters: - - $ref: '#/components/parameters/DurableFunctionId' - - name: X-Volcano-Execution-Name - in: header - required: false - description: | - Idempotency key for this execution. Generated when omitted. A repeat - under a name that already names a running execution returns that - execution and is not charged again. - - Letters, digits, `-`, `_` and `.`, up to 255 characters. Anything - else is rejected with `400`. - schema: - type: string - maxLength: 255 - pattern: ^[A-Za-z0-9._-]+$ + - $ref: '#/components/parameters/ShareId' + - $ref: '#/components/parameters/ItemProjectIdQuery' requestBody: - required: false + required: true content: application/json: schema: - description: Input passed to the function, up to 256 KiB. + $ref: '#/components/schemas/ShareUpdateRequest' responses: - '202': - description: Execution accepted and started + '200': + description: The updated deploy link content: application/json: schema: - $ref: '#/components/schemas/DurableExecution' + $ref: '#/components/schemas/Share' '400': - description: Payload is not valid JSON, or the execution name is invalid + description: Malformed request body or an invalid suggested name. Code `feature_unavailable` means deploy links are not available in this environment, so an edit or enabling the link is refused while switching it off still works; code `edit_dropped` means the link was switched off, or for a read-only account its re-sharing turned off, and the other edit sent with it was not saved, including a re-sharing change refused because the project is a copy whose source does not allow re-sharing, or because Volcano took one of the project's links down. content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: | - Missing or invalid credential. Also returned for a platform user - token, which is not an application credential; project owners start - executions through the project-scoped collection. + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: | - The anon key lacks `functions.invoke` or the function is - `authenticated`, or the request's origin is refused by the project's - CORS policy. + A project access token was used. + A person creates, changes, publishes and deletes deploy links. Also + answered when the account is read-only and the request neither switches + the link off nor sets `allow_reshare` to false. Code `reshare_not_allowed` means the request switches the + link on or sets `allow_reshare` to true, and the project is a copy made from + someone else's deploy link that, or a link it was made from in turn, does + not allow re-sharing or no longer exists. Code `source_unavailable` means + it does so on a copy, and a link the copy was made from is not available + to share from right now. Code `operator_disabled` means + the request switches on a link Volcano took down + (`disabled_reason` `operator`), which only Volcano can lift, or switches + on a link or sets `allow_reshare` to true while Volcano has taken any of + the project's links down. Switching a link off is always allowed. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: | - Durable function not found. Also returned for a standard function's - id, for a durable function in another project, and for a `private` - one to any credential but a service key, so the response cannot be - used to tell those apart. + description: Project or deploy link not found, or the project is not the caller's content: application/json: schema: $ref: '#/components/schemas/Error' - '409': + '500': + description: Failed to update the deploy link + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + tags: + - Shares + summary: Delete a deploy link + description: | + Deletes the link, its releases and its recorded events. The address stops + working. Installs the link started that have not finished, including ones + still queued, fail at their next step. The visitor keeps the project, with + its installation failed. A link Volcano took down (`disabled_reason` + `operator`) cannot be deleted until that is lifted; deleting its project + still removes it. + operationId: deleteShare + security: + - UserToken: [] + parameters: + - $ref: '#/components/parameters/ShareId' + - $ref: '#/components/parameters/ItemProjectIdQuery' + responses: + '204': + description: The deploy link was deleted + '400': description: | - Function is not deployed yet, or has no deployed region. Also - returned when two starts under the same execution name raced and - both released it, which is retryable as it stands, and with `code` - `execution_name_held` when an unfinished start this caller may not - resume holds the execution name, which needs a name of its own. + `project_id` is malformed, or `project_id` is given and the link id is + malformed. Without `project_id`, a malformed link id answers 404, as an + unknown link does. content: application/json: schema: $ref: '#/components/schemas/Error' - '413': - description: Payload is larger than 256 KiB + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - '429': + '403': description: | - The project has too many executions in flight for its plan, the - function invocation rate limit was exceeded, the project is over - its bandwidth cap, or the account is out of one of its - billing-cycle durable allowances: executions, operations, or - compute. Operations and compute are counted once an execution - finishes, so a refusal on either never interrupts an execution - already running — it declines the next start. + A project access token was used. + A person creates, changes, publishes and deletes deploy links. Code + `operator_disabled` means Volcano took the link down (`disabled_reason` + `operator`), so it is kept until Volcano lifts that. content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: | - Durable execution is not available in this environment, or the - plan terms for the start could not be read. The first means the - capability is paused or this deployment cannot serve it, so it is - not one to retry in a loop; the second is transient. + '404': + description: Project or deploy link not found, or the project is not the caller's content: application/json: schema: $ref: '#/components/schemas/Error' - /durable-functions/{functionId}/executions/{executionId}: + '500': + description: Failed to delete the deploy link + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /share-release-drafts: get: tags: - - Durable Functions - summary: Get a durable execution from an application - description: | - Returns the execution's current state with the credential that started - it, including its `result` once it has succeeded. Poll this to wait for - an execution to finish. + - Shares + summary: Show what publishing a deploy link would release + description: | + Builds the project's deployed functions and frontends the way a release + would, without storing anything, and reports what it would carry: the + functions and frontends, the project variables every project created from + the release gets (empty unless the visitor gives a value), the functions + whose code reads `VOLCANO_SERVICE_KEY`, and what is left out (resources with + no stored source, databases, sandboxes, dotenv and key files). Review it, + then publish with its `draft_id`, and its variables and service key + functions confirmed. - **With a service key:** any execution in the project when the key holds - `*`, the default. A key scoped to a list without `*` reaches an - execution whose `X-Volcano-Client-Token` the request carries, as an - anon key does; the start returns that token. - - **With an auth user token:** an execution the user started, or one - whose `X-Volcano-Client-Token` the request carries, of a durable - function whose `visibility` is `authenticated` or `public`. - - **With an anon key:** an execution whose `X-Volcano-Client-Token` the - request carries, of a function with `visibility: public`. - - Only a service key holding `*` reaches an execution that is still - `pending`. Any other execution answers `404`, as a missing one does. - - The response is the one `GET - /projects/{id}/durable-functions/{functionId}/executions/{executionId}` - returns. It never carries `client_token`. - operationId: getDurableExecutionFromApplication + Every call runs a full build and counts against the account's hourly + release build budget, which drafts and publishes share. Fetch it when the + owner opens the publish step, not on every focus or poll. + operationId: getShareReleaseDraft security: - - AnonKey: [] - - ServiceRoleKey: [] - - AuthUserAccessToken: [] + - UserToken: [] parameters: - - $ref: '#/components/parameters/DurableFunctionId' - - $ref: '#/components/parameters/DurableExecutionId' - - $ref: '#/components/parameters/DurableClientToken' + - $ref: '#/components/parameters/ShareIdQuery' + - $ref: '#/components/parameters/ItemProjectIdQuery' responses: '200': - description: Successful response + description: What a release would carry content: application/json: schema: - $ref: '#/components/schemas/DurableExecution' + $ref: '#/components/schemas/ShareReleaseDraft' + '400': + description: | + `project_id` is malformed, or `project_id` is given and the link id is + malformed. Without `project_id`, a malformed link id answers 404, as an + unknown link does. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': - description: Missing or invalid credential + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: | - The anon key lacks `functions.invoke`, the service key is scoped - without it, or the function is `authenticated` and the request - carries an anon key. Also returned when the request's origin is - refused by the project's CORS policy. + A project access token was used. + A person creates, changes, publishes and deletes deploy links. Code + `reshare_not_allowed` means the project is a copy made from someone else's + deploy link, and that link, or a link it was made from in turn, does not + allow re-sharing or no longer exists. Code `source_unavailable` means the + project is a copy, and a link it was made from is not available to share + from right now. Code `operator_disabled` means + Volcano took one of the project's links down (`disabled_reason` + `operator`), so the project cannot be shared until that is lifted. content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: | - Durable function or execution not found, or the credential cannot - reach the execution. A `private` function answers every credential - but a service key this way. + Project or deploy link not found, or the project is not the caller's, or + publishing is not available in this environment (code + `feature_unavailable`). A local server without stored + source archives cannot publish, even where `GET /capabilities` lists + `shares` as available for managing links. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '422': + description: | + The project cannot be released as it is: it has no deployed function or + frontend with stored source, a function's settings would be refused, it + has more than 100 variables a release would carry or more than 100 + functions reading `VOLCANO_SERVICE_KEY`, or the release would be larger + than an install reads. content: application/json: schema: $ref: '#/components/schemas/Error' '429': description: | - The function's or the project's function rate limit, which reads - share with invocations and starts, or the project is over its - bandwidth cap. + This account started too many release builds this hour (30, drafts and + publishes together; code `release_builds_limited`). Try again after + `Retry-After`. + headers: + Retry-After: + description: Seconds until the clock hour the budget counts in ends. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to build the release draft content: application/json: schema: $ref: '#/components/schemas/Error' '503': description: | - Durable execution is not available in this environment, the plan - terms for the request could not be read, or reads of the - execution's state in its region are throttled. The first is not one - to retry in a loop; the others are transient, and a throttled read - carries `Retry-After`. + Release builds on this server are busy (code `builds_busy`); try again after + `Retry-After`. headers: Retry-After: - description: | - Seconds to wait before reading again. Sent only when reads in - the execution's region are throttled. + description: Seconds to wait before trying again. schema: type: integer content: application/json: schema: $ref: '#/components/schemas/Error' - /durable-functions/{functionId}/executions/{executionId}/stop: - post: + /share-releases: + get: tags: - - Durable Functions - summary: Stop a durable execution from an application + - Shares + summary: List a deploy link's releases description: | - Cancels a running execution with the credential that started it. Its - completed steps are not undone. - - Access follows the same rules as reading the execution. - - The call is accepted rather than awaited: the response reports the - execution as it was read back and may still say `running`. Poll - `GET /durable-functions/{functionId}/executions/{executionId}` to see - it settle into `stopped`. - - Stopping an execution that already finished is not an error: the - response carries the state it settled in. - operationId: stopDurableExecutionFromApplication + Pages the link's releases, newest first. Follow `next_cursor` while + `has_more` is true. + operationId: listShareReleases security: - - AnonKey: [] - - ServiceRoleKey: [] - - AuthUserAccessToken: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/DurableFunctionId' - - $ref: '#/components/parameters/DurableExecutionId' - - $ref: '#/components/parameters/DurableClientToken' + - $ref: '#/components/parameters/ShareIdQuery' + - $ref: '#/components/parameters/ItemProjectIdQuery' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/ShareReleaseCursor' responses: '200': - description: | - Stop accepted. The body is the execution as it was read back, which - may still report `running`. - content: - application/json: - schema: - $ref: '#/components/schemas/DurableExecution' - '401': - description: Missing or invalid credential - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '403': - description: | - The anon key lacks `functions.invoke`, the service key is scoped - without it, or the function is `authenticated` and the request - carries an anon key. Also returned when the request's origin is - refused by the project's CORS policy. + description: A page of the link's releases content: application/json: schema: - $ref: '#/components/schemas/Error' - '404': + $ref: '#/components/schemas/PaginatedShareReleases' + '400': description: | - Durable function or execution not found, or the credential cannot - reach the execution. A `private` function answers every credential - but a service key this way. + `project_id` is malformed, or `project_id` is given and the link id is + malformed, or `limit` or `cursor` is invalid, such as a cursor issued for + another share or page size. Without `project_id`, a malformed link id + answers 404, as an unknown link does. content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: | - The execution has not started yet. Only a service key holding `*` - can reach an execution in that state. + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - description: | - The function's or the project's function rate limit, which stops - share with invocations and starts, or the project is over its - bandwidth cap. + '404': + description: Project or deploy link not found content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: | - Durable execution is not available in this environment, the plan - terms for the request could not be read, or the execution's state - could not be read back because reads in its region are throttled. - The first is not one to retry in a loop; the others are transient, - and a throttled read carries `Retry-After`. A stop answered with a - throttle may already have been sent, so read the execution before - stopping it again. - headers: - Retry-After: - description: | - Seconds to wait before reading again. Sent only when reads in - the execution's region are throttled. - schema: - type: integer + '500': + description: Failed to list the deploy link's releases content: application/json: schema: $ref: '#/components/schemas/Error' - /durable-functions/{functionId}/executions/{executionId}/messages: post: tags: - - Durable Functions - summary: Send a message to a durable execution from an application + - Shares + summary: Publish a deploy link release description: | - Sends a named message to a running execution. The workflow receives it - from `ctx.waitForMessage` with the same name. A message sent before - anything waits for its name is kept, and each wait takes the oldest - one, so messages arrive in the order they were sent. - - Messages never decide an approval: a workflow waiting in - `ctx.waitForApproval` is not resumed by one. - - **With a service key:** any execution in the project. - - **With an auth user token:** an execution the user started, or one - whose `X-Volcano-Client-Token` the request carries, of a durable - function whose `visibility` is `authenticated` or `public`. - - **With an anon key:** an execution whose `X-Volcano-Client-Token` the - request carries, of a function with `visibility: public`. - - Any other execution answers `404`, as a missing one does. + Snapshots the project's deployed functions and frontends into an immutable + release and makes it the link's current release in one step, so visitors see + either the previous release or this one. Visitors install exactly the stored + release; later deploys to the project change nothing until the owner + publishes again. - Send `Idempotency-Key` to make a retry safe: a repeat with a key the - same sender has used on the execution returns the first message with - `200` and sends nothing. - operationId: sendDurableMessageFromApplication + Send the reviewed draft's `draft_id`, its variables and the functions that + receive the new project's `VOLCANO_SERVICE_KEY`, as confirmed from the + draft. Both lists must be exactly the draft's: a release carries every + variable, since leaving one out would only break the code that reads it. If + a fresh build is not the reviewed draft, because the project was redeployed + or changed since, or the lists differ from it, nothing is published and the + answer is `409` with code `draft_changed` and the new draft. A + release carries variable names, never values, and no database. A publish is + a full build and counts against the account's hourly release build budget, + which it shares with the draft. + operationId: publishShareRelease security: - - AnonKey: [] - - ServiceRoleKey: [] - - AuthUserAccessToken: [] - parameters: - - $ref: '#/components/parameters/DurableFunctionId' - - $ref: '#/components/parameters/DurableExecutionId' - - $ref: '#/components/parameters/DurableMessageIdempotencyKey' - - $ref: '#/components/parameters/DurableClientToken' + - UserToken: [] requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/SendDurableMessageRequest' + $ref: '#/components/schemas/ShareReleaseCreateRequest' responses: - '200': - description: A message with this `Idempotency-Key` was already sent; it is returned - content: - application/json: - schema: - $ref: '#/components/schemas/DurableMessage' '201': - description: | - Message sent. `status` is `delivered` when a wait took it at once, - `delivering` when a wait took it and the handover is still being - confirmed, and `queued` when it is kept for the next wait. + description: The published release, now the link's current release content: application/json: schema: - $ref: '#/components/schemas/DurableMessage' + $ref: '#/components/schemas/ShareRelease' '400': - description: The name, data or idempotency key is invalid + description: | + The body names an existing link but is otherwise malformed, such as an + unknown field or a `variables` entry of the wrong type. A body that is not + JSON, or whose `share_id` is missing or malformed, answers 404, as an + unknown link does. content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Missing or invalid credential + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: | - The anon key lacks `functions.invoke`, the service key is scoped - without it, or the function is `authenticated` and the request - carries an anon key. Also returned when the request's origin is - refused by the project's CORS policy. + A project access token was used. + A person creates, changes, publishes and deletes deploy links. Code + `reshare_not_allowed` means the project is a copy made from someone else's + deploy link, and that link, or a link it was made from in turn, does not + allow re-sharing or no longer exists. Code `source_unavailable` means the + project is a copy, and a link it was made from is not available to share + from right now. Code `operator_disabled` means + Volcano took one of the project's links down (`disabled_reason` + `operator`), so the project cannot be shared until that is lifted. content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: | - Durable function or execution not found, or the credential cannot - reach the execution. A `private` function answers every credential - but a service key this way. + Project or deploy link not found, including a body that names no + well-formed `share_id`, or the project is not the caller's, or publishing + is not available in this environment (code `feature_unavailable`). A local server without stored + source archives cannot publish, even where `GET /capabilities` lists + `shares` as available for managing links. content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: | - The message cannot be sent. `code` says why: - - - `execution_not_running`: the execution has finished. - - `too_many_queued_messages`: the execution already holds the - maximum number of messages nothing has taken. + What was confirmed does not match a fresh build of the project (code + `draft_changed`). The body carries the fresh draft in `draft`; review it + and publish again. `error` names the confirmed variables the draft does + not have, the draft variables left out, or the service key functions the + draft expects. It says the + project changed when the confirmation matches the fresh draft but its + `draft_id` is not the one sent: the project changed since the draft was + reviewed, or while the release was being built. content: application/json: schema: - $ref: '#/components/schemas/Error' - '413': - description: The request body is larger than 72 KiB + $ref: '#/components/schemas/ShareDraftChangedError' + '422': + description: | + The project cannot be released as it is: it has no deployed function or + frontend with stored source, a function's settings would be refused, it + has more than 100 variables a release would carry or more than 100 + functions reading `VOLCANO_SERVICE_KEY`, or the release would be larger + than an install reads. content: application/json: schema: $ref: '#/components/schemas/Error' '429': description: | - Too many messages sent to this execution, or the function's rate - limit, which sends share with its invocations and starts. + This account started too many release builds this hour (30, drafts and + publishes together; code `release_builds_limited`). Try again after + `Retry-After`. + headers: + Retry-After: + description: Seconds until the clock hour the budget counts in ends. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to publish the release content: application/json: schema: $ref: '#/components/schemas/Error' '503': - description: The plan terms for the request could not be read. Retry with backoff. + description: | + Release builds on this server are busy (code `builds_busy`); try again after + `Retry-After`. + headers: + Retry-After: + description: Seconds to wait before trying again. + schema: + type: integer content: application/json: schema: $ref: '#/components/schemas/Error' + /share-stats: get: tags: - - Durable Functions - summary: List a durable execution's messages from an application + - Shares + summary: Get a deploy link's click and deploy counts description: | - Lists the messages sent to and published by an execution, oldest - first. Pass the last `seq` you read as `after` to read only what came - next; that is how a client catches up after a live subscription - reconnects. - - Access follows the same rules as sending. - operationId: listDurableMessagesFromApplication + Counts what happened at the link: clicks, previews, confirmations, projects + created, and how many became ready or failed. Informational only. Visitors + are counted from a salted hash and no address is stored. Events are kept + for 90 days, so a `days` above 90 is rejected with `400`. + operationId: getShareStats security: - - AnonKey: [] - - ServiceRoleKey: [] - - AuthUserAccessToken: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/DurableFunctionId' - - $ref: '#/components/parameters/DurableExecutionId' - - $ref: '#/components/parameters/DurableClientToken' - - $ref: '#/components/parameters/DurableMessageDirectionFilter' - - $ref: '#/components/parameters/DurableMessageNameFilter' - - $ref: '#/components/parameters/DurableMessageAfter' - - $ref: '#/components/parameters/DurableMessageLimit' + - $ref: '#/components/parameters/ShareIdQuery' + - $ref: '#/components/parameters/ItemProjectIdQuery' + - name: days + in: query + required: false + description: How many days back to count. Defaults to 30. + schema: + type: integer + minimum: 1 + maximum: 90 + default: 30 responses: '200': - description: Successful response + description: The link's event counts content: application/json: schema: - $ref: '#/components/schemas/DurableMessageList' + $ref: '#/components/schemas/ShareStats' '400': - description: A filter is invalid + description: | + `days` is outside 1 to 90, `project_id` is malformed, or `project_id` is + given and the link id is malformed. Without `project_id`, a malformed link + id answers 404, as an unknown link does. content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Missing or invalid credential - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '403': - description: | - The anon key lacks `functions.invoke`, the service key is scoped - without it, or the function is `authenticated` and the request - carries an anon key. Also returned when the request's origin is - refused by the project's CORS policy. + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: | - Durable function or execution not found, or the credential cannot - reach the execution. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '429': - description: | - The function's rate limit, which lists share with its invocations - and starts. + description: Project or deploy link not found content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: The plan terms for the request could not be read. Retry with backoff. + '500': + description: Failed to get the deploy link stats content: application/json: schema: $ref: '#/components/schemas/Error' - /functions/resolve: - get: + /forks: + post: tags: - - Functions - summary: Resolve function name for invocation + - Forks + summary: Fork a share into a project of your own description: | - Resolves a DNS-safe function name to its function ID and invocation URL within the caller's project. + Creates a project in the caller's account from the release a share offers, + and queues its install: the release's functions and frontends, never the + owner's data, variable values, keys or sign-in settings. Every variable the + release declares is created; one the visitor gives no value for is created + empty. Installation is asynchronous: poll the project until + `template_installation.status` is `ready`. A `201` without + `template_installation` means nothing is being installed. - SDKs use this endpoint internally to invoke by function name while routing by function ID. - Invoke the returned `invoke_url` as-is. It does not share a domain with the API, so a host - built from the API URL will not reach the function. When the deployment serves no public - invocation domain, as in local development, `invoke_url` is omitted and callers invoke - through `POST /functions/{functionId}/invoke`. - - **With Service Key**: - - Allowed - - **With Auth User Token**: - - Allowed for `authenticated` and `public` functions - - A `private` function answers 404, exactly as a missing one + The fork is checked against what the release recorded when it was published + (its functions, frontends and variables, and the plan's room for them); the + release's archive is read and checked by the install. A stored archive that + fails those checks fails the install with `failure_code` `source_invalid` + rather than refusing the request. - **With Anon Key**: - - Requires anon key permission: `functions.invoke` - - Function must have `visibility: public`; any other answers 404 - operationId: resolveFunctionForInvocation + Send the `release_id` that `GET /share-previews/{share_id}` returned. If the + share moved to a new release since, nothing is created and the answer is + `409` with code `release_changed`. + operationId: createFork security: - - AnonKey: [] - - ServiceRoleKey: [] - - AuthUserAccessToken: [] + - UserToken: [] parameters: - - name: name - in: query - required: true + - name: Idempotency-Key + in: header + required: false + description: | + Makes a fork safe to retry. A repeat with the same key from the same + account answers `201` with the project the first request created, without + confirming, counting or creating anything again. Reusing a key for a + different request (another name, share, release or set of variable names + with a value) answers `409` with code `idempotency_key_reused`. Variable + values are not compared. The key is kept as long as the project exists. schema: type: string - maxLength: 63 - pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ - description: DNS-safe function name (lowercase letters, numbers, hyphens; cannot start or end with hyphen) - example: my-function + minLength: 1 + maxLength: 255 + pattern: ^[!-~]+$ + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ForkCreateRequest' responses: - '200': - description: Function resolved successfully + '201': + description: The project was created and its install queued content: application/json: schema: - $ref: '#/components/schemas/ResolveFunctionResponse' + $ref: '#/components/schemas/Project' '400': - description: Bad request - missing or invalid function name + description: The request body is malformed. content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Unauthorized - invalid or missing token + description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: | - Forbidden - CORS blocked, or missing `functions.invoke` permission - for anon key + The release would exceed the plan's limits for frontends and functions, or the + account may not create projects. Code `proxy_credential_rejected` means the + request carried the dashboard proxy's visitor headers without a valid proof + from the proxy; it is never about the caller's session. content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: | - Function not found. Also returned for a `private` function with an - auth user token, and a non-public one with an anon key. A durable - function is never resolvable here: it is started through - `POST /durable-functions/{functionId}/executions`, not invoked. + The share is not available. It does not exist, was switched off, has not + been published, or is a copy whose source no longer allows re-sharing. Code + `feature_unavailable` means forks are not available in this environment (see + `GET /capabilities`). content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/logs/activity: - post: - tags: - - Logs - summary: Get project log activity - description: | - Retrieve bucketed log counts for one resource type in the project. Set - `resource.type` to `function`, `frontend`, or `database`. Add - `resource.ids` to filter to one or more resources, and add - `resource.deployments.ids` to count deployment logs instead of runtime - logs for functions and frontends. Deployment logs are not supported for - databases. Database logs are a SUPERAGENT feature; `resource.type=database` - from a HOBBY project owner returns 403. The activity window is limited - to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days); older start - times are clamped to that window. Buckets are aligned to UTC clock - intervals and count events in the half-open window - `[start_time, end_time)`. - operationId: getProjectLogActivity - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LogActivityRequest' - responses: - '200': - description: Successful response + '409': + description: | + The share has a new release since the preview (code `release_changed`): fetch + the preview again and confirm the new release. Code `idempotency_key_reused`: + the `Idempotency-Key` was already used for a different request. Code + `request_in_progress`: the first request with this `Idempotency-Key` has made + its project but not yet queued the install; retry after `Retry-After`, and the + retry answers that project once it is settled. A project name you already use + is not a conflict: the project is created under that name with a short random + suffix added. Only when no free suffixed name is found after a few tries does + the request answer `409`. + headers: + Retry-After: + description: Seconds to wait before retrying (code `request_in_progress`). Absent otherwise. + schema: + type: integer content: application/json: schema: - $ref: '#/components/schemas/LogActivityResponse' - '400': - description: Bad request - invalid query parameter + $ref: '#/components/schemas/Error' + '422': + description: | + The release cannot be installed as it is, or `variables` names a variable the + release does not declare (code `variable_not_declared`). A variable left out, + or sent empty, is created empty. The message names the variables, never their + values. Code `variables_required` means the release declares variables Volcano + could not set up; ask the person who shared it to share it again. content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + '429': + description: Too many forks (20 an hour) from this account; try again after `Retry-After` + headers: + Retry-After: + description: Seconds until the clock hour the limit counts in ends. + schema: + type: integer content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Forbidden - project ownership required + '451': + description: Volcano cannot serve requests from the visitor's location under US sanctions (a fork confirmed through the dashboard) content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project or resource not found + '500': + description: Failed to create the project from the deploy link content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/logs/search: - post: + '503': + description: | + Durable functions are paused (code `feature_paused`, with a `Retry-After` + header) and the release has a durable function. Code `service_unavailable` + means the dashboard proxy's own project is not being served right now. Code + `rate_limit_unavailable` means Volcano cannot count forks right now; retry + after `Retry-After`. + headers: + Retry-After: + description: Seconds until durable functions may be back (code `feature_paused`), or a short wait while forks cannot be counted (code `rate_limit_unavailable`). Absent otherwise. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/git-connection/production-branch: + put: tags: - - Logs - summary: Search project logs + - Projects + - Git Connections + summary: Set the branch a project deploys from description: | - Search or filter logs for one resource type in the project. Set - `resource.type` to `function`, `frontend`, or `database`. Add - `resource.ids` to filter to one or more resources, and add - `resource.deployments.ids` to read deployment logs instead of runtime - logs for functions and frontends. Deployment logs are not supported for - databases. Database logs are a SUPERAGENT feature; requests for - `resource.type=database` from a HOBBY project owner return 403. - Log history (runtime and deployment) is limited to the plan's retention - window (HOBBY: 1 day, SUPERAGENT: 30 days); older time ranges are clamped to that - window. - operationId: searchProjectLogs + Changes only the production branch, leaving the repository binding + alone. PUT /projects/{id}/git-connection can also set it, but that is a + full rebind: it needs connection_id, installation_id and a repository + selector resent, and re-resolves the repository against GitHub for a + field that does not depend on it. + + The branch does not have to exist. It is validated as a Git branch name + and nothing more, so a project can be pointed at a branch that is about + to be pushed — the case a repository created empty depends on. + + Setting the branch here marks it as the project's own choice, so a later + default-branch rename on GitHub no longer moves it, and the response + reports `production_branch_follows_default: false`. Projects that never + set one keep following the repository's default branch. + + An empty string undoes that choice: the project deploys from the + repository's default branch again and follows later renames. Volcano + reads the default branch from GitHub through the project owner's + connection, and the response carries it with + `production_branch_follows_default: true`. + operationId: setProjectGitProductionBranch security: - UserToken: [] - ProjectAccessToken: [] @@ -5055,16 +5008,21 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LogSearchRequest' + $ref: '#/components/schemas/SetProjectGitProductionBranchRequest' responses: '200': - description: Successful response + description: The project's repo connection, with the new branch content: application/json: schema: - $ref: '#/components/schemas/LogSearchResponse' + $ref: '#/components/schemas/ProjectGitConnection' '400': - description: Bad request - invalid query parameter + description: | + Malformed request body, a production_branch that is not a valid + Git branch name, or an empty one for a repository with no commits + yet. Code `feature_unavailable` means this Volcano deployment has + no GitHub integration, so an empty production_branch cannot read + the default branch. content: application/json: schema: @@ -5076,84 +5034,80 @@ paths: schema: $ref: '#/components/schemas/Error' '403': - description: Forbidden - project ownership required + description: Project not owned by the caller content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project or resource not found + description: | + Project not found, or it has no repository connected. The branch is + part of the connection, so there is nothing to set it on until one + exists. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/logs/stream: - post: + '409': + description: | + A Git source transition is pending, or an empty production_branch + could not read the default branch because the project owner's + GitHub connection needs reconnecting or lost access to the + repository + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: GitHub rate limited reading the default branch for an empty production_branch. Try again shortly. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to set the production branch + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/git-connection/root-directory: + put: tags: - - Logs - summary: Stream project logs + - Projects + - Git Connections + summary: Set the directory a project builds from description: | - Live-tail project logs as Server-Sent Events. The request body uses the - resource selector plus `q`, `start_time`, and `limit`, - including runtime logs and function/frontend deployment logs selected - with `resource.deployments`. Deployment logs are not supported for - databases. Database logs are a SUPERAGENT feature; `resource.type=database` - from a HOBBY project owner returns 403. The `q` field uses the same - syntax as search and activity requests. Do not send `cursor` or - `end_time`; use `/logs/search` for range backfills. - Explicit historical `start_time` values are limited to the plan's - retention window (HOBBY: 1 day, SUPERAGENT: 30 days). Resume with - `Last-Event-ID` or the `last_event_id` query parameter. The cursor is - bound to the request body: the resource selector and every filter must - match the original request when reconnecting, otherwise the request is - rejected with `400`. + Changes only the root directory, leaving the repository, the production + branch and `production_branch_follows_default` alone. Unlike PUT /projects/{id}/git-connection, this accepts a + project access token, so CI or an agent can move a project within its + repository without being able to change the repository. - This is a live tail, not a gap-free backfill. On connect or reconnect the - server delivers at most `limit` of the most recent matching events from - the cursor position and then follows new events; events older than that - window are not replayed. Use `/logs/search` to backfill a time range. - operationId: streamProjectLogs + The directory is a path relative to the repository root. An empty + string, `.` or `/` means the repository root. The response carries it in + the form a deploy reads it: `./apps/web/` comes back as `apps/web`. + operationId: setProjectGitRootDirectory security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: Last-Event-ID - in: header - required: false - schema: - type: string - description: Opaque stream cursor from the most recent SSE `id` field. - - name: last_event_id - in: query - required: false - schema: - type: string - description: Opaque stream cursor fallback when setting `Last-Event-ID` is not practical. requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/LogStreamRequest' + $ref: '#/components/schemas/SetProjectGitRootDirectoryRequest' responses: '200': - description: Server-Sent Events stream. `log` events contain a JSON `LogSearchEvent`; `warning` events contain a JSON object with an `error` field. + description: The project's repo connection, with the new root directory content: - text/event-stream: + application/json: schema: - type: string - examples: - log: - summary: Log event - value: | - : connected - - id: STREAM_CURSOR - event: log - data: {"id":"LOG_EVENT_ID","timestamp":"2024-01-01T12:00:00Z","level":"info","message":"User logged in","resource":{"type":"function","id":"550e8400-e29b-41d4-a716-446655440000","name":"login"},"region":"us-east-1"} + $ref: '#/components/schemas/ProjectGitConnection' '400': - description: Bad request - invalid selector, stream cursor, or unsupported stream field + description: | + Malformed request body, or a root_directory that is absolute or + leaves the repository content: application/json: schema: @@ -5165,2137 +5119,2293 @@ paths: schema: $ref: '#/components/schemas/Error' '403': - description: Forbidden - project ownership required + description: Project not owned by the caller content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project or resource not found + description: | + Project not found, or it has no repository connected. The root + directory is part of the connection, so there is nothing to set it + on until one exists. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: | + A Git source transition is pending or complete, so the recorded + root cannot be changed content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Internal server error - log streaming setup failed + description: Failed to set the root directory content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/functions/batch: - post: + /projects/{id}/git-connection/owner-push: + get: tags: - - Functions - summary: Deploy multiple functions in one request + - Projects + - Git Connections + summary: Check whether the project owner can push to the connected repository description: | - Upload multiple function source archives in one multipart request. Each archive should contain source files - plus dependency manifests/lockfiles, not installed dependency directories. ZIP and tar.gz uploads are - accepted and normalized to tar.gz before storage. The API enforces `SOURCE_ARCHIVE_SIZE_LIMIT_MB` - for each uploaded and normalized source archive. The server records a shared - deployment batch ID for the resulting function deployments. Each function deployment runs its own - compile/publish workflow concurrently, and each publish build enforces `LAMBDA_TARGET_CONTAINER_SIZE_LIMIT_MB` - for the final container image. - One batch request can include up to 100 functions. Submit multiple batch requests for larger projects. - If one function fails before its workflow starts, already-started function deployments are left - running and the failed function is reported in the `failed` array. Failed new functions are deleted; - failed updates are rolled back to their previous metadata/status where possible. - operationId: createFunctionsBatch + Answers whether the project owner's GitHub account can push to the + repository the project is connected to. Volcano makes the same check + before it writes to that repository for the project. The repository is + always the project's connected one; the route takes no repository. + + When `can_push` is false, `reason` says why. The answer can be a few + seconds old: repeated checks within that time are answered without + asking GitHub again. + + Checks that ask GitHub draw on an hourly budget for the project and + another for its owner, shared by all of the owner's projects. Over + either, the route answers `429` with `Retry-After`. + operationId: getProjectGitOwnerPush security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - requestBody: - required: true - content: - multipart/form-data: - schema: - type: object - properties: - functions: - type: string - description: | - JSON array of functions with `name`, `runtime`, optional `handler`, and `file_field`. Each `file_field` must name a multipart file field containing that function's ZIP or tar.gz source bundle. - - Each entry may also declare `variable_scope` (`all` or `scoped`) and `variables` (an array of project variable names). Omitting them leaves the function's stored declaration unchanged. Volcano detects direct environment references in the uploaded source code and keeps them separate from the declared names: detected names are not written back to the declaration and do not appear in a config export. A scoped function receives its declared names plus the detected ones the project defines; a detected name the project does not define is ignored, since such a reference is often optional. Detection reads code only, so a name appearing solely in a comment or in an unrelated string is not a reference. Declare a name when the function reads it through a computed key, or when it must not deploy without the variable. The request is rejected with 400 before anything is deployed if a scoped function declares a variable the project does not define, or if the resulting environment exceeds 4096 bytes. - code_0: - type: string - format: binary - description: Function ZIP or tar.gz archive referenced by the first manifest entry's `file_field`; additional code_N file fields may be included. Each archive is subject to SOURCE_ARCHIVE_SIZE_LIMIT_MB. - required: - - functions responses: - '202': - description: Batch deployment accepted - content: - application/json: - schema: - $ref: '#/components/schemas/BatchFunctionDeployResponse' - '207': - description: Batch deployment partially accepted; successful functions started deployment and failed functions were compensated where possible + '200': + description: Whether the project owner can push to the connected repository content: application/json: schema: - $ref: '#/components/schemas/BatchFunctionDeployResponse' - '400': - description: Bad request + $ref: '#/components/schemas/ProjectGitOwnerPush' + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Function limit exceeded for the project + description: Project not owned by the caller content: application/json: schema: $ref: '#/components/schemas/Error' - '409': + '404': description: | - A name in the batch is held by a function of the other kind — a - function cannot change kind — or the project's source is managed by - Git, where deploys come from a push to the production branch. + Project not found, or has no repo connection. Code + `feature_unavailable` when this deployment has no Git provider + integration. content: application/json: schema: $ref: '#/components/schemas/Error' '429': description: | - The owner's billing-cycle build-minutes allowance is spent. The - error names the allowance and carries a link to the usage page. + The project, or its owner across their projects, used up the + hour's checks that ask GitHub. Try again after `Retry-After`. + headers: + Retry-After: + description: Seconds until the budget's hour ends. + schema: + type: integer content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: | - Build usage could not be read, so the allowance could not be - checked. The same request succeeds once it can be. + '500': + description: Failed to check the project owner's access content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/schedulers: - get: - tags: - - Functions - summary: List every function scheduler in a project + '503': + description: | + The check could not be answered now: GitHub did not answer or is + rate limiting the owner's account, or Volcano could not read the + budget. Try again after `Retry-After`. + headers: + Retry-After: + description: Seconds to wait before checking again. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/git-connection: + get: + tags: + - Projects + - Git Connections + summary: Get a project's repo connection description: | - Project-scoped counterpart to `/projects/{id}/functions/{functionId}/schedulers`. - Returns schedulers across all functions in the project, ordered by - creation time descending, with standard page/limit pagination so - clients don't have to fan out one request per function. - - Schedulers of standard and durable functions are listed together, and - each carries `function_kind`. Pass `function_kind` to list one kind - only. - operationId: listProjectSchedulers + Returns the repository binding. `production_branch_follows_default` + tells a branch that tracks the repository's default from one the + project pinned: a client rebinding the same repository sends a pinned + branch back to keep it. + operationId: getProjectGitConnection security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Cursor' - - $ref: '#/components/parameters/EndingBefore' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Search' - - $ref: '#/components/parameters/FunctionKindFilter' responses: '200': - description: Project schedulers + description: The project's current repo connection content: application/json: schema: - $ref: '#/components/schemas/FunctionSchedulerListResponse' - '400': - description: Bad request - invalid pagination or filter + $ref: '#/components/schemas/ProjectGitConnection' + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/functions/{functionId}/schedulers: - get: - tags: - - Functions - summary: List schedulers for a function - operationId: listFunctionSchedulers - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FunctionId' - responses: - '200': - description: Function schedulers + '403': + description: Project not owned by the caller content: application/json: schema: - $ref: '#/components/schemas/FunctionSchedulerListResponse' + $ref: '#/components/schemas/Error' '404': - description: Function not found + description: Project not found, or has no repo connection content: application/json: schema: $ref: '#/components/schemas/Error' - post: + '500': + description: Failed to get project git connection + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + put: tags: - - Functions - summary: Create a scheduler for a function - description: Creates regional scheduled invocation jobs. Requested regions must be a subset of the function's deployed regions. - operationId: createFunctionScheduler + - Projects + - Git Connections + summary: Connect or update a project's repo connection + description: | + Full replace, following Vercel's model: many projects may point at the + same repo, so this only binds the project — it never creates or + deletes git-provider state. Used for both the initial connect and + later edits (repo change, root directory, production branch). + Resolves the repository_id or repo_full_name selector against the repos + accessible through installation_id via connection_id's stored GitHub + user token, then persists repository metadata only from that validated + GitHub response. + + Omitting production_branch follows the repository's default and + discards a pinned branch. To keep a pin when rebinding the same + repository, read the connection first and send production_branch back + when `production_branch_follows_default` is false. The response reports + the result in the same field. + + Project access tokens are refused. Which repository a project deploys + from is a person's decision, made with a platform token or in the + dashboard. A project access token can still change the root directory + and production branch through PUT + /projects/{id}/git-connection/root-directory and PUT + /projects/{id}/git-connection/production-branch. + + Connecting a repository to a project with none, while LavaFlow is on + and was turned on with no repository, makes it the one LavaFlow works + in, unless the LavaFlow settings' `fix_blocker` asks to turn it on + again after the link. Any later change of repository pauses LavaFlow until the owner + turns it on again; binding the repository LavaFlow works in again + resumes it with no new turn-on. + operationId: connectProjectGit security: - UserToken: [] - - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FunctionId' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/CreateFunctionSchedulerRequest' + $ref: '#/components/schemas/ConnectProjectGitRequest' responses: - '201': - description: Scheduler created + '200': + description: The project's repo connection content: application/json: schema: - $ref: '#/components/schemas/FunctionScheduler' + $ref: '#/components/schemas/ProjectGitConnection' '400': description: | - Invalid schedule, geofenced region, a scheduler of this name - already exists on the function, or the function is not active. + Malformed request body, no repository selector, selectors that + identify different repositories, a production_branch that is not a + valid Git branch name, no production_branch on a repository with no + default branch to follow (name one to connect a repository that has + no commits yet), or a production_branch other than the new + repository's default in a request that also changes repository + (a repository that reports no default branch accepts any branch). content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: | - Schedulers are not available on this plan, or the project already - holds as many as the plan allows. The cap counts standard and - durable function schedulers together. + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Function not found + '403': + description: | + Project not owned by the caller, the selected repository is not + accessible through installation_id, or the request used a project + access token or came through MCP. A full-scope token, and MCP, get + `project access tokens cannot change a project's repository; a + person changes it in the dashboard or with a platform token`, and a + read-only token gets `project access token is read-only`. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/functions/{functionId}/schedulers/{schedulerId}: - get: - tags: - - Functions - summary: Get a function scheduler - operationId: getFunctionScheduler - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FunctionId' - - $ref: '#/components/parameters/SchedulerId' - responses: - '200': - description: Function scheduler - content: - application/json: - schema: - $ref: '#/components/schemas/FunctionScheduler' '404': - description: Function or scheduler not found + description: Project or connection not found content: application/json: schema: $ref: '#/components/schemas/Error' - patch: - tags: - - Functions - summary: Update a function scheduler - operationId: updateFunctionScheduler - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FunctionId' - - $ref: '#/components/parameters/SchedulerId' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateFunctionSchedulerRequest' - responses: - '200': - description: Scheduler updated + '409': + description: | + A Git source transition is pending or complete, so the recorded + repository and root cannot be changed content: application/json: schema: - $ref: '#/components/schemas/FunctionScheduler' - '400': - description: | - Invalid schedule, geofenced region, or a scheduler of this name - already exists on the function. + $ref: '#/components/schemas/Error' + '500': + description: Failed to connect project git content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Function or scheduler not found + '503': + description: Git provider integration is not configured content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - - Functions - summary: Delete a function scheduler - operationId: deleteFunctionScheduler + - Projects + - Git Connections + summary: Disconnect a project's repo connection + operationId: disconnectProjectGit security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FunctionId' - - $ref: '#/components/parameters/SchedulerId' responses: '204': - description: Scheduler deleted - '404': - description: Function or scheduler not found + description: Connection removed + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/functions/{functionId}/deployments: - get: - tags: - - Functions - summary: List function deployments - operationId: listFunctionDeployments - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FunctionId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - responses: - '200': - description: Successful response + '403': + description: Project not owned by the caller content: application/json: schema: - $ref: '#/components/schemas/PaginatedFunctionDeployments' + $ref: '#/components/schemas/Error' '404': - description: Function not found + description: Project not found, or has no repo connection content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/durable-functions: + '409': + description: | + A Git source transition is pending or complete, so the recorded + repository cannot be disconnected + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to disconnect project git + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/git-deploy-settings: get: tags: - - Durable Functions - summary: List all durable functions in a project - description: | - Standard functions never appear here, and durable functions never appear - under `/projects/{id}/functions`. The two are separate collections. - operationId: listDurableFunctions + - Projects + - Git Connections + summary: Get a project's Git auto-deploy settings + operationId: getProjectGitDeploySettings security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Search' responses: '200': - description: Successful response + description: The project's current Git auto-deploy settings content: application/json: schema: - $ref: '#/components/schemas/PaginatedDurableFunctions' - '400': - description: Bad request - invalid pagination parameters + $ref: '#/components/schemas/ProjectGitDeploySettings' + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - '404': + '403': + description: Project not owned by the caller + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - post: + '500': + description: Failed to get project git deploy settings + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + put: tags: - - Durable Functions - summary: Create or update a durable function + - Projects + - Git Connections + summary: Update a project's Git auto-deploy settings description: | - Upload a durable function source bundle. Creates the function on the - first call for a name and redeploys it on every call after that, the - same create-or-update contract `POST /projects/{id}/functions` has. + Full replace of the project's Git auto-deploy settings: what a push to + the connected repo's production branch deploys. - Volcano builds and deploys asynchronously. A deployment that starts - immediately returns `status: provisioning`, then transitions to `active` - or `failed`; a deployment that has to wait for a running one is exposed - through `pending_deployment_id`. Existing executions keep running - against the runtime they started on. + Connecting a repository sets auto_deploy_enabled and deploy_functions + to true for a project that has never called this endpoint, so a push + deploys without any further setup. Once these settings have been saved + here they are the project's own: connecting, rebinding, disconnecting + and reconnecting all leave them untouched, including when they were + saved before any repository was connected. Frontend settings are off + until set here; the frontend need not exist when they are saved, since + frontend_name is resolved at deploy time. - The `durable` configuration is derived from the project's plan rather - than supplied here, and is fixed once the function exists. A name - already held by a standard function is rejected with 409: a function - cannot change kind. - operationId: createDurableFunction + apply_migrations is the exception to the full replace: omitting it + leaves the saved value unchanged. It is off until set here. + operationId: updateProjectGitDeploySettings security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' requestBody: required: true content: - multipart/form-data: + application/json: schema: - type: object - required: - - name - - code - - runtime - properties: - name: - type: string - description: DNS-safe function name (lowercase letters, numbers, hyphens; cannot start or end with hyphen) - maxLength: 63 - pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ - example: order-pipeline - code: - type: string - format: binary - description: ZIP or tar.gz archive containing function source code plus dependency manifests/lockfiles. - runtime: - type: string - enum: - - nodejs22.x - - nodejs24.x - - python3.13 - - python3.14 - description: | - Runtime environment. Required. Durable execution needs the - durable authoring API, which ships for these runtimes only; - any other runtime is rejected with 400 and the response - names the ones that work. Note that a durable Python - function needs a newer runtime than a standard one defaults - to. `GET /functions/runtimes` reports `durable_capable` per - runtime. - example: nodejs24.x - handler: - type: string - description: The name of the function to invoke. Defaults to "handler" if not specified. - default: handler - example: handler - visibility: - allOf: - - $ref: '#/components/schemas/FunctionVisibility' - description: | - Who may start an execution. Redeploying is the only way to - change it, since the collection has no update endpoint; omit - it to keep the current visibility, and a new function starts - `private`. - - The standard collection's synchronous invocation fields — - `invocation_mode`, `http_auth_mode`, `openapi_spec` — - configure a request path no durable route serves, and are - rejected with 400 rather than ignored. - is_public: - type: boolean - deprecated: true - description: | - Deprecated alias for `visibility`: `true` means `public` and - `false` means `authenticated`. Sending both with different - meanings returns 400. - variable_scope: - type: string - enum: - - all - - scoped - x-enum-varnames: - - CreateDurableFunctionMultipartBodyVariableScopeAll - - CreateDurableFunctionMultipartBodyVariableScopeScoped - description: | - Which project variables this function receives. `all` (the default) gives it every project variable; `scoped` gives it only the variables it selects. Omitting this leaves an existing function's scope unchanged. - variables: - type: string - description: | - JSON-encoded array of project variable names this function requires, on top of the ones detected in its source. A declared name the project does not define is rejected with 400; a detected name it does not define is ignored. Only used when `variable_scope` is `scoped`. Omitting this leaves an existing function's declared names unchanged. + $ref: '#/components/schemas/UpdateProjectGitDeploySettingsRequest' responses: '200': - description: Existing durable function updated; its deployment was started or queued + description: The project's updated Git auto-deploy settings content: application/json: schema: - $ref: '#/components/schemas/DurableFunction' - '201': - description: Durable function created and deployment workflow started + $ref: '#/components/schemas/ProjectGitDeploySettings' + '400': + description: | + Malformed request body, frontend_app_root without frontend_name, or + apply_migrations set to true where database migrations are not + available (code `feature_unavailable`) content: application/json: schema: - $ref: '#/components/schemas/DurableFunction' - '400': - description: | - Bad request (invalid archive, unsupported runtime, invalid name, an - unknown `visibility`, `visibility` and `is_public` disagree, or a - project region that does not offer durable execution — a durable - function deploys to every region of its project) + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Durable function limit exceeded for the project + description: Project not owned by the caller content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: | - Name is held by a standard function, or a deletion is queued or - running. The request is refused before the deploy starts, so - nothing is deployed. + '404': + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Internal server error (function deployment failed) + '409': + description: | + A Git source transition is pending, or this change would remove + deploy coverage after Git has taken over content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: | - Durable deploys are paused platform-wide. The same request succeeds - once they are re-enabled; executions already running are unaffected. + '500': + description: Failed to update project git deploy settings content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/durable-functions/{functionId}: + /projects/{id}/git-deployment-runs: get: tags: - - Durable Functions - summary: Get durable function by ID or name - operationId: getDurableFunction + - Projects + - Git Connections + summary: List a project's Git deployment runs + description: | + Lists the deployment runs Git auto deploy recorded for the project, + newest push first. Each push to the production branch records one run, + which says whether the push deployed and, when it failed or was + skipped, why. + + A run that applied migrations names the migration run it started on + each database. Get one at + `GET /projects/{id}/databases/{databaseName}/migration-runs/{runId}` + for its files. + + Project access tokens can list runs, including read-only ones. + operationId: listGitDeploymentRuns security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/IssueCursor' + - name: status + in: query + required: false + description: Return only runs in this status. + schema: + $ref: '#/components/schemas/GitDeploymentRunStatus' + - name: branch + in: query + required: false + description: Return only runs for pushes to this branch. + schema: + type: string + minLength: 1 + maxLength: 255 responses: '200': description: Successful response content: application/json: schema: - $ref: '#/components/schemas/DurableFunction' - '404': - description: Durable function not found + $ref: '#/components/schemas/PaginatedGitDeploymentRuns' + '400': + description: A filter or the cursor is invalid content: application/json: schema: $ref: '#/components/schemas/Error' - delete: - tags: - - Durable Functions - summary: Delete a durable function - description: | - Accepted for asynchronous teardown; the work continues after the - response. The function's executions go with it: executions still in - flight are stopped, and history stops being readable whatever - `retention_days` had left. - - Stopping is asynchronous at the platform, and it does not interrupt a - step already running -- that step runs to its next checkpoint. So a - delete ends an execution rather than halting it mid-step; stop the - execution yourself first if you need to observe it ending. - operationId: deleteDurableFunction - security: - - UserToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' - responses: - '202': - description: Deletion accepted and teardown started - '404': - description: | - Durable function not found. Also returned for an id that names a - durable function in another project, so the response cannot be used - to tell the two apart. + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/durable-functions/{functionId}/deployments: - get: - tags: - - Durable Functions - summary: List durable function deployments - operationId: listDurableFunctionDeployments - security: - - UserToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - responses: - '200': - description: Successful response + '403': + description: Project not owned by the caller content: application/json: schema: - $ref: '#/components/schemas/PaginatedFunctionDeployments' + $ref: '#/components/schemas/Error' '404': - description: Durable function not found + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/durable-functions/{functionId}/schedulers: + /projects/{id}/git-deployment-runs/{runId}: get: tags: - - Durable Functions - summary: List schedulers for a durable function + - Projects + - Git Connections + summary: Get a Git deployment run description: | - The durable collection's counterpart to - `/projects/{id}/functions/{functionId}/schedulers`. A standard - function's id is not accepted here, and a durable function's id is not - accepted there. - operationId: listDurableFunctionSchedulers + Returns one deployment run: the commit it deployed, its status, the + migration runs it started, and why it failed or was skipped. + + Project access tokens can read runs, including read-only ones. + operationId: getGitDeploymentRun security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' + - name: runId + in: path + required: true + description: Deployment run ID + schema: + type: string + format: uuid responses: '200': - description: Durable function schedulers + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/FunctionSchedulerListResponse' - '404': - description: Durable function not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - tags: - - Durable Functions - summary: Create a scheduler for a durable function - description: | - Each tick starts an execution rather than invoking the function, under - an execution name derived from the run, so a retried tick resolves to - the execution it already started. Requested regions must be a subset of - the function's deployed regions. - - A tick draws on the same durable allowances and concurrency cap a - manual start does, and a tick that would exceed the cap fails that run. - operationId: createDurableFunctionScheduler - security: - - UserToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateFunctionSchedulerRequest' - responses: - '201': - description: Scheduler created - content: - application/json: - schema: - $ref: '#/components/schemas/FunctionScheduler' - '400': - description: | - Invalid schedule, geofenced region, a scheduler of this name - already exists on the function, or the function is not active. + $ref: '#/components/schemas/GitDeploymentRun' + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: | - Schedulers are not available on this plan, or the project already - holds as many as the plan allows. The cap counts standard and - durable function schedulers together. + description: Project not owned by the caller content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Durable function not found + description: Project or run not found content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/durable-functions/{functionId}/schedulers/{schedulerId}: + /projects/{id}/databases/{databaseName}/queries: get: tags: - - Durable Functions - summary: Get a durable function scheduler - operationId: getDurableFunctionScheduler + - Databases + summary: Get database queries + description: | + Returns the database's current top queries from pg_stat_statements + ranked by total execution time. Only data statements (SELECT, INSERT, + UPDATE, DELETE, MERGE) are listed; statements Volcano runs to operate + the database are left out. + + **SUPERAGENT plan required.** This endpoint is only available to projects owned + by users on the SUPERAGENT billing plan. + operationId: getProjectDatabaseQueries security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' - - $ref: '#/components/parameters/SchedulerId' + - $ref: '#/components/parameters/DatabaseName' + - name: limit + in: query + description: Maximum number of queries to return. + schema: + type: integer + minimum: 1 + maximum: 100 + default: 10 responses: '200': - description: Durable function scheduler + description: Database query performance retrieved content: application/json: schema: - $ref: '#/components/schemas/FunctionScheduler' - '404': - description: Durable function or scheduler not found + $ref: '#/components/schemas/DatabaseQueryPerformanceResponse' + '400': + description: Bad request - invalid query parameters content: application/json: schema: $ref: '#/components/schemas/Error' - patch: - tags: - - Durable Functions - summary: Update a durable function scheduler - operationId: updateDurableFunctionScheduler - security: - - UserToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' - - $ref: '#/components/parameters/SchedulerId' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateFunctionSchedulerRequest' - responses: - '200': - description: Scheduler updated + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: - $ref: '#/components/schemas/FunctionScheduler' - '400': - description: | - Invalid schedule, geofenced region, or a scheduler of this name - already exists on the function. + $ref: '#/components/schemas/Error' + '403': + description: Access denied content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Durable function or scheduler not found + description: Project or database not found content: application/json: schema: $ref: '#/components/schemas/Error' - delete: - tags: - - Durable Functions - summary: Delete a durable function scheduler - operationId: deleteDurableFunctionScheduler - security: - - UserToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' - - $ref: '#/components/parameters/SchedulerId' - responses: - '204': - description: Scheduler deleted - '404': - description: Durable function or scheduler not found + '500': + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/durable-functions/{functionId}/executions: - post: + /deployments: + get: tags: - - Durable Functions - summary: Start a durable execution + - Projects + summary: List deployments across a user's projects description: | - Starts an execution and returns its handle. Never returns a result: an - execution can outlive any request a client could hold open, so the - result is read back from - `GET /projects/{id}/durable-functions/{functionId}/executions/{executionId}`. + Lists Function and Frontend deployment attempts across every project the + user owns, newest first. Pass `project_id` to narrow the feed to a single + project. - The request body is the execution's input and must be valid JSON if - present. An empty body starts the execution with no input. + Scope is project **ownership** (`projects.user_id`). `owner_id` names + whose deployments to return, not who started them — the actor is + `initiated_by_user_id`, which this endpoint does not filter on. - Send `X-Volcano-Execution-Name` to make the start idempotent: repeating a - start with the same name returns the existing execution instead of - beginning a second one. + With a user token the scope is always the authenticated user: `owner_id` + may be omitted, or set to that same user, but naming anyone else is + refused with 403. Service callers on the management API must pass it, + since they have no authenticated user. - Each execution counts against the project's durable execution - allowance, the operations it performs count against the durable - operations allowance when it finishes, and the number of executions in - flight at once is capped by the plan. - operationId: startDurableExecution + The owner is not checked for existence: an id with no projects returns an + empty page rather than `404`. Unlike `/users/{id}/usage`, this endpoint is + polled to detect an event, so a caller needs `404` to keep meaning "this + route is not served here" — which is how a consumer notices it is running + against an older release. A mistyped owner therefore reads as "nothing + deployed"; callers that need to tell those apart should verify the user + through `GET /users/{id}` first. + + Ordering is selectable. The default is the feed order — most recent + attempt first. `completed_at.asc` orders by completion, oldest first, and + considers only attempts that finished; combined with `limit=1` and a + `status` filter it answers "when did this user first succeed" in one + bounded query. + + Both pagination modes are supported, selected exactly as + `/projects/{id}/deployments` selects them: `cursor`/`ending_before` (or a + `limit` with no `page`) uses keyset pagination; otherwise `page`/`limit` + offset pagination. `page` with a cursor, and `cursor` with + `ending_before`, are rejected. + + A cursor is bound to every filter *and* to `order`, so changing any of + them mid-pagination rejects the cursor rather than silently skipping or + repeating rows. The keyset position is `(created_at, id)` for + `created_at.desc` and `(completed_at, id)` for `completed_at.asc`. + operationId: listDeployments security: - UserToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' - - name: X-Volcano-Execution-Name - in: header + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/EndingBefore' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/DeploymentOwnerId' + - name: project_id + in: query required: false - description: | - Idempotency key for this execution. Generated when omitted. A repeat - under a name that already names a running execution returns that - execution and is not charged again. - - Letters, digits, `-`, `_` and `.`, up to 255 characters. Anything - else is rejected with `400`. + description: Restrict the feed to a single project owned by the user. schema: type: string - maxLength: 255 - pattern: ^[A-Za-z0-9._-]+$ - requestBody: - required: false - content: - application/json: - schema: - description: Input passed to the function, up to 256 KiB. + format: uuid + - name: created_after + in: query + required: false + description: Restrict results to attempts created at or after this timestamp. + schema: + type: string + format: date-time + - $ref: '#/components/parameters/DeploymentResourceType' + - $ref: '#/components/parameters/DeploymentStatus' + - $ref: '#/components/parameters/DeploymentOperation' + - $ref: '#/components/parameters/DeploymentOrder' responses: - '202': - description: Execution accepted and started + '200': + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/DurableExecution' + $ref: '#/components/schemas/PaginatedProjectDeployments' '400': - description: Payload is not valid JSON, or the execution name is invalid + description: Bad request - invalid filter or pagination content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Durable function not found + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: | - Function is not deployed yet, or has no deployed region. Also - returned when two starts under the same execution name raced and - both released it, which is retryable as it stands. + '403': + description: Forbidden - owner_id names a different user content: application/json: schema: $ref: '#/components/schemas/Error' - '413': - description: Payload exceeds the maximum execution input size - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '429': - description: | - Too many executions already in flight for this project, or the - account is out of one of its billing-cycle durable allowances: - executions, operations, or compute. An owner-started execution is - metered exactly like an application-started one. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '503': - description: | - Durable execution is not available in this environment, or the - plan terms for the start could not be read. The first means the - capability is paused or this deployment cannot serve it, so it is - not one to retry in a loop; the second is transient. + '500': + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' + /projects/{id}/deployments: get: tags: - - Durable Functions - summary: List a durable function's executions + - Projects + summary: List deployments in a project description: | - Returns the platform's last observed status for each execution; listing - does not poll each one. Fetch a single execution for its live state. - operationId: listDurableExecutions + Lists Function and Frontend deployment attempts across the project, + ordered most-recent first. Each item includes a normalized resource + reference so clients can render both resource types without extra + fetches. + + Standard and durable function deployments both appear under + `resource.type: function`, and `resource.kind` tells them apart. Pass + `function_kind` to list one kind only; frontends are then excluded. + Combining `function_kind` with `resource_type=frontend` is rejected. + operationId: listProjectDeployments security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/Limit' - - name: status + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/EndingBefore' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Search' + - name: created_after in: query required: false - description: Return only executions in this status. + description: Restrict results to attempts created at or after this timestamp. schema: - $ref: '#/components/schemas/DurableExecutionStatus' + type: string + format: date-time + - name: resource_type + in: query + required: false + description: | + Restrict the feed to a single resource type. Omit to return both + Function and Frontend deployments. + schema: + type: string + enum: + - function + - frontend + - $ref: '#/components/parameters/FunctionKindFilter' responses: '200': description: Successful response content: application/json: schema: - $ref: '#/components/schemas/PaginatedDurableExecutions' + $ref: '#/components/schemas/PaginatedProjectDeployments' '400': - description: Unsupported status filter + description: Bad request - invalid identifier or filter, or `function_kind` combined with `resource_type=frontend` content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Durable function not found + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/durable-functions/{functionId}/executions/{executionId}: + '403': + description: Forbidden - project ownership required + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/deployments/summary: get: tags: - - Durable Functions - summary: Get a durable execution + - Projects + summary: Summarize deployments in a project description: | - Returns the execution's current state, including its `result` once it has - succeeded. Poll this to wait for an execution to finish. - operationId: getDurableExecution + Summarizes deployment attempts for one comparable resource pipeline. + Success rate uses conclusive outcomes only: active and deleted attempts + are successful; failed and degraded attempts are failures; in-progress + and superseded attempts are excluded. Median build duration includes + completed, non-superseded attempts with recorded build work, + including failed builds. + + With `resource_type=function`, pass `function_kind` to summarize one + kind of function only. It is rejected with `resource_type=frontend`. + operationId: summarizeProjectDeployments security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' - - $ref: '#/components/parameters/DurableExecutionId' + - name: search + in: query + required: false + description: Restrict the summary to resource names containing this value. + schema: + type: string + - name: resource_type + in: query + required: true + description: Restrict the summary to one comparable deployment pipeline. + schema: + type: string + enum: + - function + - frontend + - $ref: '#/components/parameters/FunctionKindFilter' + - name: created_after + in: query + required: false + description: Restrict results to attempts created at or after this timestamp. + schema: + type: string + format: date-time responses: '200': description: Successful response content: application/json: schema: - $ref: '#/components/schemas/DurableExecution' - '404': - description: Durable function or execution not found + $ref: '#/components/schemas/ProjectDeploymentSummary' + '400': + description: Bad request - invalid identifier or filter, or `function_kind` combined with `resource_type=frontend` content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: | - Durable execution is not available in this environment. Either the - capability is paused or this deployment cannot serve it, so the - request is not one to retry in a loop. + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/durable-functions/{functionId}/executions/{executionId}/operations: + '403': + description: Forbidden - project ownership required + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/domains: get: tags: - - Durable Functions - summary: List a durable execution's operations + - Frontends + summary: List all custom domains in a project description: | - Returns the execution's trace: every operation it began — each step, - wait, poll, child context, map item and parallel branch — with when it - started and ended, how it ended, and each attempt of a retried step. - `invocations` are the windows the function's code was actually running; - the gaps between them are time the execution spent suspended, which is - not charged. - - A finished execution's trace is final and `complete` is `true`. A - running one is refreshed when it is read, and can be up to about ten - seconds behind; `synced_at` says when it was last refreshed. Inputs, - results and other payloads are never included. - - The list is not paginated: an execution is limited to 3,000 - operations, and a trace is read whole. - operationId: listDurableExecutionOperations + Project-scoped custom-domain list. Returns every active custom + domain across every frontend in the project (excludes soft-deleted + rows). Each item inlines the linked frontend's id and name so the + UI does not need a second fetch to render the "Linked to" column. + operationId: listProjectCustomDomains security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' - - $ref: '#/components/parameters/DurableExecutionId' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/EndingBefore' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Search' responses: '200': description: Successful response content: application/json: schema: - $ref: '#/components/schemas/DurableExecutionOperationList' - '404': - description: Durable function or execution not found + $ref: '#/components/schemas/PaginatedProjectCustomDomains' + '400': + description: Bad request - invalid identifier content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: The trace could not be read + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: | - Durable execution is not available in this environment. Either the - capability is paused or this deployment cannot serve it, so the - request is not one to retry in a loop. + '403': + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/durable-functions/{functionId}/executions/{executionId}/stop: - post: + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/functions: + get: tags: - - Durable Functions - summary: Stop a durable execution + - Functions + summary: List all functions in a project description: | - Cancels a running execution. Its completed steps are not undone. - - The call is accepted rather than awaited: cancellation happens behind - it, so the response reports the execution as it was read back and may - still say `running`. Do not branch on that status — the execution - settles into `stopped` shortly after, and polling - `GET /projects/{id}/durable-functions/{functionId}/executions/{executionId}` - is how you see it get there. - - Stopping an execution that already finished is not an error: the - response carries the state it settled in. - operationId: stopDurableExecution + Supports two mutually exclusive pagination modes. Offset mode uses `page` + and `limit` and returns `next` (URL). Cursor mode uses `cursor` and + `limit`, supports `search` (case-insensitive name match), and returns + `next_cursor`/`prev_cursor`. Sending both `page` and `cursor` (or `page` + and `search`) returns 400. + operationId: listFunctions security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' - - $ref: '#/components/parameters/DurableExecutionId' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/EndingBefore' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Search' responses: '200': - description: | - Stop accepted. The body is the execution as it was read back, which - may still report `running`. + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/DurableExecution' + $ref: '#/components/schemas/PaginatedFunctions' '404': - description: Durable function or execution not found + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: Execution has not started yet - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '503': - description: | - Durable execution is not available in this environment. Either the - capability is paused or this deployment cannot serve it, so the - request is not one to retry in a loop. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /projects/{id}/durable-functions/{functionId}/executions/{executionId}/messages: post: tags: - - Durable Functions - summary: Send a message to a durable execution + - Functions + summary: Create or update function code description: | - Sends a named message to a running execution, as - `POST /durable-functions/{functionId}/executions/{executionId}/messages` - does for an application. The workflow receives it from - `ctx.waitForMessage` with the same name; until then it is kept, and - waits take messages oldest first. - - Project access tokens can send messages, but read-only ones cannot. - A message never decides an approval. - operationId: sendDurableMessage + Upload a function source bundle. Direct API clients may send the function code + as a ZIP or tar.gz archive via multipart/form-data. The API stores a normalized tar.gz + source archive. + Cloud deploys should include source files and dependency manifests/lockfiles, not installed + dependency directories. Volcano installs Node.js, Python, and Ruby dependencies during the + function compile build. + Source archive size is enforced by the API with `SOURCE_ARCHIVE_SIZE_LIMIT_MB`; the CLI + does not apply its own source archive size limit. After the final container image is + built, the publish build enforces `LAMBDA_TARGET_CONTAINER_SIZE_LIMIT_MB` before pushing. + Uploaded source archives cannot contain symlink entries. Safe symlinks created during + the cloud build are materialized before publish. + Volcano builds and deploys the function asynchronously after upload. A deployment that starts + immediately returns a Function resource with `status: provisioning`, then transitions to + `active` or `failed`. If another deployment is running, the response preserves the resource's + current status and exposes the queued deployment through `pending_deployment_id`. + Existing function traffic continues to use the last known-good runtime during an update. A failed + update keeps that runtime available and records the attempted deployment as failed. + Only one deployment runs for a given function. A newer request supersedes any queued request + and starts after the running deployment. Different functions and projects deploy concurrently. + If a function with the same name already exists in the project, this operation updates that + function's runtime, handler, and source bundle and returns `200 OK`. + Each project can contain up to 10,000 functions. Creating a new function over this cap returns 403. + operationId: createFunction security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' - - $ref: '#/components/parameters/DurableExecutionId' - - $ref: '#/components/parameters/DurableMessageIdempotencyKey' requestBody: required: true content: - application/json: + multipart/form-data: schema: - $ref: '#/components/schemas/SendDurableMessageRequest' + type: object + required: + - name + - code + - runtime + properties: + name: + type: string + description: DNS-safe function name (lowercase letters, numbers, hyphens; cannot start or end with hyphen) + maxLength: 63 + pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ + example: my-api-function + code: + type: string + format: binary + description: ZIP or tar.gz archive containing function source code plus dependency manifests/lockfiles. The API enforces SOURCE_ARCHIVE_SIZE_LIMIT_MB and stores a normalized tar.gz source archive. + runtime: + type: string + enum: + - nodejs22.x + - nodejs24.x + - python3.10 + - python3.11 + - python3.12 + - python3.13 + - python3.14 + - ruby3.3 + - ruby3.4 + - ruby4.0 + description: | + Runtime environment. Required. + - Node.js: nodejs22.x, nodejs24.x + - Python: python3.10, python3.11, python3.12, python3.13, python3.14 + - Ruby: ruby3.3, ruby3.4, ruby4.0 + + python3.10 is deprecated: it still deploys, and Volcano will remove it before 2027-08-31. + example: nodejs24.x + handler: + type: string + description: | + The name of the function to invoke. Defaults to "handler" if not specified. + Your code must export/define a function with this name: + - Node.js: exports.handler (in index.js, index.mjs or index.cjs, or in TypeScript in index.ts, index.mts, index.cts or index.tsx, which the build compiles without type-checking) + - Python: def handler() (in main.py) + - Ruby: def handler() (in main.rb) + default: handler + example: handler + visibility: + allOf: + - $ref: '#/components/schemas/FunctionVisibility' + description: | + Who can invoke the function. Omit it to keep the function's + current visibility; a new function starts `private`. + is_public: + type: boolean + deprecated: true + description: | + Deprecated alias for `visibility`: `true` means `public` and + `false` means `authenticated`. Sending both with different + meanings returns 400. + invocation_mode: + $ref: '#/components/schemas/FunctionInvocationMode' + http_auth_mode: + $ref: '#/components/schemas/FunctionHTTPAuthMode' + openapi_spec: + type: string + description: JSON-encoded OpenAPI 3.0 or 3.1 metadata for an HTTP-mode function. + variable_scope: + type: string + enum: + - all + - scoped + x-enum-varnames: + - CreateFunctionMultipartBodyVariableScopeAll + - CreateFunctionMultipartBodyVariableScopeScoped + description: | + Which project variables this function receives. `all` (the default) gives it only project variables marked `shared: true`; `scoped` gives it only the variables it selects. Omitting this leaves an existing function's scope unchanged. + variables: + type: string + description: | + JSON-encoded array of project variable names this function requires, on top of the ones detected in its source. A declared name the project does not define is rejected with 400; a detected name it does not define is ignored. Only used when `variable_scope` is `scoped`. Omitting this leaves an existing function's declared names unchanged. + commit: + type: string + description: | + JSON-encoded commit the uploaded source came from: `{"repository": "acme/app", "sha": "<40-character commit ID>", "dirty": false}`. `repository` is `owner/name` or a github.com remote URL (`https://github.com/acme/app.git`, `git@github.com:acme/app.git`, or `ssh://git@github.com/acme/app.git`); Volcano drops any credentials in the URL and records `owner/name`. `dirty` is `true` when the uploaded files differ from the commit. All three fields are required, and fields Volcano does not know are ignored. An empty value, `null`, or `""` reports no commit. A malformed commit, or a repository not on GitHub, returns 400 before anything is deployed. Volcano records a function's commit with `commit.verified: false`; a clean commit of the project's connected repository that its production branch holds gets `commit.verification: repository`. responses: '200': - description: A message with this `Idempotency-Key` was already sent; it is returned + description: Existing function updated; its deployment was started or queued content: application/json: schema: - $ref: '#/components/schemas/DurableMessage' + $ref: '#/components/schemas/Function' '201': - description: | - Message sent. `status` is `delivered`, `delivering`, or `queued`, - as on the application route. + description: Function created and deployment workflow started content: application/json: schema: - $ref: '#/components/schemas/DurableMessage' + $ref: '#/components/schemas/Function' '400': - description: The name, data or idempotency key is invalid + description: | + Bad request (invalid file, too large, etc.), an unknown + `visibility`, `visibility` and `is_public` disagree, or a + malformed `commit` content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: The request used a `read_only` project access token + description: Function limit exceeded for the project content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Durable function or execution not found + '409': + description: | + Function deletion is queued or running, the name is already held + by a durable function — a function cannot change kind — or the + redeploy would take a function with Frontend Function routes out + of `public` or out of HTTP invocation mode. The request is refused + before the deploy starts, so nothing is deployed. The message + `project variables changed during the upload; retry` means + `NODE_PATH` was created, changed or deleted while the upload was + processed; send the same request again. content: application/json: schema: $ref: '#/components/schemas/Error' - '409': + '429': description: | - The message cannot be sent. `code` is `execution_not_running` or - `too_many_queued_messages`. + The owner's billing-cycle build-minutes allowance is spent. The + error names the allowance and carries a link to the usage page. content: application/json: schema: $ref: '#/components/schemas/Error' - '413': - description: The request body is larger than 72 KiB + '500': + description: Internal server error (function deployment failed) content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - description: Too many messages sent to this execution + '503': + description: | + Build usage could not be read, so the allowance could not be + checked. The same request succeeds once it can be. content: application/json: schema: $ref: '#/components/schemas/Error' + /projects/{id}/functions/{functionId}: get: tags: - - Durable Functions - summary: List a durable execution's messages - description: | - Lists the messages sent to and published by an execution, oldest - first. Pass the last `seq` you read as `after` to read only what came - next. - - Project access tokens can list messages, including read-only ones. - operationId: listDurableMessages + - Functions + summary: Get function by ID + operationId: getFunction security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' - - $ref: '#/components/parameters/DurableExecutionId' - - $ref: '#/components/parameters/DurableMessageDirectionFilter' - - $ref: '#/components/parameters/DurableMessageNameFilter' - - $ref: '#/components/parameters/DurableMessageAfter' - - $ref: '#/components/parameters/DurableMessageLimit' + - $ref: '#/components/parameters/FunctionId' responses: '200': description: Successful response content: application/json: schema: - $ref: '#/components/schemas/DurableMessageList' - '400': - description: A filter is invalid - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/Function' '404': - description: Durable function or execution not found + description: Function not found content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/durable-functions/{functionId}/executions/{executionId}/message-waits: - get: + patch: tags: - - Durable Functions - summary: List a durable execution's open message waits - description: | - Lists the waits an execution has open in `ctx.waitForMessage`, oldest - first, so you can see which message names it is waiting for. - - Project access tokens can list waits, including read-only ones. - operationId: listDurableMessageWaits + - Functions + summary: Update function settings + operationId: updateFunction security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableFunctionId' - - $ref: '#/components/parameters/DurableExecutionId' + - $ref: '#/components/parameters/FunctionId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateFunctionRequest' + examples: + makePublic: + summary: Let anon keys invoke the function + value: + visibility: public + allowSignedInUsers: + summary: Let signed-in users of the project invoke the function + value: + visibility: authenticated + makePrivate: + summary: Allow only service keys and schedulers (the default) + value: + visibility: private responses: '200': - description: Successful response + description: Function updated content: application/json: schema: - $ref: '#/components/schemas/DurableMessageWaitList' - '404': - description: Durable function or execution not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /durable-messages/waits: - post: - tags: - - Durable Functions - summary: Wait for a message from inside a workflow - description: | - Registers a wait for a named message. The Volcano SDK calls this from - `ctx.waitForMessage`; applications do not call it directly. - - `execution_ref` and `callback_id` are opaque values the SDK reads from - the running workflow. Together they are the request's credential, so - the operation takes no other authentication. When a message for the - name is already queued, the wait takes the oldest one at once. - - Retrying is safe: a request for a wait that is already registered - returns it with `200`. - operationId: registerDurableMessageWait - security: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterDurableMessageWaitRequest' - responses: - '200': - description: The wait was already registered - content: - application/json: - schema: - $ref: '#/components/schemas/DurableMessageWaitRegistration' - '201': - description: Wait registered - content: - application/json: - schema: - $ref: '#/components/schemas/DurableMessageWaitRegistration' - '400': - description: The request body is invalid + $ref: '#/components/schemas/Function' + '400': + description: | + Invalid settings: an unknown `visibility`, `visibility` and + `is_public` disagree, or `http_auth_mode: none` on a function that + is not `public` content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: No running durable execution matches `execution_ref` + description: Function not found content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: | - The wait cannot be registered now. `code` says why: - - - `callback_not_ready`: the workflow has not finished opening the - wait yet. Retry with a short backoff; the SDK does. - - `callback_closed`: the workflow is no longer waiting on it. - - `callback_taken`: the callback is already registered as an - approval or a messages session. - - `execution_ended`: the execution has finished. - - `too_many_message_waits`: the execution already has the maximum - number of open waits. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '413': - description: The request body is larger than 8 KiB - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '429': - description: Too many requests from this execution or address + Function settings conflict with attached Frontend Function routes: + a routed function must stay `public` and in HTTP invocation mode. content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: | - The wait could not be confirmed with the workflow right now. Retry - with backoff. + delete: + tags: + - Functions + summary: Delete a function + description: | + Schedules asynchronous function deletion. If another deployment is running, the function + preserves its current status and exposes the queued deletion through `pending_deployment_id`. + Its status changes to `deleting` when cleanup starts. After cleanup, it returns 404 and no + longer appears in function lists. + operationId: deleteFunction + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FunctionId' + responses: + '202': + description: Function deletion started or queued + '404': + description: Function not found content: application/json: schema: $ref: '#/components/schemas/Error' - /durable-messages/sessions: + /functions/{functionId}/invoke: post: tags: - - Durable Functions - summary: Open a messages session from inside a workflow + - Functions + summary: Invoke a function description: | - Opens the session a workflow publishes messages with. The Volcano SDK - calls this once per workflow context, on its first `ctx.publish`; - applications do not call it directly. + Invoke a function. The function's `visibility` decides which credentials + may call it, and the function does not run for any other. A `private` + function answers every credential but a service key exactly as a + missing one, with 404, so its name and id cannot be discovered; an anon + key on an `authenticated` function gets 403. An SDK calling by name + resolves it first through `GET /functions/resolve`, which answers that + anon key with 404 instead. - As for a wait, `execution_ref` and `callback_id` are the credential. - The session's token is delivered to the workflow itself and never - appears in a response. + **With Service Key** (admin/background operations, every visibility): + - Use for background jobs, webhooks, cron, admin operations + - Function receives payload only (no user context) + - Database queries bypass RLS (admin access) - Retrying is safe: a request for a session that is already registered - returns it with `200`. - operationId: openDurableMessageSession - security: [] + **With Auth User Token** (user-facing, `authenticated` or `public` functions): + - Use for user-initiated actions + - Includes users from anonymous sign-ins + - Function receives payload + `__volcano_auth` context: + ```javascript + { + user_id: "uuid", + email: "user@example.com", + project_id: "uuid", + role: "authenticated" or "anonymous" + } + ``` + - Database queries enforce RLS (user-scoped data) + + **With Anon Key** (`public` functions only): + - Requires anon key permission: `functions.invoke` + - Function must have `visibility: public` + - Function receives payload only (no `__volcano_auth`) + + **Reserved payload keys:** the top-level `__volcano_auth`, + `__volcano_http` and `__volcano_mount` keys are reserved. Volcano + removes caller-supplied values for all three before the function runs; + only an auth user token adds a server-built `__volcano_auth`, and only + HTTP-mode ingress sets `__volcano_http: true`. `__volcano_mount` is set + only by Volcano's first-party app mounts. + + **Transport and CORS:** + - This operation is the authenticated direct RPC endpoint and always uses the + POST `{payload: ...}` contract, including for functions whose DNS ingress is + configured in HTTP mode. + - The geo-routed DNS ingress is the function's `invoke_url`. It is on a + different domain from this API, so it cannot be derived from the API host. + - RPC-mode DNS ingress accepts POST at `/`. HTTP-mode DNS ingress accepts GET, + HEAD, POST, PUT, PATCH, and DELETE at `/` and nested paths. + - Direct and RPC-mode CORS preflight advertises `POST, OPTIONS`. HTTP-mode DNS + preflight advertises `GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS`. + - `http_auth_mode: none` applies only to public HTTP-mode DNS ingress; this + direct operation always requires a Volcano credential. + + **Durable functions are not invocable here.** A durable function's id + answers 404, whatever its visibility, because a synchronous call would + run it with no execution record, no idempotency and no concurrency + accounting. Start one with + `POST /durable-functions/{functionId}/executions`. + operationId: invokeFunction + security: + - AnonKey: [] + - ServiceRoleKey: [] + - AuthUserAccessToken: [] + parameters: + - $ref: '#/components/parameters/FunctionId' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/OpenDurableMessageSessionRequest' + $ref: '#/components/schemas/FunctionInvocationRequest' + examples: + serviceCall: + summary: Admin/background operation (service key) + value: + payload: + action: process_batch + items: + - 1 + - 2 + - 3 + userCall: + summary: User-initiated call (auth token) + value: + payload: + action: get_profile + anonCall: + summary: Public function call (anon key) + value: + payload: + action: ping_public_endpoint responses: '200': - description: The session was already registered - content: - application/json: + description: Function response (passthrough from function runtime) + headers: + X-Volcano-Version: + description: Volcano API/runtime version that served this invocation (`` in production, `-` in non-production) schema: - $ref: '#/components/schemas/DurableMessageSessionRegistration' - '201': - description: Session opened + type: string + X-Volcano-Region: + description: Region the function ran in (for example `us-east-1`) + schema: + type: string + X-Volcano-Proxy-Ms: + description: Milliseconds Volcano spent preparing the invocation, counted from the request arriving until the function was dispatched. Present only when the function was invoked. Does not include function execution. + schema: + type: integer + minimum: 0 + X-Volcano-Proxy-Handler-Ms: + description: The part of `X-Volcano-Proxy-Ms` spent in the invoke endpoint itself. Subtract it from `X-Volcano-Proxy-Ms` to see what authentication and request validation cost. Present only when the function was invoked. + schema: + type: integer + minimum: 0 + X-Volcano-Compute-Ms: + description: Milliseconds spent running the function, from dispatch until it returned. Present only when the function was invoked. Does not include proxy preparation. + schema: + type: integer + minimum: 0 content: application/json: schema: - $ref: '#/components/schemas/DurableMessageSessionRegistration' + $ref: '#/components/schemas/FunctionInvocationResponse' '400': - description: The request body is invalid + description: Bad request - invalid payload or function in failed state content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: No running durable execution matches `execution_ref` + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - '409': + '403': description: | - The session cannot be opened now. `code` is `callback_not_ready`, - `callback_closed`, `callback_taken` (the callback is already - registered as an approval or a message wait), `execution_ended`, - or `too_many_message_sessions`. + Forbidden - CORS blocked, missing `functions.invoke`, or an anon key + on an `authenticated` function content: application/json: schema: $ref: '#/components/schemas/Error' - '413': - description: The request body is larger than 8 KiB + '404': + description: | + Function not found. Also returned for a `private` function to any + credential but a service key. content: application/json: schema: $ref: '#/components/schemas/Error' '429': - description: Too many requests from this execution or address + description: | + Rate limit exceeded (per-function or project-wide limit), or the + owning platform user's billing-cycle bandwidth allowance (aggregate ingress + + egress) was exceeded. content: application/json: schema: $ref: '#/components/schemas/Error' '503': description: | - The session could not be confirmed with the workflow right now. - Retry with backoff. + Function still provisioning or rate limiting service unavailable. + A freshly deployed (or updated) function may briefly report + `provisioning` and reject invocations until the background status + reconciler observes its deployment workflow completing and transitions + it to `active`. This is expected for a few seconds after deploy; clients + should retry. content: application/json: schema: $ref: '#/components/schemas/Error' - /durable-messages/publish: - post: - tags: - - Durable Functions - summary: Publish a message from inside a workflow - description: | - Publishes a named message from a running workflow. The Volcano SDK - calls this from `ctx.publish`; applications do not call it directly. - - The message is stored, listed with the execution's messages, and - delivered live to clients subscribed to the execution. Live delivery - counts against the project's Realtime messages. - - The SDK sends an `Idempotency-Key` that a rerun of the publishing step - repeats, so a step that runs again returns the first message with - `200` and publishes nothing. - operationId: publishDurableMessage - security: [] - parameters: - - name: X-Volcano-Durable-Session - in: header - required: true - description: The session token the workflow received when its session opened. - schema: - type: string - minLength: 1 - maxLength: 128 - - $ref: '#/components/parameters/DurableMessageIdempotencyKey' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PublishDurableMessageRequest' - responses: - '200': - description: A message with this `Idempotency-Key` was already published; it is returned - content: - application/json: + default: + description: Function response (passthrough; status code/body/headers come from the function) + headers: + X-Volcano-Version: + description: Volcano API/runtime version that served this invocation (`` in production, `-` in non-production) schema: - $ref: '#/components/schemas/DurableMessage' - '201': - description: Message published - content: - application/json: + type: string + X-Volcano-Region: + description: Region the function ran in (for example `us-east-1`) schema: - $ref: '#/components/schemas/DurableMessage' - '400': - description: The session token header is missing, or the name, data or idempotency key is invalid - content: - application/json: + type: string + X-Volcano-Proxy-Ms: + description: Milliseconds Volcano spent preparing the invocation, counted from the request arriving until the function was dispatched. Present only when the function was invoked. Does not include function execution. schema: - $ref: '#/components/schemas/Error' - '401': - description: The session token is not valid - content: - application/json: + type: integer + minimum: 0 + X-Volcano-Proxy-Handler-Ms: + description: The part of `X-Volcano-Proxy-Ms` spent in the invoke endpoint itself. Subtract it from `X-Volcano-Proxy-Ms` to see what authentication and request validation cost. Present only when the function was invoked. schema: - $ref: '#/components/schemas/Error' - '409': - description: | - The message cannot be published. `code` is - `execution_not_running` or `too_many_published_messages`. - content: - application/json: + type: integer + minimum: 0 + X-Volcano-Compute-Ms: + description: Milliseconds spent running the function, from dispatch until it returned. Present only when the function was invoked. Does not include proxy preparation. schema: - $ref: '#/components/schemas/Error' - '413': - description: The request body is larger than 72 KiB + type: integer + minimum: 0 content: application/json: schema: - $ref: '#/components/schemas/Error' - /durable-approvals: + $ref: '#/components/schemas/FunctionInvocationResponse' + /durable-functions/{functionId}/executions: post: tags: - Durable Functions - summary: Request an approval from inside a workflow + summary: Start a durable execution from an application description: | - Registers an approval request for a running durable execution. The - Volcano SDK calls this from `ctx.waitForApproval`; applications do not - call it directly. + Starts an execution of a durable function using an application + credential, and returns its handle. - `execution_ref` and `callback_id` are opaque values the SDK reads from - the running workflow. Together they are the request's credential, so - the operation takes no other authentication. The approval belongs to - the project that owns the execution, and expires when the workflow's - own approval timeout does. + This is the durable counterpart of `POST /functions/{functionId}/invoke`, + and it is the endpoint an application calls. Like that one, it is not + project-scoped: an anon key, a service key and an auth user token each + carry their own project. The project-scoped collection under + `/projects/{id}/durable-functions/...` remains the owner's management + surface. - Retrying is safe: a request for an approval that is already registered - returns it with `200`. - operationId: requestDurableApproval - security: [] + **With a service key:** any durable function in the project. + + **With an auth user token:** a durable function whose `visibility` is + `authenticated` or `public`. + + **With an anon key:** requires the `functions.invoke` permission, and + the function must have `visibility: public`. + + A `private` durable function answers every credential but a service key + exactly as a missing one, with 404. + + The start returns a `client_token`. An anon key, a service key scoped + to a list without `*`, or a user who did not start the execution, + sends it as `X-Volcano-Client-Token` to read the execution, stop it, + and reach its messages. An anon key is shared by everyone who loads + the page, so the id alone never reaches an + execution. Listing executions takes the project owner's token or a + project access token. + + Send `X-Volcano-Execution-Name` to make the start idempotent: repeating + a start with the same name returns the existing execution instead of + beginning a second one. + + Each execution counts once against the project's durable execution + allowance, however many times the start is retried under the same + execution name, and the number in flight at once is capped by the plan. + The operations the execution performs are counted against the durable + operations allowance when it finishes. + operationId: startDurableExecutionFromApplication + security: + - AnonKey: [] + - ServiceRoleKey: [] + - AuthUserAccessToken: [] + parameters: + - $ref: '#/components/parameters/DurableFunctionId' + - name: X-Volcano-Execution-Name + in: header + required: false + description: | + Idempotency key for this execution. Generated when omitted. A repeat + under a name that already names a running execution returns that + execution and is not charged again. + + Letters, digits, `-`, `_` and `.`, up to 255 characters. Anything + else is rejected with `400`. + schema: + type: string + maxLength: 255 + pattern: ^[A-Za-z0-9._-]+$ requestBody: - required: true + required: false content: application/json: schema: - $ref: '#/components/schemas/RequestDurableApprovalRequest' + description: Input passed to the function, up to 256 KiB. responses: - '200': - description: The approval was already registered + '202': + description: Execution accepted and started content: application/json: schema: - $ref: '#/components/schemas/DurableApprovalRegistration' - '201': - description: Approval registered + $ref: '#/components/schemas/DurableExecution' + '400': + description: Payload is not valid JSON, or the execution name is invalid content: application/json: schema: - $ref: '#/components/schemas/DurableApprovalRegistration' - '400': - description: The request body is invalid + $ref: '#/components/schemas/Error' + '401': + description: | + Missing or invalid credential. Also returned for a platform user + token, which is not an application credential; project owners start + executions through the project-scoped collection. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: | + The anon key lacks `functions.invoke` or the function is + `authenticated`, or the request's origin is refused by the project's + CORS policy. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: No running durable execution matches `execution_ref` + description: | + Durable function not found. Also returned for a standard function's + id, for a durable function in another project, and for a `private` + one to any credential but a service key, so the response cannot be + used to tell those apart. content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: | - The approval cannot be registered now. `code` says why: - - - `approval_not_ready`: the workflow has not finished opening the - approval yet. Retry with a short backoff; the SDK does. - - `approval_closed`: the workflow is no longer waiting on it. - - `callback_taken`: the callback is already registered as a - message wait or a messages session. - - `execution_ended`: the execution has finished. - - `too_many_pending_approvals`: the execution already has the - maximum number of pending approvals. + Function is not deployed yet, or has no deployed region. Also + returned when two starts under the same execution name raced and + both released it, which is retryable as it stands, and with `code` + `execution_name_held` when an unfinished start this caller may not + resume holds the execution name, which needs a name of its own. content: application/json: schema: $ref: '#/components/schemas/Error' '413': - description: The request body is larger than 64 KiB + description: Payload is larger than 256 KiB content: application/json: schema: $ref: '#/components/schemas/Error' '429': - description: Too many approval requests from this execution or address + description: | + The project has too many executions in flight for its plan, the + function invocation rate limit was exceeded, the project is over + its bandwidth cap, or the account is out of one of its + billing-cycle durable allowances: executions, operations, or + compute. Operations and compute are counted once an execution + finishes, so a refusal on either never interrupts an execution + already running — it declines the next start. content: application/json: schema: $ref: '#/components/schemas/Error' '503': description: | - The approval could not be confirmed with the workflow right now. - Retry with backoff. + Durable execution is not available in this environment, or the + plan terms for the start could not be read. The first means the + capability is paused or this deployment cannot serve it, so it is + not one to retry in a loop; the second is transient. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/issues: + /durable-functions/{functionId}/executions/{executionId}: get: tags: - - Issues - summary: List issues + - Durable Functions + summary: Get a durable execution from an application description: | - Lists the project's issues, most recently seen first. An issue groups - the runtime errors one function or frontend raised with the same error - type and stack, or the same message when there is no stack. + Returns the execution's current state with the credential that started + it, including its `result` once it has succeeded. Poll this to wait for + an execution to finish. - Project access tokens can list issues, including read-only ones. - operationId: listIssues + **With a service key:** any execution in the project when the key holds + `*`, the default. A key scoped to a list without `*` reaches an + execution whose `X-Volcano-Client-Token` the request carries, as an + anon key does; the start returns that token. + + **With an auth user token:** an execution the user started, or one + whose `X-Volcano-Client-Token` the request carries, of a durable + function whose `visibility` is `authenticated` or `public`. + + **With an anon key:** an execution whose `X-Volcano-Client-Token` the + request carries, of a function with `visibility: public`. + + Only a service key holding `*` reaches an execution that is still + `pending`. Any other execution answers `404`, as a missing one does. + + The response is the one `GET + /projects/{id}/durable-functions/{functionId}/executions/{executionId}` + returns. It never carries `client_token`. + operationId: getDurableExecutionFromApplication security: - - UserToken: [] - - ProjectAccessToken: [] + - AnonKey: [] + - ServiceRoleKey: [] + - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/IssueCursor' - - name: status - in: query - required: false - description: Return only issues in this status. - schema: - $ref: '#/components/schemas/IssueStatus' - - name: resource_id - in: query - required: false - description: Return only issues raised by this function or frontend. - schema: - type: string - format: uuid + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/DurableExecutionId' + - $ref: '#/components/parameters/DurableClientToken' responses: '200': description: Successful response content: application/json: schema: - $ref: '#/components/schemas/PaginatedIssues' - '400': - description: A filter or the cursor is invalid + $ref: '#/components/schemas/DurableExecution' + '401': + description: Missing or invalid credential + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: | + The anon key lacks `functions.invoke`, the service key is scoped + without it, or the function is `authenticated` and the request + carries an anon key. Also returned when the request's origin is + refused by the project's CORS policy. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found. Code `feature_unavailable` means issues are not available in this environment. + description: | + Durable function or execution not found, or the credential cannot + reach the execution. A `private` function answers every credential + but a service key this way. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/issues/{issueId}: - get: - tags: - - Issues - summary: Get an issue - description: | - Returns one issue: the resource that raised it, how often and when it - was seen, and its status. - - Project access tokens can read issues, including read-only ones. - operationId: getIssue - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/IssueId' - responses: - '200': - description: Successful response + '429': + description: | + The function's or the project's function rate limit, which reads + share with invocations and starts, or the project is over its + bandwidth cap. content: application/json: schema: - $ref: '#/components/schemas/Issue' - '404': - description: Issue not found. Code `feature_unavailable` means issues are not available in this environment. + $ref: '#/components/schemas/Error' + '503': + description: | + Durable execution is not available in this environment, the plan + terms for the request could not be read, or reads of the + execution's state in its region are throttled. The first is not one + to retry in a loop; the others are transient, and a throttled read + carries `Retry-After`. + headers: + Retry-After: + description: | + Seconds to wait before reading again. Sent only when reads in + the execution's region are throttled. + schema: + type: integer content: application/json: schema: $ref: '#/components/schemas/Error' - patch: + /durable-functions/{functionId}/executions/{executionId}/stop: + post: tags: - - Issues - summary: Update an issue + - Durable Functions + summary: Stop a durable execution from an application description: | - Sets an issue's status. A resolved issue that is seen again after it - was resolved reopens, and `regressed_at` records when. An ignored issue - stays ignored while it keeps being counted. + Cancels a running execution with the credential that started it. Its + completed steps are not undone. - Setting the status an issue already has is safe to repeat. - operationId: updateIssue + Access follows the same rules as reading the execution. + + The call is accepted rather than awaited: the response reports the + execution as it was read back and may still say `running`. Poll + `GET /durable-functions/{functionId}/executions/{executionId}` to see + it settle into `stopped`. + + Stopping an execution that already finished is not an error: the + response carries the state it settled in. + operationId: stopDurableExecutionFromApplication security: - - UserToken: [] - - ProjectAccessToken: [] + - AnonKey: [] + - ServiceRoleKey: [] + - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/IssueId' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateIssueRequest' + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/DurableExecutionId' + - $ref: '#/components/parameters/DurableClientToken' responses: '200': - description: Updated + description: | + Stop accepted. The body is the execution as it was read back, which + may still report `running`. content: application/json: schema: - $ref: '#/components/schemas/Issue' - '400': - description: The request body is invalid + $ref: '#/components/schemas/DurableExecution' + '401': + description: Missing or invalid credential content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Issue not found. Code `feature_unavailable` means issues are not available in this environment. + '403': + description: | + The anon key lacks `functions.invoke`, the service key is scoped + without it, or the function is `authenticated` and the request + carries an anon key. Also returned when the request's origin is + refused by the project's CORS policy. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/autofix: - get: - tags: - - Autofix - summary: Get autofix settings - description: | - Returns whether Volcano diagnoses the project's issues with AI, how far - a run may go, and which model it uses. A project that never saved - settings returns the defaults, with autofix off. - - Your API key is never returned. `api_key_configured`, - `api_key_provider`, and `api_key_last4` show whether one is set and - which provider it belongs to. - - Where autofix is not available, saved settings stay readable. A project - that never saved any answers `404` with code `feature_unavailable`. - operationId: getAutofixSettings - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - responses: - '200': - description: Successful response + '404': + description: | + Durable function or execution not found, or the credential cannot + reach the execution. A `private` function answers every credential + but a service key this way. content: application/json: schema: - $ref: '#/components/schemas/AutofixSettings' - '404': - description: Project not found. Code `feature_unavailable` means autofix is not available in this environment and the project never saved settings. + $ref: '#/components/schemas/Error' + '409': + description: | + The execution has not started yet. Only a service key holding `*` + can reach an execution in that state. content: application/json: schema: $ref: '#/components/schemas/Error' - '501': - description: Autofix is not available in local mode. + '429': + description: | + The function's or the project's function rate limit, which stops + share with invocations and starts, or the project is over its + bandwidth cap. content: application/json: schema: $ref: '#/components/schemas/Error' '503': - description: The owner's plan could not be resolved. Retry later. + description: | + Durable execution is not available in this environment, the plan + terms for the request could not be read, or stops or reads of + executions in its region are throttled. The first is not one to + retry in a loop; the others are transient, and a throttle carries + `Retry-After`. A stop throttled while reading the execution back may + already have been sent; repeating it is safe, because a stop of an + execution that has ended answers the state it ended in. + headers: + Retry-After: + description: | + Seconds to wait before trying again. Sent only when stops or + reads of executions in the region are throttled. + schema: + type: integer content: application/json: schema: $ref: '#/components/schemas/Error' - put: + /durable-functions/{functionId}/executions/{executionId}/messages: + post: tags: - - Autofix - summary: Replace autofix settings + - Durable Functions + summary: Send a message to a durable execution from an application description: | - Replaces the project's autofix settings. Omitted fields take their - defaults, except three: an omitted `provider` or `model` keeps its saved - value, and an omitted `api_key` keeps the stored key. So - `{"enabled": false}` turns autofix off and keeps the key. + Sends a named message to a running execution. The workflow receives it + from `ctx.waitForMessage` with the same name. A message sent before + anything waits for its name is kept, and each wait takes the oldest + one, so messages arrive in the order they were sent. - Project access tokens are refused. Autofix opens pull requests in the - project's repository, so a person turns it on with a platform token or - in the dashboard. + Messages never decide an approval: a workflow waiting in + `ctx.waitForApproval` is not resumed by one. + + **With a service key:** any execution in the project when the key holds + `*`, the default. A key scoped to a list without `*`, such as + `["functions.invoke"]`, reaches an execution whose + `X-Volcano-Client-Token` the request carries, as an anon key does; the + start returns that token. + + **With an auth user token:** an execution the user started, or one + whose `X-Volcano-Client-Token` the request carries, of a durable + function whose `visibility` is `authenticated` or `public`. - Turning autofix on needs a plan that includes it. Settings that are - already on stay stored after a downgrade, and saving them again is not - refused, but no run starts until the plan includes autofix again. Other - saves need no plan. + **With an anon key:** an execution whose `X-Volcano-Client-Token` the + request carries, of a function with `visibility: public`. - Provider `anthropic` runs on your own API key. A key belongs to the - provider it was saved with, and turning autofix on with a provider that - runs on your own key needs one for it. Turning autofix off or switching - providers keeps the stored key; only - `DELETE /projects/{id}/autofix/api-key` removes it. Turning autofix on - with provider `volcano` needs the `autofix.managed_models` capability; - without it the request answers `400` with code `feature_unavailable`. + Any other execution answers `404`, as a missing one does. - Where autofix is not available, a project with saved settings can - still change them with `enabled: false`. Turning autofix on answers - `404` with code `feature_unavailable`. - operationId: updateAutofixSettings + Send `Idempotency-Key` to make a retry safe: a repeat with a key the + same sender has used on the execution returns the first message with + `200` and sends nothing. + operationId: sendDurableMessageFromApplication security: - - UserToken: [] + - AnonKey: [] + - ServiceRoleKey: [] + - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/DurableExecutionId' + - $ref: '#/components/parameters/DurableMessageIdempotencyKey' + - $ref: '#/components/parameters/DurableClientToken' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UpdateAutofixSettingsRequest' + $ref: '#/components/schemas/SendDurableMessageRequest' responses: '200': - description: Saved + description: A message with this `Idempotency-Key` was already sent; it is returned content: application/json: schema: - $ref: '#/components/schemas/AutofixSettings' - '400': - description: The request body is invalid, the key does not fit the provider, or turning autofix on with a provider that runs on your own key has no key for it. Code `feature_unavailable` means Volcano-managed models are not available in this environment. + $ref: '#/components/schemas/DurableMessage' + '201': + description: | + Message sent. `status` is `delivered` when a wait took it at once, + `delivering` when a wait took it and the handover is still being + confirmed, and `queued` when it is kept for the next wait. content: application/json: schema: - $ref: '#/components/schemas/Error' - '403': - description: The owner's plan does not include autofix, or the request used a project access token. Only a person changes autofix settings. + $ref: '#/components/schemas/DurableMessage' + '400': + description: The name, data or idempotency key is invalid content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project not found. Code `feature_unavailable` means autofix is not available in this environment, which refuses turning it on and a project's first save. + '401': + description: Missing or invalid credential content: application/json: schema: $ref: '#/components/schemas/Error' - '501': - description: Autofix is not available in local mode. + '403': + description: | + The anon key lacks `functions.invoke`, the service key is scoped + without it, or the function is `authenticated` and the request + carries an anon key. Also returned when the request's origin is + refused by the project's CORS policy. content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: Turning autofix on needs the owner's plan, which could not be resolved. Nothing was saved. Retry later. + '404': + description: | + Durable function or execution not found, or the credential cannot + reach the execution. A `private` function answers every credential + but a service key this way. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/autofix/api-key: - delete: - tags: - - Autofix - summary: Delete the API key - description: | - Deletes the project's stored API key and returns the settings. Autofix - on the key's provider runs on that key, so it turns off; on another - provider it stays as it is. Deleting when no key is stored succeeds. - - Turning autofix off or switching providers never deletes the key, and - neither does applying a project configuration. This works where - autofix is not available, for a project that saved settings. + '409': + description: | + The message cannot be sent. `code` says why: - Project access tokens are refused. - operationId: deleteAutofixAPIKey - security: - - UserToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - responses: - '200': - description: Deleted + - `execution_not_running`: the execution has finished. + - `too_many_queued_messages`: the execution already holds the + maximum number of messages nothing has taken. content: application/json: schema: - $ref: '#/components/schemas/AutofixSettings' - '403': - description: The request used a project access token. Only a person deletes the key. + $ref: '#/components/schemas/Error' + '413': + description: The request body is larger than 72 KiB content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project not found. Code `feature_unavailable` means autofix is not available in this environment and the project never saved settings. + '429': + description: | + Too many messages sent to this execution, the function's or the + project's function rate limit, which sends share with invocations + and starts, or the project is over its bandwidth cap. content: application/json: schema: $ref: '#/components/schemas/Error' - '501': - description: Autofix is not available in local mode. + '503': + description: The plan terms for the request could not be read. Retry with backoff. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/durable-approvals: get: tags: - Durable Functions - summary: List durable approvals + summary: List a durable execution's messages from an application description: | - Lists the approvals durable workflows in the project have requested, - newest first. Pending approvals are the ones a workflow is waiting on; - decided, expired, and cancelled ones are kept for a year. + Lists the messages sent to and published by an execution, oldest + first. Pass the last `seq` you read as `after` to read only what came + next; that is how a client catches up after a live subscription + reconnects. - Project access tokens can list approvals, including read-only ones. - operationId: listDurableApprovals + Access follows the same rules as sending. + operationId: listDurableMessagesFromApplication security: - - UserToken: [] - - ProjectAccessToken: [] + - AnonKey: [] + - ServiceRoleKey: [] + - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - - name: status - in: query - required: false - description: Return only approvals in this status. - schema: - $ref: '#/components/schemas/DurableApprovalStatus' - - $ref: '#/components/parameters/DurableApprovalFunctionFilter' - - name: execution_id - in: query - required: false - description: Return only approvals requested by this durable execution. - schema: - type: string - format: uuid - - name: from - in: query - required: false - description: Return only approvals requested at or after this time. - schema: - type: string - format: date-time - - name: to - in: query - required: false - description: Return only approvals requested before this time. - schema: - type: string - format: date-time + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/DurableExecutionId' + - $ref: '#/components/parameters/DurableClientToken' + - $ref: '#/components/parameters/DurableMessageDirectionFilter' + - $ref: '#/components/parameters/DurableMessageNameFilter' + - $ref: '#/components/parameters/DurableMessageAfter' + - $ref: '#/components/parameters/DurableMessageLimit' responses: '200': description: Successful response content: application/json: schema: - $ref: '#/components/schemas/PaginatedDurableApprovals' + $ref: '#/components/schemas/DurableMessageList' '400': - description: A filter is invalid, or `from` is after `to` + description: A filter is invalid content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/durable-approvals/stats: + '401': + description: Missing or invalid credential + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: | + The anon key lacks `functions.invoke`, the service key is scoped + without it, or the function is `authenticated` and the request + carries an anon key. Also returned when the request's origin is + refused by the project's CORS policy. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: | + Durable function or execution not found, or the credential cannot + reach the execution. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: | + The function's or the project's function rate limit, which lists + share with invocations and starts, or the project is over its + bandwidth cap. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: The plan terms for the request could not be read. Retry with backoff. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /functions/resolve: get: tags: - - Durable Functions - summary: Get durable approval statistics + - Functions + summary: Resolve function name for invocation description: | - Counts the project's approvals by outcome over a time window, overall, - per workflow, and per day. The window defaults to the last 30 days and - can cover up to a year. An approval is counted on the day it was - requested. + Resolves a DNS-safe function name to its function ID and invocation URL within the caller's project. - Project access tokens can read statistics, including read-only ones. - operationId: getDurableApprovalStats + SDKs use this endpoint internally to invoke by function name while routing by function ID. + Invoke the returned `invoke_url` as-is. It does not share a domain with the API, so a host + built from the API URL will not reach the function. In local development, and when the + deployment serves no public invocation domain, `invoke_url` is omitted and callers invoke + through `POST /functions/{functionId}/invoke`. A local function's own `invoke_url`, for + webhook testing, is on the function resource. + + **With Service Key**: + - Allowed + + **With Auth User Token**: + - Allowed for `authenticated` and `public` functions + - A `private` function answers 404, exactly as a missing one + + **With Anon Key**: + - Requires anon key permission: `functions.invoke` + - Function must have `visibility: public`; any other answers 404 + operationId: resolveFunctionForInvocation security: - - UserToken: [] - - ProjectAccessToken: [] + - AnonKey: [] + - ServiceRoleKey: [] + - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableApprovalFunctionFilter' - - name: from - in: query - required: false - description: Start of the window. Defaults to 30 days before `to`. - schema: - type: string - format: date-time - - name: to + - name: name in: query - required: false - description: End of the window. Defaults to now. + required: true schema: type: string - format: date-time + maxLength: 63 + pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ + description: DNS-safe function name (lowercase letters, numbers, hyphens; cannot start or end with hyphen) + example: my-function responses: '200': - description: Successful response + description: Function resolved successfully content: application/json: schema: - $ref: '#/components/schemas/DurableApprovalStats' + $ref: '#/components/schemas/ResolveFunctionResponse' '400': - description: The window is invalid or longer than 366 days + description: Bad request - missing or invalid function name content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/durable-approvals/{approvalId}: - get: - tags: - - Durable Functions - summary: Get a durable approval - description: | - Returns one approval: what the workflow asked, the durable function - and execution that asked it, its deadline, and the decision once one - is made. - - Project access tokens can read approvals, including read-only ones. - operationId: getDurableApproval - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableApprovalId' - responses: - '200': - description: Successful response + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: - $ref: '#/components/schemas/DurableApproval' + $ref: '#/components/schemas/Error' + '403': + description: | + Forbidden - CORS blocked, or missing `functions.invoke` permission + for anon key + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Approval not found + description: | + Function not found. Also returned for a `private` function with an + auth user token, and a non-public one with an anon key. A durable + function is never resolvable here: it is started through + `POST /durable-functions/{functionId}/executions`, not invoked. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/durable-approvals/{approvalId}/approve: + /projects/{id}/logs/activity: post: tags: - - Durable Functions - summary: Approve a durable approval + - Logs + summary: Get project log activity description: | - Approves a pending approval. The workflow resumes with the decision. - - Only a person can decide: use the dashboard or a platform token from - `volcano login`. Project access tokens are refused with `403`. - - Approving an approval that is already approved returns it unchanged. - If the workflow cannot be reached right away, the decision still - stands and Volcano keeps delivering it. - operationId: approveDurableApproval + Retrieve bucketed log counts for one resource type in the project. Set + `resource.type` to `function`, `frontend`, `database`, or `app`. Add + `resource.ids` to filter to one or more resources, and add + `resource.deployments.ids` to count deployment logs instead of runtime + logs for functions and frontends. Deployment logs are not supported for + databases or apps. `app` counts the entries a first-party app, such as + the Builder, wrote into the project; an app's ID is UUIDv5 of its slug + (see `LogResource.id`). With no entries it answers 200 with none; an unknown app in `resource.ids` answers 404 `app not found`. The `app_logs` release gate controls new writes only: entries already written stay readable when it closes. Database logs are a SUPERAGENT feature; `resource.type=database` + from a HOBBY project owner returns 403. The activity window is limited + to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days); older start + times are clamped to that window. Buckets are aligned to UTC clock + intervals and count events in the half-open window + `[start_time, end_time)`. + operationId: getProjectLogActivity security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableApprovalId' requestBody: - required: false + required: true content: application/json: schema: - $ref: '#/components/schemas/DurableApprovalDecisionRequest' + $ref: '#/components/schemas/LogActivityRequest' responses: '200': - description: Approved + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/DurableApproval' + $ref: '#/components/schemas/LogActivityResponse' '400': - description: The request body is invalid + description: Bad request - invalid query parameter content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: The credential is not a person's + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Approval not found + '403': + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: | - The approval was already denied, or has expired or been cancelled. - `code` is `approval_decided`, `approval_expired`, or - `approval_cancelled`. + '404': + description: Project or resource not found content: application/json: schema: $ref: '#/components/schemas/Error' - '413': - description: The request body is larger than 16 KiB - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /projects/{id}/durable-approvals/{approvalId}/deny: + /projects/{id}/logs/search: post: tags: - - Durable Functions - summary: Deny a durable approval + - Logs + summary: Search project logs description: | - Denies a pending approval. The workflow resumes with the decision; a - denial is a value the workflow branches on, not an error. - - Only a person can decide: use the dashboard or a platform token from - `volcano login`. Project access tokens are refused with `403`. - - Denying an approval that is already denied returns it unchanged. - If the workflow cannot be reached right away, the decision still - stands and Volcano keeps delivering it. - operationId: denyDurableApproval + Search or filter logs for one resource type in the project. Set + `resource.type` to `function`, `frontend`, `database`, or `app`. Add + `resource.ids` to filter to one or more resources, and add + `resource.deployments.ids` to read deployment logs instead of runtime + logs for functions and frontends. Deployment logs are not supported for + databases or apps. `app` reads the entries a first-party app, such as + the Builder, wrote into the project; an app's ID is UUIDv5 of its slug + (see `LogResource.id`). With no entries it answers 200 with none; an unknown app in `resource.ids` answers 404 `app not found`. The `app_logs` release gate controls new writes only: entries already written stay readable when it closes. Database logs are a SUPERAGENT feature; requests for + `resource.type=database` from a HOBBY project owner return 403. + Log history (runtime and deployment) is limited to the plan's retention + window (HOBBY: 1 day, SUPERAGENT: 30 days); older time ranges are clamped to that + window. + operationId: searchProjectLogs security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DurableApprovalId' requestBody: - required: false + required: true content: application/json: schema: - $ref: '#/components/schemas/DurableApprovalDecisionRequest' + $ref: '#/components/schemas/LogSearchRequest' responses: '200': - description: Denied + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/DurableApproval' + $ref: '#/components/schemas/LogSearchResponse' '400': - description: The request body is invalid - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '403': - description: The credential is not a person's + description: Bad request - invalid query parameter content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Approval not found + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: | - The approval was already approved, or has expired or been - cancelled. `code` is `approval_decided`, `approval_expired`, or - `approval_cancelled`. + '403': + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' - '413': - description: The request body is larger than 16 KiB + '404': + description: Project or resource not found content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/frontends: - get: + /projects/{id}/logs/stream: + post: tags: - - Frontends - summary: List all frontends in a project + - Logs + summary: Stream project logs description: | - Supports two mutually exclusive pagination modes. Offset mode uses `page` - and `limit` and returns `next` (URL). Cursor mode uses `cursor` and - `limit`, supports `search` (case-insensitive name match), and returns - `next_cursor`. Sending both `page` and `cursor` (or `page` and `search`) - returns 400. - operationId: listFrontends + Live-tail project logs as Server-Sent Events. The request body uses the + resource selector plus `q`, `start_time`, and `limit`, + including runtime logs and function/frontend deployment logs selected + with `resource.deployments`. Deployment logs are not supported for + databases. Database logs are a SUPERAGENT feature; `resource.type=database` + from a HOBBY project owner returns 403. The `q` field uses the same + syntax as search and activity requests. Do not send `cursor` or + `end_time`; use `/logs/search` for range backfills. + Explicit historical `start_time` values are limited to the plan's + retention window (HOBBY: 1 day, SUPERAGENT: 30 days). Resume with + `Last-Event-ID` or the `last_event_id` query parameter. The cursor is + bound to the request body: the resource selector and every filter must + match the original request when reconnecting, otherwise the request is + rejected with `400`. + + This is a live tail, not a gap-free backfill. On connect or reconnect the + server delivers at most `limit` of the most recent matching events from + the cursor position and then follows new events; events older than that + window are not replayed. Use `/logs/search` to backfill a time range. + operationId: streamProjectLogs security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Cursor' - - $ref: '#/components/parameters/EndingBefore' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Search' + - name: Last-Event-ID + in: header + required: false + schema: + type: string + description: Opaque stream cursor from the most recent SSE `id` field. + - name: last_event_id + in: query + required: false + schema: + type: string + description: Opaque stream cursor fallback when setting `Last-Event-ID` is not practical. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LogStreamRequest' responses: '200': - description: Successful response + description: Server-Sent Events stream. `log` events contain a JSON `LogSearchEvent`; `warning` events contain a JSON object with an `error` field. content: - application/json: + text/event-stream: schema: - $ref: '#/components/schemas/PaginatedFrontends' + type: string + examples: + log: + summary: Log event + value: | + : connected + + id: STREAM_CURSOR + event: log + data: {"id":"LOG_EVENT_ID","timestamp":"2024-01-01T12:00:00Z","level":"info","message":"User logged in","resource":{"type":"function","id":"550e8400-e29b-41d4-a716-446655440000","name":"login"},"region":"us-east-1"} '400': - description: Bad request - invalid project identifier + description: Bad request - invalid selector, stream cursor, or unsupported stream field content: application/json: schema: @@ -7313,49 +7423,35 @@ paths: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found + description: Project or resource not found content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Internal server error + description: Internal server error - log streaming setup failed content: application/json: schema: $ref: '#/components/schemas/Error' + /projects/{id}/functions/batch: post: tags: - - Frontends - summary: Create a new frontend deployment + - Functions + summary: Deploy multiple functions in one request description: | - Creates and deploys a frontend for the project. - If a frontend with the same name already exists in the project, this operation updates that - frontend using the uploaded archive and starts a new deployment. A deployment that starts - immediately returns `status: provisioning`, then transitions to `active`, `degraded`, or - `failed`. If another deployment is running, the response preserves the frontend's current status - and exposes the queued deployment through `pending_deployment_id`. - Existing frontend traffic continues to use an available runtime while the new deployment builds - and provisions. Each deployment publishes its own static assets before the runtimes switch to its - build, and the live build's assets keep serving until the new deployment is live, so a page loaded - mid-deployment resolves its assets whichever build served it. A failed redeploy puts the runtimes - back on the build they were running, leaves the frontend `active` on the previous deployment, and - records the attempted deployment as failed. `degraded` means the runtime remains available but - edge synchronization requires recovery; Volcano retries the edge step without rebuilding. Only one deployment may run for a - given frontend, while independent frontends and projects can deploy concurrently. - For monorepos, provide `app_root` as a relative path from the uploaded archive root - to the Next.js app that should be built. Omit it for single-app archives. - Supported frontend environments are Next.js 15.x and 16.x with Node.js - 22.x or 24.x. The Node.js runtime is inferred from - `package.json` `engines.node`; if omitted, Volcano uses Node.js 22.x. - The selected Node.js family must also satisfy the installed Next.js package's - `engines.node` constraint. Volcano tests Next 15.5.27 (`^18.18.0 || ^19.8.0 || >=20.0.0`) and Next 16.4.0 (`>=20.9.0`). - Source archive size is enforced by the API with `SOURCE_ARCHIVE_SIZE_LIMIT_MB`; the CLI - does not apply its own source archive size limit. After the final container images are - built, the publish build enforces `LAMBDA_TARGET_CONTAINER_SIZE_LIMIT_MB` before pushing. - This operation is limited by plan-based frontend deployment quotas (`FREE_FRONTEND_DEPLOYMENTS`, `PRO_FRONTEND_DEPLOYMENTS`). - Each project can contain up to 10,000 frontends regardless of plan. - operationId: createFrontend + Upload multiple function source archives in one multipart request. Each archive should contain source files + plus dependency manifests/lockfiles, not installed dependency directories. ZIP and tar.gz uploads are + accepted and normalized to tar.gz before storage. The API enforces `SOURCE_ARCHIVE_SIZE_LIMIT_MB` + for each uploaded and normalized source archive. The server records a shared + deployment batch ID for the resulting function deployments. Each function deployment runs its own + compile/publish workflow concurrently, and each publish build enforces `LAMBDA_TARGET_CONTAINER_SIZE_LIMIT_MB` + for the final container image. + One batch request can include up to 100 functions. Submit multiple batch requests for larger projects. + If one function fails before its workflow starts, already-started function deployments are left + running and the failed function is reported in the `failed` array. Failed new functions are deleted; + failed updates are rolled back to their previous metadata/status where possible. + operationId: createFunctionsBatch security: - UserToken: [] - ProjectAccessToken: [] @@ -7367,481 +7463,508 @@ paths: multipart/form-data: schema: type: object - required: - - name - - archive properties: - name: - type: string - maxLength: 63 - pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ - description: DNS-safe frontend name - framework: - type: string - enum: - - nextjs - default: nextjs - description: Next.js frontend. Supported Next.js majors are 15.x and 16.x. - app_root: - type: string - maxLength: 1024 - description: Optional relative POSIX path from the uploaded archive root to the Next.js app to build, for example `apps/web`. - example: apps/web - variable_scope: + functions: type: string - enum: - - all - - scoped - description: Variable selection for this deployment. New frontends default to `scoped`; omitting this field for an existing frontend preserves its current selection. - variables: - type: array - items: - type: string - pattern: ^[A-Za-z_][A-Za-z0-9_]*$ - description: Project variable names selected when `variable_scope` is `scoped`. Submit each name as a repeated multipart field. - archive: + description: | + JSON array of functions with `name`, `runtime`, optional `handler`, and `file_field`. Each `file_field` must name a multipart file field containing that function's ZIP or tar.gz source bundle. + + Each entry may also declare `variable_scope` (`all` or `scoped`) and `variables` (an array of project variable names). Omitting them leaves the function's stored declaration unchanged. Volcano detects direct environment references in the uploaded source code and keeps them separate from the declared names: detected names are not written back to the declaration and do not appear in a config export. A scoped function receives its declared names plus the detected ones the project defines; a detected name the project does not define is ignored, since such a reference is often optional. Detection reads code only, so a name appearing solely in a comment or in an unrelated string is not a reference. Declare a name when the function reads it through a computed key, or when it must not deploy without the variable. The request is rejected with 400 before anything is deployed if a scoped function declares a variable the project does not define, or if the resulting environment exceeds 4096 bytes. + + Each entry may also carry `commit`, the commit its source came from, as an object: `{"repository": "acme/app", "sha": "<40-character commit ID>", "dirty": false}`. It takes the same values as the `commit` field of a single function upload; `null` or `""` reports no commit. The request is rejected with 400 before anything is deployed if an entry's commit is malformed or names a repository not on GitHub. + code_0: type: string format: binary - description: ZIP or tar.gz archive of the frontend project directory or monorepo workspace root. The API enforces SOURCE_ARCHIVE_SIZE_LIMIT_MB and stores a normalized tar.gz archive. + description: Function ZIP or tar.gz archive referenced by the first manifest entry's `file_field`; additional code_N file fields may be included. Each archive is subject to SOURCE_ARCHIVE_SIZE_LIMIT_MB. + required: + - functions responses: - '200': - description: Existing frontend updated; its deployment was started or queued + '202': + description: Batch deployment accepted content: application/json: schema: - $ref: '#/components/schemas/Frontend' - '201': - description: Frontend created and deployment workflow started + $ref: '#/components/schemas/BatchFunctionDeployResponse' + '207': + description: Batch deployment partially accepted; successful functions started deployment and failed functions were compensated where possible content: application/json: schema: - $ref: '#/components/schemas/Frontend' + $ref: '#/components/schemas/BatchFunctionDeployResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + '403': + description: Function limit exceeded for the project content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Frontend deployment limit exceeded for the current plan or project hard cap + '409': + description: | + A name in the batch is held by a function of the other kind — a + function cannot change kind — or the project's source is managed by + Git, where deploys come from a push to the production branch. The + message `project variables changed during the upload; retry` means + `NODE_PATH` was created, changed or deleted while the upload was + processed; nothing was deployed, so send the same request again. content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '409': - description: Conflict - frontend deletion is queued or running - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '500': - description: Internal server error + '429': + description: | + The owner's billing-cycle build-minutes allowance is spent. The + error names the allowance and carries a link to the usage page. content: application/json: schema: $ref: '#/components/schemas/Error' '503': - description: Service unavailable - frontend workflow or archive limit configuration missing + description: | + Build usage could not be read, so the allowance could not be + checked. The same request succeeds once it can be. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/frontends/{frontendId}: + /projects/{id}/schedulers: get: tags: - - Frontends - summary: Get frontend details - operationId: getFrontend + - Functions + summary: List every function scheduler in a project + description: | + Project-scoped counterpart to `/projects/{id}/functions/{functionId}/schedulers`. + Returns schedulers across all functions in the project, ordered by + creation time descending, with standard page/limit pagination so + clients don't have to fan out one request per function. + + Schedulers of standard and durable functions are listed together, and + each carries `function_kind`. Pass `function_kind` to list one kind + only. + operationId: listProjectSchedulers security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FrontendId' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/EndingBefore' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Search' + - $ref: '#/components/parameters/FunctionKindFilter' responses: '200': - description: Successful response + description: Project schedulers content: application/json: schema: - $ref: '#/components/schemas/Frontend' + $ref: '#/components/schemas/FunctionSchedulerListResponse' '400': - description: Bad request - invalid identifier + description: Bad request - invalid pagination or filter content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + /projects/{id}/notifications: + get: + tags: + - Notifications + summary: Get notification settings + description: | + Returns where the project's alerts go and when a failing scheduler is + announced. A project that never saved settings returns the defaults: + email to the project owner, no webhook, and an alert after 3 failed + runs in a row, followed by one when the scheduler recovers. + + The webhook signing secret is never returned here; `secret_configured` + shows whether one is set. A read-only project access token is refused + with `403`, because the webhook URL can carry the receiver's token. + operationId: getNotificationSettings + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + responses: + '200': + description: Notification settings content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/NotificationSettings' '403': - description: Forbidden - project ownership required + description: The request used a `read_only` project access token content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Frontend not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '500': - description: Internal server error + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - delete: + put: tags: - - Frontends - summary: Delete a frontend + - Notifications + summary: Update notification settings description: | - Schedules asynchronous frontend deletion. If another deployment is running, the frontend - preserves its current status and exposes the queued deletion through `pending_deployment_id`. - Its status changes to `deleting` when cleanup starts. After cleanup, it returns 404 and no - longer appears in frontend lists. - operationId: deleteFrontend + Changes the project's notification settings. Omitted fields keep their + current values, so `{"email": {"enabled": false}}` only turns email off. + + Alert emails go only to the project owner's verified account email + address. `email.recipients` may be empty or name that address; any + other list is refused with `400`, and so is any non-empty list while + the owner has no verified address. `email.status` in the response + says whether alerts are being emailed. + + Setting `webhook.url` on a project without a webhook generates its + signing secret, returned in `webhook.secret` in this response only. + Changing the URL keeps the secret. An empty `webhook.url` removes the + webhook and its secret. + + Outside local mode the webhook must be reachable on the public + internet; a URL naming a private or loopback address is refused, and + so is a delivery to a host name that resolves to one. + operationId: updateNotificationSettings security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FrontendId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateNotificationSettingsRequest' responses: - '202': - description: Frontend deletion started or queued - '400': - description: Bad request - invalid identifier + '200': + description: Saved content: application/json: schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + $ref: '#/components/schemas/NotificationSettings' + '400': + description: The request body is invalid, for example a recipient other than the project owner's verified account email address. content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Forbidden - project ownership required + description: The request used a `read_only` project access token content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Frontend not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '500': - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '503': - description: Service unavailable - frontend workflow configuration missing + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/frontends/{frontendId}/redeploy: + /projects/{id}/notifications/webhook-secret: post: tags: - - Frontends - summary: Redeploy frontend using latest uploaded artifact + - Notifications + summary: Rotate the webhook signing secret description: | - Starts a new frontend workflow using the latest stored artifact. A deployment that starts - immediately returns `status: provisioning`, then transitions to `active`, `degraded`, or - `failed`. An overlapping deployment preserves the frontend's current status, is exposed through - `pending_deployment_id`, and supersedes any older queued deployment. The previous runtime and its - published static assets remain available during provisioning, and a failed redeploy restores the - regional runtimes to that build and keeps it serving while the attempted deployment is recorded as - failed. - operationId: redeployFrontend + Replaces the webhook signing secret and returns the settings with the + new one in `webhook.secret`, this once. Every delivery from now on is + signed with the new secret, including retries of earlier alerts. + operationId: rotateNotificationWebhookSecret security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FrontendId' responses: '200': - description: Frontend redeploy started or queued - content: - application/json: - schema: - $ref: '#/components/schemas/Frontend' - '400': - description: Bad request - invalid identifier - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + description: Rotated content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/NotificationSettings' '403': - description: Forbidden - project ownership required + description: The request used a `read_only` project access token content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Frontend not found + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' '409': - description: Conflict - frontend deletion is queued or running - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '500': - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '503': - description: Service unavailable - frontend workflow configuration missing + description: No webhook is configured. Set `webhook.url` first. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/frontends/{frontendId}/domain: - get: + /projects/{id}/notifications/test: + post: tags: - - Frontends - summary: Get frontend custom domain status - operationId: getFrontendCustomDomain + - Notifications + summary: Send a test notification + description: | + Sends a `notification.test` event on every channel that delivers + right away and reports how each delivery went. A webhook delivery is + signed like an alert. Enabled email is reported undelivered, without + sending, while the project owner has no verified account email + address. One test per project per minute. + operationId: sendTestNotification security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FrontendId' responses: '200': - description: | - Frontend custom domain status, or null when the frontend has no - custom domain configured (the common empty state). + description: The test was attempted. Each delivery reports whether it arrived; a failed one is not retried. content: application/json: schema: - nullable: true - allOf: - - $ref: '#/components/schemas/FrontendCustomDomainResponse' - '400': - description: Bad request - invalid identifier + $ref: '#/components/schemas/NotificationTestResult' + '403': + description: The request used a `read_only` project access token content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + '404': + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Forbidden - project ownership required + '409': + description: No webhook is configured, and email is disabled or the project owner has no verified account email address, so there is nowhere to send. content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Frontend not found + '429': + description: A test was sent less than a minute ago. content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Internal server error + /projects/{id}/functions/{functionId}/schedulers: + get: + tags: + - Functions + summary: List schedulers for a function + operationId: listFunctionSchedulers + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FunctionId' + responses: + '200': + description: Function schedulers + content: + application/json: + schema: + $ref: '#/components/schemas/FunctionSchedulerListResponse' + '404': + description: Function not found content: application/json: schema: $ref: '#/components/schemas/Error' post: tags: - - Frontends - summary: Configure frontend custom domain - description: | - Configures one custom domain for a frontend. - The default Volcano-generated frontend URL remains active. - Wildcard Volcano frontend TLS remains valid and isolated from custom-domain certificate changes. - The account must own the hostname: it must have verified the hostname or a domain above it (see `POST /user/domains`). A certificate does not prove ownership. - When the account owns no domain covering the hostname, Volcano asks for a TXT record at `_volcano.`, such as `_volcano.example.com`. Publishing it verifies the whole domain, so later subdomains need no record. A managed TLS request reserves the hostname and returns that record in `verification_records`; the reservation expires after 72 hours unless the record is published. A BYOC request gets `409` with `code: ownership_verification_required` and the record in `required_record`; publish it and send the same request again. - Managed TLS then returns the CNAME that authorizes certificate issuance and renewal. - To move an active BYOC domain to managed TLS without downtime, send `tls.mode: managed` for the same hostname. The response is `200` with the CNAME to publish; the uploaded certificate keeps serving until Volcano issues the managed one, and `serving_certificate` changes from `uploaded` to `managed`. - To move an active managed domain to BYOC without downtime, send `tls.mode: byoc` with the certificate for the same hostname. The response is `200`; the uploaded certificate replaces the managed one at once, and Volcano stops renewing the managed certificate. - An unverified reservation does not block an account that proves ownership. When another account holds one, a request gets `409` with `code: ownership_verification_required` and the caller's own `required_record`; after publishing it, the same request takes over the reservation. When another account verified the domain, the same `409` names the record that moves the domain to the caller once the other account's record is no longer published. A hostname below a domain another account owns otherwise returns `409` without `code`. - operationId: createFrontendCustomDomain + - Functions + summary: Create a scheduler for a function + description: Creates regional scheduled invocation jobs. Requested regions must be a subset of the function's deployed regions. + operationId: createFunctionScheduler security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FrontendId' + - $ref: '#/components/parameters/FunctionId' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/CreateFrontendCustomDomainRequest' + $ref: '#/components/schemas/CreateFunctionSchedulerRequest' responses: - '200': - description: 'Custom domain already configured with the same hostname. A request with the other TLS mode for the frontend''s active domain switches it in place. To managed TLS, the uploaded certificate keeps serving, with `serving_certificate: uploaded`, until Volcano issues the managed certificate. To BYOC, the uploaded certificate replaces the managed one at once.' - content: - application/json: - schema: - $ref: '#/components/schemas/FrontendCustomDomainResponse' '201': - description: Custom domain provisioning started + description: Scheduler created content: application/json: schema: - $ref: '#/components/schemas/FrontendCustomDomainResponse' + $ref: '#/components/schemas/FunctionScheduler' '400': - description: Bad request - invalid domain - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + description: | + Invalid schedule, geofenced region, a scheduler of this name + already exists on the function, or the function is not active. content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Forbidden - the plan does not include custom domains, or a managed TLS request would exceed the account's managed TLS certificate limit + description: | + Schedulers are not available on this plan, or the project already + holds as many as the plan allows. The cap counts standard and + durable function schedulers together. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Frontend not found + description: Function not found content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: 'Conflict - ownership not verified, custom domain owned or reserved by another account, already in use, still detaching, or frontend already has a custom domain. While a removed domain detaches and Volcano releases it (about a minute for BYOC, a few minutes for managed TLS), adding its hostname to any frontend, or any domain to its frontend, returns `code: custom_domain_releasing` and a `Retry-After` header; send the same request again after that many seconds. A release that will not finish within a few minutes returns the conflict without `code`.' - headers: - Retry-After: - description: Seconds to wait before sending the same request again. Sent only with code `custom_domain_releasing`. - schema: - type: integer - content: - application/json: - schema: - $ref: '#/components/schemas/FrontendCustomDomainConflictError' - '500': - description: Internal server error + /projects/{id}/functions/{functionId}/schedulers/{schedulerId}: + get: + tags: + - Functions + summary: Get a function scheduler + operationId: getFunctionScheduler + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FunctionId' + - $ref: '#/components/parameters/SchedulerId' + responses: + '200': + description: Function scheduler content: application/json: schema: - $ref: '#/components/schemas/Error' - '503': - description: Service unavailable - custom domain provisioning is temporarily unavailable + $ref: '#/components/schemas/FunctionScheduler' + '404': + description: Function or scheduler not found content: application/json: schema: $ref: '#/components/schemas/Error' - delete: + patch: tags: - - Frontends - summary: Delete frontend custom domain - operationId: deleteFrontendCustomDomain + - Functions + summary: Update a function scheduler + operationId: updateFunctionScheduler security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FrontendId' + - $ref: '#/components/parameters/FunctionId' + - $ref: '#/components/parameters/SchedulerId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateFunctionSchedulerRequest' responses: - '204': - description: Custom domain detach scheduled - '400': - description: Bad request - invalid identifier + '200': + description: Scheduler updated content: application/json: schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + $ref: '#/components/schemas/FunctionScheduler' + '400': + description: | + Invalid schedule, geofenced region, or a scheduler of this name + already exists on the function. content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Forbidden - project ownership required + '404': + description: Function or scheduler not found content: application/json: schema: $ref: '#/components/schemas/Error' + delete: + tags: + - Functions + summary: Delete a function scheduler + operationId: deleteFunctionScheduler + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FunctionId' + - $ref: '#/components/parameters/SchedulerId' + responses: + '204': + description: Scheduler deleted '404': - description: Frontend or custom domain not found + description: Function or scheduler not found content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: The custom domain switched TLS mode while the request ran. Send it again. + /projects/{id}/functions/{functionId}/deployments: + get: + tags: + - Functions + summary: List function deployments + operationId: listFunctionDeployments + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FunctionId' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + responses: + '200': + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/Error' - '500': - description: Internal server error + $ref: '#/components/schemas/PaginatedFunctionDeployments' + '404': + description: Function not found content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/frontends/{frontendId}/deployments: + /projects/{id}/functions/{functionId}/candidates: get: tags: - - Frontends - summary: List frontend deployments - operationId: listFrontendDeployments + - Functions + summary: List a function's previews + description: | + Returns the function's previews, oldest first, each with its latest deployment. A function has at most + 20 live previews. Reading never depends on the `functions.candidates` capability. A durable function has no previews: reading its previews answers an empty list, and reading its serving state answers its own build. + operationId: listFunctionCandidates security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FrontendId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/FunctionId' responses: '200': - description: Successful response + description: The function's previews content: application/json: schema: - $ref: '#/components/schemas/PaginatedFrontendDeployments' + $ref: '#/components/schemas/FunctionCandidateList' '400': description: Bad request - invalid identifier content: @@ -7861,7 +7984,7 @@ paths: schema: $ref: '#/components/schemas/Error' '404': - description: Frontend not found + description: Function not found content: application/json: schema: @@ -7872,46 +7995,64 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/frontends/{frontendId}/usage: - get: + post: tags: - - Frontends - summary: Per-day request and error counts for a single frontend - description: | - Returns a zero-filled daily series of request counts and 5xx - error counts for one frontend, oldest first. Each entry is one - UTC day; missing days (no traffic recorded) come back as - `requests: 0, errors: 0` so the response always has exactly - `days` entries. + - Functions + summary: Create a function preview + description: | + Builds the uploaded source with the function's runtime, handler and variables, and deploys it to a + runtime of its own in every region the function deploys to. The preview is invoked at + `https://.` and is always private, whatever the function's own + visibility: only the project's service key, with `functions.invoke`, can invoke it, and signed-in + users, anon keys and access tokens are refused. It gets none of the function's schedules or warmers. + The response is `202` while the first deployment runs; read the preview for its `status` and `url`. - Backs the Monitoring section on the frontend detail page in - the Volcano dashboard. `days` defaults to 30 and is capped at 90 to keep - the (frontend_id, day) index scan bounded. - operationId: getFrontendUsageHistory + While the `functions.candidates` capability is unavailable, including on the local development server, it answers `404` with code `feature_unavailable`. Reading and deleting existing previews, and rolling the function back to its own build, keep + working. + + A preview builds like any deploy and spends the project's build minutes. A function has at most 20 + live previews, and each name is unique within the function. Without `ttl_seconds` a preview is kept + until it is deleted. Durable functions have no previews. + operationId: createFunctionCandidate security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FrontendId' - - name: days - in: query - description: Number of trailing days to return (1–90, default 30). - required: false - schema: - type: integer - minimum: 1 - maximum: 90 - default: 30 + - $ref: '#/components/parameters/FunctionId' + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + required: + - name + - code + properties: + name: + type: string + minLength: 1 + maxLength: 128 + description: Names the preview within the function. Cannot be `production`. + ttl_seconds: + type: integer + minimum: 1 + maximum: 2592000 + description: Deletes the preview this many seconds after it is created, at most 30 days. Omit to keep it until deleted. + code: + type: string + format: binary + description: The function's source archive, as for deploying the function. Built with the function's runtime and handler. responses: - '200': - description: Successful response + '202': + description: Preview created; its first deployment is running content: application/json: schema: - $ref: '#/components/schemas/FrontendUsageHistoryResponse' + $ref: '#/components/schemas/FunctionCandidate' '400': - description: Bad request - invalid identifier + description: Bad request - invalid name, expiry, identifier or source archive, or a variable the source reads has no value the function can give it content: application/json: schema: @@ -7929,2057 +8070,2153 @@ paths: schema: $ref: '#/components/schemas/Error' '404': - description: Frontend not found + description: Function not found, or the capability is unavailable (code `feature_unavailable`) content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Internal server error + '409': + description: 'Conflict. `code: durable_function_unsupported` - the function is durable. `code: candidate_name_taken` - the function has a preview with this name. `code: candidate_limit_reached` - the function has the maximum previews. `code: function_deleting` or `code: project_deleting` - the function or project is being deleted.' content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/frontends/{frontendId}/function-routes: - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FrontendId' - get: - tags: - - Frontends - summary: List a Frontend's Function routes - operationId: listFrontendFunctionRoutes - security: - - UserToken: [] - - ProjectAccessToken: [] - responses: - '200': - description: Function routes ordered from most to least specific + '413': + description: Request body exceeds the function source archive limit content: application/json: schema: - $ref: '#/components/schemas/FrontendFunctionRouteList' - '401': - description: Unauthorized + $ref: '#/components/schemas/Error' + '429': + description: Too many requests - the project's build minutes for the billing cycle are used up (code `build_minutes_exceeded`) content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Project not owned by the caller + '500': + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Failed to list Function routes + '503': + description: Service unavailable - function deployments are not configured content: application/json: schema: $ref: '#/components/schemas/Error' - post: + /projects/{id}/functions/{functionId}/candidates/{candidateId}: + get: tags: - - Frontends - summary: Route a Frontend path to an HTTP Function - operationId: createFrontendFunctionRoute + - Functions + summary: Get a function preview description: | - The Frontend and Function must belong to this Project. The Function must be a standard - Function with `visibility: public` and HTTP invocation mode, because requests through the - route carry no credential: Volcano does not check a token sent to a route path or add - `__volcano_auth`, so the Function authenticates its callers itself. A Function cannot leave `public` - while a route targets it. The route applies to every hostname that resolves to the - Frontend, including generated, custom-domain, preview, and local hostnames. + Returns the preview with its latest deployment. Never depends on the `functions.candidates` capability. + operationId: getFunctionCandidate security: - UserToken: [] - ProjectAccessToken: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateFrontendFunctionRouteRequest' + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FunctionId' + - $ref: '#/components/parameters/FunctionCandidateId' responses: - '201': - description: Function route created + '200': + description: The preview content: application/json: schema: - $ref: '#/components/schemas/FrontendFunctionRoute' + $ref: '#/components/schemas/FunctionCandidate' '400': - description: Invalid path or non-HTTP Function + description: Bad request - invalid identifier content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Unauthorized + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Project not owned by the caller + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Frontend or Function not found in the Project - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '409': - description: Path is already routed, the Frontend has reached its 64-route limit, or the Function is not public + description: Function or preview not found content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Failed to create Function route + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/frontends/{frontendId}/function-routes/{routeId}: - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/FrontendId' - - $ref: '#/components/parameters/FrontendFunctionRouteId' - put: + delete: tags: - - Frontends - summary: Replace a Frontend Function route - description: 'Replaces the route''s target, path, and prefix handling. The new target must meet the same rules as on create, including `visibility: public`.' - operationId: updateFrontendFunctionRoute + - Functions + summary: Delete a function preview + description: | + Starts removing the preview's runtime, URL, builds and stored source once any running deployment + finishes; the preview reads `deleting` until that is done, and answers `404` once it is gone. Asking + again for a preview that is already being deleted is the same request. + + A preview the function runs cannot be deleted: roll back first. Deleting one the function only keeps + for a rollback gives that rollback up; the function's own build stays one `to_production` rollback + away. Never depends on the `functions.candidates` capability. + operationId: deleteFunctionCandidate security: - UserToken: [] - ProjectAccessToken: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateFrontendFunctionRouteRequest' + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FunctionId' + - $ref: '#/components/parameters/FunctionCandidateId' responses: - '200': - description: Function route replaced - content: - application/json: - schema: - $ref: '#/components/schemas/FrontendFunctionRoute' + '202': + description: Deletion started '400': - description: Invalid path or non-HTTP Function + description: Bad request - invalid identifier content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Unauthorized + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Project not owned by the caller + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Function route, Frontend, or Function not found + description: Function or preview not found content: application/json: schema: $ref: '#/components/schemas/Error' '409': - description: Path is already routed, the Frontend has reached its 64-route limit, or the Function is not public + description: '`code: candidate_in_use` - the function runs this preview; roll it back first.' content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Failed to replace Function route + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - delete: + /projects/{id}/functions/{functionId}/candidates/{candidateId}/deployments: + get: tags: - - Frontends - summary: Delete a Frontend Function route - operationId: deleteFrontendFunctionRoute + - Functions + summary: List a function preview's deployments + description: | + Returns the preview's deployments, newest first, at most 100. Never depends on the + `functions.candidates` capability. + operationId: listFunctionCandidateDeployments security: - UserToken: [] - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FunctionId' + - $ref: '#/components/parameters/FunctionCandidateId' responses: - '204': - description: Function route deleted + '200': + description: The preview's deployments + content: + application/json: + schema: + $ref: '#/components/schemas/FunctionCandidateDeploymentList' + '400': + description: Bad request - invalid identifier + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': - description: Unauthorized + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Project not owned by the caller + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Function route not found on the Frontend + description: Function or preview not found content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Failed to delete Function route + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/variable-environments: - get: + post: tags: - - Variable Environments - summary: List variable Environments - operationId: listVariableEnvironments + - Functions + summary: Deploy new source to a function preview + description: | + Builds the uploaded source and deploys it to the preview, which keeps serving its previous + deployment until this one succeeds. A preview takes one deployment at a time, and one the function + runs, or keeps for a rollback, takes none. While the `functions.candidates` capability is unavailable, including on the local development server, it answers `404` with code `feature_unavailable`. + + A deployment builds like any deploy and spends the project's build minutes. + operationId: redeployFunctionCandidate security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FunctionId' + - $ref: '#/components/parameters/FunctionCandidateId' + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + required: + - code + properties: + code: + type: string + format: binary + description: The function's source archive, as for deploying the function. Built with the function's runtime and handler. responses: - '200': - description: Variable Environments, with Global first and custom Environments ordered by name + '202': + description: The deployment is running content: application/json: schema: - $ref: '#/components/schemas/VariableEnvironmentList' + $ref: '#/components/schemas/FunctionCandidateDeployment' + '400': + description: Bad request - invalid identifier or source archive, or a variable the source reads has no value the function can give it + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': - description: Unauthorized + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Project not owned by the caller + description: Forbidden - project ownership required + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Function or preview not found, or the capability is unavailable (code `feature_unavailable`) + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: 'Conflict. `code: durable_function_unsupported` - the function is durable. `code: deployment_in_progress` - a deployment of the preview is running; retry once it finishes. `code: candidate_not_deployable` - the preview is being deleted. `code: candidate_in_use` - the function runs this preview or keeps it for a rollback. `code: function_deleting` - the function is being deleted.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: Request body exceeds the function source archive limit + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Too many requests - the project's build minutes for the billing cycle are used up (code `build_minutes_exceeded`) content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Failed to list variable Environments + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' + '503': + description: Service unavailable - function deployments are not configured + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/functions/{functionId}/candidates/{candidateId}/promote: post: tags: - - Variable Environments - summary: Create a variable Environment - operationId: createVariableEnvironment - description: Creates a custom variable Environment. Global is reserved and already exists. A Project may have at most 100 custom Environments. + - Functions + summary: Promote a function preview + description: | + Points the function's traffic at the preview's runtime. Nothing is deployed or rebuilt, so it + takes effect at once: every call to the function, through its own URL, the invoke route, a + schedule or a frontend route, runs the preview's code, while the function keeps its ID, URL, + visibility, schedules, metering and logs. The function's own build is kept as it is for a + rollback, and what the function ran becomes what a rollback returns to. + + The preview must be serving a successful deployment built with the variables, runtime and handler + the function has now, in every region the function deploys to, and the function must have a + successful deployment of its own. It is refused while a deployment of the function, or a + synchronization of its variables, runs. Promotion names the `revision` the caller read from + `serving`; a competing promotion or rollback makes it fail with `409`. Once the project's + repository is the source of truth, promotion is refused with `409`, as a direct deploy is. + While the `functions.candidates` capability is unavailable, including on the local development server, it answers `404` with code `feature_unavailable`. + operationId: promoteFunctionCandidate security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FunctionId' + - $ref: '#/components/parameters/FunctionCandidateId' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/CreateVariableEnvironmentRequest' + $ref: '#/components/schemas/FunctionPromotionRequest' responses: - '201': - description: Variable Environment created + '200': + description: The function's traffic now runs on the preview content: application/json: schema: - $ref: '#/components/schemas/VariableEnvironment' + $ref: '#/components/schemas/FunctionServing' '400': - description: | - Invalid name, or the reserved Global name. Schema-invalid names - return the generic invalid-request error; a reserved name returns - `invalid_variable_environment`. + description: Bad request - invalid identifier or body content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Unauthorized + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Project not owned by the caller + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project no longer exists + description: Function or preview not found, or the capability is unavailable (code `feature_unavailable`) content: application/json: schema: $ref: '#/components/schemas/Error' '409': - description: | - A case-insensitive name conflict or the 100-custom-Environment - limit has been reached, or the Project is being deleted. Tell them - apart with `code`, which is `variable_environment_conflict`, - `variable_environment_limit_reached`, or `project_deleting`. + description: 'Conflict. `code: durable_function_unsupported` - the function is durable. `code: stale_revision` - the revision is stale; read `serving` again. `code: already_serving` - the function already runs this preview. `code: candidate_not_ready` - the preview serves no successful deployment, or its latest redeploy failed; redeploy it successfully first. `code: configuration_changed` - the preview was built with other variables, runtime or handler than the function has now; redeploy it. `code: candidate_regions_changed` - the function deploys to a region the preview was not built in; redeploy it. `code: deployment_in_progress` - a deployment of the preview or of the function, or a synchronization of the function''s variables, is running; retry once it finishes. `code: function_not_deployed` - the function has no successful deployment of its own to roll back to. `code: function_deleting` - the function is being deleted. `code: source_managed_by_git` - the project''s repository is the source of truth; deploy from it.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: The request body is larger than 4 KiB content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Failed to create the variable Environment + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/variable-environments/{environmentId}: - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/VariableEnvironmentId' + /projects/{id}/functions/{functionId}/serving: get: tags: - - Variable Environments - summary: Get a variable Environment - operationId: getVariableEnvironment + - Functions + summary: Get what a function runs + description: | + Returns whether the function runs its own build or a promoted preview's, what a rollback returns + to, and its latest promotion or rollback. Never depends on the `functions.candidates` capability. + A durable function always runs its own build. + operationId: getFunctionServing security: - UserToken: [] - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FunctionId' responses: '200': - description: Variable Environment details + description: What the function runs content: application/json: schema: - $ref: '#/components/schemas/VariableEnvironment' + $ref: '#/components/schemas/FunctionServing' + '400': + description: Bad request - invalid identifier + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': - description: Unauthorized + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Project not owned by the caller + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Variable Environment not found in this Project + description: Function not found content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Failed to get the variable Environment + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - patch: + /projects/{id}/functions/{functionId}/serving/rollback: + post: tags: - - Variable Environments - summary: Rename a variable Environment - operationId: renameVariableEnvironment - description: Renames a custom Environment without changing its stable ID. Global cannot be renamed. + - Functions + summary: Roll back what a function runs + description: | + Points the function's traffic back at what served it before its last promotion or rollback, or at + its own build with `to_production`. A rollback is a new activation, so what it leaves becomes what + a further rollback returns to, and it can itself be undone. Nothing is deployed, so it takes effect + at once. It names the `revision` the caller read; a competing activation makes it fail with `409`. + + Rolling back to a preview promotes it again and is refused with `409` when promoting it would be, + and with `404` code `feature_unavailable` while the capability is unavailable. Rolling back to the + function's own build is not: it never depends on the capability, the project's source mode, or a + running deployment of the function. + operationId: rollbackFunctionServing security: - UserToken: [] - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FunctionId' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/RenameVariableEnvironmentRequest' + $ref: '#/components/schemas/FunctionRollbackRequest' responses: '200': - description: Variable Environment renamed + description: The function's traffic now runs on what it was rolled back to content: application/json: schema: - $ref: '#/components/schemas/VariableEnvironment' + $ref: '#/components/schemas/FunctionServing' '400': - description: | - Invalid name, or the reserved Global name. Schema-invalid names - return the generic invalid-request error; a reserved name returns - `invalid_variable_environment`. + description: Bad request - invalid identifier or body content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Unauthorized + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Project not owned by the caller + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Variable Environment not found in this Project + description: 'Function not found, or `code: feature_unavailable` while the `functions.candidates` capability is unavailable and the rollback would make a preview serve again' content: application/json: schema: $ref: '#/components/schemas/Error' '409': - description: | - A case-insensitive name conflict, an attempt to rename Global, or - a Project being deleted. Tell them apart with `code`, which is - `variable_environment_conflict`, - `variable_environment_immutable`, or `project_deleting`. + description: 'Conflict. `code: durable_function_unsupported` - the function is durable. `code: stale_revision` - the revision is stale; read `serving` again. `code: nothing_to_roll_back` - the function runs its own build and keeps no preview to return to. `code: rollback_unavailable` - the preview to roll back to is gone or serves no successful deployment. `code: function_not_deployed` - the function has no successful deployment of its own. `code: function_deleting` - the function is being deleted. A rollback to a preview is also refused like a promotion: `code: candidate_not_ready`, `code: configuration_changed`, `code: candidate_regions_changed`, `code: deployment_in_progress` and `code: source_managed_by_git`.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: The request body is larger than 4 KiB content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Failed to rename the variable Environment + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - delete: + /projects/{id}/durable-functions: + get: tags: - - Variable Environments - summary: Delete a variable Environment - operationId: deleteVariableEnvironment - description: Deletes a custom Environment. Global cannot be deleted. + - Durable Functions + summary: List all durable functions in a project + description: | + Standard functions never appear here, and durable functions never appear + under `/projects/{id}/functions`. The two are separate collections. + operationId: listDurableFunctions security: - UserToken: [] - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Search' responses: - '204': - description: Variable Environment deleted - '401': - description: Unauthorized + '200': + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/Error' - '403': - description: Project not owned by the caller + $ref: '#/components/schemas/PaginatedDurableFunctions' + '400': + description: Bad request - invalid pagination parameters content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Variable Environment not found in this Project - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '409': - description: | - Global is protected, or the Project is being deleted. Tell them - apart with `code`, which is `variable_environment_immutable` or - `project_deleting`. + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Failed to delete the variable Environment - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /projects/{id}/variables: - get: + post: tags: - - Variables - summary: List all variables for a project + - Durable Functions + summary: Create or update a durable function description: | - Returns project-level environment variables used by deployed functions and frontends. - operationId: listVariables + Upload a durable function source bundle. Creates the function on the + first call for a name and redeploys it on every call after that, the + same create-or-update contract `POST /projects/{id}/functions` has. + + Volcano builds and deploys asynchronously. A deployment that starts + immediately returns `status: provisioning`, then transitions to `active` + or `failed`; a deployment that has to wait for a running one is exposed + through `pending_deployment_id`. Existing executions keep running + against the runtime they started on. + + The `durable` configuration is derived from the project's plan rather + than supplied here, and is fixed once the function exists. A name + already held by a standard function is rejected with 409: a function + cannot change kind. + operationId: createDurableFunction security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Cursor' - - $ref: '#/components/parameters/EndingBefore' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Search' + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + required: + - name + - code + - runtime + properties: + name: + type: string + description: DNS-safe function name (lowercase letters, numbers, hyphens; cannot start or end with hyphen) + maxLength: 63 + pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ + example: order-pipeline + code: + type: string + format: binary + description: ZIP or tar.gz archive containing function source code plus dependency manifests/lockfiles. + runtime: + type: string + enum: + - nodejs22.x + - nodejs24.x + - python3.13 + - python3.14 + description: | + Runtime environment. Required. Durable execution needs the + durable authoring API, which ships for these runtimes only; + any other runtime is rejected with 400 and the response + names the ones that work. Note that a durable Python + function needs a newer runtime than a standard one defaults + to. `GET /functions/runtimes` reports `durable_capable` per + runtime. + example: nodejs24.x + handler: + type: string + description: The name of the function to invoke. Defaults to "handler" if not specified. + default: handler + example: handler + visibility: + allOf: + - $ref: '#/components/schemas/FunctionVisibility' + description: | + Who may start an execution. Redeploying is the only way to + change it, since the collection has no update endpoint; omit + it to keep the current visibility, and a new function starts + `private`. + + The standard collection's synchronous invocation fields — + `invocation_mode`, `http_auth_mode`, `openapi_spec` — + configure a request path no durable route serves, and are + rejected with 400 rather than ignored. + is_public: + type: boolean + deprecated: true + description: | + Deprecated alias for `visibility`: `true` means `public` and + `false` means `authenticated`. Sending both with different + meanings returns 400. + variable_scope: + type: string + enum: + - all + - scoped + x-enum-varnames: + - CreateDurableFunctionMultipartBodyVariableScopeAll + - CreateDurableFunctionMultipartBodyVariableScopeScoped + description: | + Which project variables this function receives. `all` (the default) gives it every project variable; `scoped` gives it only the variables it selects. Omitting this leaves an existing function's scope unchanged. + variables: + type: string + description: | + JSON-encoded array of project variable names this function requires, on top of the ones detected in its source. A declared name the project does not define is rejected with 400; a detected name it does not define is ignored. Only used when `variable_scope` is `scoped`. Omitting this leaves an existing function's declared names unchanged. + commit: + type: string + description: | + JSON-encoded commit the uploaded source came from: `{"repository": "acme/app", "sha": "<40-character commit ID>", "dirty": false}`. `repository` is `owner/name` or a github.com remote URL (`https://github.com/acme/app.git`, `git@github.com:acme/app.git`, or `ssh://git@github.com/acme/app.git`); Volcano drops any credentials in the URL and records `owner/name`. `dirty` is `true` when the uploaded files differ from the commit. All three fields are required, and fields Volcano does not know are ignored. An empty value, `null`, or `""` reports no commit. A malformed commit, or a repository not on GitHub, returns 400 before anything is deployed. Volcano records a function's commit with `commit.verified: false`; a clean commit of the project's connected repository that its production branch holds gets `commit.verification: repository`. responses: '200': - description: Successful response + description: Existing durable function updated; its deployment was started or queued content: application/json: schema: - $ref: '#/components/schemas/PaginatedVariables' - '404': - description: Project not found + $ref: '#/components/schemas/DurableFunction' + '201': + description: Durable function created and deployment workflow started + content: + application/json: + schema: + $ref: '#/components/schemas/DurableFunction' + '400': + description: | + Bad request (invalid archive, unsupported runtime, invalid name, an + unknown `visibility`, `visibility` and `is_public` disagree, a + malformed `commit`, or a project region that does not offer durable + execution — a durable + function deploys to every region of its project) content: application/json: schema: $ref: '#/components/schemas/Error' - post: - tags: - - Variables - summary: Create or update a variable - description: | - Creates a project-level environment variable and triggers asynchronous propagation - to deployed functions and frontends in the project's configured regions. - operationId: createVariable - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateVariableRequest' - responses: - '201': - description: Variable created + '403': + description: Durable function limit exceeded for the project content: application/json: schema: - $ref: '#/components/schemas/Variable' - '400': - description: Bad request + $ref: '#/components/schemas/Error' + '409': + description: | + Name is held by a standard function, or a deletion is queued or + running. The request is refused before the deploy starts, so + nothing is deployed. The message `project variables changed during + the upload; retry` means `NODE_PATH` was created, changed or + deleted while the upload was processed; send the same request + again. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal server error (function deployment failed) content: application/json: schema: $ref: '#/components/schemas/Error' '503': - description: Private variable membership writes are disabled during rollout + description: | + Durable deploys are paused platform-wide. The same request succeeds + once they are re-enabled; executions already running are unaffected. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/databases: + /projects/{id}/durable-functions/{functionId}: get: tags: - - Databases - summary: List all databases for a project - description: | - Supports two mutually exclusive pagination modes. Offset mode uses `page` - and `limit`. Cursor mode uses `cursor` and `limit`, supports `search` - (case-insensitive name match), and returns `next_cursor`/`prev_cursor`. - The optional `status` filter applies in both modes and is bound to the - cursor. Sending both `page` and `cursor` (or `page` and `search`) returns 400. - operationId: listDatabases + - Durable Functions + summary: Get durable function by ID or name + operationId: getDurableFunction security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Cursor' - - $ref: '#/components/parameters/EndingBefore' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Search' - - name: status - in: query - required: false - schema: - type: string - enum: - - provisioning - - active - - restoring - - failed - - deleting - description: Return only the databases in this status. + - $ref: '#/components/parameters/DurableFunctionId' responses: '200': description: Successful response content: application/json: schema: - $ref: '#/components/schemas/PaginatedDatabases' - post: + $ref: '#/components/schemas/DurableFunction' + '404': + description: Durable function not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: tags: - - Databases - summary: Create a new PostgreSQL database + - Durable Functions + summary: Delete a durable function description: | - Creates a PostgreSQL database in the project. - Each project can hold 1 database on HOBBY and up to 10,000 on SUPERAGENT. - Requests over the plan's cap return 403. - operationId: createDatabase + Accepted for asynchronous teardown; the work continues after the + response. The function's executions go with it: executions still in + flight are stopped, and history stops being readable whatever + `retention_days` had left. + + Stopping is asynchronous at the platform, and it does not interrupt a + step already running -- that step runs to its next checkpoint. So a + delete ends an execution rather than halting it mid-step; stop the + execution yourself first if you need to observe it ending. + operationId: deleteDurableFunction security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateDatabaseRequest' + - $ref: '#/components/parameters/DurableFunctionId' responses: - '201': - description: Database created (provisioning) - content: - application/json: - schema: - $ref: '#/components/schemas/Database' - '403': - description: Database limit exceeded for the project + '202': + description: Deletion accepted and teardown started + '404': + description: | + Durable function not found. Also returned for an id that names a + durable function in another project, so the response cannot be used + to tell the two apart. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/databases/{databaseName}: + /projects/{id}/durable-functions/{functionId}/deployments: get: tags: - - Databases - summary: Get database details - operationId: getDatabase + - Durable Functions + summary: List durable function deployments + operationId: listDurableFunctionDeployments security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' responses: '200': description: Successful response content: application/json: schema: - $ref: '#/components/schemas/Database' - delete: - tags: - - Databases - summary: Delete a database - description: | - Deletes a database and the instance backing it. When the instance is - removed synchronously the database row is deleted and the response is - `204`. If the instance cannot be deleted right away, the database row - is retained (status `deleting`) and its teardown is handed to the - background reconciler, which retries the deletion and removes the row - once the instance is gone; in that case the response is `202`. The database row is - never dropped while its instance still exists, so an instance is - never orphaned without a record to retry from. - operationId: deleteDatabase - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' - responses: - '202': - description: | - Deletion accepted and in progress. The backing instance could not be - removed synchronously, so the database is marked `deleting` and torn - down asynchronously by the reconciler. - content: - application/json: - schema: - type: object - properties: - status: - type: string - example: deleting - message: - type: string - example: database deletion in progress - '204': - description: Database deleted (backing instance removed synchronously) + $ref: '#/components/schemas/PaginatedFunctionDeployments' '404': - description: Project or database not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '409': - description: | - A restore is running on the database. Deleting it while a worker is - replacing its data would race that worker, so wait for the restore - to finish. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '503': - description: | - Volcano could not check whether a restore is running, and will not - delete a database that might be mid-restore. Retry. + description: Durable function not found content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/databases/{databaseName}/branches: + /projects/{id}/durable-functions/{functionId}/schedulers: get: tags: - - Database Branches - summary: List a database's branches + - Durable Functions + summary: List schedulers for a durable function description: | - Returns every branch of the database, including those still provisioning - and those that failed, since each still holds a name. - - Connection strings are omitted. Fetch a single branch to get its - connection string. - operationId: listDatabaseBranches + The durable collection's counterpart to + `/projects/{id}/functions/{functionId}/schedulers`. A standard + function's id is not accepted here, and a durable function's id is not + accepted there. + operationId: listDurableFunctionSchedulers security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/DurableFunctionId' responses: '200': - description: Successful response + description: Durable function schedulers content: application/json: schema: - $ref: '#/components/schemas/DatabaseBranchList' + $ref: '#/components/schemas/FunctionSchedulerListResponse' '404': - description: Project or database not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '503': - description: Branching is temporarily unavailable + description: Durable function not found content: application/json: schema: $ref: '#/components/schemas/Error' post: tags: - - Database Branches - summary: Create a branch of a database + - Durable Functions + summary: Create a scheduler for a durable function description: | - Forks the database into a new branch. The branch starts as an exact copy - of the parent's data and diverges from there. - - Provisioning is asynchronous: the response is `202` with the branch in - `provisioning` and no connection string. Poll the branch until it reports - `active`, at which point it carries its own connection string. + Each tick starts an execution rather than invoking the function, under + an execution name derived from the run, so a retried tick resolves to + the execution it already started. Requested regions must be a subset of + the function's deployed regions. - Retrying a create with a name that already exists returns `409` rather - than a second branch, so a retried request cannot silently consume two - slots of the branch allowance. - operationId: createDatabaseBranch + A tick draws on the same durable allowances and concurrency cap a + manual start does, and a tick that would exceed the cap fails that run. + operationId: createDurableFunctionScheduler security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/DurableFunctionId' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/CreateDatabaseBranchRequest' + $ref: '#/components/schemas/CreateFunctionSchedulerRequest' responses: - '202': - description: Branch accepted and provisioning + '201': + description: Scheduler created content: application/json: schema: - $ref: '#/components/schemas/DatabaseBranch' + $ref: '#/components/schemas/FunctionScheduler' '400': - description: Invalid branch name or lifetime + description: | + Invalid schedule, geofenced region, a scheduler of this name + already exists on the function, or the function is not active. content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: | - The database has reached its branch allowance, or the owner's plan - does not include branching. + Schedulers are not available on this plan, or the project already + holds as many as the plan allows. The cap counts standard and + durable function schedulers together. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project or database not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '409': - description: | - A branch of that name already exists on this database, or the - database cannot be branched right now because it is still - provisioning, being restored, failed, or being deleted. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '503': - description: Branching is temporarily unavailable + description: Durable function not found content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/databases/{databaseName}/branches/{branchName}: + /projects/{id}/durable-functions/{functionId}/schedulers/{schedulerId}: get: tags: - - Database Branches - summary: Get a branch - description: | - Returns the branch, including its connection string once it is `active`. - Poll this after creating a branch to learn when it is connectable. - operationId: getDatabaseBranch + - Durable Functions + summary: Get a durable function scheduler + operationId: getDurableFunctionScheduler security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' - - $ref: '#/components/parameters/BranchName' + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/SchedulerId' responses: '200': - description: Successful response + description: Durable function scheduler content: application/json: schema: - $ref: '#/components/schemas/DatabaseBranch' + $ref: '#/components/schemas/FunctionScheduler' '404': - description: Project, database, or branch not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '503': - description: Branching is temporarily unavailable + description: Durable function or scheduler not found content: application/json: schema: $ref: '#/components/schemas/Error' patch: tags: - - Database Branches - summary: Extend a branch's lifetime - description: | - Replaces the branch's lifetime and restarts the countdown from now, so a - branch you are still working on is not swept mid-session. The new - duration is remembered, so a later reset re-arms the same lifetime. - operationId: updateDatabaseBranch + - Durable Functions + summary: Update a durable function scheduler + operationId: updateDurableFunctionScheduler security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' - - $ref: '#/components/parameters/BranchName' + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/SchedulerId' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UpdateDatabaseBranchRequest' + $ref: '#/components/schemas/UpdateFunctionSchedulerRequest' responses: '200': - description: Lifetime updated + description: Scheduler updated content: application/json: schema: - $ref: '#/components/schemas/DatabaseBranch' + $ref: '#/components/schemas/FunctionScheduler' '400': - description: Requested lifetime is outside the allowed range + description: | + Invalid schedule, geofenced region, or a scheduler of this name + already exists on the function. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project, database, or branch not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '409': - description: The branch is being deleted - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '503': - description: Branching is temporarily unavailable + description: Durable function or scheduler not found content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - - Database Branches - summary: Delete a branch - description: | - Marks the branch for teardown and returns immediately. The branch stops - accepting connections at once; its fork and its row are removed by a - background job, so a provider outage cannot leave the call hanging or the - branch half-deleted. - - Deleting a branch that is still provisioning is allowed and stops the - build, and repeating the call while teardown is in progress is accepted - again. Once the branch is gone the call returns `404`. - operationId: deleteDatabaseBranch + - Durable Functions + summary: Delete a durable function scheduler + operationId: deleteDurableFunctionScheduler security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' - - $ref: '#/components/parameters/BranchName' + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/SchedulerId' responses: - '202': - description: Deletion accepted and in progress - content: - application/json: - schema: - type: object - properties: - status: - type: string - example: deleting - message: - type: string - example: branch deletion in progress - required: - - status - - message - '404': - description: Project, database, or branch not found - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '503': - description: Branching is temporarily unavailable + '204': + description: Scheduler deleted + '404': + description: Durable function or scheduler not found content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/databases/{databaseName}/branches/{branchName}/reset: + /projects/{id}/durable-functions/{functionId}/executions: post: tags: - - Database Branches - summary: Reset a branch to its parent's current state + - Durable Functions + summary: Start a durable execution description: | - Discards everything written on the branch and re-forks it from the - parent as it is now. + Starts an execution and returns its handle. Never returns a result: an + execution can outlive any request a client could hold open, so the + result is read back from + `GET /projects/{id}/durable-functions/{functionId}/executions/{executionId}`. - Returns immediately with the branch in `provisioning`. The rewind runs in - the background; poll the branch until it reports `active` before - connecting again. + The request body is the execution's input and must be valid JSON if + present. An empty body starts the execution with no input. - The branch keeps its name and its connection string, so anything holding - that string keeps working once it is active again, and its lifetime is - re-armed to the duration it was created with. The branch does not serve - connections for the duration of the reset. - operationId: resetDatabaseBranch + Send `X-Volcano-Execution-Name` to make the start idempotent: repeating a + start with the same name returns the existing execution instead of + beginning a second one. + + Each execution counts against the project's durable execution + allowance, the operations it performs count against the durable + operations allowance when it finishes, and the number of executions in + flight at once is capped by the plan. + operationId: startDurableExecution security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' - - $ref: '#/components/parameters/BranchName' + - $ref: '#/components/parameters/DurableFunctionId' + - name: X-Volcano-Execution-Name + in: header + required: false + description: | + Idempotency key for this execution. Generated when omitted. A repeat + under a name that already names a running execution returns that + execution and is not charged again. + + Letters, digits, `-`, `_` and `.`, up to 255 characters. Anything + else is rejected with `400`. + schema: + type: string + maxLength: 255 + pattern: ^[A-Za-z0-9._-]+$ + requestBody: + required: false + content: + application/json: + schema: + description: Input passed to the function, up to 256 KiB. responses: '202': - description: Branch reset accepted; the branch is provisioning + description: Execution accepted and started content: application/json: schema: - $ref: '#/components/schemas/DatabaseBranch' + $ref: '#/components/schemas/DurableExecution' + '400': + description: Payload is not valid JSON, or the execution name is invalid + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Project, database, or branch not found + description: Durable function not found content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: | - The branch is not active, a reset is already in progress, the parent - database is being restored, or the parent was restored within the - last 24 hours — a reset re-forks from the parent, and the provider - holds a child's reset shut for that long afterwards. + Function is not deployed yet, or has no deployed region. Also + returned when two starts under the same execution name raced and + both released it, which is retryable as it stands. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: Payload exceeds the maximum execution input size + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: | + Too many executions already in flight for this project, or the + account is out of one of its billing-cycle durable allowances: + executions, operations, or compute. An owner-started execution is + metered exactly like an application-started one. content: application/json: schema: $ref: '#/components/schemas/Error' '503': - description: Branching is temporarily unavailable + description: | + Durable execution is not available in this environment, or the + plan terms for the start could not be read. The first means the + capability is paused or this deployment cannot serve it, so it is + not one to retry in a loop; the second is transient. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/databases/{databaseName}/branches/{branchName}/reset-password: - post: + get: tags: - - Database Branches - summary: Rotate a branch's password + - Durable Functions + summary: List a durable function's executions description: | - Issues a new password for the branch and invalidates the previous - connection string. Existing connections are not interrupted; new ones - must use the returned string. Proxies pick the rotation up within a few - seconds, so the previous password can still open new connections until - then. - - The parent database's credentials are untouched. - operationId: resetDatabaseBranchPassword + Returns the platform's last observed status for each execution; listing + does not poll each one. Fetch a single execution for its live state. + operationId: listDurableExecutions security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' - - $ref: '#/components/parameters/BranchName' + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + - name: status + in: query + required: false + description: Return only executions in this status. + schema: + $ref: '#/components/schemas/DurableExecutionStatus' responses: '200': - description: Password rotated - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseBranch' - '404': - description: Project, database, or branch not found + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/Error' - '409': - description: The branch is not active + $ref: '#/components/schemas/PaginatedDurableExecutions' + '400': + description: Unsupported status filter content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: Branching is temporarily unavailable + '404': + description: Durable function not found content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/databases/{databaseName}/backups: + /projects/{id}/durable-functions/{functionId}/executions/{executionId}: get: tags: - - Database Backups - summary: List a database's backups + - Durable Functions + summary: Get a durable execution description: | - Returns every backup of the database, newest first, together with the - window a point-in-time restore may target. - - Both backups you took and backups the schedule produced are listed; - `source` tells them apart. Only manual backups count against the plan's - backup allowance. - operationId: listDatabaseBackups + Returns the execution's current state, including its `result` once it has + succeeded. Poll this to wait for an execution to finish. + operationId: getDurableExecution security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/DurableExecutionId' responses: '200': description: Successful response content: application/json: schema: - $ref: '#/components/schemas/DatabaseBackupList' - '403': - description: Backups require SUPERAGENT - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/DurableExecution' '404': - description: Project or database not found + description: Durable function or execution not found content: application/json: schema: $ref: '#/components/schemas/Error' - '409': + '503': description: | - The database has no storage project yet, so there is nothing to - list. A database reports this while it is still provisioning. - content: - application/json: + Durable execution is not available in this environment, or reads of + the execution's state in its region are throttled. The first means + the capability is paused or this deployment cannot serve it, so the + request is not one to retry in a loop. A throttled read is transient + and carries `Retry-After`. + headers: + Retry-After: + description: | + Seconds to wait before reading again. Sent only when reads in + the execution's region are throttled. schema: - $ref: '#/components/schemas/Error' - '503': - description: Backups are temporarily unavailable + type: integer content: application/json: schema: $ref: '#/components/schemas/Error' - post: + /projects/{id}/durable-functions/{functionId}/executions/{executionId}/operations: + get: tags: - - Database Backups - summary: Back up a database + - Durable Functions + summary: List a durable execution's operations description: | - Captures the database as it is now. The backup is available immediately; - its `size_bytes` appears once the storage provider has costed it. + Returns the execution's trace: every operation it began — each step, + wait, poll, child context, map item and parallel branch — with when it + started and ended, how it ended, and each attempt of a retried step. + `invocations` are the windows the function's code was actually running; + the gaps between them are time the execution spent suspended, which is + not charged. - Backups are rate-limited to one per minute per database, and capped by - the owner's plan. - operationId: createDatabaseBackup + A finished execution's trace is final and `complete` is `true`. A + running one is refreshed when it is read, and can be up to about ten + seconds behind; `synced_at` says when it was last refreshed. Inputs, + results and other payloads are never included. + + The list is not paginated: an execution is limited to 3,000 + operations, and a trace is read whole. + operationId: listDurableExecutionOperations security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateDatabaseBackupRequest' + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/DurableExecutionId' responses: - '201': - description: Backup created + '200': + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/DatabaseBackup' - '400': - description: Invalid backup name + $ref: '#/components/schemas/DurableExecutionOperationList' + '404': + description: Durable function or execution not found content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: | - The database has reached its backup allowance, or the owner's plan - does not include backups, which are available only on SUPERAGENT. + '500': + description: The trace could not be read content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project or database not found + '503': + description: | + Durable execution is not available in this environment. Either the + capability is paused or this deployment cannot serve it, so the + request is not one to retry in a loop. content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: | - A backup of that name already exists, the database is not active, a - restore is running on it, or a backup was taken too recently. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '503': - description: Backups are temporarily unavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /projects/{id}/databases/{databaseName}/backups/{backupName}: - get: + /projects/{id}/durable-functions/{functionId}/executions/{executionId}/stop: + post: tags: - - Database Backups - summary: Get a backup - description: Returns one backup of the database. - operationId: getDatabaseBackup + - Durable Functions + summary: Stop a durable execution + description: | + Cancels a running execution. Its completed steps are not undone. + + The call is accepted rather than awaited: cancellation happens behind + it, so the response reports the execution as it was read back and may + still say `running`. Do not branch on that status — the execution + settles into `stopped` shortly after, and polling + `GET /projects/{id}/durable-functions/{functionId}/executions/{executionId}` + is how you see it get there. + + Stopping an execution that already finished is not an error: the + response carries the state it settled in. + operationId: stopDurableExecution security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' - - $ref: '#/components/parameters/BackupName' + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/DurableExecutionId' responses: '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseBackup' - '403': - description: Backups require SUPERAGENT + description: | + Stop accepted. The body is the execution as it was read back, which + may still report `running`. content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/DurableExecution' '404': - description: Project, database, or backup not found + description: Durable function or execution not found content: application/json: schema: $ref: '#/components/schemas/Error' '409': - description: | - The database has no storage project yet, so it holds no backups. A - database reports this while it is still provisioning. + description: Execution has not started yet content: application/json: schema: $ref: '#/components/schemas/Error' '503': - description: Backups are temporarily unavailable + description: | + Durable execution is not available in this environment, or stops or + reads of executions in its region are throttled. The first means the + capability is paused or this deployment cannot serve it, so the + request is not one to retry in a loop. A throttle is transient and + carries `Retry-After`. A stop throttled while reading the execution + back may already have been sent; repeating it is safe, because a + stop of an execution that has ended answers the state it ended in. + headers: + Retry-After: + description: | + Seconds to wait before trying again. Sent only when stops or + reads of executions in the region are throttled. + schema: + type: integer content: application/json: schema: $ref: '#/components/schemas/Error' - delete: + /projects/{id}/durable-functions/{functionId}/executions/{executionId}/messages: + post: tags: - - Database Backups - summary: Delete a backup + - Durable Functions + summary: Send a message to a durable execution description: | - Deletes the backup and frees its storage. Scheduled backups can be - deleted too. A backup that is already gone reports `404`, so a name - that never existed and a name that no longer does read the same. - Refused with `409` while the database is being restored. - operationId: deleteDatabaseBackup + Sends a named message to a running execution, as + `POST /durable-functions/{functionId}/executions/{executionId}/messages` + does for an application. The workflow receives it from + `ctx.waitForMessage` with the same name; until then it is kept, and + waits take messages oldest first. + + Project access tokens can send messages, but read-only ones cannot. + A message never decides an approval. + operationId: sendDurableMessage security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' - - $ref: '#/components/parameters/BackupName' + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/DurableExecutionId' + - $ref: '#/components/parameters/DurableMessageIdempotencyKey' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SendDurableMessageRequest' responses: '200': - description: Backup deleted + description: A message with this `Idempotency-Key` was already sent; it is returned content: application/json: schema: - type: object - properties: - status: - type: string - example: deleted - message: - type: string - example: backup deleted - required: - - status - - message + $ref: '#/components/schemas/DurableMessage' + '201': + description: | + Message sent. `status` is `delivered`, `delivering`, or `queued`, + as on the application route. + content: + application/json: + schema: + $ref: '#/components/schemas/DurableMessage' + '400': + description: The name, data or idempotency key is invalid + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '403': - description: Backups require SUPERAGENT + description: The request used a `read_only` project access token content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project, database, or backup not found + description: Durable function or execution not found content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: | - The database is being restored. A restore is pinned to a backup it - may not have restored yet, so deleting one is refused until the - restore finishes. + The message cannot be sent. `code` is `execution_not_running` or + `too_many_queued_messages`. content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: Backups are temporarily unavailable + '413': + description: The request body is larger than 72 KiB + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Too many messages sent to this execution content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/databases/{databaseName}/backup-schedule: get: tags: - - Database Backups - summary: Get the automated backup schedule + - Durable Functions + summary: List a durable execution's messages description: | - Returns the database's backup schedule. An empty list means no scheduled - backups. - operationId: getDatabaseBackupSchedule + Lists the messages sent to and published by an execution, oldest + first. Pass the last `seq` you read as `after` to read only what came + next. + + Project access tokens can list messages, including read-only ones. + operationId: listDurableMessages security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/DurableExecutionId' + - $ref: '#/components/parameters/DurableMessageDirectionFilter' + - $ref: '#/components/parameters/DurableMessageNameFilter' + - $ref: '#/components/parameters/DurableMessageAfter' + - $ref: '#/components/parameters/DurableMessageLimit' responses: '200': description: Successful response content: application/json: schema: - $ref: '#/components/schemas/DatabaseBackupSchedule' - '403': - description: Backups require SUPERAGENT + $ref: '#/components/schemas/DurableMessageList' + '400': + description: A filter is invalid content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project or database not found + description: Durable function or execution not found content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: | - The database has no storage project yet, so it has no schedule. A - database reports this while it is still provisioning. + /projects/{id}/durable-functions/{functionId}/executions/{executionId}/message-waits: + get: + tags: + - Durable Functions + summary: List a durable execution's open message waits + description: | + Lists the waits an execution has open in `ctx.waitForMessage`, oldest + first, so you can see which message names it is waiting for. + + Project access tokens can list waits, including read-only ones. + operationId: listDurableMessageWaits + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/DurableExecutionId' + responses: + '200': + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/Error' - '503': - description: Backups are temporarily unavailable + $ref: '#/components/schemas/DurableMessageWaitList' + '404': + description: Durable function or execution not found content: application/json: schema: $ref: '#/components/schemas/Error' - put: + /durable-messages/waits: + post: tags: - - Database Backups - summary: Replace the automated backup schedule + - Durable Functions + summary: Wait for a message from inside a workflow description: | - Replaces the schedule wholesale. Send an empty `entries` list to stop - scheduled backups. + Registers a wait for a named message. The Volcano SDK calls this from + `ctx.waitForMessage`; applications do not call it directly. - Scheduled backups do not count against the plan's backup allowance, but - their retention is clamped to the plan's. - operationId: updateDatabaseBackupSchedule - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' + `execution_ref` and `callback_id` are opaque values the SDK reads from + the running workflow. Together they are the request's credential, so + the operation takes no other authentication. When a message for the + name is already queued, the wait takes the oldest one at once. + + Retrying is safe: a request for a wait that is already registered + returns it with `200`. + operationId: registerDurableMessageWait + security: [] requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/DatabaseBackupSchedule' + $ref: '#/components/schemas/RegisterDurableMessageWaitRequest' responses: '200': - description: Schedule replaced + description: The wait was already registered content: application/json: schema: - $ref: '#/components/schemas/DatabaseBackupSchedule' - '400': - description: | - The schedule names a recurrence that cannot fire: a weekly or - monthly one with no `day`, or a `day` outside its frequency's range - (1-7 for weekly, 1-28 for monthly). The response says which. + $ref: '#/components/schemas/DurableMessageWaitRegistration' + '201': + description: Wait registered content: application/json: schema: - $ref: '#/components/schemas/Error' - '403': - description: Backups require SUPERAGENT + $ref: '#/components/schemas/DurableMessageWaitRegistration' + '400': + description: The request body is invalid content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project or database not found + description: No running durable execution matches `execution_ref` content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: | - The database is not active, or a restore is running on it — a restore - moves the data to a new branch, and the provider keeps the schedule - per branch. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '503': - description: Backups are temporarily unavailable + The wait cannot be registered now. `code` says why: + + - `callback_not_ready`: the workflow has not finished opening the + wait yet. Retry with a short backoff; the SDK does. + - `callback_closed`: the workflow is no longer waiting on it. + - `callback_taken`: the callback is already registered as an + approval or a messages session. + - `execution_ended`: the execution has finished. + - `too_many_message_waits`: the execution already has the maximum + number of open waits. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/databases/{databaseName}/restores: - get: - tags: - - Database Backups - summary: List a database's restores - description: | - Returns the database's restore history, newest first, capped at the 50 - most recent. There is no pagination: a database that has been restored - more than 50 times keeps the older records but does not return them. - operationId: listDatabaseRestores - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseRestoreList' - '403': - description: Backups require SUPERAGENT + '413': + description: The request body is larger than 8 KiB content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project or database not found + '429': + description: Too many requests from this execution content: application/json: schema: $ref: '#/components/schemas/Error' '503': - description: Backups are temporarily unavailable + description: | + The wait could not be confirmed with the workflow right now. Retry + with backoff. content: application/json: schema: $ref: '#/components/schemas/Error' + /durable-messages/sessions: post: tags: - - Database Backups - summary: Restore a database + - Durable Functions + summary: Open a messages session from inside a workflow description: | - Replaces the database's data, either with a named backup or with its - state at a point in time. This is destructive: everything written after - that point is discarded. + Opens the session a workflow publishes messages with. The Volcano SDK + calls this once per workflow context, on its first `ctx.publish`; + applications do not call it directly. - Asynchronous: the response is `202` with the restore `pending` and the - database `restoring`. The database does not accept connections until the - restore reports `completed`; its connection string is unchanged - throughout, so nothing holding it needs updating. + As for a wait, `execution_ref` and `callback_id` are the credential. + The session's token is delivered to the workflow itself and never + appears in a response. - Restores are in place. There is no way to restore into a second - database, and a database's branches are never restored — they keep - serving their own data, but resetting a branch from its parent is - refused by the storage provider for up to 24 hours afterwards. - operationId: createDatabaseRestore - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' + Retrying is safe: a request for a session that is already registered + returns it with `200`. + operationId: openDurableMessageSession + security: [] requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/CreateDatabaseRestoreRequest' + $ref: '#/components/schemas/OpenDurableMessageSessionRequest' responses: - '202': - description: Restore accepted and in progress + '200': + description: The session was already registered content: application/json: schema: - $ref: '#/components/schemas/DatabaseRestore' - '400': - description: | - Neither or both restore targets were named, or the requested time is - outside the available window. + $ref: '#/components/schemas/DurableMessageSessionRegistration' + '201': + description: Session opened content: application/json: schema: - $ref: '#/components/schemas/Error' - '403': - description: | - The owner's plan does not include backups or point-in-time restore. - Both are available only on SUPERAGENT. + $ref: '#/components/schemas/DurableMessageSessionRegistration' + '400': + description: The request body is invalid content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project, database, or backup not found + description: No running durable execution matches `execution_ref` content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: | - A restore is already in progress, the database is not active, - another database operation is still running, or the database is - holding as many pre-restore branches as it may. + The session cannot be opened now. `code` is `callback_not_ready`, + `callback_closed`, `callback_taken` (the callback is already + registered as an approval or a message wait), `execution_ended`, + or `too_many_message_sessions`. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: The request body is larger than 8 KiB + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Too many requests from this execution content: application/json: schema: $ref: '#/components/schemas/Error' '503': - description: Backups are temporarily unavailable + description: | + The session could not be confirmed with the workflow right now. + Retry with backoff. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/databases/{databaseName}/restores/{restoreId}: - get: + /durable-messages/publish: + post: tags: - - Database Backups - summary: Get a restore + - Durable Functions + summary: Publish a message from inside a workflow description: | - Returns the restore. Poll this after starting one; the database is - connectable again once it reports `completed`. - operationId: getDatabaseRestore - security: - - UserToken: [] - - ProjectAccessToken: [] + Publishes a named message from a running workflow. The Volcano SDK + calls this from `ctx.publish`; applications do not call it directly. + + The message is stored, listed with the execution's messages, and + delivered live to clients subscribed to the execution. Live delivery + counts against the project's Realtime messages. + + The SDK sends an `Idempotency-Key` that a rerun of the publishing step + repeats, so a step that runs again returns the first message with + `200` and stores nothing new. That message is delivered live again, + and counts again, because the first run may have stopped before + subscribers got it. The SDKs deliver it to a subscriber once. + operationId: publishDurableMessage + security: [] parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' - - $ref: '#/components/parameters/RestoreId' + - name: X-Volcano-Durable-Session + in: header + required: true + description: The session token the workflow received when its session opened. + schema: + type: string + minLength: 1 + maxLength: 128 + - $ref: '#/components/parameters/DurableMessageIdempotencyKey' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PublishDurableMessageRequest' responses: '200': - description: Successful response + description: A message with this `Idempotency-Key` was already published; it is returned content: application/json: schema: - $ref: '#/components/schemas/DatabaseRestore' - '403': - description: Backups require SUPERAGENT + $ref: '#/components/schemas/DurableMessage' + '201': + description: Message published + content: + application/json: + schema: + $ref: '#/components/schemas/DurableMessage' + '400': + description: The session token header is missing, or the name, data or idempotency key is invalid content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project, database, or restore not found + '401': + description: The session token is not valid content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: Backups are temporarily unavailable + '409': + description: | + The message cannot be published. `code` is + `execution_not_running` or `too_many_published_messages`. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/databases/{databaseName}/reset-password: + '413': + description: The request body is larger than 72 KiB + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /durable-callbacks: post: tags: - - Databases - summary: Reset database password + - Durable Functions + summary: Get a callback token from inside a workflow description: | - Rotates the Volcano-managed PostgreSQL password used by clients when connecting - through pgproxy. This does not rotate or expose the internal owner password. - The returned password and connection string are the only client credentials that - will authenticate through pgproxy after reset. + Registers a waiting step and returns its callback token. The Volcano + SDK calls this from `ctx.waitForCallback`; applications do not call it + directly. - Existing connections are not interrupted; new ones must use the returned - string. Proxies pick the rotation up within a few seconds, so the previous - password can still open new connections until then. - operationId: resetDatabasePassword - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' + `execution_ref` and `callback_id` are opaque values the SDK reads from + the running workflow. Together they are the request's credential, so + the operation takes no other authentication. The token works until + the step's own timeout, and only for that step. + + Retrying is safe: a request for a step that is already registered + returns the same token with `200` while the step still waits. Once + the token is answered, or the step times out or ends, a retry answers + `409` with `callback_closed`. + operationId: registerDurableCallback + security: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RegisterDurableCallbackRequest' responses: '200': - description: Password reset successful + description: The step was already registered; its token is returned content: application/json: schema: - type: object - properties: - message: - type: string - role_name: - type: string - description: Volcano-managed per-database client login (also the pgproxy routing username) - example: volcano_client_11111111-1111-1111-1111-111111111111 - new_password: - type: string - description: New Volcano-managed client password. Always starts with `vpg_`. - connection_string: - type: string - description: Updated pgproxy connection string using Volcano-managed credentials. + $ref: '#/components/schemas/DurableCallbackRegistration' + '201': + description: Token issued + content: + application/json: + schema: + $ref: '#/components/schemas/DurableCallbackRegistration' '400': - description: Database is not active + description: The request body is invalid content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Database not found + description: No running durable execution matches `execution_ref` content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: | - A restore is running on the database. A restore replaces the - credentials as it finishes, so wait for it and rotate afterwards. + The token cannot be issued now. `code` says why: + + - `callback_not_ready`: the workflow has not finished opening the + step yet. Retry with a short backoff; the SDK does. + - `callback_closed`: the workflow is no longer waiting on it. + - `callback_taken`: the step is already registered as an approval + or a message wait. + - `execution_ended`: the execution has finished. + - `too_many_callback_tokens`: the execution already holds the + maximum number of open tokens. content: application/json: schema: $ref: '#/components/schemas/Error' - '503': + '413': + description: The request body is larger than 8 KiB + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Too many requests from this execution + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': description: | - Volcano could not check whether a restore is running, and will not - rotate a credential a restore might be about to replace. Retry. + The step could not be confirmed with the workflow right now. Retry + with backoff. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/databases/{databaseName}/type: - patch: + /durable-callbacks/succeed: + post: tags: - - Databases - summary: Update database size + - Durable Functions + summary: Complete a waiting step with a result description: | - Change the size tier of a database. This may briefly interrupt active connections. + Resumes the workflow step waiting on the token with `result`. Call it + from the system the workflow handed the token to. - **Available sizes:** - - `volcano-db-xs`: Up to ~1GB RAM - Development, small apps - - `volcano-db-s`: Up to ~4GB RAM - Production-ready, light traffic - - `volcano-db-m`: Up to ~8GB RAM - Medium traffic applications - - `volcano-db-l`: Up to ~16GB RAM - High traffic, larger datasets - - `volcano-db-xl`: Up to ~32GB RAM - Heavy workloads - - `volcano-db-2xl`: Up to ~64GB RAM - Enterprise-scale - operationId: updateDatabaseType - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' + The token is the only credential. A token takes one outcome: once it + has succeeded or failed, every later request is refused with + `409 callback_completed`, including a retry of the request that + succeeded it. + operationId: succeedDurableCallback + security: [] requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UpdateDatabaseTypeRequest' + $ref: '#/components/schemas/SucceedDurableCallbackRequest' responses: '200': - description: Database type updated + description: The workflow has the result content: application/json: schema: - $ref: '#/components/schemas/Database' - '400': - description: Invalid database type - '404': - description: Database not found - '409': + $ref: '#/components/schemas/DurableCallbackOutcome' + '202': description: | - The database is not active — being provisioned, deleted, or - restored. Compute can only be changed while it is active. + The result is recorded and on its way to the workflow, which takes + longer than this request waits. Volcano finishes the delivery; do + not send it again. + content: + application/json: + schema: + $ref: '#/components/schemas/DurableCallbackOutcome' + '400': + description: The token is missing or malformed, or `result` is missing, null, not JSON, or larger than 64 KiB content: application/json: schema: $ref: '#/components/schemas/Error' - '503': + '404': description: | - Volcano could not check whether a restore is running, and will not - reconfigure compute a restore might be moving. Retry. + No callback has this token. `code` is `callback_not_found`. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/databases/{databaseName}/stats: - get: - tags: - - Databases - summary: Get database consumption metrics - description: | - Retrieve consumption metrics including storage, compute time, and data transfer. - Metrics are aggregated at the project level. Defaults to last 24 hours. - - **Note:** Advanced metrics require an upgraded plan. - operationId: getDatabaseStats - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/DatabaseName' - - name: from - in: query - required: false - schema: - type: string - format: date-time - description: Start time in RFC3339 format (e.g., "2024-01-01T00:00:00Z"). Defaults to 24 hours ago. - - name: to - in: query - required: false - schema: - type: string - format: date-time - description: End time in RFC3339 format (e.g., "2024-01-02T00:00:00Z"). Defaults to now. - - name: granularity - in: query - required: false - schema: - type: string - enum: - - hourly - - daily - - monthly - default: hourly - description: Level of detail for metrics aggregation - responses: - '200': - description: Successful response + '409': + description: | + The token already has an outcome. `code` is `callback_completed`. content: application/json: schema: - $ref: '#/components/schemas/DatabaseStats' - '400': - description: Invalid parameters + $ref: '#/components/schemas/Error' + '410': + description: | + The workflow no longer waits on the token. `code` says why: + + - `callback_expired`: the step timed out, on its own timeout or + its heartbeat timeout. + - `execution_ended`: the execution finished or stopped. content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Database not found + '413': + description: The request body is larger than 72 KiB content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: Database metrics not available or requires upgraded plan + '429': + description: Too many callback requests for the token or its project. Retry later. content: application/json: schema: $ref: '#/components/schemas/Error' - /databases/{databaseName}/query/ping: + /durable-callbacks/fail: post: tags: - - Database Queries - summary: Database connectivity probe (REST API) + - Durable Functions + summary: Fail a waiting step description: | - Connectivity probe that runs a fixed `SELECT 1` through pgproxy, using the - same authentication, status/bandwidth gating, and metering as the other - `/query/*` endpoints. + Resumes the workflow step waiting on the token by raising `error`. The + SDKs raise it as `CallbackFailedError`, carrying its `type` and + `message`. - Unlike those endpoints, ping takes **no request body** and performs **no - table-name validation**, so it works on any database — including a freshly - provisioned, empty one. It is a real committed round-trip through pgproxy, - so a `200` means the database is reachable and queryable. Used by the - dashboard's database connection test. - operationId: queryDatabasePing - security: - - AuthUserAccessToken: [] - parameters: - - $ref: '#/components/parameters/DatabaseName' + The token is the only credential, and takes one outcome, as for + succeeding it. + operationId: failDurableCallback + security: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FailDurableCallbackRequest' responses: '200': - description: Database is reachable - headers: - X-Volcano-Proxy-Ms: - $ref: '#/components/headers/DatabaseQueryProxyMs' - X-Volcano-Proxy-Handler-Ms: - $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' - X-Volcano-Compute-Ms: - $ref: '#/components/headers/DatabaseQueryComputeMs' + description: The workflow has the error content: application/json: schema: - $ref: '#/components/schemas/DatabaseQueryResult' - example: - data: - - ?column?: 1 - count: 1 - '401': - description: Not authenticated + $ref: '#/components/schemas/DurableCallbackOutcome' + '202': + description: | + The error is recorded and on its way to the workflow. Volcano + finishes the delivery; do not send it again. content: application/json: schema: - $ref: '#/components/schemas/Error' - '403': - description: Access denied + $ref: '#/components/schemas/DurableCallbackOutcome' + '400': + description: The token is missing or malformed, or the error's `type` or `message` is invalid content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Database not found + description: | + No callback has this token. `code` is `callback_not_found`. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: | + The token already has an outcome. `code` is `callback_completed`. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '410': + description: | + The workflow no longer waits on the token. `code` is + `callback_expired` or `execution_ended`. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: The request body is larger than 200 KiB content: application/json: schema: $ref: '#/components/schemas/Error' '429': - $ref: '#/components/responses/DatabaseQueryCapExceeded' - /databases/{databaseName}/query/select: + description: Too many callback requests for the token or its project. Retry later. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /durable-callbacks/heartbeat: post: tags: - - Database Queries - summary: Query database with SELECT (REST API) + - Durable Functions + summary: Keep a waiting step alive description: | - Query your database using a simple REST API - no SQL required! - - **Authentication:** Requires auth user access token (from signup/signin) - - **Row-Level Security:** Automatically enforced - you see only data you have access to - - **Use Cases:** - - Query from browser/mobile apps - - Simple data retrieval - - Filtered searches with sorting and pagination - - **Note:** For complex queries (JOINs, CTEs), use functions with direct SQL - operationId: queryDatabaseSelect - security: - - AuthUserAccessToken: [] - parameters: - - $ref: '#/components/parameters/DatabaseName' + Tells the workflow step waiting on the token that the work is still + going on, restarting its heartbeat timeout. A heartbeat never extends + the step's own timeout, and a step without a heartbeat timeout needs + none. + operationId: heartbeatDurableCallback + security: [] requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/DatabaseSelectRequest' + $ref: '#/components/schemas/HeartbeatDurableCallbackRequest' responses: '200': - description: Query successful - headers: - X-Volcano-Proxy-Ms: - $ref: '#/components/headers/DatabaseQueryProxyMs' - X-Volcano-Proxy-Handler-Ms: - $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' - X-Volcano-Compute-Ms: - $ref: '#/components/headers/DatabaseQueryComputeMs' + description: The step is still waiting content: application/json: schema: - $ref: '#/components/schemas/DatabaseQueryResult' - example: - data: - - id: uuid-123 - title: My Post - content: Post content - status: published - views: 150 - created_at: '2026-01-13T10:00:00Z' - count: 1 + $ref: '#/components/schemas/DurableCallbackOutcome' '400': - description: Invalid query + description: The token is missing or malformed content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Not authenticated + '404': + description: | + No callback has this token. `code` is `callback_not_found`. content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Access denied + '409': + description: | + The token already has an outcome. `code` is `callback_completed`. content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Database not found + '410': + description: | + The workflow no longer waits on the token. `code` is + `callback_expired` or `execution_ended`. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: The request body is larger than 8 KiB content: application/json: schema: $ref: '#/components/schemas/Error' '429': - $ref: '#/components/responses/DatabaseQueryCapExceeded' - /databases/{databaseName}/query/insert: + description: Too many callback requests for the token or its project. Retry later. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: The heartbeat could not reach the workflow right now. Retry with backoff. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /durable-approvals: post: tags: - - Database Queries - summary: Insert data into database (REST API) - description: | - Insert new rows into your database using REST API. - - **Authentication:** Requires auth user access token + - Durable Functions + summary: Request an approval from inside a workflow + description: | + Registers an approval request for a running durable execution. The + Volcano SDK calls this from `ctx.waitForApproval`; applications do not + call it directly. - **Auto-set user_id:** If your table has a trigger using `auth.uid()`, - user_id will be automatically set to the authenticated user + `execution_ref` and `callback_id` are opaque values the SDK reads from + the running workflow. Together they are the request's credential, so + the operation takes no other authentication. The approval belongs to + the project that owns the execution, and expires when the workflow's + own approval timeout does. - **Security:** Row-Level Security policies are enforced - operationId: queryDatabaseInsert - security: - - AuthUserAccessToken: [] - parameters: - - $ref: '#/components/parameters/DatabaseName' + Retrying is safe: a request for an approval that is already registered + returns it with `200`. + operationId: requestDurableApproval + security: [] requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/DatabaseInsertRequest' + $ref: '#/components/schemas/RequestDurableApprovalRequest' responses: '200': - description: Insert successful - headers: - X-Volcano-Proxy-Ms: - $ref: '#/components/headers/DatabaseQueryProxyMs' - X-Volcano-Proxy-Handler-Ms: - $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' - X-Volcano-Compute-Ms: - $ref: '#/components/headers/DatabaseQueryComputeMs' + description: The approval was already registered content: application/json: schema: - $ref: '#/components/schemas/DatabaseQueryResult' - example: - data: - - id: uuid-123 - title: My New Post - content: This is the content - status: draft - user_id: user-uuid - created_at: '2026-01-13T10:00:00Z' - count: 1 + $ref: '#/components/schemas/DurableApprovalRegistration' + '201': + description: Approval registered + content: + application/json: + schema: + $ref: '#/components/schemas/DurableApprovalRegistration' '400': - description: Invalid request + description: The request body is invalid content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Not authenticated + '404': + description: No running durable execution matches `execution_ref` content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Access denied + '409': + description: | + The approval cannot be registered now. `code` says why: + + - `approval_not_ready`: the workflow has not finished opening the + approval yet. Retry with a short backoff; the SDK does. + - `approval_closed`: the workflow is no longer waiting on it. + - `callback_taken`: the callback is already registered as a + message wait or a messages session. + - `execution_ended`: the execution has finished. + - `too_many_pending_approvals`: the execution already has the + maximum number of pending approvals. content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Database not found + '413': + description: The request body is larger than 64 KiB content: application/json: schema: $ref: '#/components/schemas/Error' '429': - $ref: '#/components/responses/DatabaseQueryCapExceeded' - /databases/{databaseName}/query/update: - post: + description: Too many approval requests from this execution or address + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: | + The approval could not be confirmed with the workflow right now. + Retry with backoff. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/capabilities: + get: tags: - - Database Queries - summary: Update data in database (REST API) + - Projects + summary: List a project's capabilities description: | - Update existing rows in your database using REST API. + Lists which product capabilities accept new work for this project. It + has the same entries as `GET /capabilities`, and answers each one as it + does, except for capabilities a project can have when another can't: - **Security:** Row-Level Security ensures you can only update data you have access to + | ID | Available for this project when | + | --- | --- | + | `lavaflow` | LavaFlow is released, offered to the project's owner, and included in the owner's plan | + | `lavaflow.merge` | `lavaflow` is, and LavaFlow's merging is released in this environment | + | `lavaflow.lineage` | `lavaflow` is, and fix lineage is released in this environment | + | `lavaflow.open_pr_ci_start` | `lavaflow` is, and LavaFlow's one CI start for fixes a person merges is released in this environment | + | `lavaflow.code_quality` | `lavaflow` is, Code Quality is released in this environment, and the owner's plan allows Code Quality findings; with an allowance of 0 it is `unavailable` with `code` `plan_required` | + | `lavaflow.slack` | `lavaflow` is, the Volcano Slack app is set up in this environment, and Slack reports have launched in it | + | `lavaflow.aikido` | `lavaflow` is, and Aikido reports have launched in this environment | - **Safety:** Requires at least one filter to prevent accidental mass updates. A - request with no `filters` is rejected with `400` (mirrors delete). This matters - for service-key queries, which run with full access and bypass RLS. + Where `lavaflow` isn't available, a project with LavaFlow settings, runs, + or bound Slack channels lists it `read_only`: its LavaFlow reads answer, + and its owner can turn LavaFlow off or remove channel bindings. A project without them lists it `unavailable`, with + `code` `plan_required` when the owner's plan leaves LavaFlow out. - **Note:** If RLS blocks the update, an empty result is returned (not an error) - operationId: queryDatabaseUpdate + Check it to decide what to offer for a project, instead of calling a + route to see whether it fails. Project access tokens can read it, + including read-only ones. + operationId: listProjectCapabilities security: - - AuthUserAccessToken: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/DatabaseName' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseUpdateRequest' + - $ref: '#/components/parameters/ProjectId' responses: '200': - description: Update successful - headers: - X-Volcano-Proxy-Ms: - $ref: '#/components/headers/DatabaseQueryProxyMs' - X-Volcano-Proxy-Handler-Ms: - $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' - X-Volcano-Compute-Ms: - $ref: '#/components/headers/DatabaseQueryComputeMs' - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseQueryResult' - example: - data: - - id: post-uuid - title: Updated Title - status: published - updated_at: '2026-01-13T10:05:00Z' - count: 1 - '400': - description: Invalid request + description: Capabilities for this project content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/CapabilityList' '401': description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Access denied - content: - application/json: - schema: - $ref: '#/components/schemas/Error' '404': - description: Database not found + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - $ref: '#/components/responses/DatabaseQueryCapExceeded' - /databases/{databaseName}/query/delete: - post: + /lavaflow/settings: + get: tags: - - Database Queries - summary: Delete data from database (REST API) + - LavaFlow + summary: Get LavaFlow settings description: | - Delete rows from your database using REST API. - - **Safety:** Requires at least one filter to prevent accidental mass deletions - - **Security:** Row-Level Security ensures you can only delete data you have access to + Returns whether LavaFlow works on the project's issues and how far it + goes on its own. LavaFlow takes project guidance from the repository's + AGENTS.md and CLAUDE.md, not from a setting. A project + that never saved settings returns the defaults, with LavaFlow off. + LavaFlow sends this project's logs and source code to an AI service + that Volcano operates. - **Note:** If RLS blocks the delete, an empty result is returned (not an error) - operationId: queryDatabaseDelete + `can_update` says whether the caller can save the settings: only the + project's owner can, with a platform token. Project access tokens can + read the settings, including read-only ones. + operationId: getLavaflowSettings security: - - AuthUserAccessToken: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/DatabaseName' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseDeleteRequest' + - $ref: '#/components/parameters/ProjectIdQuery' responses: '200': - description: Delete successful - headers: - X-Volcano-Proxy-Ms: - $ref: '#/components/headers/DatabaseQueryProxyMs' - X-Volcano-Proxy-Handler-Ms: - $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' - X-Volcano-Compute-Ms: - $ref: '#/components/headers/DatabaseQueryComputeMs' + description: The project's LavaFlow settings content: application/json: schema: - $ref: '#/components/schemas/DatabaseQueryResult' - example: - data: - - id: post-uuid - title: Deleted Post - count: 1 + $ref: '#/components/schemas/LavaflowSettings' '400': - description: Invalid request or missing filters + description: '`project_id` is missing or not a UUID.' content: application/json: schema: @@ -9991,62 +10228,136 @@ paths: schema: $ref: '#/components/schemas/Error' '403': - description: Access denied + description: Code `plan_required` means the owner's plan does not include LavaFlow and the project has no LavaFlow records. Without a code, the owner's plan could not be read; retry later. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Database not found + description: Not found. A project the caller can't read answers exactly like one that doesn't exist, and so does one being deleted. Code `feature_unavailable` means LavaFlow is not available for this project and it has no LavaFlow records. content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - $ref: '#/components/responses/DatabaseQueryCapExceeded' - /databases/{databaseName}/branches/{branchName}/query/ping: - post: + patch: tags: - - Database Queries - summary: Database connectivity probe (REST API) - description: | - Connectivity probe that runs a fixed `SELECT 1` through pgproxy, using the - same authentication, status/bandwidth gating, and metering as the other - `/query/*` endpoints. + - LavaFlow + summary: Update LavaFlow settings + description: | + Changes the fields the request names for the project `project_id` + names; an omitted field keeps its saved value, or its default when + nothing is saved. `{"project_id": "…", "enabled": true}` turns LavaFlow + on for every function, frontend and durable function in the project, + and records the repository the project points at as the one LavaFlow + works in. A request carrying `"enabled": true` is a turn-on, even while + LavaFlow is on. When the project points at no repository at a turn-on, + the first repository it connects afterwards is recorded. A request + that omits `enabled` never changes which repository is recorded. + LavaFlow sends this project's logs and source code to an AI service + that Volcano operates. - Unlike those endpoints, ping takes **no request body** and performs **no - table-name validation**, so it works on any database — including a freshly - provisioned, empty one. It is a real committed round-trip through pgproxy, - so a `200` means the database is reachable and queryable. Used by the - dashboard's database connection test. + Turning LavaFlow on, from off, also starts runs for up to 5 open issues + with `exception: true` and an `event_count` of at least 2, last seen in + the past 7 days, most recently seen first, leaving out any issue + LavaFlow already ran; runs LavaFlow queued on its own and hasn't + started count toward the 5. They start like any run LavaFlow starts on + its own, up to 3 at once per project. Only the owner's save with a + `volcano login` token whose sign-in is live, a live Volcano dashboard + sign-in, or a platform token that expires, starts them; any other save turns LavaFlow on without them. A save while LavaFlow is on starts none, and neither + does LavaFlow becoming available to the project. - **Branch-targeted.** Runs against the named branch instead of the parent - database, using the branch's own credentials. The branch must be `active` - and unexpired. Nothing about this request can reach the parent's data. - operationId: queryDatabaseBranchPing + Only the project's owner can save, with a platform token or a live + Volcano dashboard sign-in, while their account is active. A full-scope project access token can only turn + settings off: a body with `project_id` and + `"code_quality": {"enabled": false}`, each field spelled exactly and + sent once, and nothing else. Any other + body from a project access token, including one that turns a setting + on, adds a field, sends `null`, or names a field the schema doesn't + have, gets `403` with code `person_required`, as does a request made + through MCP. A read-only project access token is refused as read-only + first, without a code, + and so is the owner of a read-only account. + + `code_quality.enabled: true` turns on LavaFlow Code Quality, which + reviews the lines each production deploy of a frontend changes and + turns what it confirms into issues and pull requests. Function deploys + ask for no scan yet. It needs the project's `lavaflow.code_quality` + capability: while Code Quality isn't released here the save answers + `400` with code `feature_unavailable`, and while the owner's plan + allows no Code Quality findings it answers `403` with code + `plan_required`. Only the owner can turn it on, with the check below. + Turning it off always works, and drops the deploys waiting to be + scanned. + + `autonomy: merge` needs the project's `lavaflow.merge` capability. + Without it, a save that sets `autonomy` to `merge`, or changes + `merge_policy`, answers `400` with code `feature_unavailable`. A save + that sends the saved values again passes this check, though it can + still need the owner's check below, and a project at `merge` can + still change to another autonomy. The save doesn't read the + repository's branch rules: LavaFlow merges only into a base branch + that requires at least one status check, and holds every fix with + `no_required_checks` on any other. + + Changing `autonomy` to `merge` lets LavaFlow merge with no one else + looking. So does turning `enabled` on while `autonomy` stays `merge`, + and changing `merge_policy`, to any value, while `autonomy` is, or + becomes, `merge`. Turning `allow_ungated_workflows` on lets LavaFlow + open a fix where a workflow could run it with the repository's + secrets before a person approves it. Turning `code_quality` on starts + work on every frontend production deploy with no incident behind it. + Only the owner can make these changes, with a credential of + their own that expires: a `volcano login` token + whose sign-in is live, a live Volcano dashboard sign-in, or a + platform token with an expiry. The owner's + GitHub account must also be able to push to the project's repository. + A project access token, MCP, a platform token that never expires, a + sign-in that ended, an owner who can't push, and a project with no + repository get `403` with code `person_required`, and nothing is + saved. Turning LavaFlow, `allow_ungated_workflows` or `code_quality` + off needs no check. + Nothing is saved either when the push check can't be answered (`429` + or `503`, with `Retry-After`). When the project points at another + repository, reaches its repository through another Volcano GitHub App + installation, or points at none, `autonomy` changes from `merge` to + `open_pr`; pointing back doesn't change it back. Reconnecting after a + reinstall of the App counts as another installation. + + Turning LavaFlow on needs a plan that includes it (`403`, code + `plan_required`). LavaFlow is available where the project's + `lavaflow` capability is, which includes the owner's plan. Where it is + not, a project with LavaFlow records can still turn LavaFlow, Code + Quality or both off: a save that sends `enabled: false`, + `code_quality: {enabled: false}` or both, and otherwise only + `allow_ungated_workflows: false` sent with `enabled`. Any other save, + and any save for a project without records, answers `404` with code + `feature_unavailable` while LavaFlow is not offered to the project, and + `403` with code `plan_required` when it is but the owner's plan does + not include it. + operationId: patchLavaflowSettings security: + - UserToken: [] - AuthUserAccessToken: [] - parameters: - - $ref: '#/components/parameters/DatabaseName' - - $ref: '#/components/parameters/BranchName' + - ProjectAccessToken: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LavaflowSettingsUpdate' responses: '200': - description: Database is reachable - headers: - X-Volcano-Proxy-Ms: - $ref: '#/components/headers/DatabaseQueryProxyMs' - X-Volcano-Proxy-Handler-Ms: - $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' - X-Volcano-Compute-Ms: - $ref: '#/components/headers/DatabaseQueryComputeMs' + description: Saved content: application/json: schema: - $ref: '#/components/schemas/DatabaseQueryResult' - example: - data: - - ?column?: 1 - count: 1 + $ref: '#/components/schemas/LavaflowSettings' + '400': + description: 'The body is invalid: `project_id` missing or not a UUID, no field to change, an unknown field or autonomy, a `human_review_paths` pattern that is not relative to the repository root or holds a NUL character. Code `feature_unavailable` means the save sets `autonomy: merge` or changes `merge_policy` without the project''s `lavaflow.merge` capability, or turns `code_quality` on while Code Quality isn''t released.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': description: Not authenticated content: @@ -10054,80 +10365,91 @@ paths: schema: $ref: '#/components/schemas/Error' '403': - description: Access denied + description: 'Code `person_required` means a full-scope project access token made any save but turning Code Quality off, MCP made the request, or the save turns on a setting only the project''s owner may turn on, and the owner did not make it with a credential of their own that expires: a `volcano login` token whose sign-in is live, a live Volcano dashboard sign-in, or a platform token with an expiry, never a project access token or a platform token that never expires. Those settings are `code_quality`, `allow_ungated_workflows`, `autonomy: merge`, `enabled` turned on while `autonomy` stays `merge`, and a change to `merge_policy` while `autonomy` is or becomes `merge`. It also means the owner''s GitHub account can''t push to the project''s repository, or the project has none. Code `plan_required` means the owner''s plan does not include LavaFlow, or allows no Code Quality findings for a save that turns `code_quality` on. Without a code: a read-only project access token made the request, the owner''s account is read-only, or the owner''s plan could not be read and nothing was saved; retry later.' content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Database or branch not found + description: Not found. A project the caller can't read answers exactly like one that doesn't exist, and so does one being deleted. Code `feature_unavailable` means LavaFlow is not available for this project and the save does more than turn LavaFlow or Code Quality off on a project with LavaFlow records. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: Another save, or a change of the project's repository, changed the settings while this save checked them, and kept changing them when it tried again. Nothing was saved. Send the request again. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: Request body exceeds 131,072 bytes content: application/json: schema: $ref: '#/components/schemas/Error' '429': - $ref: '#/components/responses/DatabaseQueryCapExceeded' - '503': - $ref: '#/components/responses/DatabaseBranchQueryUnavailable' - /databases/{databaseName}/branches/{branchName}/query/select: - post: + description: | + The save turns on `code_quality`, `allow_ungated_workflows` or + `autonomy: merge`, turns `enabled` on under `merge`, changes + `merge_policy` under `merge`, or + lets the runs LavaFlow starts on its own merge again, and the project, or its owner across their + projects, used up the hour's checks of the owner's GitHub push access. + Nothing was saved. Try again after `Retry-After`. + headers: + Retry-After: + description: Seconds until the budget's hour ends. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: | + The save turns on `code_quality`, `allow_ungated_workflows` or + `autonomy: merge`, turns `enabled` on under `merge`, changes + `merge_policy` under `merge`, or + lets the runs LavaFlow starts on its own merge again, and the owner's GitHub push access could not be + checked now. + Nothing was saved. Try again after `Retry-After`. + headers: + Retry-After: + description: Seconds to wait before saving again. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /lavaflow/connector-bindings: + get: tags: - - Database Queries - summary: Query database with SELECT (REST API) + - LavaFlow + summary: List the project's connector bindings description: | - Query your database using a simple REST API - no SQL required! - - **Authentication:** Requires auth user access token (from signup/signin) - - **Row-Level Security:** Automatically enforced - you see only data you have access to - - **Use Cases:** - - Query from browser/mobile apps - - Simple data retrieval - - Filtered searches with sorting and pagination - - **Note:** For complex queries (JOINs, CTEs), use a function with direct SQL - - **Branch-targeted.** Runs against the named branch instead of the parent - database, using the branch's own credentials. The branch must be `active` - and unexpired. Nothing about this request can reach the parent's data. - operationId: queryDatabaseBranchSelect + Lists where problems are reported to LavaFlow from for the project, + such as Slack channels. In a bound Slack channel, someone whose Slack + identity is connected to the project owner's account can mention the + Volcano app to report a problem. Project access tokens can read the + list, including read-only ones, and so can MCP, as + `get_lavaflow_connector_bindings`. The list answers whether or not the + project's `lavaflow.slack` capability is available. + operationId: listLavaflowConnectorBindings security: - - AuthUserAccessToken: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/DatabaseName' - - $ref: '#/components/parameters/BranchName' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseSelectRequest' + - $ref: '#/components/parameters/ProjectIdQuery' responses: '200': - description: Query successful - headers: - X-Volcano-Proxy-Ms: - $ref: '#/components/headers/DatabaseQueryProxyMs' - X-Volcano-Proxy-Handler-Ms: - $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' - X-Volcano-Compute-Ms: - $ref: '#/components/headers/DatabaseQueryComputeMs' + description: The project's connector bindings content: application/json: schema: - $ref: '#/components/schemas/DatabaseQueryResult' - example: - data: - - id: uuid-123 - title: My Post - content: Post content - status: published - views: 150 - created_at: '2026-01-13T10:00:00Z' - count: 1 + $ref: '#/components/schemas/LavaflowConnectorBindingsResponse' '400': - description: Invalid query + description: '`project_id` is missing or not a UUID.' content: application/json: schema: @@ -10138,77 +10460,71 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Access denied - content: - application/json: - schema: - $ref: '#/components/schemas/Error' '404': - description: Database or branch not found + description: Not found. A project the caller can't read answers exactly like one that doesn't exist, and so does one being deleted. content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - $ref: '#/components/responses/DatabaseQueryCapExceeded' - '503': - $ref: '#/components/responses/DatabaseBranchQueryUnavailable' - /databases/{databaseName}/branches/{branchName}/query/insert: post: tags: - - Database Queries - summary: Insert data into database (REST API) - description: | - Insert new rows into your database using REST API. - - **Authentication:** Requires auth user access token - - **Auto-set user_id:** If your table has a trigger using `auth.uid()`, - user_id will be automatically set to the authenticated user + - LavaFlow + summary: Bind a connector to the project + description: | + Binds a place in a connector to the project, so problems reported + there reach LavaFlow for it, and answers `201`. Send `slack` for a + `slack` connector and `aikido` for an `aikido` one. For a `slack` + connector the place is a channel. Binding a channel that is already + bound answers `200` with that binding, and makes the current owner the + one who bound it, so a retry is safe. One of the Slack identities the + caller's sign-in session signed in as must belong to the connector's + workspace and be a member of the channel, so on an account several + people share, each binds only channels they are in. The channel must + be one the picker (`GET /user/slack/channels`) lists: one the Volcano + app is in, and not archived, a Slack Connect channel, or shared + across an organization. - **Security:** Row-Level Security policies are enforced + For an `aikido` connector the place is the workspace's new code + (SAST) issues on the project's GitHub repository, at or above + `min_severity`. The caller must have + connected the workspace. Binding it again answers `200` and sets the + new minimum. Each issue starts a LavaFlow run that stops at a pull + request for review. - **Branch-targeted.** Runs against the named branch instead of the parent - database, using the branch's own credentials. The branch must be `active` - and unexpired. Nothing about this request can reach the parent's data. - operationId: queryDatabaseBranchInsert + Only the project's owner can bind, with a platform token or a live + dashboard sign-in session. A session must come from the dashboard's + own configured project; another project's session gets `403`. A project + access token, or a request made through MCP, gets `403` with code + `person_required`. Binding a Slack channel needs the project's + `lavaflow.slack` capability, and binding Aikido its + `lavaflow.aikido` capability: where it is unavailable, this answers + `404` with code `feature_unavailable`, or `403` with code + `plan_required` when the owner's plan does not include LavaFlow. + operationId: createLavaflowConnectorBinding security: + - UserToken: [] - AuthUserAccessToken: [] - parameters: - - $ref: '#/components/parameters/DatabaseName' - - $ref: '#/components/parameters/BranchName' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/DatabaseInsertRequest' + $ref: '#/components/schemas/LavaflowConnectorBindingCreate' responses: '200': - description: Insert successful - headers: - X-Volcano-Proxy-Ms: - $ref: '#/components/headers/DatabaseQueryProxyMs' - X-Volcano-Proxy-Handler-Ms: - $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' - X-Volcano-Compute-Ms: - $ref: '#/components/headers/DatabaseQueryComputeMs' + description: The channel, or the Aikido workspace, was already bound for the project content: application/json: schema: - $ref: '#/components/schemas/DatabaseQueryResult' - example: - data: - - id: uuid-123 - title: My New Post - content: This is the content - status: draft - user_id: user-uuid - created_at: '2026-01-13T10:00:00Z' - count: 1 + $ref: '#/components/schemas/LavaflowConnectorBinding' + '201': + description: The connector is bound + content: + application/json: + schema: + $ref: '#/components/schemas/LavaflowConnectorBinding' '400': - description: Invalid request + description: 'The body is invalid or names the wrong connector type, the connector is not one the caller can use or connected, the caller''s sign-in session signed in as no Slack identity in its workspace, the channel cannot report problems (it is archived, a Slack Connect channel, or shared across an organization), or the Volcano app is not in the channel yet: invite it, then bind again.' content: application/json: schema: @@ -10220,75 +10536,54 @@ paths: schema: $ref: '#/components/schemas/Error' '403': - description: Access denied + description: Code `person_required` means a project access token or MCP made the request. Code `plan_required` means the owner's plan does not include LavaFlow. Without a code, the session belongs to a project other than the dashboard's configured project, the owner's account is read-only, or the owner's plan could not be read. Retry later only when the plan could not be read. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Database or branch not found + description: Not found. A project the caller can't read answers exactly like one that doesn't exist, and so does a channel that no Slack identity the caller's sign-in session signed in as is a member of, and a private channel the Volcano app is not in, which the app cannot see. Code `feature_unavailable` means the project's `lavaflow.slack`, or for Aikido its `lavaflow.aikido`, capability is unavailable. content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - $ref: '#/components/responses/DatabaseQueryCapExceeded' - '503': - $ref: '#/components/responses/DatabaseBranchQueryUnavailable' - /databases/{databaseName}/branches/{branchName}/query/update: - post: + '502': + description: Slack did not answer whether the owner is a member of the channel; try again + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /lavaflow/connector-bindings/{binding_id}: + delete: tags: - - Database Queries - summary: Update data in database (REST API) + - LavaFlow + summary: Remove a connector binding description: | - Update existing rows in your database using REST API. - - **Security:** Row-Level Security ensures you can only update data you have access to - - **Safety:** Requires at least one filter to prevent accidental mass updates. A - request with no `filters` is rejected with `400` (mirrors delete). This matters - for service-key queries, which run with full access and bypass RLS. - - **Note:** If RLS blocks the update, an empty result is returned (not an error) - - **Branch-targeted.** Runs against the named branch instead of the parent - database, using the branch's own credentials. The branch must be `active` - and unexpired. Nothing about this request can reach the parent's data. - operationId: queryDatabaseBranchUpdate + Stops a bound place, such as a Slack channel or an Aikido workspace, + reporting problems for its project. Reports from it still queued are canceled at their next + check. The binding's own project authorizes the request. Only the + project's owner can remove one, with a platform token. A project + access token or MCP gets `403` with code `person_required` for a + binding of its own project, and `404` for another project's, as for an + unknown one. Removing works whether or not the project's + `lavaflow.slack` capability is available. + operationId: deleteLavaflowConnectorBinding security: - - AuthUserAccessToken: [] + - UserToken: [] parameters: - - $ref: '#/components/parameters/DatabaseName' - - $ref: '#/components/parameters/BranchName' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseUpdateRequest' + - name: binding_id + in: path + required: true + description: The binding's ID, from listing the project's connector bindings + schema: + type: string + format: uuid + - $ref: '#/components/parameters/ItemProjectIdQuery' responses: - '200': - description: Update successful - headers: - X-Volcano-Proxy-Ms: - $ref: '#/components/headers/DatabaseQueryProxyMs' - X-Volcano-Proxy-Handler-Ms: - $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' - X-Volcano-Compute-Ms: - $ref: '#/components/headers/DatabaseQueryComputeMs' - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseQueryResult' - example: - data: - - id: post-uuid - title: Updated Title - status: published - updated_at: '2026-01-13T10:05:00Z' - count: 1 + '204': + description: The place no longer reports for the project '400': - description: Invalid request + description: '`project_id` is given, and it or the binding ID is not a UUID.' content: application/json: schema: @@ -10300,71 +10595,54 @@ paths: schema: $ref: '#/components/schemas/Error' '403': - description: Access denied + description: Code `person_required` means a project access token or MCP made the request. Without a code, the owner's account is read-only. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Database or branch not found + description: No such binding. A binding of a project the caller can't read, or of another project than a given `project_id`, answers exactly like one that doesn't exist. Without `project_id`, so does a binding ID that is not a UUID. content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - $ref: '#/components/responses/DatabaseQueryCapExceeded' - '503': - $ref: '#/components/responses/DatabaseBranchQueryUnavailable' - /databases/{databaseName}/branches/{branchName}/query/delete: - post: + /lavaflow/scans: + get: tags: - - Database Queries - summary: Delete data from database (REST API) - description: | - Delete rows from your database using REST API. - - **Safety:** Requires at least one filter to prevent accidental mass deletions - - **Security:** Row-Level Security ensures you can only delete data you have access to - - **Note:** If RLS blocks the delete, an empty result is returned (not an error) + - LavaFlow + summary: List LavaFlow Code Quality scans + description: | + Pages the project's Code Quality scans, newest first. The first page + starts with the project's waiting scan, if it has one: the deploys + that went live since the last scan, with `status: waiting` and the + bound it waits at in `waiting_reason`. A bound never drops a deploy: + the waiting scan covers every commit since the last one when it + starts. A platform publication pause is reported as `feature_paused` + and does not spend the scan's retry allowance. With publication enabled, + a separate pause on starting runs is reported as `feature_unavailable`. - **Branch-targeted.** Runs against the named branch instead of the parent - database, using the branch's own credentials. The branch must be `active` - and unexpired. Nothing about this request can reach the parent's data. - operationId: queryDatabaseBranchDelete + Each scan shows the commits it compared, the resources whose deploys + it covers, what it did with what it found, and the findings whose + runs were billed. Scans stay readable while LavaFlow or Code Quality + is off. Project access tokens can read them, including read-only + ones. + operationId: listLavaflowScans security: - - AuthUserAccessToken: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/DatabaseName' - - $ref: '#/components/parameters/BranchName' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseDeleteRequest' + - $ref: '#/components/parameters/ProjectIdQuery' + - $ref: '#/components/parameters/LavaflowScanLimit' + - $ref: '#/components/parameters/LavaflowRunCursor' responses: '200': - description: Delete successful - headers: - X-Volcano-Proxy-Ms: - $ref: '#/components/headers/DatabaseQueryProxyMs' - X-Volcano-Proxy-Handler-Ms: - $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' - X-Volcano-Compute-Ms: - $ref: '#/components/headers/DatabaseQueryComputeMs' + description: A page of scans content: application/json: schema: - $ref: '#/components/schemas/DatabaseQueryResult' - example: - data: - - id: post-uuid - title: Deleted Post - count: 1 + $ref: '#/components/schemas/PaginatedLavaflowScans' '400': - description: Invalid request or missing filters + description: '`project_id` is missing or not a UUID, or the cursor or limit is invalid.' content: application/json: schema: @@ -10376,1396 +10654,1221 @@ paths: schema: $ref: '#/components/schemas/Error' '403': - description: Access denied + description: Code `plan_required` means the owner's plan does not include LavaFlow and the project has no LavaFlow records. Without a code, the owner's plan could not be read; retry later. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Database or branch not found + description: Not found. A project the caller can't read answers exactly like one that doesn't exist, and so does one being deleted. Code `feature_unavailable` means LavaFlow is not available for this project and it has no LavaFlow records. content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - $ref: '#/components/responses/DatabaseQueryCapExceeded' - '503': - $ref: '#/components/responses/DatabaseBranchQueryUnavailable' - /databases/regions: + /lavaflow/stats: get: tags: - - Databases - summary: List platform-supported regions for database provisioning - operationId: listDatabaseRegions + - LavaFlow + summary: Get LavaFlow stats description: | - Returns the regions enabled for database provisioning in this platform environment. - These are the same regions offered for function deployment, and the only values - the `region` field of a database accepts. - This is a public endpoint that doesn't require authentication. - responses: - '200': - description: List of platform-supported regions - content: - application/json: - schema: - type: array - items: - type: object - properties: - id: - type: string - example: us-east-1 - description: Region identifier for API usage - name: - type: string - example: US East (N. Virginia) - description: Human-readable region location - /databases/postgres-versions: - get: - tags: - - Databases - summary: List available PostgreSQL versions - operationId: listPostgresVersions - description: | - Returns the PostgreSQL major versions a database can be created on, - newest first. Local mode lists only the version its server runs. - This is a public endpoint that doesn't require authentication. + The activity counts report issues LavaFlow took on and pull requests it + opened per UTC day, oldest first, with every day in the window present. + Merges do not count toward these activity fields. The window ends + today, which is partial. The activity `totals` equal the sum of the + activity `days` and of the per-resource counts from + `GET /lavaflow/resources` for the same project, `days` and `category`. + + `category` filters these activity counts to runs in that category. + Activity counts measure issues taken on and pull requests opened, + while `GET /lavaflow/runs` counts runs, so the two need not match. + + The optional `outcomes` object separately reports confirmed merges, + improvements observed live and actual automatic issue-resolution + episodes. `category` filters its merge and live counts; its primary + issue-resolution count includes every category. Outcome counts use + their own event dates and do not contribute to the activity totals. + Older servers omit `outcomes`; its absence means unavailable, not + zero. Null outcome counts mean unknown, not zero. Read the per-metric + coverage alongside the counts: partial coverage and retained + confirmations do not establish a complete total. + operationId: getLavaflowStats + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectIdQuery' + - $ref: '#/components/parameters/LavaflowDays' + - $ref: '#/components/parameters/LavaflowCategoryFilter' responses: '200': - description: List of available PostgreSQL versions + description: The project's LavaFlow activity per day content: application/json: schema: - type: array - items: - type: object - properties: - version: - type: string - example: '18' - description: PostgreSQL major version number - name: - type: string - example: PostgreSQL 18 - description: Human-readable version name - default: - type: boolean - description: True on the version to preselect for a new database; absent on the others - recommended: - type: boolean - description: True on the version recommended for new databases; absent on the others - deprecated: - type: boolean - description: Whether this version is deprecated (approaching EOL) - /functions/runtimes: - get: - tags: - - Functions - summary: List supported function runtimes - operationId: listFunctionRuntimes - security: [] - description: | - Returns the public function runtime catalog: every runtime a deploy accepts, its display - label for runtime pickers, language defaults, durable capability, and local source packaging - metadata for deployments. - This is a public endpoint that doesn't require authentication. - responses: - '200': - description: Supported function runtimes + $ref: '#/components/schemas/LavaflowStats' + '400': + description: '`project_id` is missing or not a UUID, `days` is outside 1 to 217, or `category` is not a category.' content: application/json: schema: - $ref: '#/components/schemas/FunctionRuntimesResponse' - /functions/regions: - get: - tags: - - Functions - summary: List available regions for function deployment - operationId: listFunctionRegions - security: [] - description: | - Returns the configured regions where functions can be deployed, each annotated - with a human-readable label and country flag emoji for use in UI pickers. - This is a public endpoint that doesn't require authentication. - responses: - '200': - description: Available function deployment regions + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/FunctionRegion' - /projects/{id}/variables/{name}: - get: - tags: - - Variables - summary: Get variable by name - description: | - Returns a project-level environment variable used by deployed functions and frontends. - operationId: getVariable - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/VariableName' - responses: - '200': - description: Successful response + $ref: '#/components/schemas/Error' + '403': + description: Code `plan_required` means the owner's plan does not include LavaFlow and the project has no LavaFlow records. Without a code, the owner's plan could not be read; retry later. content: application/json: schema: - $ref: '#/components/schemas/Variable' + $ref: '#/components/schemas/Error' '404': - description: Variable not found + description: Not found. A project the caller can't read answers exactly like one that doesn't exist, and so does one being deleted. Code `feature_unavailable` means LavaFlow is not available for this project and it has no LavaFlow records. content: application/json: schema: $ref: '#/components/schemas/Error' - put: + /lavaflow/resources: + get: tags: - - Variables - summary: Update a variable + - LavaFlow + summary: List LavaFlow's resources description: | - Updates a project-level environment variable and triggers asynchronous propagation - to deployed functions and frontends in the project's configured regions. - operationId: updateVariable + Lists every function, durable function and frontend in the project with + LavaFlow's activity in the window, zeros included, sorted by name. A + removed resource is listed when it has activity in the window (in that + category, with `category` set), so the counts add up to + `GET /lavaflow/stats`. + + `anomaly.flagged` is true when the last 24 hours have at least 3 + issues opened for the resource and at least 3 times its daily average + over the 29 days before, counting that average as at least 1. + + `category` counts, and flags anomalies from, only runs in that + category; every current resource is still listed, and + `last_analyzed_at` counts every run. + operationId: listLavaflowResources security: - UserToken: [] - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/VariableName' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateVariableRequest' + - $ref: '#/components/parameters/ProjectIdQuery' + - $ref: '#/components/parameters/LavaflowDays' + - $ref: '#/components/parameters/LavaflowCategoryFilter' responses: '200': - description: Variable updated + description: The project's resources with LavaFlow's activity content: application/json: schema: - $ref: '#/components/schemas/Variable' + $ref: '#/components/schemas/LavaflowResourceList' '400': - description: Invalid or reserved variable name + description: '`project_id` is missing or not a UUID, `days` is outside 1 to 217, or `category` is not a category.' content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Variable not found + '401': + description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: Private variable membership writes are disabled during rollout + '403': + description: Code `plan_required` means the owner's plan does not include LavaFlow and the project has no LavaFlow records. Without a code, the owner's plan could not be read; retry later. content: application/json: schema: $ref: '#/components/schemas/Error' - delete: - tags: - - Variables - summary: Delete a variable - description: | - Deletes a project-level environment variable and triggers asynchronous propagation - of the removal to deployed functions and frontends in the project's configured regions. - operationId: deleteVariable - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/VariableName' - responses: - '204': - description: Variable deleted '404': - description: Variable not found + description: Not found. A project the caller can't read answers exactly like one that doesn't exist, and so does one being deleted. Code `feature_unavailable` means LavaFlow is not available for this project and it has no LavaFlow records. content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/password-policy: + /lavaflow/runs: get: tags: - - Authentication - summary: Get the effective password policy + - LavaFlow + summary: List LavaFlow runs description: | - Returns the backend-enforced password bounds and compromised-password - screening status for the project identified by the anon key. A valid - anon key is required, but no route-specific auth permission is needed. - operationId: authGetPasswordPolicy + Pages the project's LavaFlow runs, newest first unless `order` says + otherwise. A page carries bounded display text, including the saved + proposed fix's optional `fix_summary`; read a run for its diagnosis, + log lines and diff. Each run names its category, the resources it + involves and its issue. A confirmed Code Quality finding can supply + `issue.severity`, and a recorded pull request can supply `branch`. + Unknown or withheld optional fields are omitted. + + Every filter narrows the list, and filters combine. `include=counts` + adds `counts`, computed from the same filters: ask for them on the + first page, since they don't depend on the cursor. Keep the filters + and `order` while paging. + operationId: listLavaflowRuns security: - - AnonKey: [] + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectIdQuery' + - $ref: '#/components/parameters/LavaflowRunLimit' + - $ref: '#/components/parameters/LavaflowRunCursor' + - $ref: '#/components/parameters/LavaflowRunStatusFilter' + - $ref: '#/components/parameters/LavaflowResourceIdFilter' + - $ref: '#/components/parameters/LavaflowCategoryFilter' + - $ref: '#/components/parameters/LavaflowInvolvedResourceFilter' + - $ref: '#/components/parameters/LavaflowIssueIdFilter' + - $ref: '#/components/parameters/LavaflowPullRequestStateFilter' + - $ref: '#/components/parameters/LavaflowRunDays' + - $ref: '#/components/parameters/LavaflowRunOrder' + - $ref: '#/components/parameters/LavaflowRunInclude' responses: '200': - description: Effective password policy + description: A page of runs content: application/json: schema: - $ref: '#/components/schemas/AuthPasswordPolicy' + $ref: '#/components/schemas/PaginatedLavaflowRuns' + '400': + description: '`project_id` is missing or not a UUID, a filter, `order`, `days`, `include` or `limit` is invalid, or the cursor is invalid or was issued for another `order`.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': - description: Invalid, missing, or revoked anon key + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Code `plan_required` means the owner's plan does not include LavaFlow and the project has no LavaFlow records. Without a code, the owner's plan could not be read; retry later. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project or auth configuration not found + description: Not found. A project the caller can't read answers exactly like one that doesn't exist, and so does one being deleted. An `issue_id` from another project answers `issue not found`, as an unknown one does. Code `feature_unavailable` means LavaFlow is not available for this project and it has no LavaFlow records. content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/signup: post: tags: - - Authentication - summary: Sign up a new auth user + - LavaFlow + summary: Start a LavaFlow run description: | - Create a new end-user account. The project is determined from the anon key. - Requires project-specific anon key in Authorization header. + Starts a run on one of the project's issues. LavaFlow starts runs on + its own only for issues with `exception: true`, and only while it is + on. Start one here for any other issue, or for one recorded before + LavaFlow was turned on. The run follows the project's settings, as + one LavaFlow starts on its own does, and answers `202` while it is + `queued`; read it with `GET /lavaflow/runs/{run_id}`. - **Session-less**: signup never issues a session. On success it returns a - uniform acknowledgement (`AuthSignupResponse`) with no tokens; the client - obtains a session with a subsequent `POST /auth/signin`. If email confirmation - is enabled for the project, a confirmation email is sent and - `confirmation_required` is `true`. + Only the project's owner can start a run, as a person, while their + account is active: with a platform token that expires, `volcano + login`, or a live Volcano dashboard sign-in. A platform token that + never expires, a `volcano login` token + whose sign-in ended, a full-scope project access token, and a request + made through MCP get `403` with code `person_required`; a read-only + project access token is refused as read-only first, without a code, + and so is the owner of a read-only account. - **Anti-enumeration**: a signup for an already-registered email returns the - exact same `201` response as a fresh signup — it never returns `409` — so the - response cannot be used to discover which emails are registered. - operationId: authSignup + Every start counts toward the run limits: 5 runs per issue and 200 per + project in any 24 hours. An issue has one run in progress at a time, + so sending the request again while the first run is in progress + answers `409` with code `lavaflow_run_in_progress`. + + A run on a Code Quality issue is a Code Quality run. It starts only + while Code Quality is available to the project, as + `lavaflow.code_quality` in `GET /capabilities` reports, and on for it. + operationId: createLavaflowRun security: - - AnonKey: [] + - UserToken: [] + - AuthUserAccessToken: [] requestBody: required: true content: application/json: schema: - type: object - required: - - email - - password - properties: - email: - type: string - format: email - password: - type: string - description: | - Password validated after NFC normalization against the - policy returned by GET /auth/password-policy. - user_metadata: - type: object - additionalProperties: true + $ref: '#/components/schemas/LavaflowRunCreate' responses: - '201': - description: | - Signup acknowledged (session-less). Returned identically for a new - account and for an already-registered email (anti-enumeration). + '202': + description: The run, queued content: application/json: schema: - $ref: '#/components/schemas/AuthSignupResponse' + $ref: '#/components/schemas/LavaflowRun' '400': - description: Invalid input (bad email/password format) + description: 'The body is invalid: `project_id` or `issue_id` missing or not a UUID, or an unknown field. Code `feature_unavailable` means the issue is a Code Quality issue and Code Quality is not available.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': - description: | - Unauthorized - Invalid, tampered, revoked, or wrong-project anon key + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '403': - description: | - Forbidden - Signups disabled, anon key lacks signup permission, or the - email domain is not in `allowed_email_domains`. The internal - `anonymous.volcano.internal` domain is reserved for anonymous - accounts and is refused whatever the project allows. - '429': - description: Rate limit exceeded - '503': - description: Compromised-password screening is temporarily unavailable + description: 'Code `person_required` means the request didn''t come from the owner''s live person credential: a platform token that never expires, a `volcano login` token whose sign-in ended, a full-scope project access token, or MCP made it. Start a run with a platform token that expires, `volcano login`, or the dashboard. Code `plan_required` means the owner''s plan does not include LavaFlow, or, for a Code Quality issue, Code Quality. Without a code: a read-only project access token made the request, the owner''s account is read-only or inactive, or the owner''s plan could not be read; retry later.' content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/signin: - post: - tags: - - Authentication - summary: Sign in an auth user - description: | - Authenticate with email and password. Requires an anon key. - - Set `session_mode` to `cookie` to request HttpOnly refresh-token - storage. Cookie mode is honored only for an exact, credentialed CORS - origin on the same schemeful site as this API. Otherwise the response - retains the refresh token in its body. A frontend on its default - Volcano URL is cross-site with this API and so always gets the body - token. - operationId: authSignin - security: - - AnonKey: [] - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - email - - password - properties: - email: - type: string - password: - type: string - session_mode: - type: string - enum: - - cookie - responses: - '200': - description: Signin successful + '404': + description: Not found. A project the caller can't read answers exactly like one that doesn't exist, and so does one being deleted. Code `issue_not_found` means the project has no issue `issue_id`; an issue of another project answers the same. Code `feature_unavailable` means LavaFlow is not available for this project. content: application/json: schema: - $ref: '#/components/schemas/AuthTokenResponse' - '400': - description: Invalid input (missing email/password) - '401': - description: | - Unauthorized - Invalid credentials, invalid/tampered/revoked anon key, - or account banned/deleted - '403': - description: | - Forbidden - Anon key lacks signin permission, or the email domain is - not in `allowed_email_domains` while `allowed_email_domains_mode` is - `signup_and_signin`. The domain is taken from the account's canonical - email (its primary identity), which is not necessarily the address in - the request. + $ref: '#/components/schemas/Error' + '409': + description: The run did not start. Code `lavaflow_disabled` means LavaFlow is off for the project, or, for a Code Quality issue, Code Quality is; turn it on. Code `repository_required` means LavaFlow was turned on for a repository the project no longer links, and `repository_changed` that the project links another repository than LavaFlow was turned on for; turn LavaFlow on again. Code `lavaflow_run_in_progress` means the issue has a run in progress. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: Request body exceeds 4,096 bytes + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '429': - description: Rate limit exceeded - /auth/refresh: - post: + description: A run limit is reached. Code `issue_run_limit_reached` means the issue started 5 runs in the last 24 hours, and `project_run_limit_reached` that the project started 200. Try again after `Retry-After`. + headers: + Retry-After: + description: Seconds until the limit has room for the run. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /lavaflow/runs/{run_id}: + get: tags: - - Authentication - summary: Refresh access token + - LavaFlow + summary: Get a LavaFlow run description: | - Get a new access token using a refresh token. Requires an anon key. + Returns a run, with its diagnosis, the log lines it cites, its diff, + its review, including the findings the review left open and what it + asks a person to decide, and whether the repository's own checks + passed when LavaFlow ran them on the fix, with the commands they ran. + The run's project authorizes the read, so `project_id` is optional. + The text holds the project's logs and source code, so this endpoint + takes the same access as the project's log endpoints. - Send `refresh_token` in the body for the default flow. An eligible - cookie-mode browser request may instead send `session_mode: cookie` - with an empty token or omit the request body; the API reads and resets - the project's HttpOnly cookie and omits `refresh_token` from the - response. - operationId: authRefresh + A run held because the repository's workflows could run its fix with + the repository's secrets before a person approves it + (`pull_request_skipped: ungated_workflows`) lists every such job in + `held_workflows`, beside the fix's `diff` and `diff_sha256`. + operationId: getLavaflowRun security: - - AnonKey: [] - requestBody: - required: false - content: - application/json: - schema: - type: object - properties: - refresh_token: - type: string - session_mode: - type: string - enum: - - cookie + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/LavaflowRunId' + - $ref: '#/components/parameters/ItemProjectIdQuery' responses: '200': - description: Token refreshed + description: The run content: application/json: schema: - $ref: '#/components/schemas/AuthTokenResponse' + $ref: '#/components/schemas/LavaflowRun' + '400': + description: '`project_id` is given and not a UUID.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': - description: Invalid or expired refresh token + description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: | - The account's email domain is not in `allowed_email_domains` while - `allowed_email_domains_mode` is `signup_and_signin`, so the session - cannot be extended + description: Code `plan_required` means the owner's plan does not include LavaFlow and the project has no LavaFlow records. Without a code, the owner's plan could not be read; retry later. content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - description: Rate limit exceeded + '404': + description: Not found. A run of a project the caller can't read, or of a project being deleted, answers exactly like one that doesn't exist, and so does a run of another project than a given `project_id`. Code `feature_unavailable` means LavaFlow is not available for the project and it has no LavaFlow records. content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/logout: + /lavaflow/held-fix-opens: post: tags: - - Authentication - summary: Logout (revoke refresh token) - description: | - Invalidate a refresh token. Requires an anon key. + - LavaFlow + summary: Open a held LavaFlow fix + description: | + Opens the pull request for a fix LavaFlow held because the + repository's workflows could run it with the repository's secrets + before a person approves it (`pull_request_skipped: + ungated_workflows`). Read the run first: send its `id` as `run_id`, + with the `diff_sha256` and `held_workflows.jobs_sha256` it served, to + say you read that diff and that list of jobs. LavaFlow opens the fix it + saved, exactly as reviewed, past those jobs only. It writes no new + fix. - Send `refresh_token` for the default flow. An eligible cookie-mode - browser request may instead send `session_mode: cookie` with an empty - token; logout remains idempotent when the cookie is missing or expired. - operationId: authLogout - security: - - AnonKey: [] - requestBody: - required: false - content: - application/json: - schema: - type: object - properties: - refresh_token: - type: string - session_mode: - type: string - enum: - - cookie - responses: - '204': - description: Logged out successfully - /auth/forgot-password: - post: - tags: - - Authentication - summary: Request password reset - description: | - Generates recovery token and stores it (email sending pending). - Returns generic message to prevent email enumeration. - Project is identified via the anon key. - operationId: authForgotPassword + Right before it queues the run, LavaFlow serves the diff again and + reads the workflows again. A diff served differently since you read + it, or a job list or a commit the workflows were read at that changed, + answers `409` with code `run_changed`; read the run again, which lists + what LavaFlow found. The response is the run, `202` while it is + `queued`. LavaFlow reads the workflows again before it opens the pull + request, and once more as it pushes the fix: a job you didn't read, a + new commit on a branch the workflows were read on, even one that + changes no job, or a production branch other than the one you read + them on holds the fix again with a new list. + + Opening a fix lets its pull request open, nothing more. LavaFlow + starts no CI on it and never merges it, as for every fix opened past + ungated workflows; a person pushes to the branch or merges it. The + pull request's description names who opened it and lists the jobs. + One exception: when LavaFlow's read before the pull request opens + finds no job that runs the fix before a person approves it, because + the workflows were gated since you read them, the fix opens as any + other fix and follows the project's merge settings. A run whose + `held_workflows` lists no job opens the same way. + + Only the project's owner can open a fix, as a person, while their + account is active: with a `volcano login` token + whose sign-in is live, or a platform token that expires. Their GitHub + account must be able to push to the project's repository. A project + access token, a request made through MCP, a platform token that never + expires, and a sign-in that ended get `403` with code + `person_required`. Opening a fix uses one of the run's attempts: the + attempt that opens it is one of the run's, so a run held again on its + last attempt can't be opened again. It starts no new run and counts + toward no run limit. + operationId: createLavaflowHeldFixOpen security: - - AnonKey: [] + - UserToken: [] requestBody: required: true content: application/json: schema: - type: object - required: - - email - properties: - email: - type: string - format: email + $ref: '#/components/schemas/LavaflowHeldFixOpen' responses: - '200': - description: Generic success message (doesn't reveal if email exists) + '202': + description: The run, queued to open its fix content: application/json: schema: - type: object - properties: - message: - type: string - example: If the email exists, a password reset link has been sent + $ref: '#/components/schemas/LavaflowRun' + '400': + description: 'The body is invalid: `project_id` or `run_id` missing or not a UUID, `diff_sha256` or `jobs_sha256` missing or not 64 lowercase hex characters, or an unknown field.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '403': - description: Password reset is disabled for this project + description: 'Code `person_required` means the request didn''t come from the owner''s live person credential: a full-scope project access token, MCP, a platform token that never expires, or a `volcano login` token whose sign-in ended made it, or the owner''s GitHub account can''t push to the project''s repository, or the project has none. Open the fix with a platform token that expires, or `volcano login`. Code `plan_required` means the owner''s plan does not include LavaFlow. Without a code: a read-only project access token made the request, the owner''s account is read-only or inactive, or the owner''s plan could not be read; retry later.' content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - description: Rate limit exceeded (10 requests per hour per IP) + '404': + description: Not found. A project the caller can't read answers exactly like one that doesn't exist, and so does one being deleted. A run of another project than `project_id` answers as one that doesn't exist. Code `feature_unavailable` means LavaFlow is not available for this project. content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/reset-password: - post: - tags: - - Authentication - summary: Reset password with recovery token - description: | - Reset password using recovery token from forgot-password. - Revokes all existing sessions for security. - operationId: authResetPassword - security: - - AnonKey: [] - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - token - - new_password - properties: - token: - type: string - description: Recovery token from forgot-password - new_password: - type: string - description: | - Password validated after NFC normalization against the - policy returned by GET /auth/password-policy. - responses: - '200': - description: Password reset successful + '409': + description: 'Nothing was queued. Code `run_not_held` means the run holds no fix you can open: it was not held for ungated workflows, its pull request opened or is queued to, its diff is cut short or withholds a file, or LavaFlow could not list every job that held it (`held_workflows` is `null`). Code `run_changed` means the diff or the jobs are not the ones you named: read the run again. Code `run_attempts_exhausted` means the run used all its retries, so LavaFlow can''t open its fix any more; apply the fix yourself from the run''s `diff`, and where the diff is cut short or withholds a file, from its `diagnosis`. Code `lavaflow_disabled` means LavaFlow is off for the project; turn it on. Code `repository_required` means LavaFlow was turned on for a repository the project no longer links, `repository_changed` that the project links another repository than LavaFlow was turned on for, or than the fix was written for, and `repository_unreadable` that LavaFlow can no longer read the repository''s workflows. Code `lavaflow_run_in_progress` means another run of the issue is in progress.' content: application/json: schema: - type: object - properties: - message: - type: string - '400': - description: Password doesn't meet requirements - '401': - description: Invalid or expired token + $ref: '#/components/schemas/Error' + '413': + description: Request body exceeds 4,096 bytes + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: The project, or its owner across their projects, used up the hour's checks of the owner's GitHub push access. Nothing was queued. Try again after `Retry-After`. + headers: + Retry-After: + description: Seconds until the budget's hour ends. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '503': - description: Compromised-password screening is temporarily unavailable + description: GitHub didn't answer the owner's push check or the read of the workflows. Nothing was queued. Try again after `Retry-After`. + headers: + Retry-After: + description: Seconds to wait before trying again. + schema: + type: integer content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/confirm: + /issues: post: tags: - - Authentication - summary: Confirm email address - description: | - Confirm email address using token sent via email. - Required if require_email_confirmation is enabled. - operationId: authConfirmEmail + - Issues + summary: Create an issue + description: | + Records an issue you write on the project `project_id` names: a + description of what to fix, in your words, and optionally a title. The + issue has `source` `request`, the + project as its resource, and status `open`. With LavaFlow on, LavaFlow + starts a run on it by itself, as on a new error: the run follows the + project's LavaFlow settings and counts toward the run limits. Follow + it with `GET /lavaflow/runs?project_id=…&issue_id=…`. Where none + starts, as with LavaFlow off, start one with `POST /lavaflow/runs`. + + The issue counts toward the project's 1,000 open issues, with runtime, + build and reported issues; at that limit it is refused with code + `open_issue_limit_reached`. Resolve or ignore issues to make room. + + Only the project's owner can create an issue, as a person: with + `volcano login`, a live Volcano dashboard sign-in, or a platform token + that expires. A full-scope project access + token, MCP and a never-expiring platform token are refused with code + `person_required`, as starting a run is, and a read-only project access + token or account with an uncoded `403`, because creating one starts a + run, which sends the description to an AI service with the project's + source. A project access token is refused before its `project_id` is + looked up. List, read and update the issue under + `/projects/{id}/issues`. + operationId: createIssue security: - - AnonKey: [] + - UserToken: [] + - AuthUserAccessToken: [] requestBody: required: true content: application/json: schema: - type: object - required: - - token - properties: - token: - type: string - description: Confirmation token from email + $ref: '#/components/schemas/CreateIssueRequest' responses: - '200': - description: Email confirmed or already confirmed + '201': + description: Created content: application/json: schema: - type: object - properties: - message: - type: string - enum: - - Email confirmed successfully - - Email already confirmed - examples: - confirmed: - summary: Fresh confirmation - value: - message: Email confirmed successfully - alreadyConfirmed: - summary: Token belongs to already-confirmed user - value: - message: Email already confirmed + $ref: '#/components/schemas/Issue' '400': - description: Missing confirmation token in request body - '401': - description: Invalid or expired token - /auth/resend-confirmation: - post: - tags: - - Authentication - summary: Resend confirmation email - description: | - Resend email confirmation link. - Returns generic message to prevent email enumeration. - No email is sent when the account does not exist or is already confirmed. - If the account exists and is unconfirmed, a new token is generated and - any previous confirmation token is invalidated. - operationId: authResendConfirmation - security: - - AnonKey: [] - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - email - properties: - email: - type: string - format: email - responses: - '200': - description: Generic success message + description: The request body is invalid, or its description or title is blank. content: application/json: schema: - type: object - properties: - message: - type: string - '429': - description: Rate limit exceeded + $ref: '#/components/schemas/Error' + '403': + description: 'Code `person_required`: only the project''s owner, as a person, can create an issue. A project access token or MCP is refused so even where writing issues isn''t available. A read-only account is refused too. In local mode, which runs no LavaFlow, its own token can create one.' content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/signup-anonymous: - post: + '404': + description: The project `project_id` names was not found, or you can't use it. Code `feature_unavailable` means writing issues is not available in this environment, as the `issues.create` capability reports. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: 'Code `open_issue_limit_reached`: the project has 1,000 open issues. Resolve or ignore some, then try again.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: The request body is larger than 64 KiB. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/issues: + get: tags: - - Authentication - summary: Create anonymous user + - Issues + summary: List issues description: | - Create guest user without email/password. + Lists the project's issues, most recently seen first. An issue groups + the runtime errors one function or frontend raised with the same error + type and stack, or the same message when there is no stack; the + deploys of one function or frontend whose own build failed with the + same first error (`source` `build`); or one Code Quality finding or + reported problem, or one issue a person wrote (`source` `request`). - User metadata (like display_name) can be included and will appear in realtime presence events. - Requires enable_anonymous_signins to be true. - operationId: authSignupAnonymous + Project access tokens can list issues, including read-only ones. + operationId: listIssues security: - - AnonKey: [] - requestBody: - description: Optional user metadata - content: - application/json: - schema: - type: object - properties: - user_metadata: - type: object - additionalProperties: true - description: Custom user metadata (e.g., display_name, avatar_url) - example: - display_name: Alice - avatar_url: https://example.com/alice.jpg + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/IssueCursor' + - name: status + in: query + required: false + description: Return only issues in this status. + schema: + $ref: '#/components/schemas/IssueStatus' + - name: resource_id + in: query + required: false + description: Return only issues raised by this function or frontend. + schema: + type: string + format: uuid + - name: source + in: query + required: false + description: Return only issues from this source, such as `build` for failed builds. + schema: + $ref: '#/components/schemas/IssueSource' responses: - '201': - description: Anonymous user created + '200': + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/AuthTokenResponse' - '403': - description: Anonymous signins disabled - /auth/user/convert-anonymous: - post: + $ref: '#/components/schemas/PaginatedIssues' + '400': + description: A filter or the cursor is invalid + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project not found. Code `feature_unavailable` means issues are not available in this environment. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/issues/{issueId}: + get: tags: - - Authentication - summary: Convert anonymous user to authenticated + - Issues + summary: Get an issue description: | - Add email and password to anonymous user. - Requires auth user access token. - If require_email_confirmation is enabled for the project, the converted - user remains unconfirmed until /auth/confirm succeeds. When email - sending is enabled, a confirmation email is sent during conversion. - operationId: authConvertAnonymous + Returns one issue: the resource that raised it, how often and when it + was seen, and its status. + + Project access tokens can read issues, including read-only ones. + operationId: getIssue security: - - AuthUserAccessToken: [] - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - email - - password - properties: - email: - type: string - format: email - password: - type: string - description: | - Password validated after NFC normalization against the - policy returned by GET /auth/password-policy. - user_metadata: - type: object - additionalProperties: true + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/IssueId' responses: '200': - description: User converted successfully + description: Successful response content: application/json: schema: - type: object - properties: - user: - $ref: '#/components/schemas/AuthUser' - '400': - description: Not an anonymous user - '403': - description: | - The chosen email domain is not in `allowed_email_domains` - '409': - description: Email already in use - '503': - description: Compromised-password screening is temporarily unavailable + $ref: '#/components/schemas/Issue' + '404': + description: Issue not found. Code `feature_unavailable` means issues are not available in this environment. content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/user/change-email: - post: + patch: tags: - - Authentication - summary: Request email change + - Issues + summary: Update an issue description: | - Request to change user's email address. - Sends confirmation token to new email address. - operationId: authRequestEmailChange + Sets an issue's status. A resolved issue that is seen again after it + was resolved reopens, and `regressed_at` records when. An ignored issue + stays ignored while it keeps being counted. + + Setting the status an issue already has is safe to repeat. + operationId: updateIssue security: - - AuthUserAccessToken: [] + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/IssueId' requestBody: required: true content: application/json: schema: - type: object - required: - - new_email - properties: - new_email: - type: string - format: email + $ref: '#/components/schemas/UpdateIssueRequest' responses: '200': - description: Confirmation email sent + description: Updated content: application/json: schema: - type: object - properties: - message: - type: string - new_email: - type: string + $ref: '#/components/schemas/Issue' '400': - description: Invalid email format or same as current email - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Not authenticated + description: The request body is invalid content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: | - The requested email domain is not in `allowed_email_domains` + '404': + description: Issue not found. Code `feature_unavailable` means issues are not available in this environment. content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: Email already in use + /projects/{id}/durable-approvals: + get: + tags: + - Durable Functions + summary: List durable approvals + description: | + Lists the approvals durable workflows in the project have requested, + newest first. Pending approvals are the ones a workflow is waiting on; + decided, expired, and cancelled ones are kept for a year. + + Project access tokens can list approvals, including read-only ones. + operationId: listDurableApprovals + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + - name: status + in: query + required: false + description: Return only approvals in this status. + schema: + $ref: '#/components/schemas/DurableApprovalStatus' + - $ref: '#/components/parameters/DurableApprovalFunctionFilter' + - name: execution_id + in: query + required: false + description: Return only approvals requested by this durable execution. + schema: + type: string + format: uuid + - name: from + in: query + required: false + description: Return only approvals requested at or after this time. + schema: + type: string + format: date-time + - name: to + in: query + required: false + description: Return only approvals requested before this time. + schema: + type: string + format: date-time + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedDurableApprovals' + '400': + description: A filter is invalid, or `from` is after `to` content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - description: Rate limit exceeded (10 requests per hour per IP) + /projects/{id}/durable-approvals/stats: + get: + tags: + - Durable Functions + summary: Get durable approval statistics + description: | + Counts the project's approvals by outcome over a time window, overall, + per workflow, and per day. The window defaults to the last 30 days and + can cover up to a year. An approval is counted on the day it was + requested. + + Project access tokens can read statistics, including read-only ones. + operationId: getDurableApprovalStats + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DurableApprovalFunctionFilter' + - name: from + in: query + required: false + description: Start of the window. Defaults to 30 days before `to`. + schema: + type: string + format: date-time + - name: to + in: query + required: false + description: End of the window. Defaults to now. + schema: + type: string + format: date-time + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/DurableApprovalStats' + '400': + description: The window is invalid or longer than 366 days content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/user/confirm-email-change: + /projects/{id}/durable-approvals/{approvalId}: + get: + tags: + - Durable Functions + summary: Get a durable approval + description: | + Returns one approval: what the workflow asked, the durable function + and execution that asked it, its deadline, and the decision once one + is made. + + Project access tokens can read approvals, including read-only ones. + operationId: getDurableApproval + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DurableApprovalId' + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/DurableApproval' + '404': + description: Approval not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/durable-approvals/{approvalId}/approve: post: tags: - - Authentication - summary: Confirm email change - description: Confirm email change with token sent to new address - operationId: authConfirmEmailChange + - Durable Functions + summary: Approve a durable approval + description: | + Approves a pending approval. The workflow resumes with the decision. + + Only a person can decide: use the dashboard or a platform token from + `volcano login`. Project access tokens are refused with `403`. + + Approving an approval that is already approved returns it unchanged. + If the workflow cannot be reached right away, the decision still + stands and Volcano keeps delivering it. + operationId: approveDurableApproval security: - - AuthUserAccessToken: [] + - UserToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DurableApprovalId' requestBody: - required: true + required: false content: application/json: schema: - type: object - required: - - email_change_token - properties: - email_change_token: - type: string + $ref: '#/components/schemas/DurableApprovalDecisionRequest' responses: '200': - description: Email changed successfully + description: Approved content: application/json: schema: - type: object - properties: - message: - type: string - user: - $ref: '#/components/schemas/AuthUser' + $ref: '#/components/schemas/DurableApproval' '400': - description: Invalid or expired token, or no pending email change + description: The request body is invalid content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Not authenticated + '403': + description: The credential is not a person's content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: | - The pending email domain is no longer in `allowed_email_domains`. - Re-checked here because the allowlist can narrow between the request - and the confirmation. + '404': + description: Approval not found content: application/json: schema: $ref: '#/components/schemas/Error' '409': - description: Email is now in use by another user + description: | + The approval was already denied, or has expired or been cancelled. + `code` is `approval_decided`, `approval_expired`, or + `approval_cancelled`. content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/user/cancel-email-change: - delete: + '413': + description: The request body is larger than 16 KiB + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/durable-approvals/{approvalId}/deny: + post: tags: - - Authentication - summary: Cancel pending email change - operationId: authCancelEmailChange + - Durable Functions + summary: Deny a durable approval + description: | + Denies a pending approval. The workflow resumes with the decision; a + denial is a value the workflow branches on, not an error. + + Only a person can decide: use the dashboard or a platform token from + `volcano login`. Project access tokens are refused with `403`. + + Denying an approval that is already denied returns it unchanged. + If the workflow cannot be reached right away, the decision still + stands and Volcano keeps delivering it. + operationId: denyDurableApproval security: - - AuthUserAccessToken: [] + - UserToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DurableApprovalId' + requestBody: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/DurableApprovalDecisionRequest' responses: '200': - description: Email change cancelled + description: Denied content: application/json: schema: - type: object - properties: - message: - type: string - '401': - description: Not authenticated + $ref: '#/components/schemas/DurableApproval' + '400': + description: The request body is invalid content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/user/sessions: - get: - tags: - - Authentication - summary: Get current user's sessions - description: | - Returns paginated sessions for the currently authenticated user. - Each session includes device info, IP addresses, and activity timestamps. - The current session is marked with `is_current: true`. - - **Ordering and pagination.** Without `sort`, results are ordered by most - recent activity and paged with `page`/`limit`, returning the - `sessions`/`total`/`page`/`limit`/`total_pages` body below. This is the - legacy default and is preserved for existing clients. - - Send `sort=created_at` to opt into the standard list contract: results are - ordered by session start (newest first) and may be paged either with - `page`/`limit` or by cursor with `cursor`/`ending_before` plus a bounded - `offset` past the cursor anchor. Cursor responses use the shared - `data` envelope with `next_cursor`/`prev_cursor`. - - Unlike other list endpoints, sending `limit` without `page` does **not** - select cursor mode here; `sort=created_at` is the only opt-in. Cursor - pagination is rejected with 400 for the activity order, because - `last_activity_at` changes whenever a session refreshes its token: a row - that crosses the cursor anchor between two requests would be skipped and - never shown. The `status=expired` filter is also offset-only because a - session can expire above the cursor anchor during a walk. Sending that - filter in cursor mode, `page` with `cursor` or `ending_before`, or both - cursor directions returns 400. - operationId: authGetMySessions - security: - - AuthUserAccessToken: [] - parameters: - - name: page - in: query - description: Page number (1-indexed) - schema: - type: integer - minimum: 1 - default: 1 - - name: limit - in: query - description: Number of sessions per page (max 100) - schema: - type: integer - minimum: 1 - maximum: 100 - default: 20 - - name: sort - in: query - description: | - Sort key. `last_activity` (default) orders by most recent activity and - supports offset pagination only. `created_at` orders by session start - and supports both offset and cursor pagination. - schema: - type: string - enum: - - last_activity - - created_at - default: last_activity - - name: status - in: query - description: | - Filter by whether the session can still be refreshed. Omit for every - stored session, including expired ones. `expired` is not supported - with cursor pagination. - schema: - type: string - enum: - - active - - expired - - name: cursor - in: query - description: | - Opaque keyset cursor from a previous response's `next_cursor`. Requires - `sort=created_at`; mutually exclusive with `page` and `ending_before`. - schema: - type: string - - name: ending_before - in: query - description: | - Opaque keyset cursor from a previous response's `prev_cursor`, paging - backward. Requires `sort=created_at`; mutually exclusive with `page` - and `cursor`. - schema: - type: string - - name: offset - in: query - description: | - Bounded number of rows to skip past the cursor anchor (the hybrid - jump, maximum 100000). Ignored unless `cursor` or `ending_before` is - supplied. - schema: - type: integer - minimum: 0 - maximum: 100000 - responses: - '200': - description: Paginated list of user sessions + '403': + description: The credential is not a person's content: application/json: schema: - type: object - properties: - sessions: - type: array - items: - $ref: '#/components/schemas/AuthSession' - total: - type: integer - description: Total number of sessions - page: - type: integer - description: Current page number - limit: - type: integer - description: Number of sessions per page - total_pages: - type: integer - description: Total number of pages - data: - type: array - description: Sessions for this page (cursor pagination only) - items: - $ref: '#/components/schemas/AuthSession' - has_more: - type: boolean - description: Whether a further page exists (cursor pagination only) - next_cursor: - type: string - description: Opaque cursor for the next page (cursor pagination only) - prev_cursor: - type: string - description: Opaque cursor for the previous page (cursor pagination only). Send as `ending_before`. - '400': - description: Invalid or conflicting pagination parameters + $ref: '#/components/schemas/Error' + '404': + description: Approval not found content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Not authenticated + '409': + description: | + The approval was already approved, or has expired or been + cancelled. `code` is `approval_decided`, `approval_expired`, or + `approval_cancelled`. content: application/json: schema: $ref: '#/components/schemas/Error' - delete: - tags: - - Authentication - summary: Sign out from all other devices - description: | - Deletes all sessions except the current one. - Use this to log out from all other devices while keeping the current session active. - operationId: authDeleteAllMySessions - security: - - AuthUserAccessToken: [] - responses: - '204': - description: All other sessions deleted - '401': - description: Not authenticated + '413': + description: The request body is larger than 16 KiB content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/user/sessions/{sessionId}: - delete: + /projects/{id}/frontends: + get: tags: - - Authentication - summary: Sign out from specific device + - Frontends + summary: List all frontends in a project description: | - Deletes a specific session, logging out that device. - You can get session IDs from the list sessions endpoint. - operationId: authDeleteMySession + Supports two mutually exclusive pagination modes. Offset mode uses `page` + and `limit` and returns `next` (URL). Cursor mode uses `cursor` and + `limit`, supports `search` (case-insensitive name match), and returns + `next_cursor`. Sending both `page` and `cursor` (or `page` and `search`) + returns 400. + operationId: listFrontends security: - - AuthUserAccessToken: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - name: sessionId - in: path - required: true - description: The session ID to delete - schema: - type: string - format: uuid + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/EndingBefore' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Search' responses: - '204': - description: Session deleted - '401': - description: Not authenticated + '200': + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/Error' - '404': - description: Session not found + $ref: '#/components/schemas/PaginatedFrontends' + '400': + description: Bad request - invalid project identifier content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/user: - get: - tags: - - Authentication - summary: Get current user profile - description: Returns authenticated user's profile. Requires access token. - operationId: authGetUser - security: - - AuthUserAccessToken: [] - responses: - '200': - description: User profile + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: - type: object - properties: - user: - $ref: '#/components/schemas/AuthUser' - '401': - description: Not authenticated - access token missing or invalid + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' - put: - tags: - - Authentication - summary: Update user profile - description: Update password or metadata. Requires access token. - operationId: authUpdateUser - security: - - AuthUserAccessToken: [] - requestBody: - content: - application/json: - schema: - type: object - properties: - password: - type: string - description: | - Password validated after NFC normalization against the - policy returned by GET /auth/password-policy. - user_metadata: - type: object - additionalProperties: true - description: | - Metadata keys to merge into the current user metadata. - Omitted keys remain unchanged; set a key to null to remove it. - Merging is shallow; nested objects replace the stored value for that top-level key. - responses: - '200': - description: Profile updated + '404': + description: Project not found content: application/json: schema: - type: object - properties: - user: - $ref: '#/components/schemas/AuthUser' - '400': - description: Bad request - invalid password or metadata format + $ref: '#/components/schemas/Error' + '500': + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Not authenticated - access token missing or invalid - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '503': - description: Compromised-password screening is temporarily unavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /auth/user/identities: - get: + post: tags: - - Authentication - summary: List the current user's identities + - Frontends + summary: Create a new frontend deployment description: | - Returns every real email identity the account owns. An account can own - multiple identities (for example a password identity plus one or more - OAuth identities on different emails). Anonymous accounts have no real - identity and return an empty list. - operationId: authListIdentities + Creates and deploys a frontend for the project. + If a frontend with the same name already exists in the project, this operation updates that + frontend using the uploaded archive and starts a new deployment. A deployment that starts + immediately returns `status: provisioning`, then transitions to `active`, `degraded`, or + `failed`. If another deployment is running, the response preserves the frontend's current status + and exposes the queued deployment through `pending_deployment_id`. + Existing frontend traffic continues to use an available runtime while the new deployment builds + and provisions. Each deployment publishes its own static assets before the runtimes switch to its + build, and the live build's assets keep serving until the new deployment is live, so a page loaded + mid-deployment resolves its assets whichever build served it. A failed redeploy puts the runtimes + back on the build they were running, leaves the frontend `active` on the previous deployment, and + records the attempted deployment as failed. `degraded` means the runtime remains available but + edge synchronization requires recovery; Volcano retries the edge step without rebuilding. Only one deployment may run for a + given frontend, while independent frontends and projects can deploy concurrently. + For monorepos, provide `app_root` as a relative path from the uploaded archive root + to the Next.js app that should be built. Omit it for single-app archives. + Supported frontend environments are Next.js 15.x and 16.x with Node.js + 22.x or 24.x. The Node.js runtime is inferred from + `package.json` `engines.node`; if omitted, Volcano uses Node.js 22.x. + The selected Node.js family must also satisfy the installed Next.js package's + `engines.node` constraint. Volcano tests Next 15.5.29 (`^18.18.0 || ^19.8.0 || >=20.0.0`) and Next 16.4.5 (`>=20.9.0`). + Source archive size is enforced by the API with `SOURCE_ARCHIVE_SIZE_LIMIT_MB`; the CLI + does not apply its own source archive size limit. After the final container images are + built, the publish build enforces `LAMBDA_TARGET_CONTAINER_SIZE_LIMIT_MB` before pushing. + Plans do not limit how many frontends a project has; usage allowances apply across all of a user's frontends. + Each project can contain up to 10,000 frontends regardless of plan. + operationId: createFrontend security: - - AuthUserAccessToken: [] + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + required: + - name + - archive + properties: + name: + type: string + maxLength: 63 + pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ + description: DNS-safe frontend name + framework: + type: string + enum: + - nextjs + default: nextjs + description: Next.js frontend. Supported Next.js majors are 15.x and 16.x. + app_root: + type: string + maxLength: 1024 + description: Optional relative POSIX path from the uploaded archive root to the Next.js app to build, for example `apps/web`. + example: apps/web + variable_scope: + type: string + enum: + - all + - scoped + description: Variable selection for this deployment. New frontends default to `scoped`; omitting this field for an existing frontend preserves its current selection. + variables: + type: array + items: + type: string + pattern: ^[A-Za-z_][A-Za-z0-9_]*$ + description: Project variable names selected when `variable_scope` is `scoped`. Submit each name as a repeated multipart field. + archive: + type: string + format: binary + description: ZIP or tar.gz archive of the frontend project directory or monorepo workspace root. The API enforces SOURCE_ARCHIVE_SIZE_LIMIT_MB and stores a normalized tar.gz archive. + commit: + type: string + description: | + JSON-encoded commit the uploaded source came from: `{"repository": "acme/app", "sha": "<40-character commit ID>", "dirty": false, "root": "apps/web"}`. `repository` is `owner/name` or a github.com remote URL (`https://github.com/acme/app.git`, `git@github.com:acme/app.git`, or `ssh://git@github.com/acme/app.git`); Volcano drops any credentials in the URL and records `owner/name`. `dirty` is `true` when the uploaded files differ from the commit. `root` is the uploaded directory's path from the repository root, `""` for the root itself. `repository`, `sha`, and `dirty` are required, and fields Volcano does not know are ignored. An empty value, `null`, or `""` reports no commit. A malformed commit, or a repository not on GitHub, returns 400 before anything is deployed. Volcano checks the commit against the project's connected repository and each uploaded file against the commit's file at `root`, and returns the result in the deployment's `commit.verified`; an uploaded file in the project's root directory that the commit does not hold sets `commit.dirty`, and one outside it leaves the commit unverified. A commit it cannot verify is still recorded and never fails the deploy. responses: '200': - description: List of identities + description: Existing frontend updated; its deployment was started or queued content: application/json: schema: - $ref: '#/components/schemas/AuthIdentitiesResponse' - '401': - description: Not authenticated + $ref: '#/components/schemas/Frontend' + '201': + description: Frontend created and deployment workflow started content: application/json: schema: - $ref: '#/components/schemas/Error' - /auth/user/identities/{identityId}: - delete: - tags: - - Authentication - summary: Unlink an identity from the current user - description: | - Removes a non-primary identity and its attached sign-in methods. Refused - when the identity is the account's primary, its only identity, or when - removing it would leave the account with no way to sign in. - operationId: authUnlinkIdentity - security: - - AuthUserAccessToken: [] - parameters: - - name: identityId - in: path - required: true - description: The identity ID to unlink - schema: - type: string - format: uuid - responses: - '204': - description: Identity unlinked + $ref: '#/components/schemas/Frontend' '400': - description: Identity cannot be unlinked (primary, last, or would remove last sign-in method), or the identity id is malformed + description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Not authenticated + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Project frontend hard cap exceeded content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Identity not found + description: Project not found content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/user/methods: - get: - tags: - - Authentication - summary: List the current user's sign-in methods - description: | - Returns a flat list of every sign-in method the account owns (password, - each OAuth provider, and any active anonymous method), with the primary - method flagged. Password stubs and converted anonymous methods are excluded. - operationId: authListMethods - security: - - AuthUserAccessToken: [] - responses: - '200': - description: List of sign-in methods + '409': + description: 'Conflict. `code: frontend_served_by_candidate` - a promoted Candidate serves the existing frontend; roll back to the frontend''s own runtime before deploying it. Without a code, the frontend''s deletion is queued or running.' content: application/json: schema: - $ref: '#/components/schemas/AuthMethodsResponse' - '401': - description: Not authenticated + $ref: '#/components/schemas/Error' + '500': + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/user/methods/{methodId}/promote: - post: + '503': + description: Service unavailable - frontend workflow or archive limit configuration missing + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}: + get: tags: - - Authentication - summary: Set a method as the account's primary - description: | - Promotes the given method to the account's primary sign-in method. The - account's canonical email is re-derived from the promoted method's identity. - Refused for password stubs and converted anonymous methods, and for an - identity whose domain is outside the project's `allowed_email_domains`. - operationId: authPromoteMethod + - Frontends + summary: Get frontend details + operationId: getFrontend security: - - AuthUserAccessToken: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - name: methodId - in: path - required: true - description: The method ID to promote - schema: - type: string - format: uuid + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FrontendId' responses: '200': - description: The promoted method + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/AuthMethodSummary' + $ref: '#/components/schemas/Frontend' '400': - description: This method cannot be set as primary (password stub, converted anonymous method, or unverified email), or the method id is malformed + description: Bad request - invalid identifier content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Not authenticated + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: The promoted identity's email domain is not in the project's allowed_email_domains + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Method not found + description: Frontend not found content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/auth/insights: - get: + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: tags: - - Auth Admin - summary: Get auth user insights + - Frontends + summary: Delete a frontend description: | - Returns current and deleted auth-user totals, rolling 24-hour and 30-day - active users, and zero-filled daily activity and account-retention counts - for an inclusive UTC date range. Weeks start on Monday. - The existing deletions series counts accounts by deletion date; net_growth - remains signups minus deletions and is not affected by bans. - The banned_users, deleted_users, and available_users fields describe the - current state of users registered in each bucket. Banned users exclude - deleted users and expired bans. Available users are signups minus - banned_users minus deleted_users. Unban and expiry restore availability in - the original signup bucket. These current-state cohorts can change after - the requested dates have passed, without rewriting activity counts. - Sign-in counts remain grouped by session creation date. Deleted users - contribute to active counts until their last activity leaves the rolling - window. Token refreshes affect active users but not the sign-in series. - Signup history is backfilled from accounts present when collection was - deployed. Accounts hard-deleted before deletion-history collection cannot - be recovered. Current bans require no separate event-history collection. - operationId: getAuthInsights + Schedules asynchronous frontend deletion. If another deployment is running, the frontend + preserves its current status and exposes the queued deletion through `pending_deployment_id`. + Its status changes to `deleting` when cleanup starts. After cleanup, it returns 404 and no + longer appears in frontend lists. + operationId: deleteFrontend security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: from - in: query - description: Inclusive UTC start date. Defaults to 29 days before `to`. - schema: - type: string - format: date - - name: to - in: query - description: Inclusive UTC end date. Defaults to today. - schema: - type: string - format: date - - name: interval - in: query - description: Chart bucket size. Defaults to `day`. - schema: - $ref: '#/components/schemas/AuthInsightsInterval' + - $ref: '#/components/parameters/FrontendId' responses: - '200': - description: Auth insights retrieved - content: - application/json: - schema: - $ref: '#/components/schemas/AuthInsightsResponse' - example: - project_id: 4f165080-a931-4e03-b3bd-41c45c3f0058 - observed_at: '2026-07-20T18:00:00Z' - window: - from: '2026-06-21' - to: '2026-07-20' - interval: day - summary: - total_users: 1234 - deleted_users: 42 - active_users_1d: 83 - active_users_30d: 418 - series: - - bucket_start: '2026-07-20' - signups: 12 - signins: 97 - deletions: 3 - banned_users: 2 - deleted_users: 3 - available_users: 7 - net_growth: 9 - is_partial: true + '202': + description: Frontend deletion started or queued '400': - description: Invalid date range or interval + description: Bad request - invalid identifier content: application/json: schema: @@ -11777,13 +11880,19 @@ paths: schema: $ref: '#/components/schemas/Error' '403': - description: Access denied + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found + description: Frontend not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: Another Frontend's route mounts this Frontend. Remove those routes first; the error names the mounting Frontends. content: application/json: schema: @@ -11794,2338 +11903,2042 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/auth/users: - get: + '503': + description: Service unavailable - frontend workflow configuration missing + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/redeploy: + post: tags: - - Auth Admin - summary: List all auth users (admin) - description: List auth users in project. Requires platform token. - operationId: listAuthUsers + - Frontends + summary: Redeploy frontend using latest uploaded artifact + description: | + Starts a new frontend workflow using the latest stored artifact. A deployment that starts + immediately returns `status: provisioning`, then transitions to `active`, `degraded`, or + `failed`. An overlapping deployment preserves the frontend's current status, is exposed through + `pending_deployment_id`, and supersedes any older queued deployment. The previous runtime and its + published static assets remain available during provisioning, and a failed redeploy restores the + regional runtimes to that build and keeps it serving while the attempted deployment is recorded as + failed. + operationId: redeployFrontend security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Cursor' - - $ref: '#/components/parameters/EndingBefore' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Search' - - name: status - in: query - required: false - description: Filter by effective status. `banned` returns only currently-banned users; an expired temporary ban lists as `active`. - schema: - type: string - enum: - - active - - banned + - $ref: '#/components/parameters/FrontendId' responses: '200': - description: Successful response + description: Frontend redeploy started or queued content: application/json: schema: - $ref: '#/components/schemas/PaginatedAuthUsers' + $ref: '#/components/schemas/Frontend' '400': - description: Invalid status or pagination parameters + description: Bad request - invalid identifier content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/auth/users/{userId}: + '401': + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - project ownership required + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Frontend not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: 'Conflict. `code: frontend_served_by_candidate` - a promoted Candidate serves the frontend; roll back to the frontend''s own runtime before redeploying it. Without a code, the frontend''s deletion is queued or running.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Service unavailable - frontend workflow configuration missing + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/domain: get: tags: - - Auth Admin - summary: Get specific auth user (admin) - operationId: getAuthUser + - Frontends + summary: Get frontend custom domain status + description: | + Deprecated: use `GET /projects/{id}/frontends/{frontendId}/domains`. + Returns the frontend's oldest domain that serves it rather than redirecting. + deprecated: true + operationId: getFrontendCustomDomain security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: userId - in: path - required: true - schema: - type: string - format: uuid + - $ref: '#/components/parameters/FrontendId' responses: '200': - description: Auth user details + description: | + Frontend custom domain status, or null when the frontend has no + custom domain configured (the common empty state). content: application/json: schema: - $ref: '#/components/schemas/AuthUser' - delete: - tags: - - Auth Admin - summary: Delete auth user (admin) - description: Soft-deletes user and revokes all sessions - operationId: deleteAuthUser - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: userId - in: path - required: true - schema: - type: string - format: uuid - responses: - '204': - description: User deleted - /projects/{id}/auth/users/{userId}/sessions: - get: + nullable: true + allOf: + - $ref: '#/components/schemas/FrontendCustomDomainResponse' + '400': + description: Bad request - invalid identifier + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - project ownership required + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Frontend not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: tags: - - Auth Admin - summary: List user sessions + - Frontends + summary: Configure frontend custom domain + deprecated: true description: | - List paginated sessions for a specific auth user. - Returns session details including device info, IP address, and activity timestamps. - - Ordering and pagination match `GET /auth/user/sessions`: the default is - activity order with `page`/`limit` and the legacy `sessions` body, and - `sort=created_at` opts into the standard cursor/offset hybrid with the - shared `data` envelope. Cursor pagination is only available for - `sort=created_at`, because the activity timestamp changes under paging. - The `status=expired` filter is offset-only because sessions can expire - above a cursor anchor during a walk. - operationId: listUserSessions + Deprecated: use `POST /projects/{id}/frontends/{frontendId}/domains`, which adds a domain beside the frontend's others. + Configures one custom domain for a frontend. When the frontend already has a domain, a request for another hostname returns `409`. + The default Volcano-generated frontend URL remains active. + Wildcard Volcano frontend TLS remains valid and isolated from custom-domain certificate changes. + The account must own the hostname: it must have verified the hostname or a domain above it (see `POST /user/domains`). A certificate does not prove ownership. + When the account owns no domain covering the hostname, Volcano asks for a TXT record at `_volcano.`, such as `_volcano.example.com`. Publishing it verifies the whole domain, so later subdomains need no record. A managed TLS request reserves the hostname and returns that record in `verification_records`; the reservation expires after 72 hours unless the record is published. A BYOC request gets `409` with `code: ownership_verification_required` and the record in `required_record`; publish it and send the same request again. + Managed TLS then returns the CNAME that authorizes certificate issuance and renewal. + To move an active BYOC domain to managed TLS without downtime, send `tls.mode: managed` for the same hostname. The response is `200` with the CNAME to publish; the uploaded certificate keeps serving until Volcano issues the managed one, and `serving_certificate` changes from `uploaded` to `managed`. + To move an active managed domain to BYOC without downtime, send `tls.mode: byoc` with the certificate for the same hostname. The response is `200`; the uploaded certificate replaces the managed one at once, and Volcano stops renewing the managed certificate. + An unverified reservation does not block an account that proves ownership. When another account holds one, a request gets `409` with `code: ownership_verification_required` and the caller's own `required_record`; after publishing it, the same request takes over the reservation. When another account verified the domain, the same `409` names the record that moves the domain to the caller once the other account's record is no longer published. A hostname below a domain another account owns otherwise returns `409` without `code`. + operationId: createFrontendCustomDomain security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: userId - in: path - required: true - schema: - type: string - format: uuid - - name: page - in: query - description: Page number (1-indexed) - schema: - type: integer - minimum: 1 - default: 1 - - name: limit - in: query - description: Number of sessions per page (max 100) - schema: - type: integer - minimum: 1 - maximum: 100 - default: 20 - - name: sort - in: query - description: | - Sort key. `last_activity` (default) orders by most recent activity and - supports offset pagination only. `created_at` orders by session start - and supports both offset and cursor pagination. - schema: - type: string - enum: - - last_activity - - created_at - default: last_activity - - name: status - in: query - description: | - Filter by whether the session can still be refreshed. Omit for every - stored session, including expired ones. `expired` is not supported - with cursor pagination. - schema: - type: string - enum: - - active - - expired - - name: cursor - in: query - description: | - Opaque keyset cursor from a previous response's `next_cursor`. Requires - `sort=created_at`; mutually exclusive with `page` and `ending_before`. - schema: - type: string - - name: ending_before - in: query - description: | - Opaque keyset cursor from a previous response's `prev_cursor`, paging - backward. Requires `sort=created_at`; mutually exclusive with `page` - and `cursor`. - schema: - type: string - - name: offset - in: query - description: | - Bounded number of rows to skip past the cursor anchor (the hybrid - jump, maximum 100000). Ignored unless `cursor` or `ending_before` is - supplied. - schema: - type: integer - minimum: 0 - maximum: 100000 + - $ref: '#/components/parameters/FrontendId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateFrontendCustomDomainRequest' responses: '200': - description: Paginated list of user sessions + description: 'Custom domain already configured with the same hostname. A request with the other TLS mode for the frontend''s active domain switches it in place. To managed TLS, the uploaded certificate keeps serving, with `serving_certificate: uploaded`, until Volcano issues the managed certificate. To BYOC, the uploaded certificate replaces the managed one at once.' content: application/json: schema: - type: object - properties: - sessions: - type: array - items: - $ref: '#/components/schemas/AuthSession' - total: - type: integer - description: Total number of sessions - page: - type: integer - description: Current page number - limit: - type: integer - description: Number of sessions per page - total_pages: - type: integer - description: Total number of pages - data: - type: array - description: Sessions for this page (cursor pagination only) - items: - $ref: '#/components/schemas/AuthSession' - has_more: - type: boolean - description: Whether a further page exists (cursor pagination only) - next_cursor: - type: string - description: Opaque cursor for the next page (cursor pagination only) - prev_cursor: - type: string - description: Opaque cursor for the previous page (cursor pagination only). Send as `ending_before`. + $ref: '#/components/schemas/FrontendCustomDomainResponse' + '201': + description: Custom domain provisioning started + content: + application/json: + schema: + $ref: '#/components/schemas/FrontendCustomDomainResponse' '400': - description: Invalid or conflicting pagination parameters + description: Bad request - invalid domain content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: User not found - delete: - tags: - - Auth Admin - summary: Delete all user sessions - description: | - Revokes all sessions for a user, forcing them to re-authenticate on all devices. - Use this to log out a user from everywhere. - operationId: deleteAllUserSessions - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: userId - in: path - required: true - schema: - type: string - format: uuid - responses: - '204': - description: All sessions deleted - '404': - description: User not found - /projects/{id}/auth/users/{userId}/sessions/{sessionId}: - delete: - tags: - - Auth Admin - summary: Delete specific session - description: | - Revokes a specific session for a user. - Use this to log out a user from a single device. - operationId: deleteUserSession - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: userId - in: path - required: true - schema: - type: string - format: uuid - - name: sessionId - in: path - required: true - schema: - type: string - format: uuid - responses: - '204': - description: Session deleted - '404': - description: Session or user not found - /projects/{id}/auth/users/{userId}/ban: - post: - tags: - - Auth Admin - summary: Ban a user - description: | - Bans a user temporarily or permanently. Banned users cannot sign in - and all their active sessions are immediately revoked. - Omitting banned_until clears any previous expiry. Deleted accounts cannot be banned. - - - Omit `banned_until` for a permanent ban - - Provide `banned_until` ISO timestamp for a temporary ban - operationId: banAuthUser - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: userId - in: path - required: true - schema: - type: string - format: uuid - requestBody: - content: - application/json: - schema: - type: object - properties: - banned_until: - type: string - format: date-time - description: When the ban expires (omit for permanent ban) - example: '2026-12-31T23:59:59Z' - responses: - '200': - description: User banned successfully + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: - $ref: '#/components/schemas/BanUserResponse' + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - the plan does not include custom domains, the frontend has as many custom domains as the plan allows, or a managed TLS request would exceed the account's managed TLS certificate limit + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: User not found + description: Frontend not found content: application/json: schema: $ref: '#/components/schemas/Error' '409': - description: Deleted accounts cannot be banned or restored + description: 'Conflict - ownership not verified, custom domain owned or reserved by another account, already in use, still detaching, or frontend already has a custom domain. While a removed domain detaches and Volcano releases it (about a minute for BYOC, a few minutes for managed TLS), adding its hostname to any frontend, or any domain to its frontend, returns `code: custom_domain_releasing` and a `Retry-After` header; send the same request again after that many seconds. A release that will not finish within a few minutes returns the conflict without `code`.' + headers: + Retry-After: + description: Seconds to wait before sending the same request again. Sent only with code `custom_domain_releasing`. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/FrontendCustomDomainConflictError' + '500': + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/auth/users/{userId}/unban: - post: + '503': + description: Service unavailable - custom domain provisioning is temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: tags: - - Auth Admin - summary: Unban a user + - Frontends + summary: Delete frontend custom domain description: | - Removes a ban from a user, restoring their ability to sign in. - The user's status is set back to 'active'. Deleted accounts cannot be restored. - operationId: unbanAuthUser + Deprecated: use `DELETE /projects/{id}/frontends/{frontendId}/domains/{domain}`. + Deletes the frontend's custom domain. A frontend with several domains + returns `409`; name the one to delete on the collection route. + deprecated: true + operationId: deleteFrontendCustomDomain security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: userId - in: path - required: true - schema: - type: string - format: uuid + - $ref: '#/components/parameters/FrontendId' responses: - '200': - description: User unbanned successfully + '204': + description: Custom domain detach scheduled + '400': + description: Bad request - invalid identifier content: application/json: schema: - $ref: '#/components/schemas/UnbanUserResponse' - '404': - description: User not found + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: Deleted accounts cannot be banned or restored + '403': + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/email-templates: - get: - tags: - - Auth Configuration - summary: List email templates - description: Returns all custom email templates for this project. - operationId: listEmailTemplates + '404': + description: Frontend or custom domain not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: The custom domain switched TLS mode while the request ran, so send it again, another domain of the frontend redirects to it, or the frontend has several domains. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/domains: + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FrontendId' + get: + tags: + - Frontends + summary: List a frontend's custom domains + description: | + Lists the frontend's custom domains, oldest first. Each domain either + serves the frontend or, with `redirect` set, redirects every request to + another domain of the frontend. + operationId: listFrontendDomains security: - UserToken: [] - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' responses: '200': - description: Email templates list + description: The frontend's custom domains content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/EmailTemplate' + $ref: '#/components/schemas/FrontendCustomDomainList' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Project not owned by the caller + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Frontend not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to list custom domains + content: + application/json: + schema: + $ref: '#/components/schemas/Error' post: tags: - - Auth Configuration - summary: Create email template - description: | - Creates a custom email template for the project. Custom email templates - are a SUPERAGENT feature: requests from a HOBBY project owner are - rejected with 403, and HOBBY projects always send the built-in default - templates regardless of any previously saved custom rows. - Every project is created with one template per type, so customizing one - is usually a PUT; creating a type the project already has returns 409. - Valid template types: welcome, confirmation, password_reset, password_changed - operationId: createEmailTemplate + - Frontends + summary: Add a custom domain to a frontend + description: | + Adds a custom domain beside the frontend's others, up to the plan's + custom domains per frontend. The domain serves the frontend, or, with + `redirect`, redirects every request to `redirect.to`, another active + domain of the same frontend that serves it, keeping the path and query + string. + A redirecting domain still needs TLS, so it takes `tls` like any other. + + Ownership, verification records, TLS mode switches, and the `409` codes + work as on `POST /projects/{id}/frontends/{frontendId}/domain`. A + request for a hostname the frontend already has returns it with `200`, + or switches its TLS mode in place. When the request's redirect differs + from the domain's, it returns `409`; change a redirect with `PATCH`. + operationId: createFrontendDomain security: - UserToken: [] - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/CreateEmailTemplateRequest' + $ref: '#/components/schemas/CreateFrontendDomainRequest' responses: + '200': + description: The frontend already has this hostname, or its TLS mode was switched in place + content: + application/json: + schema: + $ref: '#/components/schemas/FrontendCustomDomainResponse' '201': - description: Template created + description: Custom domain provisioning started content: application/json: schema: - $ref: '#/components/schemas/EmailTemplate' + $ref: '#/components/schemas/FrontendCustomDomainResponse' '400': - description: Invalid template type + description: Invalid domain, TLS, or redirect, such as a redirect to a hostname the frontend does not serve or that is not active yet + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Custom email templates require the SUPERAGENT plan + description: The plan does not include custom domains, the frontend has as many as the plan allows, or a managed TLS request would exceed the managed TLS certificate limit + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Frontend not found content: application/json: schema: $ref: '#/components/schemas/Error' '409': - description: The project already has a template of this type + description: 'Ownership not verified, the hostname is owned, reserved, or used elsewhere, the frontend already has the hostname with a different redirect, or a removed domain is still releasing it (`code: custom_domain_releasing` with `Retry-After`).' + headers: + Retry-After: + description: Seconds to wait before sending the same request again. Sent only with code `custom_domain_releasing`. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/FrontendCustomDomainConflictError' + '500': + description: Failed to add the custom domain content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/email-templates/{type}: + '503': + description: Custom domain provisioning is temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/domains/{domain}: + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FrontendId' + - $ref: '#/components/parameters/FrontendCustomDomainHostname' get: tags: - - Auth Configuration - summary: Get email template - operationId: getEmailTemplate + - Frontends + summary: Get a frontend custom domain + operationId: getFrontendDomain security: - UserToken: [] - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: type - in: path - required: true - schema: - type: string - enum: - - welcome - - confirmation - - password_reset - - password_changed responses: '200': - description: Email template + description: The custom domain content: application/json: schema: - $ref: '#/components/schemas/EmailTemplate' + $ref: '#/components/schemas/FrontendCustomDomainResponse' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Project not owned by the caller + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Template not found - put: + description: Frontend or custom domain not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to get the custom domain + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + patch: tags: - - Auth Configuration - summary: Update email template + - Frontends + summary: Set or clear a custom domain's redirect description: | - Updates a custom email template. Custom email templates are a SUPERAGENT - feature: requests from a HOBBY project owner are rejected with 403 - (including after a downgrade), so a HOBBY project cannot modify - templates and always sends the built-in defaults. - operationId: updateEmailTemplate + `{"redirect": {"to": "www.example.com", "status": 308}}` makes the + domain redirect to another active domain of the frontend that serves it. + `{"redirect": null}` makes it serve the frontend again. A domain other + domains redirect to cannot become a redirect itself. `status` defaults + to `308`. Proxies apply the change within seconds. + operationId: updateFrontendDomain security: - UserToken: [] - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: type - in: path - required: true - schema: - type: string - enum: - - welcome - - confirmation - - password_reset - - password_changed requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UpdateEmailTemplateRequest' + $ref: '#/components/schemas/UpdateFrontendCustomDomainRequest' responses: '200': - description: Template updated + description: The updated custom domain content: application/json: schema: - $ref: '#/components/schemas/EmailTemplate' + $ref: '#/components/schemas/FrontendCustomDomainResponse' + '400': + description: 'Invalid redirect: the target is this domain, is not an active domain of the frontend, or redirects itself' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '403': - description: Custom email templates require the SUPERAGENT plan + description: Project not owned by the caller content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Template not found + description: 'Frontend or custom domain not found, or the domain is being removed (`domain_status: detaching`)' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: Other domains of the frontend redirect to this one; the message names them + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to update the custom domain + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - - Auth Configuration - summary: Delete email template + - Frontends + summary: Remove a custom domain from a frontend description: | - Deletes a custom template, reverting to the default. Custom email - templates are a SUPERAGENT feature: requests from a HOBBY project owner - are rejected with 403. - operationId: deleteEmailTemplate + Detaches the domain. A domain other domains redirect to cannot be + removed until those redirects are removed or retargeted. + operationId: deleteFrontendDomain security: - UserToken: [] - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: type - in: path - required: true - schema: - type: string - enum: - - welcome - - confirmation - - password_reset - - password_changed responses: '204': - description: Template deleted + description: Custom domain detach scheduled + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '403': - description: Custom email templates require the SUPERAGENT plan + description: Project not owned by the caller content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Template not found - /email-templates/defaults: - get: - tags: - - Auth Configuration - summary: Get default email templates - description: Returns the default email templates used when no custom template is configured. - operationId: getDefaultEmailTemplates - responses: - '200': - description: Default templates + description: Frontend or custom domain not found content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/EmailTemplate' - /email-templates/defaults/{type}: - get: - tags: - - Auth Configuration - summary: Get default email template by type - operationId: getDefaultEmailTemplate - parameters: - - name: type - in: path - required: true - schema: - type: string - enum: - - welcome - - confirmation - - password_reset - - password_changed - responses: - '200': - description: Default template + $ref: '#/components/schemas/Error' + '409': + description: Other domains of the frontend redirect to this one, and the message names them, or the domain switched TLS mode while the request ran content: application/json: schema: - $ref: '#/components/schemas/EmailTemplate' - '404': - description: Template type not found - /projects/{id}/auth/config: - get: - tags: - - Auth Configuration - summary: Get auth configuration - operationId: getAuthConfig - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - responses: - '200': - description: Auth configuration + $ref: '#/components/schemas/Error' + '500': + description: Failed to remove the custom domain content: application/json: schema: - $ref: '#/components/schemas/AuthConfig' - put: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/deployments: + get: tags: - - Auth Configuration - summary: Update auth configuration - description: | - Updates the project's auth configuration. Only the fields present in - the body are changed. - operationId: updateAuthConfig + - Frontends + summary: List frontend deployments + operationId: listFrontendDeployments security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateAuthConfigRequest' + - $ref: '#/components/parameters/FrontendId' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' responses: '200': - description: Configuration updated + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/AuthConfig' - '403': - description: | - The update would turn on, widen, or otherwise edit the email domain - allowlist (`allowed_email_domains`, `allowed_email_domains_mode`) - for a project that is not on the SUPERAGENT plan. A HOBBY project keeps - whatever allowlist it already has — parked, enforcing nothing until - it upgrades — and may still remove it, so a downgrade never leaves a - project locked out of its own signups. + $ref: '#/components/schemas/PaginatedFrontendDeployments' + '400': + description: Bad request - invalid identifier content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/auth/config/test-email: - post: - tags: - - Auth Configuration - summary: Send a test email using the project's saved SMTP config - description: | - Sends a diagnostic email to `to_email` using the project's - persisted `auth_config` SMTP credentials. If `html_body` or - `text_body` is supplied, the override path is taken: those - values (plus optional `subject`) are rendered through - html/text templates against the project's `Data` and - used as the body — used by the template editor's "Send Test" - affordance to preview an unsaved template. With both bodies - omitted, a hardcoded diagnostic message is sent and any - `subject` field is ignored. Sending `subject` alone (no - bodies) is rejected with 400 to avoid a silently-dropped - subject or a blank message. Also rejects with 400 if - `email_enabled=false`, `smtp_host` is empty, or the saved - `smtp_password` can't be read and must be set again. - operationId: testEmailConfig - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TestEmailRequest' - responses: - '200': - description: Test email sent + '401': + description: Unauthorized - invalid or missing token content: application/json: schema: - $ref: '#/components/schemas/TestEmailResponse' - '400': - description: Invalid request or email delivery not configured - '401': - description: Unauthorized + $ref: '#/components/schemas/Error' '403': - description: Forbidden + description: Forbidden - project ownership required + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Project not found - '502': - description: Template render failure or SMTP delivery failed - /projects/{id}/auth/hosted-pages/{pageType}: - get: - tags: - - Auth Configuration - summary: Get hosted auth page - description: | - Returns the saved HTML/CSS for the page type, or `page: null` when the - project has not customized it yet. Always returns `defaults` (the theme - shell to seed an editor with, which is valid input to the update endpoint) - and `runtime` (the script the rendered page runs, plus a preview harness). - operationId: getAuthHostedPage - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: pageType - in: path - required: true - schema: - $ref: '#/components/schemas/HostedAuthPageType' - responses: - '200': - description: Hosted page loaded + description: Frontend not found content: application/json: schema: - $ref: '#/components/schemas/AuthHostedPageResponse' - put: + $ref: '#/components/schemas/Error' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: tags: - - Auth Configuration - summary: Update hosted auth page + - Frontends + summary: Deploy an existing build to a frontend description: | - Saves the current HTML/CSS for this page type. - Security validation rejects script tags, javascript: URLs, inline event handlers, iframe/object/embed/meta/link tags in HTML, - and closing style/head tags in CSS. - operationId: updateAuthHostedPage + Deploys the build of another frontend's deployment in the same project to this frontend, without + compiling it again. Use it to serve one build from several frontends, such as one per region or + brand. This frontend gets its own copy of the source archive and the build, so later changes to the + source frontend do not reach it, and a later redeploy of this frontend compiles that copied source. + + The build-time variables this frontend would build with must equal those the source build read, + compared by name and value. Volcano records a keyed digest of each value, unique to the build, and + never stores the values. A mismatch returns `409` with `code: build_variables_differ` and the differing + names in `error`. The source deployment must be `active` or `degraded`, and both frontends must use + the same framework and app root. + + Admission is the redeploy's: the deployment starts with `status: provisioning`, or, while another + deployment is in progress, is exposed through `pending_deployment_id` and supersedes any older + queued deployment. Nothing is compiled: the deployment's build minutes cover publishing the build + alone. The checks run again when a queued deployment starts. A refusal then fails the deployment + without a retry, its `error_message` starting with the refusal's code. + operationId: createFrontendDeployment security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: pageType - in: path - required: true - schema: - $ref: '#/components/schemas/HostedAuthPageType' + - $ref: '#/components/parameters/FrontendId' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UpdateAuthHostedPageRequest' + $ref: '#/components/schemas/CreateFrontendDeploymentRequest' responses: '200': - description: Hosted page updated + description: Deployment started or queued content: application/json: schema: - $ref: '#/components/schemas/AuthHostedPageResponse' + $ref: '#/components/schemas/Frontend' '400': - description: Invalid input or unsafe markup - '401': - description: Unauthorized - '403': - description: Forbidden - '404': - description: Project not found - /projects/{id}/auth/pages/appearance: - get: - tags: - - Auth Configuration - summary: Get managed auth page appearance - operationId: getAuthPageAppearance - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - responses: - '200': - description: Saved appearance and effective plan state + description: 'Bad request - invalid identifier or body, or `code: source_deployment_same_frontend` when the source deployment belongs to this frontend; redeploy the frontend instead.' content: application/json: schema: - $ref: '#/components/schemas/AuthPageAppearanceResponse' + $ref: '#/components/schemas/Error' '401': - description: Unauthorized + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Access denied + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found + description: 'Frontend not found, or `code: source_deployment_not_found` when the source deployment is not in this project.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: 'Conflict. `code: build_variables_differ` names the build-time variables whose values differ. `code: source_deployment_not_active` refuses a deployment that is not `active` or `degraded`. `code: source_deployment_is_preview` refuses a preview''s deployment; deploy from a frontend''s own deployment. `code: source_served_by_candidate` refuses a deployment of a frontend a promoted Candidate serves, since that frontend does not serve its own build; roll the source frontend back to its own build first. `code: source_build_unavailable` refuses a deployment made before Volcano kept builds, or whose build is no longer kept; redeploy the source frontend once and deploy from that deployment. `code: frontend_incompatible` refuses a different framework or app root. `code: frontend_served_by_candidate` refuses a frontend a promoted Candidate serves; roll back to the frontend''s own runtime first. Without a code, the frontend''s deletion is queued or running, or the project''s source is managed by Git, where deploys come from a push to the production branch.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Monthly build-minutes allowance exceeded content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Appearance could not be read + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/auth/pages/theme: - put: + '501': + description: '`code: build_reuse_unavailable` - this server cannot deploy an existing build. Local mode answers this; deploy the frontend from source instead.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Service unavailable - frontend workflow configuration missing, or the build-minutes check is temporarily unavailable; retry later. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/candidates: + get: tags: - - Auth Configuration - summary: Save the managed auth page theme - operationId: updateAuthPageTheme + - Frontends + summary: List a frontend's Candidates + description: | + Returns the frontend's Candidates, oldest first, each with its latest deployment. A frontend + has at most 20 live Candidates. Reading never depends on the `frontends.candidates` capability. + operationId: listFrontendCandidates security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateAuthPageThemeRequest' + - $ref: '#/components/parameters/FrontendId' responses: '200': - description: Theme saved + description: The frontend's Candidates content: application/json: schema: - $ref: '#/components/schemas/UpdateAuthPageThemeRequest' + $ref: '#/components/schemas/FrontendCandidateList' '400': - description: Invalid or unreadable theme + description: Bad request - invalid identifier content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Unauthorized + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Plan does not permit customisation + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found + description: Frontend not found content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Theme could not be saved + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - delete: + post: tags: - - Auth Configuration - summary: Clear the managed auth page theme - operationId: deleteAuthPageTheme + - Frontends + summary: Create a frontend Candidate + description: | + Builds a copy of the frontend from the uploaded archive, with the frontend's own variable + selection, and deploys it to one region: the first region the frontend deploys to, or the + project's first region by name if it has not deployed yet. The Candidate is served at its own + URL, so it can be checked without changing what the frontend serves. The URL is reachable by + anyone who holds it and is not indexed; a Candidate is never public and does not claim to be + private. The response is `202` while the first deployment runs; read the Candidate for its + `status` and `url`. + + Creating a Candidate is available while the `frontends.candidates` capability is. While it is + not, this operation, redeploying, promoting and rolling back to a Candidate answer `404` with + code `feature_unavailable`; reading and deleting existing Candidates, and rolling back to the + frontend's own runtime, keep working. + + A Candidate builds like any deploy and spends the project's build minutes. A frontend has at + most 20 live Candidates, and each name is unique within the frontend. Without `ttl_seconds` a + Candidate is kept until it is deleted. + operationId: createFrontendCandidate security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FrontendId' + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + required: + - name + - archive + properties: + name: + type: string + minLength: 1 + maxLength: 128 + description: Names the Candidate within the frontend. Cannot be `production`. + ttl_seconds: + type: integer + minimum: 1 + maximum: 2592000 + description: Deletes the Candidate this many seconds after it is created, at most 30 days. Omit to keep it until deleted. + archive: + type: string + format: binary + description: ZIP or tar.gz archive of the frontend project, as for creating a frontend. The API enforces SOURCE_ARCHIVE_SIZE_LIMIT_MB. responses: - '204': - description: Theme cleared + '202': + description: Candidate created; its first deployment is running + content: + application/json: + schema: + $ref: '#/components/schemas/FrontendCandidate' + '400': + description: Bad request - invalid name, expiry, identifier or archive, a variable the frontend declares has no value, or the resolved variables are too large + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': - description: Unauthorized + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Plan does not permit customisation + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found + description: Frontend not found, or the `frontends.candidates` capability is unavailable (code `feature_unavailable`) + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: 'Conflict. `code: candidate_name_taken` - the name is taken. `code: candidate_limit_reached` - the frontend has the maximum Candidates. `code: configuration_changed` - the frontend''s configuration changed during the deploy; retry. `code: frontend_deleting` or `code: project_deleting` - the frontend or project is being deleted.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: The request body is larger than the archive limit, SOURCE_ARCHIVE_SIZE_LIMIT_MB + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Too many requests - the project's build minutes for the billing cycle are used up content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Theme could not be cleared + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/auth/pages/{pageType}/layout: - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: pageType - in: path - required: true - schema: - $ref: '#/components/schemas/HostedAuthPageType' - put: + '503': + description: Service unavailable - frontend deployments are not configured + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/candidates/{candidateId}: + get: tags: - - Auth Configuration - summary: Save one managed auth page layout - operationId: updateAuthPageLayout + - Frontends + summary: Get a frontend Candidate + operationId: getFrontendCandidate security: - UserToken: [] - ProjectAccessToken: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateAuthPageLayoutRequest' + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FrontendId' + - $ref: '#/components/parameters/FrontendCandidateId' responses: '200': - description: Layout saved + description: The Candidate with its latest deployment content: application/json: schema: - $ref: '#/components/schemas/UpdateAuthPageLayoutRequest' + $ref: '#/components/schemas/FrontendCandidate' '400': - description: Invalid page type or layout + description: Bad request - invalid identifier content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Unauthorized + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Plan does not permit customisation + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found + description: Frontend or Candidate not found content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Layout could not be saved + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - - Auth Configuration - summary: Clear one managed auth page layout - operationId: deleteAuthPageLayout + - Frontends + summary: Delete a frontend Candidate + description: | + Starts deleting the Candidate: its regional runtime, images, edge state and stored source are + removed once any running deployment finishes. Asking again for a Candidate that is already being + deleted is the same request. The Candidate answers `404` once it is gone. + + A Candidate the frontend serves cannot be deleted: roll back first. A Candidate the frontend only + keeps as the runtime a rollback returns to can be deleted, and doing so gives up that rollback; + rolling back to the frontend's own runtime stays possible. + operationId: deleteFrontendCandidate security: - UserToken: [] - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FrontendId' + - $ref: '#/components/parameters/FrontendCandidateId' responses: - '204': - description: Layout cleared + '202': + description: Deletion started '400': - description: Invalid page type + description: Bad request - invalid identifier content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Unauthorized + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Plan does not permit customisation + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found + description: Frontend or Candidate not found content: application/json: schema: $ref: '#/components/schemas/Error' - '500': - description: Layout could not be cleared + '409': + description: '`code: candidate_in_use` - the frontend serves this Candidate.' content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/auth/pages/{pageType}/preview: - get: - tags: - - Auth Configuration - summary: Render a short-lived managed auth page preview - description: | - Public HTML endpoint for a preview URL returned by the POST operation. - The signed ticket contains the unsaved appearance, expires shortly, and - runs the production page runtime against mocked authentication responses. - operationId: renderAuthPagePreview - security: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: pageType - in: path - required: true - schema: - $ref: '#/components/schemas/HostedAuthPageType' - - name: ticket - in: query - required: true - schema: - type: string - minLength: 1 - maxLength: 4096 - description: Short-lived signed preview ticket returned by the POST operation. - responses: - '200': - description: Rendered preview document - content: - text/html: - schema: - type: string - '404': - description: Ticket is invalid or expired, its path does not match, or managed authentication is disabled - content: - text/plain: - schema: - type: string '500': - description: Preview could not be rendered + description: Internal server error content: - text/plain: + application/json: schema: - type: string + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/candidates/{candidateId}/deployments: post: tags: - - Auth Configuration - summary: Preview an unsaved managed auth page appearance - operationId: previewAuthPage + - Frontends + summary: Deploy a new archive to a frontend Candidate + description: | + Builds the uploaded archive with the frontend's own variable selection and deploys it to the + Candidate. The Candidate keeps serving its previous deployment until this one succeeds, and a + failed deployment leaves it on the previous one. A Candidate takes one deployment at a time. + While the `frontends.candidates` capability is unavailable, it answers `404` with code + `feature_unavailable`. + operationId: redeployFrontendCandidate security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: pageType - in: path - required: true - schema: - $ref: '#/components/schemas/HostedAuthPageType' + - $ref: '#/components/parameters/FrontendId' + - $ref: '#/components/parameters/FrontendCandidateId' requestBody: required: true content: - application/json: + multipart/form-data: schema: - $ref: '#/components/schemas/PreviewAuthPageRequest' + type: object + required: + - archive + properties: + archive: + type: string + format: binary + description: ZIP or tar.gz archive of the frontend project, as for creating a frontend. responses: - '200': - description: Short-lived URL for the rendered preview document + '202': + description: The deployment is running content: application/json: schema: - $ref: '#/components/schemas/PreviewAuthPageResponse' + $ref: '#/components/schemas/FrontendCandidateDeployment' '400': - description: Invalid page type or draft + description: Bad request - invalid identifier or archive, a variable the frontend declares has no value, or the resolved variables are too large content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Unauthorized + description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Access denied + description: Forbidden - project ownership required content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found or managed authentication is disabled + description: Frontend or Candidate not found, or the `frontends.candidates` capability is unavailable (code `feature_unavailable`) + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: 'Conflict. `code: deployment_in_progress` - a deployment is already running; retry once it finishes. `code: candidate_not_deployable` - the Candidate is being deleted or is not ready to deploy to. `code: candidate_in_use` - the frontend serves it or keeps it for a rollback. `code: configuration_changed` - the frontend''s configuration changed during the deploy; retry. `code: frontend_deleting` or `code: project_deleting` - the frontend or project is being deleted.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: The request body is larger than the archive limit, SOURCE_ARCHIVE_SIZE_LIMIT_MB + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Too many requests - the project's build minutes for the billing cycle are used up content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Preview could not be rendered + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/auth/hosted/{pageType}: + '503': + description: Service unavailable - frontend deployments are not configured + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/serving: get: tags: - - Auth Configuration - summary: Render a managed auth page + - Frontends + summary: Get what a frontend serves description: | - Public HTML endpoint for signup, forgot-password, device approval, - verify-email, and reset-password pages. Login uses the path without a - page type. - Requires `Accept: text/html`. - Returns 404 when managed hosted pages are disabled for the project. - security: [] - operationId: renderManagedAuthPage + Reports whether the frontend serves its own runtime or a promoted Candidate's, and the + revision a promotion or rollback must name. + operationId: getFrontendServing + security: + - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: pageType - in: path - required: true - schema: - $ref: '#/components/schemas/HostedRenderablePageType' + - $ref: '#/components/parameters/FrontendId' responses: '200': - description: Hosted auth page HTML + description: What the frontend serves content: - text/html: + application/json: schema: - type: string + $ref: '#/components/schemas/FrontendServing' '400': - description: Invalid project id or unsupported Accept header - '404': - description: Managed pages disabled or page type not found - /projects/{id}/auth/hosted: - get: - tags: - - Auth Configuration - summary: Render default managed auth page - description: | - Public HTML endpoint for the managed login page. - Requires `Accept: text/html`. - security: [] - operationId: renderDefaultManagedAuthPage - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: action - in: query - required: false - schema: - type: string - enum: - - login - - signup - - forgot-password - - device - description: | - Optional deep-link action for the unified hosted page. Ignored when a - custom login page is configured. `action=device` renders the device - authorization approval UI inline (no redirect to any external app); - it signs the user in and calls `POST /auth/device/verify`. - - name: user_code - in: query - required: false - schema: - type: string - description: Device user code (from `POST /auth/device/authorize`) used with `action=device`. - - name: anon_key - in: query - required: false - schema: - type: string - description: Project anon key used by built-in managed auth flows (required for login/signup/device actions). - - name: state - in: query - required: false - schema: - type: string - description: | - Opaque one-time nonce generated by the client SDK before redirecting - here. On successful login/signup it is echoed back in the post-auth - redirect fragment as `state`, so the SDK can bind the returned session - to the flow it initiated (login-CSRF / session-fixation defense). The - SDK rejects a returned session whose `state` does not match. - responses: - '200': - description: Hosted auth page HTML + description: Bad request - invalid identifier content: - text/html: + application/json: schema: - type: string - '400': - description: Invalid project id or unsupported Accept header + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - project ownership required + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Managed pages disabled - /projects/{id}/auth/hosted/login/options: - get: + description: Frontend not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/serving/rollback: + post: tags: - - Auth Configuration - summary: Get hosted login runtime options + - Frontends + summary: Roll a frontend back to the runtime it served before description: | - Returns runtime options for the built-in managed login flow. - Requires `anon_key` query parameter. - Rate limited per project and client IP. Excess requests return `429` and `Retry-After`. - security: [] - operationId: getHostedLoginOptions + Returns the frontend's traffic to the runtime it served before the last activation, or to its + own runtime with `to_production`. A rollback is a new activation, so what it leaves becomes the + runtime a further rollback returns to, and it can itself be undone. It names the revision the + caller read; a competing activation makes it fail with `409`. + + Rolling back to a Candidate promotes it again and is refused with `409` when promoting it would + be. Rolling back to the frontend's own runtime is not. + operationId: rollbackFrontendServing + security: + - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: anon_key - in: query - required: true - schema: - type: string + - $ref: '#/components/parameters/FrontendId' + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + required: + - expected_revision + properties: + expected_revision: + type: integer + format: int64 + minimum: 0 + to_production: + type: boolean + default: false + description: Return to the frontend's own runtime whatever it served before. responses: '200': - description: Hosted login options returned + description: The frontend serves the runtime it was rolled back to content: application/json: schema: - $ref: '#/components/schemas/HostedLoginOptionsResponse' + $ref: '#/components/schemas/FrontendServing' + '400': + description: Bad request - invalid identifier or body + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': - description: Invalid or missing anon key + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - project ownership required + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Managed pages disabled - '429': - description: Rate limit exceeded - /projects/{id}/auth/hosted/login/check-email: + description: Frontend not found, or `feature_unavailable` when the release gate is off and the rollback would make a candidate serve again + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: 'Conflict. `code: stale_revision` - the revision is stale; read `serving` again. `code: nothing_to_roll_back` - there is no earlier runtime to return to. `code: rollback_unavailable` - the runtime to roll back to is gone. `code: configuration_changed` - the Candidate to roll back to was built with a different configuration. `code: deployment_in_progress` - a deployment of the Candidate or of the frontend itself is still running; retry once it finishes. `code: source_managed_by_git` - the project''s repository is the source of truth; roll back to the frontend''s own runtime.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: The request body is larger than 4 KiB + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/candidates/{candidateId}/promote: post: tags: - - Auth Configuration - summary: Check whether email exists for hosted login flow + - Frontends + summary: Promote a frontend Candidate description: | - Used by the built-in managed login page to branch UI between signin and signup. - Requires anon key in Authorization header. - Rate limited per project and client IP. Excess requests return `429` and `Retry-After`. - security: [] - operationId: hostedLoginCheckEmail + Makes the Candidate what the frontend serves. Nothing is rebuilt or copied: the frontend's + traffic is routed to the Candidate's runtime, its own custom domains and metering are + unchanged, and what it served becomes the runtime a rollback returns to. + + The Candidate must be ready and serving an active deployment, and that deployment must have + been built with the variables the frontend selects now. A Candidate that serves stops expiring and cannot be deleted. While one + serves, deploying the frontend itself answers `409`; roll back to the frontend's own runtime + first. Promotion names the revision the caller read from `serving`; a competing activation + makes it fail with `409`. Once the project's repository is the source of truth, promotion + is refused with `409`, as a direct deploy is, and so is rolling back to a Candidate; rolling + back to the frontend's own runtime is not. While the `frontends.candidates` capability is + unavailable, promotion and rolling back to a Candidate answer `404` with code + `feature_unavailable`; rolling back to the frontend's own runtime does not. + operationId: promoteFrontendCandidate + security: + - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: Authorization - in: header - required: true - schema: - type: string - description: Bearer anon key (`Bearer `) + - $ref: '#/components/parameters/FrontendId' + - $ref: '#/components/parameters/FrontendCandidateId' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/HostedLoginEmailCheckRequest' + type: object + additionalProperties: false + required: + - expected_revision + properties: + expected_revision: + type: integer + format: int64 + minimum: 0 responses: '200': - description: Email existence evaluated + description: The frontend serves the Candidate content: application/json: schema: - $ref: '#/components/schemas/HostedLoginEmailCheckResponse' + $ref: '#/components/schemas/FrontendServing' + '400': + description: Bad request - invalid identifier or body + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': - description: Invalid or missing anon key - '429': - description: Rate limit exceeded - /projects/{id}/auth/methods: + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - project ownership required + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Frontend or Candidate not found, or the `frontends.candidates` capability is unavailable (code `feature_unavailable`) + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: 'Conflict. `code: stale_revision` - the revision is stale; read `serving` again. `code: candidate_not_ready` - the Candidate is not ready. `code: configuration_changed` - it was built with a different configuration; redeploy it. `code: already_serving` - it already serves. `code: deployment_in_progress` - a deployment of the Candidate or of the frontend itself is still running; retry once it finishes. `code: source_managed_by_git` - the project''s repository is the source of truth. `code: frontend_not_deployed` - the frontend has no deployment of its own to roll back to; deploy it first.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: The request body is larger than 4 KiB + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/usage: get: tags: - - Auth Configuration - summary: Get all authentication methods + - Frontends + summary: Per-day request and error counts for a single frontend description: | - Returns all configured authentication methods for this project, - including email/password, anonymous, device authorization, and OAuth providers. - operationId: getAuthMethods + Returns a zero-filled daily series of request counts and 5xx + error counts for one frontend, oldest first. Each entry is one + UTC day; missing days (no traffic recorded) come back as + `requests: 0, errors: 0` so the response always has exactly + `days` entries. + + Backs the Monitoring section on the frontend detail page in + the Volcano dashboard. `days` defaults to 30 and is capped at 90 to keep + the (frontend_id, day) index scan bounded. + operationId: getFrontendUsageHistory security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FrontendId' + - name: days + in: query + description: Number of trailing days to return (1–90, default 30). + required: false + schema: + type: integer + minimum: 1 + maximum: 90 + default: 30 responses: '200': - description: Authentication methods configuration + description: Successful response content: application/json: schema: - type: object - properties: - email_password: - type: object - properties: - enabled: - type: boolean - method: - type: string - name: - type: string - anonymous: - type: object - properties: - enabled: - type: boolean - method: - type: string - name: - type: string - oauth_providers: - type: array - items: - type: object - properties: - enabled: - type: boolean - method: - type: string - provider: - type: string - name: - type: string - redirect_url: - type: string - scopes: - type: array - items: - type: string - available_methods: - type: array - items: - type: string - example: - - email_password - - oauth_google - - oauth_github - put: - tags: - - Auth Configuration - summary: Configure authentication methods (unified) - description: | - Configure all authentication methods in a single request. - At least one method must remain enabled. - operationId: configureAuthMethods - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - requestBody: - content: - application/json: - schema: - type: object - properties: - enable_email_password: - type: boolean - enable_anonymous: - type: boolean - oauth_providers: - type: array - items: - type: object - properties: - provider: - type: string - enabled: - type: boolean - responses: - '200': - description: Methods configured + $ref: '#/components/schemas/FrontendUsageHistoryResponse' '400': - description: At least one method must be enabled - /projects/{id}/oauth/configs: + description: Bad request - invalid identifier + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - project ownership required + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Frontend not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/function-routes: + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FrontendId' get: tags: - - OAuth Configuration - summary: List OAuth configurations - description: List all OAuth provider configurations for this project - operationId: listOAuthConfigs + - Frontends + summary: List a Frontend's Function routes + operationId: listFrontendFunctionRoutes security: - UserToken: [] - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' responses: '200': - description: List of OAuth configurations + description: Function routes ordered from most to least specific content: application/json: schema: - type: object - properties: - configs: - type: array - items: - $ref: '#/components/schemas/OAuthConfig' + $ref: '#/components/schemas/FrontendFunctionRouteList' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Project not owned by the caller + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to list Function routes + content: + application/json: + schema: + $ref: '#/components/schemas/Error' post: tags: - - OAuth Configuration - summary: Create OAuth configuration - description: Configure OAuth provider (Google, GitHub, Microsoft, Apple, Device) - operationId: createOAuthConfig + - Frontends + summary: Route a Frontend path to an HTTP Function + operationId: createFrontendFunctionRoute + description: | + The Frontend and Function must belong to this Project. The Function must be a standard + Function with `visibility: public` and HTTP invocation mode, because requests through the + route carry no credential: Volcano does not check a token sent to a route path or add + `__volcano_auth`, so the Function authenticates its callers itself. A Function cannot leave `public` + while a route targets it. The route applies to every hostname that resolves to the + Frontend, including generated, custom-domain, preview, and local hostnames. security: - UserToken: [] - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/CreateOAuthConfigRequest' + $ref: '#/components/schemas/CreateFrontendFunctionRouteRequest' responses: '201': - description: OAuth config created + description: Function route created content: application/json: schema: - $ref: '#/components/schemas/OAuthConfig' + $ref: '#/components/schemas/FrontendFunctionRoute' + '400': + description: Invalid path or non-HTTP Function + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Project not owned by the caller + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Frontend or Function not found in the Project + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '409': - description: Provider already configured - /projects/{id}/oauth/configs/{provider}: - get: + description: Path is already routed, the Frontend has reached its 64-route limit, or the Function is not public + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to create Function route + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/function-routes/{routeId}: + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FrontendId' + - $ref: '#/components/parameters/FrontendFunctionRouteId' + put: tags: - - OAuth Configuration - summary: Get OAuth configuration - operationId: getOAuthConfig + - Frontends + summary: Replace a Frontend Function route + description: 'Replaces the route''s target, path, and prefix handling. The new target must meet the same rules as on create, including `visibility: public`.' + operationId: updateFrontendFunctionRoute security: - UserToken: [] - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: provider - in: path - required: true - schema: - type: string - enum: - - google - - github - - microsoft - - apple - - device - - name: client_id - in: query - required: false - schema: - type: string - description: Required when `provider=device` to select a specific device client. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateFrontendFunctionRouteRequest' responses: '200': - description: OAuth configuration + description: Function route replaced content: application/json: schema: - $ref: '#/components/schemas/OAuthConfig' - put: - tags: - - OAuth Configuration - summary: Update OAuth configuration - operationId: updateOAuthConfig - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: provider - in: path - required: true - schema: - type: string - enum: - - google - - github - - microsoft - - apple - - device - - name: client_id - in: query - required: false - schema: - type: string - description: Required when `provider=device` to select a specific device client. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateOAuthConfigRequest' - responses: - '200': - description: OAuth config updated + $ref: '#/components/schemas/FrontendFunctionRoute' + '400': + description: Invalid path or non-HTTP Function content: application/json: schema: - $ref: '#/components/schemas/OAuthConfig' + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Project not owned by the caller + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Function route, Frontend, or Function not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: Path is already routed, the Frontend has reached its 64-route limit, or the Function is not public + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to replace Function route + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - - OAuth Configuration - summary: Delete OAuth configuration - operationId: deleteOAuthConfig + - Frontends + summary: Delete a Frontend Function route + operationId: deleteFrontendFunctionRoute security: - UserToken: [] - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: provider - in: path - required: true - schema: - type: string - enum: - - google - - github - - microsoft - - apple - - device - - name: client_id - in: query - required: false - schema: - type: string - description: Required when `provider=device` to select a specific device client. responses: '204': - description: OAuth config deleted - /projects/{id}/oauth/providers: + description: Function route deleted + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Project not owned by the caller + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Function route not found on the Frontend + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to delete Function route + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/frontend-routes: + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FrontendId' get: tags: - - OAuth Configuration - summary: List available OAuth providers - description: Get list of supported OAuth providers and their default scopes - operationId: listAvailableOAuthProviders + - Frontends + summary: List a Frontend's Frontend routes + operationId: listFrontendRoutes security: - UserToken: [] - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' responses: '200': - description: Available providers + description: Frontend routes ordered from most to least specific content: application/json: schema: - type: object - properties: - providers: - type: array - items: - type: object - properties: - id: - type: string - name: - type: string - default_scopes: - type: array - items: - type: string - /auth/oauth/{provider}/authorize: - get: - tags: - - OAuth Authentication - summary: Start OAuth authorization - description: | - Redirects user to OAuth provider for authorization. - Handles CSRF protection with state parameter. - Project is identified via the anon_key query parameter. - operationId: authOAuthAuthorize - parameters: - - name: provider - in: path - required: true - schema: - type: string - enum: - - google - - github - - microsoft - - apple - - name: anon_key - in: query - required: true - schema: - type: string - description: Project anon key (required - identifies the project) - - name: redirect_url - in: query - schema: - type: string - description: | - URL to redirect to after the OAuth flow (optional). Must exactly - match an entry in the project's `allowed_redirect_urls`, including - its query string, or be the project's own managed hosted-auth page - URL. - - name: client_state - in: query - schema: - type: string - maxLength: 255 - description: | - Optional application nonce. It is stored with the server-generated - provider state and echoed to redirect_url as `state`. - - name: response_mode - in: query - schema: - type: string - enum: - - code - description: | - Set to `code` to receive a short-lived authorization code at - redirect_url, then use POST /auth/oauth/exchange to obtain the - session. `redirect_url` is required in this mode. When omitted, the - established session-fragment response is retained for compatibility - with existing clients. - responses: - '307': - description: Redirect to OAuth provider - '400': - description: | - OAuth provider is disabled for this project, or `redirect_url` is - not registered in `allowed_redirect_urls` - '404': - description: OAuth provider not configured - /auth/oauth/{provider}/callback: - get: - tags: - - OAuth Authentication - summary: OAuth callback handler - description: | - Handles OAuth provider callback with authorization code. - Exchanges code for tokens and creates/signs in user. - operationId: authOAuthCallback - parameters: - - name: provider - in: path - required: true - schema: - type: string - enum: - - google - - github - - microsoft - - apple - - name: code - in: query - required: true - schema: - type: string - - name: state - in: query - required: true - schema: - type: string - - name: error - in: query - schema: - type: string - responses: - '200': - description: Existing user signed in (when redirect_url was omitted) + $ref: '#/components/schemas/FrontendRouteList' + '401': + description: Unauthorized content: application/json: schema: - $ref: '#/components/schemas/AuthTokenResponse' - '201': - description: New user created and signed in (when redirect_url was omitted) + $ref: '#/components/schemas/Error' + '403': + description: Project not owned by the caller content: application/json: schema: - $ref: '#/components/schemas/AuthTokenResponse' - '303': - description: | - Redirect to the exact registered redirect_url. Flows that requested - response_mode=code receive a short-lived, single-use `code` and - optional application `state`; compatibility flows receive the - established session fragment. - '400': - description: | - Missing/invalid code or state, the state parameter expired, or the - flow's stored redirect_url is no longer registered in - allowed_redirect_urls (re-checked at callback time) - '403': - description: | - The provider's email domain is not in `allowed_email_domains`. Creating - an account is refused under `signup` and `signup_and_signin`; signing in - an already-linked account is refused under `signup_and_signin`. - '409': - description: Email already exists (requires linking) - /auth/oauth/exchange: + $ref: '#/components/schemas/Error' + '500': + description: Failed to list Frontend routes + content: + application/json: + schema: + $ref: '#/components/schemas/Error' post: tags: - - OAuth Authentication - summary: Exchange OAuth authorization code - description: | - Atomically consumes a short-lived callback code and returns the user's - session. The request must use the same project anon key and exact - redirect_url that initiated the flow. - operationId: authOAuthExchange + - Frontends + summary: Mount another Frontend at a path + operationId: createFrontendRoute + description: | + Serves `path_prefix` and everything under it on this Frontend's hostnames from another + Frontend in the same Project. The path is forwarded unchanged, so the mounted Frontend must + serve its pages under the prefix (page directories or a matching `basePath`). Its root + `/_next/static` files and `/_next/image` requests are sent to it too. A Frontend may be + mounted at several prefixes. Function and Frontend routes share one path namespace and the + 64-route limit; the most specific prefix wins. A mounted Frontend's own routes do not apply + to requests it receives through a route. The route applies to every hostname that resolves + to this Frontend, including generated, custom-domain, and local hostnames. While the mounted + Frontend has no active deployment, its paths answer 502, as its own hostname does. security: - - AnonKey: [] + - UserToken: [] + - ProjectAccessToken: [] requestBody: required: true content: application/json: schema: - type: object - required: - - code - - redirect_url - properties: - code: - type: string - redirect_url: - type: string - format: uri + $ref: '#/components/schemas/CreateFrontendRouteRequest' responses: - '200': - description: Authorization code consumed and session created + '201': + description: Frontend route created content: application/json: schema: - $ref: '#/components/schemas/AuthTokenResponse' + $ref: '#/components/schemas/FrontendRoute' '400': - description: Invalid, expired, consumed, or redirect-mismatched code + description: Invalid path, or the Frontend would mount itself + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': - description: Missing or invalid project anon key + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '403': - description: | - Email confirmation is now required, or the account's email domain is not - in `allowed_email_domains` while `allowed_email_domains_mode` is - `signup_and_signin`. Both are re-checked here because the code outlives - the callback that issued it. - '429': - description: Too many exchange attempts from this client - /auth/device/authorize: - post: - tags: - - OAuth Authentication - summary: Start RFC8628 device authorization - description: | - Starts OAuth 2.0 Device Authorization Grant (RFC 8628). - Returns `device_code` for the CLI and `user_code` for browser verification. - - By default the returned `verification_uri` / `verification_uri_complete` - point at the project's managed device-approval page served by this API - (`/projects/{projectId}/auth/hosted?action=device&user_code=...&anon_key=...`), - which requires managed auth enabled and a default anon key for the - project. - - Projects can override this by setting `device_verification_url` on the - auth config (`PATCH /auth/config`). When set, that URL is returned as-is - with the `user_code` appended (no `action=device` hint and no embedded - anon key — the page brings its own), so a CLI's `login` command surfaces - the project's own RFC 8628 approval page. With a custom URL, device login - does **not** require managed auth to be enabled; the custom page's origin - must be in the project's auth CORS allowlist to call - `POST /auth/device/verify`. Either way the verification page must - authenticate the end user and call `POST /auth/device/verify` with the - `user_code`. See the device-auth guide for both approaches. - operationId: authDeviceAuthorize - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - client_id - properties: - client_id: - type: string - description: Enabled `device` OAuth client ID for the target project - responses: - '200': - description: Device authorization started + description: Project not owned by the caller content: application/json: schema: - $ref: '#/components/schemas/DeviceAuthorizationResponse' - '400': - description: Invalid request or unauthorized client + $ref: '#/components/schemas/Error' + '404': + description: Frontend or mounted Frontend not found in the Project, or, with code `feature_unavailable`, Frontend routes are not available in this environment (see `GET /capabilities`) content: application/json: schema: - $ref: '#/components/schemas/OAuthErrorResponse' - /auth/device/token: - post: + $ref: '#/components/schemas/Error' + '409': + description: Path is already routed, the Frontend has reached its 64-route limit, or this Frontend or the mounted Frontend is being deleted + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to create Frontend route + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/frontends/{frontendId}/frontend-routes/{routeId}: + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/FrontendId' + - $ref: '#/components/parameters/FrontendRouteId' + put: tags: - - OAuth Authentication - summary: Poll device token endpoint - description: | - RFC8628 token polling endpoint. - Returns OAuth errors such as `authorization_pending`, `slow_down`, `access_denied`, and `expired_token`. - operationId: authDeviceToken + - Frontends + summary: Replace a Frontend route + description: Replaces the route's mounted Frontend and path. The new values must meet the same rules as on create. + operationId: updateFrontendRoute + security: + - UserToken: [] + - ProjectAccessToken: [] requestBody: required: true content: application/json: schema: - type: object - required: - - grant_type - - device_code - - client_id - properties: - grant_type: - type: string - enum: - - urn:ietf:params:oauth:grant-type:device_code - device_code: - type: string - client_id: - type: string + $ref: '#/components/schemas/CreateFrontendRouteRequest' responses: '200': - description: Device flow completed, auth-user session minted + description: Frontend route replaced content: application/json: schema: - $ref: '#/components/schemas/AuthTokenResponse' + $ref: '#/components/schemas/FrontendRoute' '400': - description: Polling state/error response + description: Invalid path, or the Frontend would mount itself content: application/json: schema: - $ref: '#/components/schemas/OAuthErrorResponse' + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '403': - description: | - `access_denied` - the approving account's email domain is not in - `allowed_email_domains` while `allowed_email_domains_mode` is - `signup_and_signin`. Re-checked here because approval and redemption - are separate requests. + description: Project not owned by the caller content: application/json: schema: - $ref: '#/components/schemas/OAuthErrorResponse' - /auth/device/verify: - post: - tags: - - OAuth Authentication - summary: Approve or deny a device code - description: | - Browser-side endpoint for authenticated auth-users to approve (`approve`) or deny (`deny`) a `user_code`. - - Called by the verification page after the end user signs in. The grant is - scoped to the project the auth-user token belongs to: approving a - `user_code` issued for a different project returns `403`. This endpoint - does not require managed auth to be enabled, so a custom verification page - (hosted anywhere) can drive approval — it just needs an authenticated - project auth-user access token and, for cross-origin browser calls, the - page origin allowed in the project's auth CORS settings. - operationId: authDeviceVerify - security: - - AuthUserAccessToken: [] - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - user_code - properties: - user_code: - type: string - action: - type: string - enum: - - approve - - deny - default: approve - responses: - '200': - description: Verification action accepted + $ref: '#/components/schemas/Error' + '404': + description: Frontend route, Frontend, or mounted Frontend not found, or, with code `feature_unavailable`, Frontend routes are not available in this environment (see `GET /capabilities`) content: application/json: schema: - type: object - properties: - success: - type: boolean - status: - type: string - '401': - description: Not authenticated + $ref: '#/components/schemas/Error' + '409': + description: Path is already routed, or this Frontend or the mounted Frontend is being deleted content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/platform/exchange: - post: + '500': + description: Failed to replace Frontend route + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: tags: - - OAuth Authentication - summary: Exchange auth-user device session for platform token - description: | - Exchanges a verified auth-user device-flow session into a platform token for CLI usage. - The target platform user is derived from authenticated auth-user mapping; client cannot select another user. - operationId: authPlatformExchange + - Frontends + summary: Delete a Frontend route + operationId: deleteFrontendRoute security: - - AuthUserAccessToken: [] - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - client_id - properties: - client_id: - type: string + - UserToken: [] + - ProjectAccessToken: [] responses: - '200': - description: Platform token minted + '204': + description: Frontend route deleted + '401': + description: Unauthorized content: application/json: schema: - $ref: '#/components/schemas/PlatformExchangeResponse' + $ref: '#/components/schemas/Error' '403': - description: | - Exchange not allowed for this session/client/project, or the - account's email domain is not in `allowed_email_domains` while - `allowed_email_domains_mode` is `signup_and_signin`. The domain is - re-checked here because the minted platform token outlives the - session it is exchanged from. + description: Project not owned by the caller content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/oauth/providers: - get: - tags: - - OAuth Authentication - summary: List user's linked providers - description: Get list of OAuth providers linked to current user - operationId: authListOAuthProviders - security: - - AuthUserAccessToken: [] - responses: - '200': - description: Linked providers + '404': + description: Frontend route not found on the Frontend content: application/json: schema: - type: object - properties: - providers: - type: array - items: - type: object - properties: - provider: - type: string - linked_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - '401': - description: Not authenticated + $ref: '#/components/schemas/Error' + '500': + description: Failed to delete Frontend route content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/oauth/{provider}/link: - post: + /projects/{id}/variable-environments: + get: tags: - - OAuth Authentication - summary: Link OAuth provider to current user - description: | - Generates authorization URL to link OAuth provider to existing account. - User must be authenticated. - operationId: authLinkOAuthProvider + - Variable Environments + summary: List variable Environments + operationId: listVariableEnvironments security: - - AuthUserAccessToken: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - name: provider - in: path - required: true - schema: - type: string - enum: - - google - - github - - microsoft - - apple - - name: redirect_url - in: query - schema: - type: string - description: | - URL to redirect to after linking completes (optional). Same - allowed_redirect_urls requirement as GET /auth/oauth/{provider}/authorize. - - name: client_state - in: query - schema: - type: string - maxLength: 255 - description: | - Optional application nonce echoed to redirect_url as `state`. - - name: response_mode - in: query - schema: - type: string - enum: - - code - description: | - Set to `code` to receive a short-lived authorization code at - redirect_url. `redirect_url` is required in this mode. When - omitted, the established session-fragment response is retained for - compatibility with existing clients. + - $ref: '#/components/parameters/ProjectId' responses: '200': - description: Authorization URL generated - content: - application/json: - schema: - type: object - properties: - authorization_url: - type: string - '400': - description: redirect_url is not registered in allowed_redirect_urls + description: Variable Environments, with Global first and custom Environments ordered by name content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/VariableEnvironmentList' '401': - description: Not authenticated + description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: OAuth provider not configured + '403': + description: Project not owned by the caller content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: Provider already linked + '500': + description: Failed to list variable Environments content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/oauth/{provider}/unlink: - delete: + post: tags: - - OAuth Authentication - summary: Unlink OAuth provider - description: | - Remove OAuth provider from user's account. - Cannot unlink if it's the only authentication method. - operationId: authUnlinkOAuthProvider + - Variable Environments + summary: Create a variable Environment + operationId: createVariableEnvironment + description: Creates a custom variable Environment. Global is reserved and already exists. A Project may have at most 100 custom Environments. security: - - AuthUserAccessToken: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - name: provider - in: path - required: true - schema: - type: string - enum: - - google - - github - - microsoft - - apple + - $ref: '#/components/parameters/ProjectId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateVariableEnvironmentRequest' responses: - '204': - description: Provider unlinked - '400': - description: Cannot unlink last authentication method + '201': + description: Variable Environment created content: application/json: schema: - $ref: '#/components/schemas/Error' - '401': - description: Not authenticated + $ref: '#/components/schemas/VariableEnvironment' + '400': + description: | + Invalid name, or the reserved Global name. Schema-invalid names + return the generic invalid-request error; a reserved name returns + `invalid_variable_environment`. content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Provider not linked + '401': + description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/oauth/{provider}/refresh-token: - post: - tags: - - OAuth Authentication - summary: Refresh OAuth provider token - description: | - Refresh the access token for an OAuth provider using its refresh token. - Allows calling provider APIs on user's behalf (e.g., Google Drive, GitHub repos). - operationId: refreshOAuthProviderToken - security: - - AuthUserAccessToken: [] - parameters: - - name: provider - in: path - required: true - schema: - type: string - enum: - - google - - github - - microsoft - - apple - responses: - '200': - description: Token refreshed successfully + '403': + description: Project not owned by the caller content: application/json: schema: - type: object - properties: - message: - type: string - provider: - type: string - expires_in: - type: integer - '400': - description: No refresh token available or refresh failed + $ref: '#/components/schemas/Error' + '404': + description: Project no longer exists content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Not authenticated + '409': + description: | + A case-insensitive name conflict or the 100-custom-Environment + limit has been reached, or the Project is being deleted. Tell them + apart with `code`, which is `variable_environment_conflict`, + `variable_environment_limit_reached`, or `project_deleting`. content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Provider not linked + '500': + description: Failed to create the variable Environment content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/oauth/{provider}/token: + /projects/{id}/variable-environments/{environmentId}: + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/VariableEnvironmentId' get: tags: - - OAuth Authentication - summary: Get current provider access token - description: | - Get valid access token for OAuth provider. - Automatically refreshes if expired. - operationId: getOAuthProviderToken + - Variable Environments + summary: Get a variable Environment + operationId: getVariableEnvironment security: - - AuthUserAccessToken: [] - parameters: - - name: provider - in: path - required: true - schema: - type: string - enum: - - google - - github - - microsoft - - apple + - UserToken: [] + - ProjectAccessToken: [] responses: '200': - description: Current access token + description: Variable Environment details content: application/json: schema: - type: object - properties: - message: - type: string - provider: - type: string - expires_in: - type: integer + $ref: '#/components/schemas/VariableEnvironment' '401': - description: Not authenticated + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Project not owned by the caller content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Provider not linked + description: Variable Environment not found in this Project content: application/json: schema: $ref: '#/components/schemas/Error' - /auth/oauth/{provider}/call-api: - post: + '500': + description: Failed to get the variable Environment + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + patch: tags: - - OAuth Authentication - summary: Call OAuth provider API - description: | - Make an authenticated request to an OAuth provider's API on behalf of the user. - The user's stored access token is automatically used and refreshed if needed. - - The request is always sent to the provider's fixed API base URL joined with - the caller-supplied `endpoint`. `endpoint` must be a relative path beginning - with `/` (optionally with a query string); it cannot change the target host. - Absolute URLs, protocol-relative `//host` values, or userinfo (`@host`) are - rejected with `400` so the request can never be redirected to another host. - - Examples of `endpoint`: - - Google userinfo: `/oauth2/v1/userinfo` - - GitHub repositories: `/user/repos` - - Microsoft Graph profile: `/me` - - The response wraps the provider's raw JSON value with request metadata. - An empty provider body is represented as `data: null`; the envelope - preserves the provider's HTTP status in `status_code`, including errors. - Provider response bodies are limited to 8 MiB after decompression. - Transport failures, invalid JSON (including invalid UTF-8), and oversized - bodies return `502`. Provider redirects to another origin are blocked and - return `400`. - operationId: callOAuthProviderAPI + - Variable Environments + summary: Rename a variable Environment + operationId: renameVariableEnvironment + description: Renames a custom Environment without changing its stable ID. Global cannot be renamed. security: - - AuthUserAccessToken: [] - parameters: - - name: provider - in: path - required: true - schema: - type: string - enum: - - google - - github - - microsoft - - apple + - UserToken: [] + - ProjectAccessToken: [] requestBody: required: true content: application/json: schema: - type: object - required: - - endpoint - properties: - endpoint: - type: string - description: | - Relative path on the provider's API, beginning with `/`. It is - joined with the provider's fixed base URL; it must not contain a - scheme, host, userinfo, or a leading `//`. - example: /user/repos - method: - type: string - enum: - - GET - - POST - default: GET - description: HTTP method to use - body: - type: object - additionalProperties: true - description: Request body for POST requests + $ref: '#/components/schemas/RenameVariableEnvironmentRequest' responses: '200': - description: Provider API response + description: Variable Environment renamed content: application/json: schema: - type: object - description: OAuth provider API response envelope - required: - - provider - - endpoint - - status_code - - data - properties: - provider: - type: string - enum: - - google - - github - - microsoft - - apple - endpoint: - type: string - status_code: - type: integer - minimum: 100 - maximum: 599 - data: - description: Raw provider JSON value, or null when the provider returns no body - nullable: true + $ref: '#/components/schemas/VariableEnvironment' '400': description: | - Invalid request (for example: missing `endpoint`, an `endpoint` that is - not a relative path, or an unsupported HTTP method), or a provider - redirect to another origin. + Invalid name, or the reserved Global name. Schema-invalid names + return the generic invalid-request error; a reserved name returns + `invalid_variable_environment`. content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Not authenticated + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Project not owned by the caller content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: OAuth provider configuration not found + description: Variable Environment not found in this Project + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: | + A case-insensitive name conflict, an attempt to rename Global, or + a Project being deleted. Tell them apart with `code`, which is + `variable_environment_conflict`, + `variable_environment_immutable`, or `project_deleting`. content: application/json: schema: $ref: '#/components/schemas/Error' '500': - description: Failed to create the provider API request + description: Failed to rename the variable Environment content: application/json: schema: $ref: '#/components/schemas/Error' - '502': - description: Provider transport failure, invalid JSON, or response body larger than 8 MiB + delete: + tags: + - Variable Environments + summary: Delete a variable Environment + operationId: deleteVariableEnvironment + description: Deletes a custom Environment. Global cannot be deleted. + security: + - UserToken: [] + - ProjectAccessToken: [] + responses: + '204': + description: Variable Environment deleted + '401': + description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/anon-keys: + '403': + description: Project not owned by the caller + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Variable Environment not found in this Project + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: | + Global is protected, or the Project is being deleted. Tell them + apart with `code`, which is `variable_environment_immutable` or + `project_deleting`. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to delete the variable Environment + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/variables: get: tags: - - Anon Keys - summary: List anon keys + - Variables + summary: List all variables for a project description: | - Supports two mutually exclusive pagination modes. Offset mode uses `page` - and `limit` and is the default when neither `cursor` nor `search` is - supplied (first page, default `limit`). Cursor mode uses `cursor` and - `limit`, supports `search` (case-insensitive name match), and returns - `next_cursor`. Sending both `page` and `cursor` (or `page` and `search`) - returns 400. - operationId: listAnonKeys + Returns project-level environment variables used by deployed functions and frontends. + operationId: listVariables security: - UserToken: [] - ProjectAccessToken: [] @@ -14139,33 +13952,25 @@ paths: - $ref: '#/components/parameters/Search' responses: '200': - description: List of anon keys + description: Successful response content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/AnonKey' - total: - type: integer - description: Total number of items matching the query (so the UI can render numbered pages). - has_more: - type: boolean - description: Whether a next page exists. - next_cursor: - type: string - description: Opaque cursor for the next page (cursor pagination only) - prev_cursor: - type: string - description: Opaque cursor for the previous page (cursor pagination only). Send as `ending_before`. + $ref: '#/components/schemas/PaginatedVariables' + '404': + description: Project not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' post: tags: - - Anon Keys - summary: Create anon key - operationId: createAnonKey + - Variables + summary: Create or update a variable + description: | + Creates a project-level environment variable and triggers asynchronous propagation + to deployed functions and frontends in the project's configured regions. + operationId: createVariable security: - UserToken: [] - ProjectAccessToken: [] @@ -14176,3088 +13981,13319 @@ paths: content: application/json: schema: - type: object - required: - - name - properties: - name: - type: string - description: | - Key name for identification. - Can only contain letters, numbers, underscores, and hyphens. - pattern: ^[A-Za-z0-9_-]+$ - minLength: 1 - maxLength: 255 - example: frontend-app - permissions: - type: array - items: - type: string - enum: - - auth.signup - - auth.signin - - auth.refresh - - auth.logout - - auth.password_reset - - auth.confirm_email - - auth.resend_confirmation - - storage.upload - - storage.download - - storage.list - - storage.delete - - realtime.connect - - realtime.subscribe - - realtime.publish - - functions.invoke - description: | - Optional list of permissions for this key. - If not provided, defaults to auth-only permissions: auth.signup, auth.signin, auth.refresh, auth.logout, auth.password_reset, auth.confirm_email, auth.resend_confirmation. - Storage, realtime, and functions permissions must be explicitly added if needed. - example: - - auth.signup - - auth.signin - - auth.refresh - - auth.logout + $ref: '#/components/schemas/CreateVariableRequest' responses: '201': - description: Anon key created + description: Variable created content: application/json: schema: - $ref: '#/components/schemas/AnonKey' - /projects/{id}/anon-keys/{keyId}: + $ref: '#/components/schemas/Variable' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: '`code: function_served_by_candidate` - a promoted preview serves a function whose environment this write changes; the preview keeps the variables it was built with and the write would reach only the function''s own build, so roll the function back to its own build, or deploy it, first.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Private variable membership writes are disabled during rollout + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/databases: get: tags: - - Anon Keys - summary: Get anon key - description: Get details of a specific anon key - operationId: getAnonKey + - Databases + summary: List all databases for a project + description: | + Supports two mutually exclusive pagination modes. Offset mode uses `page` + and `limit`. Cursor mode uses `cursor` and `limit`, supports `search` + (case-insensitive name match), and returns `next_cursor`/`prev_cursor`. + The optional `status` filter applies in both modes and is bound to the + cursor. Sending both `page` and `cursor` (or `page` and `search`) returns 400. + operationId: listDatabases security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: keyId - in: path - required: true + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/EndingBefore' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Search' + - name: status + in: query + required: false schema: type: string - format: uuid + enum: + - provisioning + - active + - restoring + - failed + - deleting + description: Return only the databases in this status. responses: '200': - description: Anon key details + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/AnonKey' - '404': - description: Key not found - delete: + $ref: '#/components/schemas/PaginatedDatabases' + post: tags: - - Anon Keys - summary: Revoke anon key - description: Revokes key - it will immediately stop working - operationId: revokeAnonKey + - Databases + summary: Create a new PostgreSQL database + description: | + Creates a PostgreSQL database in the project. + Each project can hold 1 database on HOBBY and up to 10,000 on SUPERAGENT. + Requests over the plan's cap return 403. + operationId: createDatabase security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: keyId - in: path - required: true - schema: - type: string - format: uuid + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateDatabaseRequest' responses: - '204': - description: Key revoked - '401': - description: Unauthorized - '403': - description: Forbidden - '404': - description: Key not found - '409': - description: Cannot delete the project's default anon key + '201': + description: Database created (provisioning) content: application/json: schema: - $ref: '#/components/schemas/Error' - '500': - description: Internal server error + $ref: '#/components/schemas/Database' + '403': + description: Database limit exceeded for the project content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/anon-keys/{keyId}/regenerate: - post: + /projects/{id}/databases/{databaseName}: + get: tags: - - Anon Keys - summary: Regenerate anon key - description: Generate new JWT value for existing key - operationId: regenerateAnonKey + - Databases + summary: Get database details + operationId: getDatabase security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: keyId - in: path - required: true - schema: - type: string - format: uuid + - $ref: '#/components/parameters/DatabaseName' responses: '200': - description: Key regenerated + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/AnonKey' - /projects/{id}/anon-keys/{keyId}/set-default: - post: + $ref: '#/components/schemas/Database' + delete: tags: - - Anon Keys - summary: Set default anon key - description: Promotes the given key to the project's configured default. At most one key per project can be default. - operationId: setDefaultAnonKey + - Databases + summary: Delete a database + description: | + Deletes a database and the instance backing it. When the instance is + removed synchronously the database row is deleted and the response is + `204`. If the instance cannot be deleted right away, the database row + is retained (status `deleting`) and its teardown is handed to the + background reconciler, which retries the deletion and removes the row + once the instance is gone; in that case the response is `202`. The database row is + never dropped while its instance still exists, so an instance is + never orphaned without a record to retry from. + operationId: deleteDatabase security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: keyId - in: path - required: true - schema: - type: string - format: uuid + - $ref: '#/components/parameters/DatabaseName' responses: - '200': - description: Key set as default + '202': + description: | + Deletion accepted and in progress. The backing instance could not be + removed synchronously, so the database is marked `deleting` and torn + down asynchronously by the reconciler. content: application/json: schema: - $ref: '#/components/schemas/AnonKey' - '401': - description: Unauthorized - '403': - description: Forbidden + type: object + properties: + status: + type: string + example: deleting + message: + type: string + example: database deletion in progress + '204': + description: Database deleted (backing instance removed synchronously) '404': - description: Anon key not found - '500': - description: Internal server error + description: Project or database not found content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/access-tokens: + '409': + description: | + A restore is running on the database. Deleting it while a worker is + replacing its data would race that worker, so wait for the restore + to finish. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: | + Volcano could not check whether a restore is running, and will not + delete a database that might be mid-restore. Retry. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/databases/{databaseName}/branches: get: tags: - - Project Access Tokens - summary: List a project's access tokens + - Database Branches + summary: List a database's branches description: | - Lists the project's access tokens, newest first. Secrets are never - returned: only a hash is stored, so a token's value exists solely in the - response to the create call. - - Only tokens that can still authenticate are returned by default, so - revoked and expired ones are hidden. Pass `include_revoked=true` to see - them, which is how you find out what a key did before it stopped working. + Returns every branch of the database, including those still provisioning + and those that failed, since each still holds a name. - Requires a platform token. A project access token cannot manage project - access tokens, so a leaked credential cannot enumerate or replace itself. - operationId: listProjectAccessTokens + Connection strings are omitted. Fetch a single branch to get its + connection string. + operationId: listDatabaseBranches security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Search' - - name: include_revoked - in: query - required: false - description: | - Include tokens that can no longer authenticate — both revoked and - expired ones. - schema: - type: boolean - default: false + - $ref: '#/components/parameters/DatabaseName' responses: '200': description: Successful response content: application/json: schema: - $ref: '#/components/schemas/PaginatedProjectAccessTokens' - '401': - description: Unauthorized - invalid or missing token - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '403': - description: Forbidden - not the project owner, or a project access token was used + $ref: '#/components/schemas/DatabaseBranchList' + '404': + description: Project or database not found content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project not found + '503': + description: Branching is temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/Error' post: tags: - - Project Access Tokens - summary: Create a project access token + - Database Branches + summary: Create a branch of a database description: | - Creates a project access token and returns its secret. - - The secret is in this response and nowhere else. Only its hash is - stored, so it cannot be retrieved, displayed, or recovered later — save - it when you create it. + Forks the database into a new branch. The branch starts as an exact copy + of the parent's data and diverges from there. - The name must be unique within the project, so a retry cannot mint a - second credential. It cannot recover the first one either. A retry that - returns `409` with code `access_token_name_exists` means the original - create committed and its secret is unrecoverable: list the project's - tokens, revoke the one holding that name, and create it again. + Provisioning is asynchronous: the response is `202` with the branch in + `provisioning` and no connection string. Poll the branch until it reports + `active`, at which point it carries its own connection string. - Requires a platform token. - operationId: createProjectAccessToken + Retrying a create with a name that already exists returns `409` rather + than a second branch, so a retried request cannot silently consume two + slots of the branch allowance. + operationId: createDatabaseBranch security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DatabaseName' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/CreateProjectAccessTokenRequest' + $ref: '#/components/schemas/CreateDatabaseBranchRequest' responses: - '201': - description: Token created - save the secret now, it cannot be retrieved again + '202': + description: Branch accepted and provisioning content: application/json: schema: - $ref: '#/components/schemas/CreatedProjectAccessToken' + $ref: '#/components/schemas/DatabaseBranch' '400': - description: Bad request - invalid name, scope, or expiry - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + description: Invalid branch name or lifetime content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: Forbidden - not the project owner, or a project access token was used + description: | + The database has reached its branch allowance, or the owner's plan + does not include branching. content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: Project not found + description: Project or database not found content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: | - Duplicate name, token limit reached, or the project is being - deleted. Tell them apart with `code`, which is one of - `access_token_name_exists`, `access_token_limit_reached`, or - `project_deleting` — the message text is not a contract. + A branch of that name already exists on this database, or the + database cannot be branched right now because it is still + provisioning, being restored, failed, or being deleted. content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/access-tokens/usage: + '503': + description: Branching is temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/databases/{databaseName}/branches/{branchName}: get: tags: - - Project Access Tokens - summary: Per-day request counts for every access token in a project + - Database Branches + summary: Get a branch description: | - Returns a zero-filled daily series of request counts for each of the - project's access tokens, oldest first. Every day in the window is - present, so a gap reads as zero rather than missing. - - Revoked tokens are included, because the traffic they made before - revocation is usually the reason you are looking. - - `days` defaults to 30 and is capped at 60, which is also how long per-day - counts are retained — a longer window cannot be answered. - - A platform token sees every token in the project. A project access token - sees only its own row, so it can watch its own traffic without being - able to enumerate the project's other credentials by name. - operationId: listProjectAccessTokensUsage + Returns the branch, including its connection string once it is `active`. + Poll this after creating a branch to learn when it is connectable. + operationId: getDatabaseBranch security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: days - in: query - required: false - description: Number of trailing days to return (1-60, default 30). - schema: - type: integer - minimum: 1 - maximum: 60 - default: 30 + - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/BranchName' responses: '200': description: Successful response content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/ProjectAccessTokenUsage' - '400': - description: Bad request - invalid window - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '403': - description: Forbidden - not the project owner + $ref: '#/components/schemas/DatabaseBranch' + '404': + description: Project, database, or branch not found content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project not found + '503': + description: Branching is temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/access-tokens/{tokenId}: - get: + patch: tags: - - Project Access Tokens - summary: Get a project access token + - Database Branches + summary: Extend a branch's lifetime description: | - Returns one token's metadata. Never its secret, which is not stored in a - recoverable form. - - Requires a platform token. - operationId: getProjectAccessToken + Replaces the branch's lifetime and restarts the countdown from now, so a + branch you are still working on is not swept mid-session. The new + duration is remembered, so a later reset re-arms the same lifetime. + operationId: updateDatabaseBranch security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/TokenId' + - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/BranchName' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateDatabaseBranchRequest' responses: '200': - description: Successful response + description: Lifetime updated content: application/json: schema: - $ref: '#/components/schemas/ProjectAccessToken' - '401': - description: Unauthorized - invalid or missing token + $ref: '#/components/schemas/DatabaseBranch' + '400': + description: Requested lifetime is outside the allowed range content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Forbidden - not the project owner, or a project access token was used + '404': + description: Project, database, or branch not found content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Token not found + '409': + description: The branch is being deleted + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Branching is temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - - Project Access Tokens - summary: Revoke a project access token + - Database Branches + summary: Delete a branch description: | - Revokes the token. It stops authenticating immediately in the region - handling this call and within seconds across Volcano's other regions. - - The record is kept rather than deleted, so the token's name, prefix, last - use, and request history stay available — which is what you need if you - are revoking because a secret leaked. Revoking an already-revoked token - succeeds. - - Revoking does not undo anything the token already did. Treat whatever it - could reach as exposed and rotate accordingly. + Marks the branch for teardown and returns immediately. The branch stops + accepting connections at once; its fork and its row are removed by a + background job, so a provider outage cannot leave the call hanging or the + branch half-deleted. - Requires a platform token. - operationId: revokeProjectAccessToken + Deleting a branch that is still provisioning is allowed and stops the + build, and repeating the call while teardown is in progress is accepted + again. Once the branch is gone the call returns `404`. + operationId: deleteDatabaseBranch security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/TokenId' + - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/BranchName' responses: - '204': - description: Token revoked - '401': - description: Unauthorized - invalid or missing token - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '403': - description: Forbidden - not the project owner, or a project access token was used + '202': + description: Deletion accepted and in progress content: application/json: schema: - $ref: '#/components/schemas/Error' + type: object + properties: + status: + type: string + example: deleting + message: + type: string + example: branch deletion in progress + required: + - status + - message '404': - description: Token not found + description: Project, database, or branch not found content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: Conflict - the project is being deleted + '503': + description: Branching is temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/access-tokens/{tokenId}/usage: - get: + /projects/{id}/databases/{databaseName}/branches/{branchName}/reset: + post: tags: - - Project Access Tokens - summary: Per-day request counts for one access token + - Database Branches + summary: Reset a branch to its parent's current state description: | - Returns a zero-filled daily series of request counts for a single token, - oldest first, so the response always has exactly `days` entries. + Discards everything written on the branch and re-forks it from the + parent as it is now. - `days` defaults to 30 and is capped at 60, matching how long per-day - counts are retained. + Returns immediately with the branch in `provisioning`. The rewind runs in + the background; poll the branch until it reports `active` before + connecting again. - A project access token may read only its own usage; asking for another - token's returns `403`. A platform token may read any token in the - project. - operationId: getProjectAccessTokenUsage + The branch keeps its name and its connection string, so anything holding + that string keeps working once it is active again, and its lifetime is + re-armed to the duration it was created with. The branch does not serve + connections for the duration of the reset. + operationId: resetDatabaseBranch security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/TokenId' - - name: days - in: query - required: false - description: Number of trailing days to return (1-60, default 30). - schema: - type: integer - minimum: 1 - maximum: 60 - default: 30 + - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/BranchName' responses: - '200': - description: Successful response + '202': + description: Branch reset accepted; the branch is provisioning content: application/json: schema: - $ref: '#/components/schemas/ProjectAccessTokenUsage' - '400': - description: Bad request - invalid window + $ref: '#/components/schemas/DatabaseBranch' + '404': + description: Project, database, or branch not found content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Unauthorized - invalid or missing token + '409': + description: | + The branch is not active, a reset is already in progress, the parent + database is being restored, or the parent was restored within the + last 24 hours — a reset re-forks from the parent, and the provider + holds a child's reset shut for that long afterwards. content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: Forbidden - not the project owner + '503': + description: Branching is temporarily unavailable content: application/json: schema: $ref: '#/components/schemas/Error' + /projects/{id}/databases/{databaseName}/branches/{branchName}/reset-password: + post: + tags: + - Database Branches + summary: Rotate a branch's password + description: | + Issues a new password for the branch and invalidates the previous + connection string. Existing connections are not interrupted; new ones + must use the returned string. Proxies pick the rotation up within a few + seconds, so the previous password can still open new connections until + then. + + The parent database's credentials are untouched. + operationId: resetDatabaseBranchPassword + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/BranchName' + responses: + '200': + description: Password rotated + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseBranch' '404': - description: Token not found + description: Project, database, or branch not found content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/service-keys: + '409': + description: The branch is not active + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Branching is temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/databases/{databaseName}/backups: get: tags: - - Service Keys - summary: List service keys (paginated) + - Database Backups + summary: List a database's backups description: | - List all service role keys for a project with pagination. + Returns every backup of the database, newest first, together with the + window a point-in-time restore may target. - **WARNING:** Service keys bypass RLS - for backend/admin use only! - operationId: listServiceKeys + Backups you took, backups the schedule produced, and backups taken + before migrations are all listed; `source` tells them apart. Only manual + backups count against the plan's backup allowance. + operationId: listDatabaseBackups security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Cursor' - - $ref: '#/components/parameters/EndingBefore' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Search' + - $ref: '#/components/parameters/DatabaseName' responses: '200': - description: Paginated list of service keys + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/PaginatedServiceKeys' + $ref: '#/components/schemas/DatabaseBackupList' + '403': + description: Backups require SUPERAGENT + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project or database not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: | + The database has no storage project yet, so there is nothing to + list. A database reports this while it is still provisioning. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Backups are temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' post: tags: - - Service Keys - summary: Create service key + - Database Backups + summary: Back up a database description: | - Create a new service role key for admin operations. + Captures the database as it is now. The backup is available immediately; + its `size_bytes` appears once the storage provider has costed it. - **WARNING:** Service keys bypass all RLS policies! - Store securely and NEVER expose in frontend code. - operationId: createServiceKey + Backups are rate-limited to one per minute per database, and capped by + the owner's plan. + operationId: createDatabaseBackup security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DatabaseName' requestBody: required: true content: application/json: schema: - type: object - required: - - name - properties: - name: - type: string - description: | - Descriptive name for the key (e.g., "admin-dashboard", "background-jobs"). - Can only contain letters, numbers, underscores, and hyphens. - pattern: ^[A-Za-z0-9_-]+$ - minLength: 1 - maxLength: 255 - example: admin-dashboard - permissions: - type: array - items: - type: string - description: | - Optional least-privilege scope for the key. When omitted, empty, or - containing only blank strings, the key is granted full access (["*"]) - for backward compatibility. Provide an explicit list (e.g. - ["functions.invoke", "locks.manage"]) to restrict the key; "*" - grants everything. Scope enforcement applies to function invocation, - storage object operations, and project locks. - example: - - functions.invoke - - locks.manage + $ref: '#/components/schemas/CreateDatabaseBackupRequest' responses: '201': - description: Service key created - save the key_value immediately! + description: Backup created content: application/json: schema: - $ref: '#/components/schemas/ServiceKey' + $ref: '#/components/schemas/DatabaseBackup' + '400': + description: Invalid backup name, or one with a reserved prefix + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: | + The database has reached its backup allowance, or the owner's plan + does not include backups, which are available only on SUPERAGENT. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project or database not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '409': - description: Key with this name already exists - /projects/{id}/service-keys/{keyId}: + description: | + A backup of that name already exists, the database is not active, a + restore is running on it, or a backup was taken too recently. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Backups are temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/databases/{databaseName}/backups/{backupName}: get: tags: - - Service Keys - summary: Get service key - description: Get details of a specific service key - operationId: getServiceKey + - Database Backups + summary: Get a backup + description: Returns one backup of the database. + operationId: getDatabaseBackup security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: keyId - in: path - required: true - schema: - type: string - format: uuid + - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/BackupName' responses: '200': - description: Service key details + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/ServiceKey' + $ref: '#/components/schemas/DatabaseBackup' + '403': + description: Backups require SUPERAGENT + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Key not found + description: Project, database, or backup not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: | + The database has no storage project yet, so it holds no backups. A + database reports this while it is still provisioning. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Backups are temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - - Service Keys - summary: Delete service key + - Database Backups + summary: Delete a backup description: | - Permanently delete a service key. - Any services using this key will immediately lose access. - operationId: deleteServiceKey - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - name: keyId - in: path - required: true - schema: - type: string - format: uuid - responses: - '204': - description: Key deleted - /projects/{id}/service-keys/{keyId}/regenerate: - post: - tags: - - Service Keys - summary: Regenerate service key - description: | - Generate new JWT value for existing key. - The old key stops working within a few seconds. - Update your backend services with the new key before regenerating in production. - operationId: regenerateServiceKey + Deletes the backup and frees its storage. Scheduled backups can be + deleted too. A backup that is already gone reports `404`, so a name + that never existed and a name that no longer does read the same. + Refused with `409` while the database is being restored. + operationId: deleteDatabaseBackup security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: keyId - in: path - required: true - schema: - type: string - format: uuid + - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/BackupName' responses: '200': - description: Key regenerated - save the new key_value immediately! + description: Backup deleted content: application/json: schema: - $ref: '#/components/schemas/ServiceKey' - /projects/{id}/storage/buckets: + type: object + properties: + status: + type: string + example: deleted + message: + type: string + example: backup deleted + required: + - status + - message + '403': + description: Backups require SUPERAGENT + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project, database, or backup not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: | + The database is being restored. A restore is pinned to a backup it + may not have restored yet, so deleting one is refused until the + restore finishes. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Backups are temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/databases/{databaseName}/backup-schedule: get: tags: - - Storage Buckets - summary: List all storage buckets in a project + - Database Backups + summary: Get the automated backup schedule description: | - With no pagination params, returns the full bucket list as a bare array - (legacy). Supplying `cursor`, `ending_before`, `search`, or `limit` - switches to keyset (cursor) pagination and returns a paginated envelope - with `next_cursor`/`prev_cursor` and a filtered `total`. - operationId: listStorageBuckets + Returns the database's backup schedule. An empty list means no scheduled + backups. + operationId: getDatabaseBackupSchedule security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/Limit' - - $ref: '#/components/parameters/Cursor' - - $ref: '#/components/parameters/EndingBefore' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Search' + - $ref: '#/components/parameters/DatabaseName' responses: '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseBackupSchedule' + '403': + description: Backups require SUPERAGENT + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project or database not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': description: | - Either the full bucket list (bare array, legacy) or a paginated - envelope when cursor pagination is requested. + The database has no storage project yet, so it has no schedule. A + database reports this while it is still provisioning. content: application/json: schema: - oneOf: - - type: array - items: - $ref: '#/components/schemas/StorageBucket' - - $ref: '#/components/schemas/PaginatedStorageBuckets' - post: + $ref: '#/components/schemas/Error' + '503': + description: Backups are temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + put: tags: - - Storage Buckets - summary: Create a new storage bucket - operationId: createStorageBucket + - Database Backups + summary: Replace the automated backup schedule + description: | + Replaces the schedule wholesale. Send an empty `entries` list to stop + scheduled backups. + + Scheduled backups do not count against the plan's backup allowance, but + their retention is clamped to the plan's. + operationId: updateDatabaseBackupSchedule security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DatabaseName' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/CreateStorageBucketRequest' + $ref: '#/components/schemas/DatabaseBackupSchedule' responses: - '201': - description: Bucket created + '200': + description: Schedule replaced content: application/json: schema: - $ref: '#/components/schemas/StorageBucket' + $ref: '#/components/schemas/DatabaseBackupSchedule' + '400': + description: | + The schedule names a recurrence that cannot fire: a weekly or + monthly one with no `day`, or a `day` outside its frequency's range + (1-7 for weekly, 1-28 for monthly). The response says which. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Backups require SUPERAGENT + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project or database not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '409': - description: Bucket already exists - /projects/{id}/storage/buckets/{bucketName}: + description: | + The database is not active, or a restore is running on it — a restore + moves the data to a new branch, and the provider keeps the schedule + per branch. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Backups are temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/databases/{databaseName}/restores: get: tags: - - Storage Buckets - summary: Get storage bucket by name - operationId: getStorageBucket + - Database Backups + summary: List a database's restores + description: | + Returns the database's restore history, newest first, capped at the 50 + most recent. There is no pagination: a database that has been restored + more than 50 times keeps the older records but does not return them. + operationId: listDatabaseRestores security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/BucketName' + - $ref: '#/components/parameters/DatabaseName' responses: '200': - description: Bucket details + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/StorageBucket' + $ref: '#/components/schemas/DatabaseRestoreList' + '403': + description: Backups require SUPERAGENT + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Bucket not found - patch: + description: Project or database not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Backups are temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: tags: - - Storage Buckets - summary: Update storage bucket settings - operationId: updateStorageBucket + - Database Backups + summary: Restore a database + description: | + Replaces the database's data, either with a named backup or with its + state at a point in time. This is destructive: everything written after + that point is discarded. + + Asynchronous: the response is `202` with the restore `pending` and the + database `restoring`. The database does not accept connections until the + restore reports `completed`; its connection string is unchanged + throughout, so nothing holding it needs updating. + + Restores are in place. There is no way to restore into a second + database, and a database's branches are never restored — they keep + serving their own data, but resetting a branch from its parent is + refused by the storage provider for up to 24 hours afterwards. + operationId: createDatabaseRestore security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/BucketName' + - $ref: '#/components/parameters/DatabaseName' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UpdateStorageBucketRequest' + $ref: '#/components/schemas/CreateDatabaseRestoreRequest' responses: - '200': - description: Bucket updated + '202': + description: Restore accepted and in progress content: application/json: schema: - $ref: '#/components/schemas/StorageBucket' - delete: - tags: - - Storage Buckets - summary: Delete storage bucket and all objects - operationId: deleteStorageBucket - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/BucketName' - responses: - '200': - description: Bucket deleted - /projects/{id}/storage/buckets/{bucketName}/policies: - get: - tags: - - Storage Policies - summary: List storage policies for a bucket - operationId: listStoragePolicies - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/BucketName' - responses: - '200': - description: List of policies + $ref: '#/components/schemas/DatabaseRestore' + '400': + description: | + Neither or both restore targets were named, or the requested time is + outside the available window. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/StoragePolicy' - post: - tags: - - Storage Policies - summary: Create a storage policy - operationId: createStoragePolicy - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/BucketName' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateStoragePolicyRequest' - responses: - '201': - description: Policy created + $ref: '#/components/schemas/Error' + '403': + description: | + The owner's plan does not include backups or point-in-time restore + (code `plan_required`). Both are available only on SUPERAGENT. Also + answers 403 without a code, with `restore history is not available + yet for the requested time`, when the plan includes restore history + but the database has not built any up yet; waiting fixes it, not + upgrading. content: application/json: schema: - $ref: '#/components/schemas/StoragePolicy' - /projects/{id}/storage/buckets/{bucketName}/policies/{policyId}: - delete: - tags: - - Storage Policies - summary: Delete a storage policy - operationId: deleteStoragePolicy - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/BucketName' - - name: policyId - in: path - required: true - schema: - type: string - format: uuid - responses: - '200': - description: Policy deleted - /projects/{id}/storage/objects: + $ref: '#/components/schemas/Error' + '404': + description: Project, database, or backup not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: | + Code `migration_run_in_progress`: a migration run is backing up or + applying to the database, named by `run_id`. Wait for it to end, + then send the request again. Without a code: a restore is already + in progress, the database is not active, another database operation + is still running, or the database is holding as many pre-restore + branches as it may. + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseRestoreConflictError' + '503': + description: Backups are temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/databases/{databaseName}/restores/{restoreId}: get: tags: - - Storage Admin - summary: List all storage objects in a project + - Database Backups + summary: Get a restore description: | - Returns a paginated list of all storage objects across all buckets in the project. - Supports filtering by owner and pagination. - operationId: listStorageObjectsAdmin + Returns the restore. Poll this after starting one; the database is + connectable again once it reports `completed`. + operationId: getDatabaseRestore security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - name: owner_id - in: query - description: Filter by owner user ID - schema: - type: string - format: uuid - - name: page - in: query - description: Page number (1-based) - schema: - type: integer - default: 1 - minimum: 1 - - name: limit - in: query - description: Items per page - schema: - type: integer - default: 50 - minimum: 1 - maximum: 100 - - $ref: '#/components/parameters/Cursor' - - $ref: '#/components/parameters/EndingBefore' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Search' + - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/RestoreId' responses: '200': - description: Paginated list of storage objects + description: Successful response content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/StorageObjectWithBucket' - page: - type: integer - limit: - type: integer - total: - type: integer - has_more: - type: boolean - next_cursor: - type: string - description: Opaque cursor for the next page (cursor pagination only) - prev_cursor: - type: string - description: Opaque cursor for the previous page (cursor pagination only). Send as `ending_before`. - /projects/{id}/storage/stats: - get: - tags: - - Storage Admin - summary: Get storage statistics for a project - description: Returns aggregate storage statistics including bucket count, object count, and total size. - operationId: getStorageStats - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - responses: - '200': - description: Storage statistics + $ref: '#/components/schemas/DatabaseRestore' + '403': + description: Backups require SUPERAGENT content: application/json: schema: - $ref: '#/components/schemas/StorageStats' - /projects/{id}/realtime/config: + $ref: '#/components/schemas/Error' + '404': + description: Project, database, or restore not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Backups are temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/databases/{databaseName}/migrations: get: tags: - - Realtime - summary: Get realtime configuration for a project - description: Returns the realtime configuration including enabled features and limits. - operationId: getRealtimeConfig + - Database Migrations + summary: Get a database's migration history + description: | + Returns the migrations the database has recorded, in name order, read + from the database's own `_volcano_migrations.history` table. The history + is empty until a migration run or a baseline first records a file. + + `active_run_id` is the run that is queued or running, if any. + + If the history table is gone from a database where migrations ran, + answers `409` with code `history_missing`, and every run fails with + that code, rather than running files again. Record a baseline of the + files that were already applied to rebuild it. Dropping the whole + `_volcano_migrations` schema is not supported: the database then reads + as new, and the next run applies every file again. + + Volcano reads at most 1,000 history entries, as many files as one run + may carry. A history with more answers `409` with code + `history_too_large`. A baseline is refused with that code, and a run + fails with it. Deleting the entries of files no longer among your + migrations brings the history back under the bound. + + Available whether or not migration runs are. + operationId: getDatabaseMigrations security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DatabaseName' responses: '200': - description: Realtime configuration + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/RealtimeConfig' - '401': - description: Unauthorized + $ref: '#/components/schemas/DatabaseMigrations' + '404': + description: Project or database not found content: application/json: schema: $ref: '#/components/schemas/Error' - '404': - description: Project not found + '409': + description: | + Code `history_missing`: the history table is gone from a database + where migrations ran; record a baseline of the files that were + already applied. Code `history_too_large`: the history has more + than 1,000 entries. Without a code: the database is not active, so + its history cannot be read. content: application/json: schema: $ref: '#/components/schemas/Error' - put: + '503': + description: Volcano could not reach the database + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/databases/{databaseName}/migrations/baseline: + post: tags: - - Realtime - summary: Update realtime configuration for a project - description: Updates realtime settings including feature toggles and limits. - operationId: updateRealtimeConfig + - Database Migrations + summary: Record migrations as applied without running them + description: | + Records each file in the database's migration history as applied, + without running it. Use it once for a database whose schema already + reflects the files, such as one migrated before Volcano tracked its + migrations, so later runs apply only newer files. It is refused while + a run is queued or running, and no run starts while it records. It + does not queue: while another request is changing the database, or the + database holds it up, such as with a lock on the migration history, it + answers `409` with code `database_busy`. + + Files the history already records with the same checksum are skipped, so + repeating the request changes nothing. A file recorded with a different + checksum is refused, and nothing is recorded. + + It also rebuilds a history that was lost (`history_missing`): send + exactly the files that were already applied, and later runs apply only + the rest. + + Where migration runs are not available, answers `404` with code + `feature_unavailable`. + operationId: baselineDatabaseMigrations security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DatabaseName' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UpdateRealtimeConfigRequest' + $ref: '#/components/schemas/DatabaseMigrationFilesRequest' responses: '200': - description: Updated realtime configuration + description: The files are recorded content: application/json: schema: - $ref: '#/components/schemas/RealtimeConfig' + $ref: '#/components/schemas/DatabaseMigrationBaseline' '400': - description: Invalid configuration values + description: | + A file breaks a rule: too many files, a file over 1 MiB, a name that + is not a `.sql` file, a name repeated, or a directory other than + this database's. Nothing is recorded or queued. Code + `invalid_layout`: a path does not map to this database. Code + `invalid_file`: a name is repeated or too long. A request the + schema refuses carries no code. Without a code, the message + starting `storage limit reached`: the database is over its storage + allowance, so its writes are blocked, as they are over a + connection. content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Unauthorized + '404': + description: | + Project or database not found, or migration runs are not available + here (code `feature_unavailable`). content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/realtime/stats: - get: - tags: - - Realtime - summary: Get realtime statistics for a project - description: Returns realtime usage statistics including connection counts and subscribed tables. - operationId: getRealtimeStats - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - responses: - '200': - description: Realtime statistics + '409': + description: | + Nothing was recorded. Code `checksum_mismatch`: a file is already + recorded with a different checksum. Code + `migration_run_in_progress`: a run is queued or running, named by + `run_id`. Code `history_too_large`: the history has more than 1,000 + entries. Code `database_busy`: another request is changing the + database, or the database held the baseline up, such as with a lock + on its migration history; try again. Without a code: the database is not active or changed + while the request ran, or another session holds its migration + lock. content: application/json: schema: - $ref: '#/components/schemas/RealtimeStats' - '401': - description: Unauthorized + $ref: '#/components/schemas/DatabaseMigrationConflictError' + '413': + description: The request body is larger than 4 MiB content: application/json: schema: $ref: '#/components/schemas/Error' - /storage/{bucketName}: + '503': + description: Volcano could not reach the database + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/databases/{databaseName}/migration-runs: get: tags: - - Storage Objects - summary: List objects in a bucket - operationId: listStorageObjects + - Database Migrations + summary: List a database's migration runs + description: | + Returns the database's 50 most recent migration runs, newest first, + without their files; get a run for its files. There is no pagination. + + Available whether or not migration runs are. + operationId: listDatabaseMigrationRuns security: - - AnonKey: [] - - ServiceRoleKey: [] - - AuthUserAccessToken: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/BucketName' - - name: prefix - in: query - description: Filter objects by path prefix - schema: - type: string - - name: limit - in: query - description: Maximum objects to return - schema: - type: integer - default: 50 - maximum: 1000 - - name: cursor - in: query - description: Pagination cursor - schema: - type: string + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DatabaseName' responses: '200': - description: List of objects + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/StorageListResponse' - '403': - description: Access denied by storage policy - '429': - $ref: '#/components/responses/BandwidthCapExceeded' - /locks/{key}/lease: + $ref: '#/components/schemas/DatabaseMigrationRunList' + '404': + description: Project or database not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' post: tags: - - Locks - summary: Acquire a project lock + - Database Migrations + summary: Apply migrations to a database description: | - Acquires a project-scoped lease using the project embedded in the service-role key. - The caller must hold the `locks.manage` permission. Repeating the request with the - same lock token is idempotent and resets that lease to the requested TTL. A different - live owner receives `409 lock_held`; a caller whose own lease already lapsed receives - `409 lock_ownership_lost`. - operationId: acquireProjectLock + Starts a migration run: Volcano compares the files with the database's + history, rehearses the pending ones on a short-lived branch of the + database, takes a backup, and applies them in name order. Files the + history already records with the same checksum are skipped. + + Asynchronous: the response is `202` with the run `queued`. Poll the run + until its `status` is `succeeded` or `failed`. + + Send `Idempotency-Key` to make a retry safe: a repeat with a key this + database has seen returns that run with `200` and starts nothing. A + database runs one migration run at a time. + + Where migration runs are not available, answers `404` with code + `feature_unavailable`. + operationId: createDatabaseMigrationRun security: - - ServiceRoleKey: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/LockKey' - - $ref: '#/components/parameters/LockToken' - - $ref: '#/components/parameters/LockRequestId' + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DatabaseName' + - name: Idempotency-Key + in: header + required: false + description: | + Makes the request safe to retry. A repeat with a key this database + has seen returns the run it started. Reusing a key for different + files answers `409`. Up to 255 printable ASCII characters. + schema: + type: string + minLength: 1 + maxLength: 255 + pattern: ^[!-~]+$ requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/ProjectLockLeaseRequest' + $ref: '#/components/schemas/DatabaseMigrationFilesRequest' responses: - '201': - description: Lease acquired + '200': + description: A run with this `Idempotency-Key` already exists; it is returned content: application/json: schema: - $ref: '#/components/schemas/ProjectLockLease' - '400': - description: Invalid lock key, token, or TTL + $ref: '#/components/schemas/DatabaseMigrationRun' + '202': + description: Run accepted and queued content: application/json: schema: - $ref: '#/components/schemas/Error' - '401': - description: Missing or invalid credentials + $ref: '#/components/schemas/DatabaseMigrationRun' + '400': + description: | + A file breaks a rule: too many files, a file over 1 MiB, a name that + is not a `.sql` file, a name repeated, or a directory other than + this database's. Nothing is recorded or queued. Code + `invalid_layout`: a path does not map to this database. Code + `invalid_file`: a name is repeated or too long. A request the + schema refuses carries no code. Without a code, the message + starting `storage limit reached`: the database is over its storage + allowance, so its writes are blocked, as they are over a + connection. content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: A non-service credential was supplied or the service key lacks `locks.manage` + '404': + description: | + Project or database not found, or migration runs are not available + here (code `feature_unavailable`). content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: | - The lock is held by another live lease (`lock_held`), or the caller's own lease - lapsed and is not yet reclaimable (`lock_ownership_lost`). - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '429': - description: Project lock request limit exceeded - headers: - Retry-After: - description: Seconds until the current fixed-minute window ends. - schema: - type: integer + Code `migration_run_in_progress`: a run is already queued or running + for this database, named by `run_id`. Wait for it to end, then send + the request again. Without a code: the `Idempotency-Key` already + started a run of different files. content: application/json: schema: - $ref: '#/components/schemas/Error' - '503': - description: Lock service unavailable + $ref: '#/components/schemas/DatabaseMigrationConflictError' + '413': + description: The request body is larger than 4 MiB content: application/json: schema: $ref: '#/components/schemas/Error' - patch: + /projects/{id}/databases/{databaseName}/migration-runs/{runId}: + get: tags: - - Locks - summary: Renew a project lock + - Database Migrations + summary: Get a migration run description: | - Renews a lease owned by the supplied lock token. The request must arrive - more than one second before `expires_at`; this safety margin prevents - clock skew between regional API instances from resurrecting an expired - lease. - operationId: renewProjectLock + Returns the run with each file's outcome. Poll this after starting a + run. + + Available whether or not migration runs are. + operationId: getDatabaseMigrationRun security: - - ServiceRoleKey: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/LockKey' - - $ref: '#/components/parameters/LockToken' - - $ref: '#/components/parameters/LockRequestId' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectLockLeaseRequest' + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/MigrationRunId' responses: '200': - description: Lease renewed + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/ProjectLockLease' - '400': - description: Invalid lock key, token, or TTL + $ref: '#/components/schemas/DatabaseMigrationRun' + '404': + description: Project, database, or run not found content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Missing or invalid credentials + /projects/{id}/databases/{databaseName}/reset-password: + post: + tags: + - Databases + summary: Reset database password + description: | + Rotates the Volcano-managed PostgreSQL password used by clients when connecting + through pgproxy. This does not rotate or expose the internal owner password. + The returned password and connection string are the only client credentials that + will authenticate through pgproxy after reset. + + Existing connections are not interrupted; new ones must use the returned + string. Proxies pick the rotation up within a few seconds, so the previous + password can still open new connections until then. + operationId: resetDatabasePassword + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DatabaseName' + responses: + '200': + description: Password reset successful content: application/json: schema: - $ref: '#/components/schemas/Error' - '403': - description: A non-service credential was supplied or the service key lacks `locks.manage` + type: object + properties: + message: + type: string + role_name: + type: string + description: Volcano-managed per-database client login (also the pgproxy routing username) + example: volcano_client_11111111-1111-1111-1111-111111111111 + new_password: + type: string + description: New Volcano-managed client password. Always starts with `vpg_`. + connection_string: + type: string + description: Updated pgproxy connection string using Volcano-managed credentials. + '400': + description: Database is not active content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: The lease expired or is owned by another token + '404': + description: Database not found content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - description: Project lock request limit exceeded - headers: - Retry-After: - description: Seconds until the current fixed-minute window ends. - schema: - type: integer + '409': + description: | + A restore is running on the database. A restore replaces the + credentials as it finishes, so wait for it and rotate afterwards. content: application/json: schema: $ref: '#/components/schemas/Error' '503': - description: Lock service unavailable + description: | + Volcano could not check whether a restore is running, and will not + rotate a credential a restore might be about to replace. Retry. content: application/json: schema: $ref: '#/components/schemas/Error' - delete: + /projects/{id}/databases/{databaseName}/type: + patch: tags: - - Locks - summary: Release a project lock - description: Releases a lease only when the supplied lock token still owns it. - operationId: releaseProjectLock + - Databases + summary: Update database size + description: | + Change the size tier of a database. This may briefly interrupt active connections. + + **Available sizes:** + - `volcano-db-xs`: Up to ~1GB RAM - Development, small apps + - `volcano-db-s`: Up to ~4GB RAM - Production-ready, light traffic + - `volcano-db-m`: Up to ~8GB RAM - Medium traffic applications + - `volcano-db-l`: Up to ~16GB RAM - High traffic, larger datasets + - `volcano-db-xl`: Up to ~32GB RAM - Heavy workloads + - `volcano-db-2xl`: Up to ~64GB RAM - Enterprise-scale + operationId: updateDatabaseType security: - - ServiceRoleKey: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/LockKey' - - $ref: '#/components/parameters/LockToken' - - $ref: '#/components/parameters/LockRequestId' + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DatabaseName' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateDatabaseTypeRequest' responses: - '204': - description: Lease released + '200': + description: Database type updated + content: + application/json: + schema: + $ref: '#/components/schemas/Database' '400': - description: Invalid lock key or token + description: Invalid database type content: application/json: schema: $ref: '#/components/schemas/Error' '401': - description: Missing or invalid credentials + description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' '403': - description: A non-service credential was supplied or the service key lacks `locks.manage` + description: Access denied or the requested size exceeds the plan allowance (code plan_required) content: application/json: schema: $ref: '#/components/schemas/Error' - '409': - description: The lease is owned by another token + '404': + description: Database not found content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - description: Project lock request limit exceeded - headers: - Retry-After: - description: Seconds until the current fixed-minute window ends. + '409': + description: | + The database is not active — being provisioned, deleted, or + restored. Compute can only be changed while it is active. + content: + application/json: schema: - type: integer + $ref: '#/components/schemas/Error' + '500': + description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' '503': - description: Lock service unavailable + description: | + Volcano could not check whether a restore is running, and will not + reconfigure compute a restore might be moving. Retry. content: application/json: schema: $ref: '#/components/schemas/Error' - /locks/{key}: + /projects/{id}/databases/{databaseName}/stats: get: tags: - - Locks - summary: Read a project lock + - Databases + summary: Get database consumption metrics description: | - Reports whether the lock is currently held, when its lease expires, and the - holder's fencing token. `held` follows takeover eligibility rather than raw - expiry, so `held: false` means an acquire would succeed now. No lock token is - required, making this usable for monitoring and recovery. - operationId: getProjectLock + Retrieve consumption metrics including storage, compute time, and data transfer. + Metrics are aggregated at the project level. Defaults to last 24 hours. + + **Note:** Advanced metrics require an upgraded plan. + operationId: getDatabaseStats security: - - ServiceRoleKey: [] + - UserToken: [] + - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/LockKey' - - $ref: '#/components/parameters/LockRequestId' + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/DatabaseName' + - name: from + in: query + required: false + schema: + type: string + format: date-time + description: Start time in RFC3339 format (e.g., "2024-01-01T00:00:00Z"). Defaults to 24 hours ago. + - name: to + in: query + required: false + schema: + type: string + format: date-time + description: End time in RFC3339 format (e.g., "2024-01-02T00:00:00Z"). Defaults to now. + - name: granularity + in: query + required: false + schema: + type: string + enum: + - hourly + - daily + - monthly + default: hourly + description: Level of detail for metrics aggregation responses: '200': - description: Current lock state + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/ProjectLockState' + $ref: '#/components/schemas/DatabaseStats' '400': - description: Invalid lock key + description: Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' - '401': - description: Missing or invalid credentials + '404': + description: Database not found content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: A non-service credential was supplied or the service key lacks `locks.manage` + '503': + description: Database metrics not available or requires upgraded plan content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - description: Project lock request limit exceeded + /databases/{databaseName}/query/ping: + post: + tags: + - Database Queries + summary: Database connectivity probe (REST API) + description: | + Connectivity probe that runs a fixed `SELECT 1` through pgproxy, using the + same authentication, status/bandwidth gating, and metering as the other + `/query/*` endpoints. + + Unlike those endpoints, ping takes **no request body** and performs **no + table-name validation**, so it works on any database — including a freshly + provisioned, empty one. It is a real committed round-trip through pgproxy, + so a `200` means the database is reachable and queryable. Used by the + dashboard's database connection test. + operationId: queryDatabasePing + security: + - AuthUserAccessToken: [] + parameters: + - $ref: '#/components/parameters/DatabaseName' + responses: + '200': + description: Database is reachable headers: - Retry-After: - description: Seconds until the current fixed-minute window ends. + X-Volcano-Proxy-Ms: + $ref: '#/components/headers/DatabaseQueryProxyMs' + X-Volcano-Proxy-Handler-Ms: + $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' + X-Volcano-Compute-Ms: + $ref: '#/components/headers/DatabaseQueryComputeMs' + content: + application/json: schema: - type: integer + $ref: '#/components/schemas/DatabaseQueryResult' + example: + data: + - ?column?: 1 + count: 1 + '401': + description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: Lock service unavailable + '403': + description: Access denied. A service key whose `permissions` leave out `*` is refused with `service key scope does not include database access` once Volcano applies service key scopes to the database API. content: application/json: schema: $ref: '#/components/schemas/Error' - delete: + '404': + description: Database not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + $ref: '#/components/responses/DatabaseQueryCapExceeded' + /databases/{databaseName}/query/select: + post: tags: - - Locks - summary: Force release a project lock + - Database Queries + summary: Query database with SELECT (REST API) description: | - Drops the lease whatever token holds it, for recovering a lock whose holder - died without releasing. Use `DELETE /locks/{key}/lease` for normal release. + Query your database using a simple REST API - no SQL required! - This breaks mutual exclusion by itself: the previous holder keeps working - until its own renewal fails. Guard the protected resource with the lease's - `fencing_token`, which the next acquisition raises, so a write from the - displaced holder can be rejected. Succeeds when the lock is already absent. - operationId: forceReleaseProjectLock + **Authentication:** Requires auth user access token (from signup/signin) + + **Row-Level Security:** Applied on tables with RLS enabled. A table without RLS returns every row your role is granted + + **Use Cases:** + - Query from browser/mobile apps + - Simple data retrieval + - Filtered searches with sorting and pagination + + **Note:** For complex queries (JOINs, CTEs), use functions with direct SQL + operationId: queryDatabaseSelect security: - - ServiceRoleKey: [] + - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/LockKey' - - $ref: '#/components/parameters/LockRequestId' + - $ref: '#/components/parameters/DatabaseName' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseSelectRequest' responses: - '204': - description: Lock released - '400': - description: Invalid lock key + '200': + description: Query successful + headers: + X-Volcano-Proxy-Ms: + $ref: '#/components/headers/DatabaseQueryProxyMs' + X-Volcano-Proxy-Handler-Ms: + $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' + X-Volcano-Compute-Ms: + $ref: '#/components/headers/DatabaseQueryComputeMs' content: application/json: schema: - $ref: '#/components/schemas/Error' - '401': - description: Missing or invalid credentials + $ref: '#/components/schemas/DatabaseQueryResult' + example: + data: + - id: uuid-123 + title: My Post + content: Post content + status: published + views: 150 + created_at: '2026-01-13T10:00:00Z' + count: 1 + '400': + description: Invalid query content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: A non-service credential was supplied or the service key lacks `locks.manage` + '401': + description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' - '429': - description: Project lock request limit exceeded - headers: - Retry-After: - description: Seconds until the current fixed-minute window ends. - schema: - type: integer + '403': + description: Access denied. A service key whose `permissions` leave out `*` is refused with `service key scope does not include database access` once Volcano applies service key scopes to the database API. content: application/json: schema: $ref: '#/components/schemas/Error' - '503': - description: Lock service unavailable + '404': + description: Database not found content: application/json: schema: $ref: '#/components/schemas/Error' - /storage/{bucketName}/move: + '429': + $ref: '#/components/responses/DatabaseQueryCapExceeded' + /databases/{databaseName}/query/insert: post: tags: - - Storage Objects - summary: Move/rename an object - operationId: moveStorageObject + - Database Queries + summary: Insert data into database (REST API) + description: | + Insert new rows into your database using REST API. + + **Authentication:** Requires auth user access token + + **Auto-set user_id:** If your table has a trigger using `auth.uid()`, + user_id will be automatically set to the authenticated user + + **Security:** Row-Level Security policies are enforced + operationId: queryDatabaseInsert security: - - ServiceRoleKey: [] - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/BucketName' + - $ref: '#/components/parameters/DatabaseName' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/StorageMoveRequest' + $ref: '#/components/schemas/DatabaseInsertRequest' responses: '200': - description: Object moved + description: Insert successful + headers: + X-Volcano-Proxy-Ms: + $ref: '#/components/headers/DatabaseQueryProxyMs' + X-Volcano-Proxy-Handler-Ms: + $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' + X-Volcano-Compute-Ms: + $ref: '#/components/headers/DatabaseQueryComputeMs' content: application/json: schema: - $ref: '#/components/schemas/StorageObject' - '403': - description: Access denied by storage policy - '429': - $ref: '#/components/responses/BandwidthCapExceeded' - /storage/{bucketName}/copy: + $ref: '#/components/schemas/DatabaseQueryResult' + example: + data: + - id: uuid-123 + title: My New Post + content: This is the content + status: draft + user_id: user-uuid + created_at: '2026-01-13T10:00:00Z' + count: 1 + '400': + description: Invalid request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Access denied. A service key whose `permissions` leave out `*` is refused with `service key scope does not include database access` once Volcano applies service key scopes to the database API. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Database not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + $ref: '#/components/responses/DatabaseQueryCapExceeded' + /databases/{databaseName}/query/update: post: tags: - - Storage Objects - summary: Copy an object - operationId: copyStorageObject + - Database Queries + summary: Update data in database (REST API) + description: | + Update existing rows in your database using REST API. + + **Security:** Row-Level Security ensures you can only update data you have access to + + **Safety:** Requires at least one filter to prevent accidental mass updates. A + request with no `filters` is rejected with `400` (mirrors delete). This matters + for service-key queries, which run with full access and bypass RLS. + + **Note:** If RLS blocks the update, an empty result is returned (not an error) + operationId: queryDatabaseUpdate security: - - ServiceRoleKey: [] - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/BucketName' + - $ref: '#/components/parameters/DatabaseName' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/StorageCopyRequest' + $ref: '#/components/schemas/DatabaseUpdateRequest' responses: - '201': - description: Object copied + '200': + description: Update successful + headers: + X-Volcano-Proxy-Ms: + $ref: '#/components/headers/DatabaseQueryProxyMs' + X-Volcano-Proxy-Handler-Ms: + $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' + X-Volcano-Compute-Ms: + $ref: '#/components/headers/DatabaseQueryComputeMs' content: application/json: schema: - $ref: '#/components/schemas/StorageObject' + $ref: '#/components/schemas/DatabaseQueryResult' + example: + data: + - id: post-uuid + title: Updated Title + status: published + updated_at: '2026-01-13T10:05:00Z' + count: 1 + '400': + description: Invalid request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '403': - description: Access denied by storage policy + description: Access denied. A service key whose `permissions` leave out `*` is refused with `service key scope does not include database access` once Volcano applies service key scopes to the database API. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Database not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '429': - $ref: '#/components/responses/BandwidthCapExceeded' - /storage/{bucketName}/{path}: + $ref: '#/components/responses/DatabaseQueryCapExceeded' + /databases/{databaseName}/query/delete: post: tags: - - Storage Objects - summary: Upload a file or create resumable session + - Database Queries + summary: Delete data from database (REST API) description: | - Unified endpoint for file uploads. Behavior depends on Content-Type and headers: - - **Simple Upload (multipart/form-data):** - Upload a complete file in a single request. Best for files under 100MB. + Delete rows from your database using REST API. - **Create Resumable Session (application/json):** - Create a session for chunked uploads. Best for large files or unreliable networks. - Requires: `Content-Type: application/json` with body `{"filename": "...", "content_type": "...", "total_size": ...}` + **Safety:** Requires at least one filter to prevent accidental mass deletions - **Complete Resumable Session:** - Complete a session after all parts are uploaded. - Requires: `X-Upload-Session` header with session ID and `X-Upload-Complete: true` header. + **Security:** Row-Level Security ensures you can only delete data you have access to - **Resumable Session Ownership:** - A session created with a user access token remains bound to that user. A session - created with an anon key remains bound to that exact anon key. Reuse the same - identity or anon key for part uploads, status, completion, and abort requests; - an ownership mismatch returns `404`. - operationId: uploadStorageObject + **Note:** If RLS blocks the delete, an empty result is returned (not an error) + operationId: queryDatabaseDelete security: - - AnonKey: [] - - ServiceRoleKey: [] - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/BucketName' - - name: path - in: path - required: true - description: Object path within bucket - schema: - type: string - - name: X-Upload-Session - in: header - required: false - description: Upload session ID (for completing resumable uploads) - schema: - type: string - - name: X-Upload-Complete - in: header - required: false - description: Set to "true" to complete a resumable upload session - schema: - type: string - enum: - - 'true' + - $ref: '#/components/parameters/DatabaseName' requestBody: required: true content: - multipart/form-data: - schema: - type: object - required: - - file - properties: - file: - type: string - format: binary - description: File to upload (simple upload) application/json: schema: - $ref: '#/components/schemas/CreateUploadSessionRequest' + $ref: '#/components/schemas/DatabaseDeleteRequest' responses: '200': - description: Resumable upload completed (when X-Upload-Complete=true) + description: Delete successful + headers: + X-Volcano-Proxy-Ms: + $ref: '#/components/headers/DatabaseQueryProxyMs' + X-Volcano-Proxy-Handler-Ms: + $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' + X-Volcano-Compute-Ms: + $ref: '#/components/headers/DatabaseQueryComputeMs' content: application/json: schema: - $ref: '#/components/schemas/CompleteUploadSessionResponse' - '201': - description: File uploaded or session created + $ref: '#/components/schemas/DatabaseQueryResult' + example: + data: + - id: post-uuid + title: Deleted Post + count: 1 + '400': + description: Invalid request or missing filters content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/StorageObject' - - $ref: '#/components/schemas/CreateUploadSessionResponse' - '400': - description: | - Bad request. This can occur when: - - MIME type is not in the bucket's allowed_mime_types list - - File exceeds the bucket's configured file_size_limit - - File exceeds the global maximum upload size (5GB) - - Invalid request body or missing required fields + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '403': - description: Access denied by storage policy + description: Access denied. A service key whose `permissions` leave out `*` is refused with `service key scope does not include database access` once Volcano applies service key scopes to the database API. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Resumable upload session not found or not owned by this credential - '413': - description: | - File size exceeds plan-based limits. This occurs when: - - File exceeds the plan-based maximum file size (HOBBY or SUPERAGENT tier) - - The account on the HOBBY plan holds its file-storage allowance. - Enforcement is eventual: uploads are accepted until Volcano's - next allowance check sees the account at its allowance + description: Database not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '429': - $ref: '#/components/responses/BandwidthCapExceeded' - put: + $ref: '#/components/responses/DatabaseQueryCapExceeded' + /databases/{databaseName}/branches/{branchName}/query/ping: + post: tags: - - Storage Objects - summary: Upload a part of a resumable upload + - Database Queries + summary: Database connectivity probe (REST API) description: | - Upload a single part of a resumable upload session. + Connectivity probe that runs a fixed `SELECT 1` through pgproxy, using the + same authentication, status/bandwidth gating, and metering as the other + `/query/*` endpoints. - **Requirements:** - - Part numbers start at 1 - - All parts except the last must be at least 5MB - - Maximum part size is 25MB - - Parts can be uploaded in any order - - Re-uploading a part overwrites the previous upload - - Anonymous sessions must reuse the exact anon key that created the session - operationId: uploadPart + Unlike those endpoints, ping takes **no request body** and performs **no + table-name validation**, so it works on any database — including a freshly + provisioned, empty one. It is a real committed round-trip through pgproxy, + so a `200` means the database is reachable and queryable. Used by the + dashboard's database connection test. + + **Branch-targeted.** Runs against the named branch instead of the parent + database, using the branch's own credentials. The branch must be `active` + and unexpired. Nothing about this request can reach the parent's data. + operationId: queryDatabaseBranchPing security: - - AnonKey: [] - - ServiceRoleKey: [] - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/BucketName' - - name: path - in: path - required: true - description: Object path within bucket - schema: - type: string - - name: X-Upload-Session - in: header - required: true - description: Upload session ID - schema: - type: string - - name: X-Part-Number - in: header - required: true - description: Part number (1 to 10000) - schema: - type: integer - minimum: 1 - maximum: 10000 - requestBody: - required: true - content: - application/octet-stream: - schema: - type: string - format: binary + - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/BranchName' responses: '200': - description: Part uploaded + description: Database is reachable + headers: + X-Volcano-Proxy-Ms: + $ref: '#/components/headers/DatabaseQueryProxyMs' + X-Volcano-Proxy-Handler-Ms: + $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' + X-Volcano-Compute-Ms: + $ref: '#/components/headers/DatabaseQueryComputeMs' content: application/json: schema: - $ref: '#/components/schemas/UploadSessionPart' - '400': - description: Invalid part number or part data + $ref: '#/components/schemas/DatabaseQueryResult' + example: + data: + - ?column?: 1 + count: 1 + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '403': - description: Access denied + description: Access denied. A service key whose `permissions` leave out `*` is refused with `service key scope does not include database access` once Volcano applies service key scopes to the database API. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Session not found or not owned by this credential - get: + description: Database or branch not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + $ref: '#/components/responses/DatabaseQueryCapExceeded' + '503': + $ref: '#/components/responses/DatabaseBranchQueryUnavailable' + /databases/{databaseName}/branches/{branchName}/query/select: + post: tags: - - Storage Objects - summary: Download a file or get upload session status + - Database Queries + summary: Query database with SELECT (REST API) description: | - Download a file, or get the status of a resumable upload session. + Query your database using a simple REST API - no SQL required! - **File Download (default):** - Downloads the file at the specified path. + **Authentication:** Requires auth user access token (from signup/signin) - **Session Status (with X-Upload-Session header):** - Returns the status of a resumable upload session, including which parts have been uploaded. - Anonymous sessions must reuse the exact anon key that created the session. - operationId: downloadStorageObject + **Row-Level Security:** Applied on tables with RLS enabled. A table without RLS returns every row your role is granted + + **Use Cases:** + - Query from browser/mobile apps + - Simple data retrieval + - Filtered searches with sorting and pagination + + **Note:** For complex queries (JOINs, CTEs), use a function with direct SQL + + **Branch-targeted.** Runs against the named branch instead of the parent + database, using the branch's own credentials. The branch must be `active` + and unexpired. Nothing about this request can reach the parent's data. + operationId: queryDatabaseBranchSelect security: - - AnonKey: [] - - ServiceRoleKey: [] - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/BucketName' - - name: path - in: path - required: true - description: Object path within bucket - schema: - type: string - - name: Range - in: header - required: false - description: | - HTTP Range header for partial downloads. - Format: bytes=start-end or bytes=start- - Examples: bytes=0-1023, bytes=1000- - schema: - type: string - pattern: ^bytes=\d+-\d*$ - - name: X-Upload-Session - in: header - required: false - description: Upload session ID (to get session status instead of downloading) - schema: - type: string + - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/BranchName' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseSelectRequest' responses: '200': - description: File content or session status + description: Query successful headers: - Content-Type: - schema: - type: string - Content-Length: - schema: - type: integer - ETag: + X-Volcano-Proxy-Ms: + $ref: '#/components/headers/DatabaseQueryProxyMs' + X-Volcano-Proxy-Handler-Ms: + $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' + X-Volcano-Compute-Ms: + $ref: '#/components/headers/DatabaseQueryComputeMs' + content: + application/json: schema: - type: string + $ref: '#/components/schemas/DatabaseQueryResult' + example: + data: + - id: uuid-123 + title: My Post + content: Post content + status: published + views: 150 + created_at: '2026-01-13T10:00:00Z' + count: 1 + '400': + description: Invalid query content: - application/octet-stream: + application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: application/json: schema: - $ref: '#/components/schemas/UploadSessionStatusResponse' - '206': - description: Partial content (range request) - '400': - description: Invalid Range header format + $ref: '#/components/schemas/Error' '403': - description: Access denied by storage policy + description: Access denied. A service key whose `permissions` leave out `*` is refused with `service key scope does not include database access` once Volcano applies service key scopes to the database API. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Object or session not found, or session not owned by this credential + description: Database or branch not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '429': - $ref: '#/components/responses/BandwidthCapExceeded' - delete: + $ref: '#/components/responses/DatabaseQueryCapExceeded' + '503': + $ref: '#/components/responses/DatabaseBranchQueryUnavailable' + /databases/{databaseName}/branches/{branchName}/query/insert: + post: tags: - - Storage Objects - summary: Delete a file or abort upload session + - Database Queries + summary: Insert data into database (REST API) description: | - Delete a file, or abort a resumable upload session. + Insert new rows into your database using REST API. - **File Delete (default):** - Deletes the file at the specified path. + **Authentication:** Requires auth user access token - **Abort Session (with X-Upload-Session header):** - Aborts a resumable upload session and cleans up any uploaded parts. - Anonymous sessions must reuse the exact anon key that created the session. - operationId: deleteStorageObject + **Auto-set user_id:** If your table has a trigger using `auth.uid()`, + user_id will be automatically set to the authenticated user + + **Security:** Row-Level Security policies are enforced + + **Branch-targeted.** Runs against the named branch instead of the parent + database, using the branch's own credentials. The branch must be `active` + and unexpired. Nothing about this request can reach the parent's data. + operationId: queryDatabaseBranchInsert security: - - AnonKey: [] - - ServiceRoleKey: [] - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/BucketName' - - name: path - in: path - required: true - description: Object path within bucket - schema: - type: string - - name: X-Upload-Session - in: header - required: false - description: Upload session ID (to abort session instead of deleting file) - schema: - type: string + - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/BranchName' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseInsertRequest' responses: '200': - description: Object deleted or session aborted - '403': - description: Access denied by storage policy - '404': - description: Object or session not found, or session not owned by this credential - '429': - $ref: '#/components/responses/BandwidthCapExceeded' - /storage/{bucketName}/{path}/visibility: - patch: - tags: - - Storage Objects - summary: Update file visibility (public/private) - description: | - Change whether a file is publicly accessible. Only the file owner or a service key can change visibility. - If the bucket defines UPDATE policies, the owner must also satisfy one of them. - - - Public files can be downloaded with just an anon key (no user authentication required) - - Private files (default) require authentication and must pass policy checks - - All downloads go through the Volcano API - there is no direct access to the underlying store - operationId: updateStorageObjectVisibility - security: - - ServiceRoleKey: [] + description: Insert successful + headers: + X-Volcano-Proxy-Ms: + $ref: '#/components/headers/DatabaseQueryProxyMs' + X-Volcano-Proxy-Handler-Ms: + $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' + X-Volcano-Compute-Ms: + $ref: '#/components/headers/DatabaseQueryComputeMs' + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseQueryResult' + example: + data: + - id: uuid-123 + title: My New Post + content: This is the content + status: draft + user_id: user-uuid + created_at: '2026-01-13T10:00:00Z' + count: 1 + '400': + description: Invalid request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Access denied. A service key whose `permissions` leave out `*` is refused with `service key scope does not include database access` once Volcano applies service key scopes to the database API. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Database or branch not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + $ref: '#/components/responses/DatabaseQueryCapExceeded' + '503': + $ref: '#/components/responses/DatabaseBranchQueryUnavailable' + /databases/{databaseName}/branches/{branchName}/query/update: + post: + tags: + - Database Queries + summary: Update data in database (REST API) + description: | + Update existing rows in your database using REST API. + + **Security:** Row-Level Security ensures you can only update data you have access to + + **Safety:** Requires at least one filter to prevent accidental mass updates. A + request with no `filters` is rejected with `400` (mirrors delete). This matters + for service-key queries, which run with full access and bypass RLS. + + **Note:** If RLS blocks the update, an empty result is returned (not an error) + + **Branch-targeted.** Runs against the named branch instead of the parent + database, using the branch's own credentials. The branch must be `active` + and unexpired. Nothing about this request can reach the parent's data. + operationId: queryDatabaseBranchUpdate + security: - AuthUserAccessToken: [] parameters: - - $ref: '#/components/parameters/BucketName' - - name: path - in: path - required: true - description: Object path within bucket - schema: - type: string + - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/BranchName' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/StorageVisibilityRequest' + $ref: '#/components/schemas/DatabaseUpdateRequest' responses: '200': - description: Visibility updated + description: Update successful + headers: + X-Volcano-Proxy-Ms: + $ref: '#/components/headers/DatabaseQueryProxyMs' + X-Volcano-Proxy-Handler-Ms: + $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' + X-Volcano-Compute-Ms: + $ref: '#/components/headers/DatabaseQueryComputeMs' content: application/json: schema: - $ref: '#/components/schemas/StorageObject' + $ref: '#/components/schemas/DatabaseQueryResult' + example: + data: + - id: post-uuid + title: Updated Title + status: published + updated_at: '2026-01-13T10:05:00Z' + count: 1 + '400': + description: Invalid request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '403': - description: Not the file owner or denied by the bucket's UPDATE policies + description: Access denied. A service key whose `permissions` leave out `*` is refused with `service key scope does not include database access` once Volcano applies service key scopes to the database API. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Object not found - /public/{projectId}/{bucketName}/{path}: - get: + description: Database or branch not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + $ref: '#/components/responses/DatabaseQueryCapExceeded' + '503': + $ref: '#/components/responses/DatabaseBranchQueryUnavailable' + /databases/{databaseName}/branches/{branchName}/query/delete: + post: tags: - - Storage Objects - summary: Download a public file (no authentication required) + - Database Queries + summary: Delete data from database (REST API) description: | - Download a file that has been marked as public. This endpoint requires NO authentication. - - **Access Requirements:** - - The file must have `is_public: true` set via the visibility endpoint - - Private files will return 403 Forbidden + Delete rows from your database using REST API. - **Use Cases:** - - Shareable public URLs for profile pictures, public documents, etc. - - Embedding public files on external websites - - Direct linking without requiring SDK or authentication + **Safety:** Requires at least one filter to prevent accidental mass deletions - **URL Format:** - ``` - GET /public/{projectId}/{bucketName}/{path} - ``` + **Security:** Row-Level Security ensures you can only delete data you have access to - **Example:** - ``` - https://api.volcano.dev/public/abc123/avatars/user-photo.jpg - ``` + **Note:** If RLS blocks the delete, an empty result is returned (not an error) - **CORS:** - This endpoint allows all origins since the file is already public. - operationId: downloadPublicFile + **Branch-targeted.** Runs against the named branch instead of the parent + database, using the branch's own credentials. The branch must be `active` + and unexpired. Nothing about this request can reach the parent's data. + operationId: queryDatabaseBranchDelete + security: + - AuthUserAccessToken: [] parameters: - - name: projectId - in: path - required: true - description: Project ID - schema: - type: string - format: uuid - - $ref: '#/components/parameters/BucketName' - - name: path - in: path - required: true - description: Object path within bucket - schema: - type: string + - $ref: '#/components/parameters/DatabaseName' + - $ref: '#/components/parameters/BranchName' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseDeleteRequest' responses: '200': - description: File content + description: Delete successful + headers: + X-Volcano-Proxy-Ms: + $ref: '#/components/headers/DatabaseQueryProxyMs' + X-Volcano-Proxy-Handler-Ms: + $ref: '#/components/headers/DatabaseQueryProxyHandlerMs' + X-Volcano-Compute-Ms: + $ref: '#/components/headers/DatabaseQueryComputeMs' content: - '*/*': + application/json: schema: - type: string - format: binary - '206': - description: Partial content (range request) + $ref: '#/components/schemas/DatabaseQueryResult' + example: + data: + - id: post-uuid + title: Deleted Post + count: 1 + '400': + description: Invalid request or missing filters + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Access denied. A service key whose `permissions` leave out `*` is refused with `service key scope does not include database access` once Volcano applies service key scopes to the database API. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '404': - description: Not found (file doesn't exist or is not public) + description: Database or branch not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '429': - $ref: '#/components/responses/BandwidthCapExceeded' - /health: + $ref: '#/components/responses/DatabaseQueryCapExceeded' + '503': + $ref: '#/components/responses/DatabaseBranchQueryUnavailable' + /databases/regions: get: tags: - - System - summary: Health check endpoint - description: Returns server health status. Used for load balancer and monitoring checks. - operationId: healthCheck + - Databases + summary: List platform-supported regions for database provisioning + operationId: listDatabaseRegions + description: | + Returns the regions enabled for database provisioning in this platform environment. + These are the same regions offered for function deployment, and the only values + the `region` field of a database accepts. + This is a public endpoint that doesn't require authentication. responses: '200': - description: Server is healthy + description: List of platform-supported regions content: - text/plain: + application/json: schema: - type: string - example: OK - /capabilities: - get: + type: array + items: + type: object + properties: + id: + type: string + example: us-east-1 + description: Region identifier for API usage + name: + type: string + example: US East (N. Virginia) + description: Human-readable region location + /databases/postgres-versions: + get: tags: - - System - summary: List capabilities + - Databases + summary: List available PostgreSQL versions + operationId: listPostgresVersions description: | - Lists which product capabilities accept new work in this environment. Check it - to decide what to offer, instead of calling a route to see whether it fails. - - | ID | Covers | - | --- | --- | - | `sandboxes` | The Sandbox API: presets, templates, sessions, and executions | - | `sandboxes.sessions` | Starting and resuming sessions, and one-shot executions | - | `sandboxes.custom_templates` | Deploying a custom template; its validation waits while `sandboxes.sessions` is unavailable | - | `issues` | The Issues API: listing, reading, and updating grouped runtime errors | - | `autofix` | The Autofix API: a project's AI diagnosis and fix settings | - | `autofix.managed_models` | Turning autofix on with Volcano-managed models instead of your own API key | - - A capability missing from the list is unavailable, and a capability under - another, such as `sandboxes.sessions`, is unavailable whenever its parent is. - While a capability is unavailable, requests that start new work answer `404` - or `400` with code `feature_unavailable`; refresh this list when you receive - that code. Reading, deleting, and terminating what already exists keep - working unless the whole feature is absent from the environment. Every caller - in an environment gets the same answer. - operationId: listCapabilities - security: [] + Returns the PostgreSQL major versions a database can be created on, + newest first. Local mode lists only the version its server runs. + This is a public endpoint that doesn't require authentication. responses: '200': - description: Capabilities in this environment + description: List of available PostgreSQL versions content: application/json: schema: - $ref: '#/components/schemas/CapabilityList' - example: - data: - - id: sandboxes - status: available - - id: sandboxes.sessions - status: available - - id: sandboxes.custom_templates - status: unavailable - - id: issues - status: available - - id: autofix - status: available - - id: autofix.managed_models - status: unavailable - /openapi.json: + type: array + items: + type: object + properties: + version: + type: string + example: '18' + description: PostgreSQL major version number + name: + type: string + example: PostgreSQL 18 + description: Human-readable version name + default: + type: boolean + description: True on the version to preselect for a new database; absent on the others + recommended: + type: boolean + description: True on the version recommended for new databases; absent on the others + deprecated: + type: boolean + description: Whether this version is deprecated (approaching EOL) + /functions/runtimes: get: tags: - - System - summary: Fetch the OpenAPI specification as JSON - description: | - Returns this specification as a self-contained JSON document, with every - reference resolved. It is generated from the same document the server - validates requests against, so a client generated from it cannot - describe a different API than the one that answers. - - No credential is required: a client generator fetches this by URL before - its user has a token, and every path here is already published in the - API reference. - - The response carries a strong `ETag`; send it back as `If-None-Match` to - get `304 Not Modified` instead of the whole document. - operationId: getOpenAPISpecJSON + - Functions + summary: List supported function runtimes + operationId: listFunctionRuntimes security: [] - parameters: - - $ref: '#/components/parameters/IfNoneMatch' + description: | + Returns the public function runtime catalog: every runtime a deploy accepts, its display + label for runtime pickers, language defaults, durable capability, and local source packaging + metadata for deployments. + This is a public endpoint that doesn't require authentication. responses: '200': - description: The OpenAPI specification - headers: - ETag: - $ref: '#/components/headers/ETag' + description: Supported function runtimes content: application/json: schema: - $ref: '#/components/schemas/OpenAPISpecDocument' - '304': - $ref: '#/components/responses/OpenAPISpecNotModified' - '429': - $ref: '#/components/responses/OpenAPISpecThrottled' - head: - tags: - - System - summary: Check the JSON OpenAPI specification - description: | - The headers `GET /openapi.json` would return, so a cache can pick up the - current `ETag` without transferring the document. - operationId: headOpenAPISpecJSON - security: [] - parameters: - - $ref: '#/components/parameters/IfNoneMatch' - responses: - '200': - $ref: '#/components/responses/OpenAPISpecHeaders' - '304': - $ref: '#/components/responses/OpenAPISpecNotModified' - '429': - $ref: '#/components/responses/OpenAPISpecThrottled' - /openapi.yaml: + $ref: '#/components/schemas/FunctionRuntimesResponse' + /functions/regions: get: tags: - - System - summary: Fetch the OpenAPI specification as YAML - description: | - The same document as `/openapi.json`, serialized as YAML for tools that - prefer it. See that operation for caching and authentication notes. - operationId: getOpenAPISpecYAML + - Functions + summary: List available regions for function deployment + operationId: listFunctionRegions security: [] - parameters: - - $ref: '#/components/parameters/IfNoneMatch' + description: | + Returns the configured regions where functions can be deployed, each annotated + with a human-readable label and country flag emoji for use in UI pickers. + This is a public endpoint that doesn't require authentication. responses: '200': - description: The OpenAPI specification - headers: - ETag: - $ref: '#/components/headers/ETag' + description: Available function deployment regions content: - application/yaml: + application/json: schema: - $ref: '#/components/schemas/OpenAPISpecDocument' - '304': - $ref: '#/components/responses/OpenAPISpecNotModified' - '429': - $ref: '#/components/responses/OpenAPISpecThrottled' - head: + type: array + items: + $ref: '#/components/schemas/FunctionRegion' + /projects/{id}/variables/{name}: + get: tags: - - System - summary: Check the YAML OpenAPI specification + - Variables + summary: Get variable by name description: | - The headers `GET /openapi.yaml` would return, so a cache can pick up the - current `ETag` without transferring the document. - operationId: headOpenAPISpecYAML - security: [] + Returns a project-level environment variable used by deployed functions and frontends. + operationId: getVariable + security: + - UserToken: [] + - ProjectAccessToken: [] parameters: - - $ref: '#/components/parameters/IfNoneMatch' + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/VariableName' responses: '200': - $ref: '#/components/responses/OpenAPISpecHeaders' - '304': - $ref: '#/components/responses/OpenAPISpecNotModified' - '429': - $ref: '#/components/responses/OpenAPISpecThrottled' - /mcp: - post: + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/Variable' + '404': + description: Variable not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + put: tags: - - System - summary: Model Context Protocol endpoint + - Variables + summary: Update a variable description: | - Streamable-HTTP MCP endpoint: one JSON-RPC 2.0 object per request, one - response per request. There is no server-to-client stream, so a `GET` - returns `405`, and a batched array is rejected. - - Authenticated with a **project access token**. The endpoint takes its - project from the credential, so a platform token is refused with `403` — - it names no project, and letting a tool argument choose one would hand an - agent its own blast radius. - - Scope carries over from the REST API. A `read_only` token is not offered - mutating tools or credential-returning reads, and is refused if it calls - one anyway. Revoking the token ends MCP access on the same path it ends - API access. - - Methods: `initialize`, `notifications/initialized`, `ping`, - `tools/list`, `tools/call`. See the - [MCP guide](https://docs.volcano.dev/platform/interfaces/mcp) for the - tool surface and client configuration. - operationId: callMCP + Updates a project-level environment variable and triggers asynchronous propagation + to deployed functions and frontends in the project's configured regions. + operationId: updateVariable security: + - UserToken: [] - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/VariableName' requestBody: required: true content: application/json: schema: - type: object - description: A JSON-RPC 2.0 request object. - required: - - jsonrpc - - method - properties: - jsonrpc: - type: string - enum: - - '2.0' - method: - type: string - description: The MCP method to call. - id: - description: | - Request identifier, echoed verbatim. Omit it to send a - notification, which is answered with `202` and no body. - oneOf: - - type: string - - type: integer - params: - type: object - additionalProperties: true + $ref: '#/components/schemas/UpdateVariableRequest' responses: '200': - description: A JSON-RPC response object + description: Variable updated content: application/json: schema: - type: object - required: - - jsonrpc - - id - properties: - jsonrpc: - type: string - enum: - - '2.0' - id: - description: Echoes the request's id. Null when the request could not be read well enough to determine one. - nullable: true - oneOf: - - type: string - - type: integer - result: - type: object - additionalProperties: true - error: - type: object - required: - - code - - message - properties: - code: - type: integer - message: - type: string - '202': - description: A notification was accepted; there is no body - '401': - description: Not authenticated + $ref: '#/components/schemas/Variable' + '400': + description: Invalid or reserved variable name content: application/json: schema: $ref: '#/components/schemas/Error' - '403': - description: | - The credential is valid but may not use this endpoint — most often a - platform token, which names no project. + '404': + description: Variable not found content: application/json: schema: $ref: '#/components/schemas/Error' - '413': - description: The JSON-RPC frame exceeds the 1 MiB limit -components: - headers: - ETag: - description: | - Strong validator for the returned document. Send it back as `If-None-Match` - to revalidate without transferring the document again. - required: true - schema: - type: string - example: '"9f2c1e0b5a"' - DatabaseQueryProxyMs: - description: | - Milliseconds Volcano spent before running the query, counted from the - request arriving: authenticating the caller, validating the request, - resolving the database, and building the SQL. Does not include query - execution. Also present when the query itself failed. - schema: - type: integer - minimum: 0 - DatabaseQueryProxyHandlerMs: - description: | - The part of `X-Volcano-Proxy-Ms` spent in the query endpoint itself. - Subtract it from `X-Volcano-Proxy-Ms` to see what authentication and - request validation cost. Also present when the query itself failed. - schema: - type: integer - minimum: 0 - DatabaseQueryComputeMs: - description: | - Milliseconds the database took to run the query and return its rows. - Does not include Volcano's preparation. Also present when the query - itself failed. - schema: - type: integer - minimum: 0 - securitySchemes: - AnonKey: - type: http - scheme: bearer - bearerFormat: JWT - description: | - Project-specific public key for frontend authentication. - Required for signup, signin, refresh, and logout endpoints. - Get from Project Settings → Authentication → Anon Keys. - Safe to expose in frontend code (scoped to project, limited permissions). - AuthUserAccessToken: - type: http - scheme: bearer - bearerFormat: JWT - description: | - Auth user access token obtained from signup/signin. - Used for authenticated function invocation and user profile access. - Functions invoked with access tokens receive user context in event.__volcano_auth. - Expires after configured lifetime (default: 1 hour). - ServiceRoleKey: - type: http - scheme: bearer - bearerFormat: JWT + '409': + description: '`code: function_served_by_candidate` - a promoted preview serves a function whose environment this write changes; the preview keeps the variables it was built with and the write would reach only the function''s own build, so roll the function back to its own build, or deploy it, first.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Private variable membership writes are disabled during rollout + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + tags: + - Variables + summary: Delete a variable description: | - Service role key for admin operations. - **WARNING:** Bypasses Row-Level Security - backend use only! - Create via POST /projects/{id}/service-keys. - Used for function invocation with full database access. - UserToken: - type: http - scheme: bearer - bearerFormat: opaque + Deletes a project-level environment variable and triggers asynchronous propagation + of the removal to deployed functions and frontends in the project's configured regions. + operationId: deleteVariable + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/VariableName' + responses: + '204': + description: Variable deleted + '404': + description: Variable not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: '`code: function_served_by_candidate` - a promoted preview serves a function whose environment this write changes; the preview keeps the variables it was built with and the write would reach only the function''s own build, so roll the function back to its own build, or deploy it, first.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/password-policy: + get: + tags: + - Authentication + summary: Get the effective password policy description: | - Platform token, which acts on every project in your account. - Obtain one by running `volcano login`, or from the dashboard. - - For CI, scripts, and agents, prefer a project access token - (`pt-`) instead: it reaches only the project it was created in, - so a leak does not expose the rest of your account. See the - ProjectAccessToken scheme. - ProjectAccessToken: - type: http - scheme: bearer - bearerFormat: opaque + Returns the backend-enforced password bounds and compromised-password + screening status for the project identified by the anon key. A valid + anon key is required, but no route-specific auth permission is needed. + operationId: authGetPasswordPolicy + security: + - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' + responses: + '200': + description: Effective password policy + content: + application/json: + schema: + $ref: '#/components/schemas/AuthPasswordPolicy' + '401': + description: Invalid, missing, or revoked anon key; or invalid auth proxy metadata + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project or auth configuration not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/signup: + post: + tags: + - Authentication + summary: Sign up a new auth user description: | - Project access token, scoped to a single project. Starts with `pt-`. - - Accepted on that project's control-plane routes and refused - everywhere else, including account-wide endpoints and any other - project. A `read_only` token additionally refuses mutations. + Create a new end-user account. The project is determined from the anon key. + Requires project-specific anon key in Authorization header. - Create one with POST /projects/{id}/access-tokens using a platform - token. The secret is returned once and is not recoverable, so a - project access token cannot create, list, read, or revoke project - access tokens. - parameters: - BackupName: - name: backupName - in: path - required: true - schema: - type: string - minLength: 1 - maxLength: 128 - description: | - Backup name, unique within the database, exactly as returned by the list - endpoint. + **Session-less**: signup never issues a session. On success it returns a + uniform acknowledgement (`AuthSignupResponse`) with no tokens; the client + obtains a session with a subsequent `POST /auth/signin`. If email confirmation + is enabled for the project, a confirmation email is sent and + `confirmation_required` is `true`. - Deliberately looser than the names you can create: a backup made by a - schedule is named for you, so reading or deleting one accepts any name a - backup can have. - BranchName: - name: branchName - in: path - required: true - schema: - type: string - pattern: ^[a-z0-9_]+$ - maxLength: 64 - description: Branch name (unique within the parent database, lowercase letters, numbers, and underscores only) - BucketName: - name: bucketName - in: path - required: true - schema: - type: string - pattern: ^[a-zA-Z0-9_-]+$ - minLength: 1 - maxLength: 64 - description: Storage bucket name - Cursor: - name: cursor - in: query - required: false - schema: - type: string - description: | - Opaque keyset pagination cursor from a previous response's `next_cursor` - — pages forward. Mutually exclusive with `page` and `ending_before`; - combining them returns 400. When supplied, the request's `search` and - `limit` must match the values bound to the cursor or the request returns 400. - EndingBefore: - name: ending_before - in: query - required: false - schema: - type: string - description: | - Opaque keyset pagination cursor from a previous response's `prev_cursor` - — pages backward (the page immediately preceding this cursor). Mutually - exclusive with `page` and `cursor`; combining them returns 400. `search` - and `limit` must match the values bound to the cursor or the request - returns 400. - DatabaseName: - name: databaseName - in: path - required: true - schema: - type: string - pattern: ^[a-z0-9_]+$ - maxLength: 64 - description: Database name (unique within project, lowercase letters, numbers, and underscores only) - DeploymentId: - name: deploymentId - in: path - required: true - schema: - type: string - format: uuid - description: Frontend deployment ID - VariableEnvironmentId: - name: environmentId - in: path - required: true - schema: - type: string - format: uuid - description: Variable Environment ID - FrontendId: - name: frontendId - in: path - required: true - schema: - type: string - format: uuid - description: Frontend ID - FrontendFunctionRouteId: - name: routeId - in: path - required: true - schema: - type: string - format: uuid - description: Frontend Function route ID - FunctionId: - name: functionId - in: path - required: true - schema: - type: string - format: uuid - description: Function ID - DurableFunctionId: - name: functionId - in: path - required: true - schema: - type: string - description: Durable function ID, or its name within the project - DurableExecutionId: - name: executionId - in: path - required: true - schema: - type: string - format: uuid - description: Durable execution ID - DurableApprovalId: - name: approvalId - in: path - required: true - schema: - type: string - format: uuid - description: Durable approval ID - IssueId: - name: issueId - in: path - required: true - schema: - type: string - format: uuid - description: Issue ID - IssueCursor: - name: cursor - in: query - required: false - schema: - type: string - description: | - Opaque cursor from a previous response's `next_cursor`. Pages forward; - keep the same filters while paging. - DurableApprovalFunctionFilter: - name: function - in: query - required: false - schema: - type: string - minLength: 1 - maxLength: 255 - description: | - Only approvals requested by this durable function, given by id or by - name. A name also matches approvals from a deleted function of that - name. - DurableMessageIdempotencyKey: - name: Idempotency-Key - in: header - required: false + **Anti-enumeration**: a signup for an already-registered email returns the + exact same `201` response as a fresh signup — it never returns `409` — so the + response cannot be used to discover which emails are registered. + operationId: authSignup + security: + - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - email + - password + properties: + email: + type: string + format: email + password: + type: string + description: | + Password validated after NFC normalization against the + policy returned by GET /auth/password-policy. + user_metadata: + type: object + additionalProperties: true + responses: + '201': + description: | + Signup acknowledged (session-less). Returned identically for a new + account and for an already-registered email (anti-enumeration). + content: + application/json: + schema: + $ref: '#/components/schemas/AuthSignupResponse' + '400': + description: Invalid input (bad email/password format) + '401': + description: | + Unauthorized - Invalid, tampered, revoked, or wrong-project anon key. + Also returned for invalid, repeated, or under-scoped auth proxy metadata + (`invalid auth proxy metadata`). + '403': + description: | + Forbidden - Signups disabled, anon key lacks signup permission, or the + email domain is not in `allowed_email_domains`. The internal + `anonymous.volcano.internal` and `volcano.local` domains are reserved + for anonymous accounts and for the debug accounts an earlier Builder + created (Volcano no longer creates them), and are refused whatever the + project allows. + '429': + description: Rate limit exceeded + '503': + description: Compromised-password screening is temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/signin: + post: + tags: + - Authentication + summary: Sign in an auth user description: | - Makes a send safe to retry. A repeat with a key the same sender has - used on the execution returns the first message and sends nothing. - Keys of different senders never collide. Up to 255 characters. - schema: - type: string - minLength: 1 - maxLength: 255 - DurableClientToken: - name: X-Volcano-Client-Token - in: header - required: false + Authenticate with email and password. Requires an anon key. + + Set `session_mode` to `cookie` to request HttpOnly refresh-token + storage. Cookie mode is honored only for an exact, credentialed CORS + origin on the same schemeful site as this API. Otherwise the response + retains the refresh token in its body. A frontend on its default + Volcano URL is cross-site with this API and so always gets the body + token. + operationId: authSignin + security: + - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - email + - password + properties: + email: + type: string + password: + type: string + session_mode: + type: string + enum: + - cookie + responses: + '200': + description: Signin successful + content: + application/json: + schema: + $ref: '#/components/schemas/AuthTokenResponse' + '400': + description: Invalid input (missing email/password) + '401': + description: | + Unauthorized - Invalid credentials, invalid/tampered/revoked anon key, + or account banned/deleted; or invalid auth proxy metadata + '403': + description: | + Forbidden - Email/password is turned off for the project + (`enable_email_password: false`), the anon key lacks signin + permission, or the email domain is not in `allowed_email_domains` + while `allowed_email_domains_mode` is `signup_and_signin`. Both the + account's canonical email (its primary identity) and the email signed + in with must be on the list. + '429': + description: Rate limit exceeded + /auth/refresh: + post: + tags: + - Authentication + summary: Refresh access token description: | - The `client_token` the execution's start returned. Lets an anon key, - or a user who did not start the execution, reach it, and a service key - scoped to a list without `*` read and stop it. - schema: - type: string - maxLength: 128 - DurableMessageDirectionFilter: - name: direction - in: query - required: false - description: Return only messages travelling this way. - schema: - $ref: '#/components/schemas/DurableMessageDirection' - DurableMessageNameFilter: - name: name - in: query - required: false - description: Return only messages with this name. - schema: - $ref: '#/components/schemas/DurableMessageName' - DurableMessageAfter: - name: after - in: query - required: false - description: Return only messages whose `seq` is greater than this. - schema: - type: integer - format: int64 - minimum: 0 - default: 0 - DurableMessageLimit: - name: limit - in: query - required: false - description: Most messages to return. - schema: - type: integer - minimum: 1 - maximum: 500 - default: 100 - Limit: - name: limit - in: query - required: false - schema: - type: integer - minimum: 1 - maximum: 100 - default: 10 - description: Number of items per page (max 100) - LockKey: - name: key - in: path - required: true - description: Project-local lock name. - schema: - type: string - minLength: 1 - maxLength: 128 - pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$ - LockToken: - name: X-Volcano-Lock-Token - in: header - required: true - description: Opaque UUID generated once by the caller and retained for the lease lifetime. - schema: - type: string - format: uuid - LockRequestId: - name: X-Volcano-Request-Id - in: header - required: true - description: | - UUID correlating this request across client and server logs. Repeat safety comes from - the lock token, so a retry under a reused request ID still counts against the quota. - schema: - type: string - format: uuid - DeploymentOperation: - name: operation - in: query - required: false - description: Restrict a deployment feed to one kind of operation. - schema: - type: string - enum: - - deploy - - redeploy - - update - - delete - DeploymentOwnerId: - name: owner_id - in: query - required: false - description: | - The user who owns the projects whose deployments to return - (`projects.user_id`). This is ownership, not the actor that started the - deployment — see `initiated_by_user_id` for that. Not a UUID: platform - user ids are opaque strings. - schema: - type: string - maxLength: 255 - DeploymentOrder: - name: order - in: query - required: false + Get a new access token using a refresh token. Requires an anon key. + + Send `refresh_token` in the body for the default flow. An eligible + cookie-mode browser request may instead send `session_mode: cookie` + with an empty token or omit the request body; the API reads and resets + the project's HttpOnly cookie and omits `refresh_token` from the + response. + operationId: authRefresh + security: + - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + refresh_token: + type: string + session_mode: + type: string + enum: + - cookie + responses: + '200': + description: Token refreshed + content: + application/json: + schema: + $ref: '#/components/schemas/AuthTokenResponse' + '401': + description: Invalid or expired refresh token; or invalid auth proxy metadata + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: | + The account's canonical email, or the email of the identity the + session signed in with, is not in `allowed_email_domains` while + `allowed_email_domains_mode` is `signup_and_signin`, so the session + cannot be extended + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/logout: + post: + tags: + - Authentication + summary: Logout (revoke refresh token) description: | - Sort key and direction. `created_at.desc` (default) is the feed order. - `completed_at.asc` orders finished attempts by completion, oldest first, - and excludes attempts that never completed. - schema: - type: string - enum: - - created_at.desc - - completed_at.asc - default: created_at.desc - DeploymentResourceType: - name: resource_type - in: query - required: false + Invalidate a refresh token. Requires an anon key. + + Send `refresh_token` for the default flow. An eligible cookie-mode + browser request may instead send `session_mode: cookie` with an empty + token; logout remains idempotent when the cookie is missing or expired. + operationId: authLogout + security: + - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + refresh_token: + type: string + session_mode: + type: string + enum: + - cookie + responses: + '204': + description: Logged out successfully + '401': + description: Missing, invalid, or revoked anon key; or invalid, repeated, or under-scoped auth proxy metadata + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/forgot-password: + post: + tags: + - Authentication + summary: Request password reset description: | - Restrict a deployment feed to a single resource type. Omit to return - both Function and Frontend deployments. - schema: - type: string - enum: - - function - - frontend - FunctionKindFilter: - name: function_kind - in: query - required: false + Generates recovery token and stores it (email sending pending). + Returns generic message to prevent email enumeration. + Project is identified via the anon key. + operationId: authForgotPassword + security: + - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - email + properties: + email: + type: string + format: email + responses: + '200': + description: Generic success message (doesn't reveal if email exists) + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: If the email exists, a password reset link has been sent + '401': + description: Missing, invalid, or revoked anon key; or invalid, repeated, or under-scoped auth proxy metadata + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Password reset or email/password is turned off for this project + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Rate limit exceeded (10 requests per hour per IP) + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/reset-password: + post: + tags: + - Authentication + summary: Reset password with recovery token description: | - Restrict results to functions of one kind. Omit to include both - standard and durable functions. - schema: - $ref: '#/components/schemas/FunctionKindFilter' - DeploymentStatus: - name: status - in: query - required: false - description: Restrict a deployment feed to attempts in one status. - schema: - type: string - enum: - - queued - - provisioning - - active - - degraded - - failed - - superseded - - deleting - - deleted - Offset: - name: offset - in: query - required: false - schema: - type: integer - minimum: 0 - default: 0 - description: | - Bounded row offset past the keyset anchor named by `cursor` (forward) or - `ending_before` (backward) — the hybrid jump. Seek to the anchor, then - skip this many rows within. Used for numbered jump-to-page: from the - current page, seek to its next/prev cursor and offset the remaining - pages. Only honored on the cursor pagination path; ignored otherwise. - Page: - name: page - in: query - required: false - schema: - type: integer - minimum: 1 - description: | - Page number (1-indexed) for offset pagination. Declares no schema - default so the request validator does not inject one: handlers that omit - `page` see it unset (nil) and default to 1 in code, while cursor-first - endpoints (e.g. the project deployments feed) can detect its absence to - stay in keyset/search mode. Supplying `page` selects offset pagination. - ProjectId: - name: id - in: path - required: true - schema: - type: string - format: uuid - description: Project ID - TokenId: - name: tokenId - in: path - required: true - schema: - type: string - format: uuid - description: Project access token ID - Search: - name: search - in: query - required: false - schema: - type: string - maxLength: 256 + Reset password using recovery token from forgot-password. + Revokes all existing sessions for security. + operationId: authResetPassword + security: + - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - token + - new_password + properties: + token: + type: string + description: Recovery token from forgot-password + new_password: + type: string + description: | + Password validated after NFC normalization against the + policy returned by GET /auth/password-policy. + responses: + '200': + description: Password reset successful + content: + application/json: + schema: + type: object + properties: + message: + type: string + '400': + description: Password doesn't meet requirements + '401': + description: Invalid or expired token; or invalid auth proxy metadata + '403': + description: Password reset or email/password is turned off for this project + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Compromised-password screening is temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/confirm: + post: + tags: + - Authentication + summary: Confirm email address description: | - Case-insensitive substring match on the resource `name`. See the - endpoint description for supported pagination modes. - RestoreId: - name: restoreId - in: path - required: true - schema: - type: string - format: uuid - description: Database restore ID - SchedulerId: - name: schedulerId - in: path - required: true - schema: - type: string - format: uuid - description: Function scheduler ID - VariableName: - name: name - in: path - required: true - schema: - type: string - minLength: 1 - maxLength: 256 - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - description: Variable name. Function runtime names such as AWS_REGION are reserved and cannot be updated. - IfNoneMatch: - name: If-None-Match - in: header - required: false + Confirm email address using token sent via email. + Required if require_email_confirmation is enabled. + operationId: authConfirmEmail + security: + - AnonKey: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - token + properties: + token: + type: string + description: Confirmation token from email + responses: + '200': + description: Email confirmed or already confirmed + content: + application/json: + schema: + type: object + properties: + message: + type: string + enum: + - Email confirmed successfully + - Email already confirmed + examples: + confirmed: + summary: Fresh confirmation + value: + message: Email confirmed successfully + alreadyConfirmed: + summary: Token belongs to already-confirmed user + value: + message: Email already confirmed + '400': + description: Missing confirmation token in request body + '401': + description: Invalid or expired token + /auth/resend-confirmation: + post: + tags: + - Authentication + summary: Resend confirmation email description: | - Entity tag from an earlier response, returning `304 Not Modified` while it - still matches. Accepts the full condition: `*`, a comma-separated list, and - weak tags of the form `W/"tag"`. - schema: - type: string - example: '"9f2c1e0b5a"' - responses: - OpenAPISpecThrottled: + Resend email confirmation link. + Returns generic message to prevent email enumeration. + No email is sent when the account does not exist or is already confirmed. + If the account exists and is unconfirmed, a new token is generated and + any previous confirmation token is invalidated. + operationId: authResendConfirmation + security: + - AnonKey: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - email + properties: + email: + type: string + format: email + responses: + '200': + description: Generic success message + content: + application/json: + schema: + type: object + properties: + message: + type: string + '429': + description: Rate limit exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/signup-anonymous: + post: + tags: + - Authentication + summary: Create anonymous user description: | - Too many requests for the specification from one address. The document - carries an `ETag`; revalidate with `If-None-Match` rather than - re-fetching it. - headers: - Retry-After: - description: Seconds to wait before requesting the specification again. - schema: - type: integer - content: - application/json: - schema: - $ref: '#/components/schemas/Error' + Create guest user without email/password. + + User metadata (like display_name) can be included and will appear in realtime presence events. + Requires enable_anonymous_signins to be true. + operationId: authSignupAnonymous + security: + - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' + requestBody: + description: Optional user metadata + content: + application/json: + schema: + type: object + properties: + user_metadata: + type: object + additionalProperties: true + description: Custom user metadata (e.g., display_name, avatar_url) + example: + display_name: Alice + avatar_url: https://example.com/alice.jpg + responses: + '201': + description: Anonymous user created + content: + application/json: + schema: + $ref: '#/components/schemas/AuthTokenResponse' + '401': + description: Missing, invalid, or revoked anon key; or invalid, repeated, or under-scoped auth proxy metadata + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Anonymous signins disabled + /auth/user/convert-anonymous: + post: + tags: + - Authentication + summary: Convert anonymous user to authenticated + description: | + Add email and password to anonymous user. + Requires auth user access token. + If require_email_confirmation is enabled for the project, the converted + user remains unconfirmed until /auth/confirm succeeds. When email + sending is enabled, a confirmation email is sent during conversion. + operationId: authConvertAnonymous + security: + - AuthUserAccessToken: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - email + - password + properties: + email: + type: string + format: email + password: + type: string + description: | + Password validated after NFC normalization against the + policy returned by GET /auth/password-policy. + user_metadata: + type: object + additionalProperties: true + responses: + '200': + description: User converted successfully + content: + application/json: + schema: + type: object + properties: + user: + $ref: '#/components/schemas/AuthUser' + '400': + description: Not an anonymous user + '403': + description: | + The chosen email domain is not in `allowed_email_domains`, or is + reserved (`anonymous.volcano.internal`, `volcano.local`) + '409': + description: Email already in use + '503': + description: Compromised-password screening is temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/user/change-email: + post: + tags: + - Authentication + summary: Request email change + description: | + Request to change user's email address. + Sends confirmation token to new email address. + operationId: authRequestEmailChange + security: + - AuthUserAccessToken: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - new_email + properties: + new_email: + type: string + format: email + responses: + '200': + description: Confirmation email sent + content: + application/json: + schema: + type: object + properties: + message: + type: string + new_email: + type: string + '400': + description: Invalid email format or same as current email + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: | + The requested email domain is not in `allowed_email_domains`, or is + reserved (`anonymous.volcano.internal`, `volcano.local`) + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: Email already in use + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Rate limit exceeded (10 requests per hour per IP) + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/user/confirm-email-change: + post: + tags: + - Authentication + summary: Confirm email change + description: Confirm email change with token sent to new address + operationId: authConfirmEmailChange + security: + - AuthUserAccessToken: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - email_change_token + properties: + email_change_token: + type: string + responses: + '200': + description: Email changed successfully + content: + application/json: + schema: + type: object + properties: + message: + type: string + user: + $ref: '#/components/schemas/AuthUser' + '400': + description: Invalid or expired token, or no pending email change + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: | + The pending email domain is no longer in `allowed_email_domains`. + Re-checked here because the allowlist can narrow between the request + and the confirmation. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: Email is now in use by another user + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/user/cancel-email-change: + delete: + tags: + - Authentication + summary: Cancel pending email change + operationId: authCancelEmailChange + security: + - AuthUserAccessToken: [] + responses: + '200': + description: Email change cancelled + content: + application/json: + schema: + type: object + properties: + message: + type: string + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/user/sessions: + get: + tags: + - Authentication + summary: Get current user's sessions + description: | + Returns paginated sessions for the currently authenticated user. + Each session includes device info, IP addresses, and activity timestamps. + The current session is marked with `is_current: true`. + + **Ordering and pagination.** Without `sort`, results are ordered by most + recent activity and paged with `page`/`limit`, returning the + `sessions`/`total`/`page`/`limit`/`total_pages` body below. This is the + legacy default and is preserved for existing clients. + + Send `sort=created_at` to opt into the standard list contract: results are + ordered by session start (newest first) and may be paged either with + `page`/`limit` or by cursor with `cursor`/`ending_before` plus a bounded + `offset` past the cursor anchor. Cursor responses use the shared + `data` envelope with `next_cursor`/`prev_cursor`. + + Unlike other list endpoints, sending `limit` without `page` does **not** + select cursor mode here; `sort=created_at` is the only opt-in. Cursor + pagination is rejected with 400 for the activity order, because + `last_activity_at` changes whenever a session refreshes its token: a row + that crosses the cursor anchor between two requests would be skipped and + never shown. The `status=expired` filter is also offset-only because a + session can expire above the cursor anchor during a walk. Sending that + filter in cursor mode, `page` with `cursor` or `ending_before`, or both + cursor directions returns 400. + operationId: authGetMySessions + security: + - AuthUserAccessToken: [] + parameters: + - name: page + in: query + description: Page number (1-indexed) + schema: + type: integer + minimum: 1 + default: 1 + - name: limit + in: query + description: Number of sessions per page (max 100) + schema: + type: integer + minimum: 1 + maximum: 100 + default: 20 + - name: sort + in: query + description: | + Sort key. `last_activity` (default) orders by most recent activity and + supports offset pagination only. `created_at` orders by session start + and supports both offset and cursor pagination. + schema: + type: string + enum: + - last_activity + - created_at + default: last_activity + - name: status + in: query + description: | + Filter by whether the session can still be refreshed. Omit for every + stored session, including expired ones. `expired` is not supported + with cursor pagination. + schema: + type: string + enum: + - active + - expired + - name: cursor + in: query + description: | + Opaque keyset cursor from a previous response's `next_cursor`. Requires + `sort=created_at`; mutually exclusive with `page` and `ending_before`. + schema: + type: string + - name: ending_before + in: query + description: | + Opaque keyset cursor from a previous response's `prev_cursor`, paging + backward. Requires `sort=created_at`; mutually exclusive with `page` + and `cursor`. + schema: + type: string + - name: offset + in: query + description: | + Bounded number of rows to skip past the cursor anchor (the hybrid + jump, maximum 100000). Ignored unless `cursor` or `ending_before` is + supplied. + schema: + type: integer + minimum: 0 + maximum: 100000 + responses: + '200': + description: Paginated list of user sessions + content: + application/json: + schema: + type: object + properties: + sessions: + type: array + items: + $ref: '#/components/schemas/AuthSession' + total: + type: integer + description: Total number of sessions + page: + type: integer + description: Current page number + limit: + type: integer + description: Number of sessions per page + total_pages: + type: integer + description: Total number of pages + data: + type: array + description: Sessions for this page (cursor pagination only) + items: + $ref: '#/components/schemas/AuthSession' + has_more: + type: boolean + description: Whether a further page exists (cursor pagination only) + next_cursor: + type: string + description: Opaque cursor for the next page (cursor pagination only) + prev_cursor: + type: string + description: Opaque cursor for the previous page (cursor pagination only). Send as `ending_before`. + '400': + description: Invalid or conflicting pagination parameters + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + tags: + - Authentication + summary: Sign out from all other devices + description: | + Deletes all sessions except the current one. + Use this to log out from all other devices while keeping the current session active. + operationId: authDeleteAllMySessions + security: + - AuthUserAccessToken: [] + responses: + '204': + description: All other sessions deleted + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/user/sessions/{sessionId}: + delete: + tags: + - Authentication + summary: Sign out from specific device + description: | + Deletes a specific session, logging out that device. + You can get session IDs from the list sessions endpoint. + operationId: authDeleteMySession + security: + - AuthUserAccessToken: [] + parameters: + - name: sessionId + in: path + required: true + description: The session ID to delete + schema: + type: string + format: uuid + responses: + '204': + description: Session deleted + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Session not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/user: + get: + tags: + - Authentication + summary: Get current user profile + description: Returns authenticated user's profile. Requires access token. + operationId: authGetUser + security: + - AuthUserAccessToken: [] + responses: + '200': + description: User profile + content: + application/json: + schema: + type: object + properties: + user: + $ref: '#/components/schemas/AuthUser' + '401': + description: Not authenticated - access token missing or invalid + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + put: + tags: + - Authentication + summary: Update user profile + description: Update password or metadata. Requires access token. + operationId: authUpdateUser + security: + - AuthUserAccessToken: [] + requestBody: + content: + application/json: + schema: + type: object + properties: + password: + type: string + description: | + Password validated after NFC normalization against the + policy returned by GET /auth/password-policy. + user_metadata: + type: object + additionalProperties: true + description: | + Metadata keys to merge into the current user metadata. + Omitted keys remain unchanged; set a key to null to remove it. + Merging is shallow; nested objects replace the stored value for that top-level key. + responses: + '200': + description: Profile updated + content: + application/json: + schema: + type: object + properties: + user: + $ref: '#/components/schemas/AuthUser' + '400': + description: Bad request - invalid password or metadata format + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated - access token missing or invalid + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: The request sent a non-empty `password` while email/password is turned off for the project; nothing is updated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Compromised-password screening is temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/user/identities: + get: + tags: + - Authentication + summary: List the current user's identities + description: | + Returns every real email identity the account owns. An account can own + multiple identities (for example a password identity plus one or more + OAuth identities on different emails). Anonymous accounts have no real + identity and return an empty list. + operationId: authListIdentities + security: + - AuthUserAccessToken: [] + responses: + '200': + description: List of identities + content: + application/json: + schema: + $ref: '#/components/schemas/AuthIdentitiesResponse' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/user/identities/{identityId}: + delete: + tags: + - Authentication + summary: Unlink an identity from the current user + description: | + Removes a non-primary identity and its attached sign-in methods. Refused + when the identity is the account's primary, its only identity, or when + removing it would leave the account with no way to sign in. + operationId: authUnlinkIdentity + security: + - AuthUserAccessToken: [] + parameters: + - name: identityId + in: path + required: true + description: The identity ID to unlink + schema: + type: string + format: uuid + responses: + '204': + description: Identity unlinked + '400': + description: Identity cannot be unlinked (primary, last, or would remove last sign-in method), or the identity id is malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Identity not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/user/methods: + get: + tags: + - Authentication + summary: List the current user's sign-in methods + description: | + Returns a flat list of every sign-in method the account owns (password, + each OAuth provider, and any active anonymous method), with the primary + method flagged. Password stubs and converted anonymous methods are excluded. + operationId: authListMethods + security: + - AuthUserAccessToken: [] + responses: + '200': + description: List of sign-in methods + content: + application/json: + schema: + $ref: '#/components/schemas/AuthMethodsResponse' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/user/methods/{methodId}/promote: + post: + tags: + - Authentication + summary: Set a method as the account's primary + description: | + Promotes the given method to the account's primary sign-in method. The + account's canonical email is re-derived from the promoted method's identity. + Refused for password stubs and converted anonymous methods, and for an + identity whose domain is outside the project's `allowed_email_domains`. + operationId: authPromoteMethod + security: + - AuthUserAccessToken: [] + parameters: + - name: methodId + in: path + required: true + description: The method ID to promote + schema: + type: string + format: uuid + responses: + '200': + description: The promoted method + content: + application/json: + schema: + $ref: '#/components/schemas/AuthMethodSummary' + '400': + description: This method cannot be set as primary (password stub, converted anonymous method, or unverified email), or the method id is malformed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: The promoted identity's email domain is not in the project's allowed_email_domains, or is reserved (`anonymous.volcano.internal`, `volcano.local`) + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Method not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/auth/insights: + get: + tags: + - Auth Admin + summary: Get auth user insights + description: | + Returns current and deleted auth-user totals, rolling 24-hour and 30-day + active users, and zero-filled daily activity and account-retention counts + for an inclusive UTC date range. Weeks start on Monday. + The existing deletions series counts accounts by deletion date; net_growth + remains signups minus deletions and is not affected by bans. + The banned_users, deleted_users, and available_users fields describe the + current state of users registered in each bucket. Banned users exclude + deleted users and expired bans. Available users are signups minus + banned_users minus deleted_users. Unban and expiry restore availability in + the original signup bucket. These current-state cohorts can change after + the requested dates have passed, without rewriting activity counts. + Sign-in counts remain grouped by session creation date. Deleted users + contribute to active counts until their last activity leaves the rolling + window. Token refreshes affect active users but not the sign-in series. + Signup history is backfilled from accounts present when collection was + deployed. Accounts hard-deleted before deletion-history collection cannot + be recovered. Current bans require no separate event-history collection. + operationId: getAuthInsights + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: from + in: query + description: Inclusive UTC start date. Defaults to 29 days before `to`. + schema: + type: string + format: date + - name: to + in: query + description: Inclusive UTC end date. Defaults to today. + schema: + type: string + format: date + - name: interval + in: query + description: Chart bucket size. Defaults to `day`. + schema: + $ref: '#/components/schemas/AuthInsightsInterval' + responses: + '200': + description: Auth insights retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/AuthInsightsResponse' + example: + project_id: 4f165080-a931-4e03-b3bd-41c45c3f0058 + observed_at: '2026-07-20T18:00:00Z' + window: + from: '2026-06-21' + to: '2026-07-20' + interval: day + summary: + total_users: 1234 + deleted_users: 42 + active_users_1d: 83 + active_users_30d: 418 + series: + - bucket_start: '2026-07-20' + signups: 12 + signins: 97 + deletions: 3 + banned_users: 2 + deleted_users: 3 + available_users: 7 + net_growth: 9 + is_partial: true + '400': + description: Invalid date range or interval + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Access denied + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/auth/users: + get: + tags: + - Auth Admin + summary: List all auth users (admin) + description: List auth users in project. Requires platform token. + operationId: listAuthUsers + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/EndingBefore' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Search' + - name: status + in: query + required: false + description: Filter by effective status. `banned` returns only currently-banned users; an expired temporary ban lists as `active`. + schema: + type: string + enum: + - active + - banned + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAuthUsers' + '400': + description: Invalid status or pagination parameters + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/auth/users/{userId}: + get: + tags: + - Auth Admin + summary: Get specific auth user (admin) + operationId: getAuthUser + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: userId + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: Auth user details + content: + application/json: + schema: + $ref: '#/components/schemas/AuthUser' + delete: + tags: + - Auth Admin + summary: Delete auth user (admin) + description: Soft-deletes user and revokes all sessions + operationId: deleteAuthUser + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: userId + in: path + required: true + schema: + type: string + format: uuid + responses: + '204': + description: User deleted + /projects/{id}/auth/users/{userId}/sessions: + get: + tags: + - Auth Admin + summary: List user sessions + description: | + List paginated sessions for a specific auth user. + Returns session details including device info, IP address, and activity timestamps. + + Ordering and pagination match `GET /auth/user/sessions`: the default is + activity order with `page`/`limit` and the legacy `sessions` body, and + `sort=created_at` opts into the standard cursor/offset hybrid with the + shared `data` envelope. Cursor pagination is only available for + `sort=created_at`, because the activity timestamp changes under paging. + The `status=expired` filter is offset-only because sessions can expire + above a cursor anchor during a walk. + operationId: listUserSessions + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: userId + in: path + required: true + schema: + type: string + format: uuid + - name: page + in: query + description: Page number (1-indexed) + schema: + type: integer + minimum: 1 + default: 1 + - name: limit + in: query + description: Number of sessions per page (max 100) + schema: + type: integer + minimum: 1 + maximum: 100 + default: 20 + - name: sort + in: query + description: | + Sort key. `last_activity` (default) orders by most recent activity and + supports offset pagination only. `created_at` orders by session start + and supports both offset and cursor pagination. + schema: + type: string + enum: + - last_activity + - created_at + default: last_activity + - name: status + in: query + description: | + Filter by whether the session can still be refreshed. Omit for every + stored session, including expired ones. `expired` is not supported + with cursor pagination. + schema: + type: string + enum: + - active + - expired + - name: cursor + in: query + description: | + Opaque keyset cursor from a previous response's `next_cursor`. Requires + `sort=created_at`; mutually exclusive with `page` and `ending_before`. + schema: + type: string + - name: ending_before + in: query + description: | + Opaque keyset cursor from a previous response's `prev_cursor`, paging + backward. Requires `sort=created_at`; mutually exclusive with `page` + and `cursor`. + schema: + type: string + - name: offset + in: query + description: | + Bounded number of rows to skip past the cursor anchor (the hybrid + jump, maximum 100000). Ignored unless `cursor` or `ending_before` is + supplied. + schema: + type: integer + minimum: 0 + maximum: 100000 + responses: + '200': + description: Paginated list of user sessions + content: + application/json: + schema: + type: object + properties: + sessions: + type: array + items: + $ref: '#/components/schemas/AuthSession' + total: + type: integer + description: Total number of sessions + page: + type: integer + description: Current page number + limit: + type: integer + description: Number of sessions per page + total_pages: + type: integer + description: Total number of pages + data: + type: array + description: Sessions for this page (cursor pagination only) + items: + $ref: '#/components/schemas/AuthSession' + has_more: + type: boolean + description: Whether a further page exists (cursor pagination only) + next_cursor: + type: string + description: Opaque cursor for the next page (cursor pagination only) + prev_cursor: + type: string + description: Opaque cursor for the previous page (cursor pagination only). Send as `ending_before`. + '400': + description: Invalid or conflicting pagination parameters + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: User not found + delete: + tags: + - Auth Admin + summary: Delete all user sessions + description: | + Revokes all sessions for a user, forcing them to re-authenticate on all devices. + Use this to log out a user from everywhere. + operationId: deleteAllUserSessions + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: userId + in: path + required: true + schema: + type: string + format: uuid + responses: + '204': + description: All sessions deleted + '404': + description: User not found + /projects/{id}/auth/users/{userId}/sessions/{sessionId}: + delete: + tags: + - Auth Admin + summary: Delete specific session + description: | + Revokes a specific session for a user. + Use this to log out a user from a single device. + operationId: deleteUserSession + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: userId + in: path + required: true + schema: + type: string + format: uuid + - name: sessionId + in: path + required: true + schema: + type: string + format: uuid + responses: + '204': + description: Session deleted + '404': + description: Session or user not found + /projects/{id}/auth/users/{userId}/ban: + post: + tags: + - Auth Admin + summary: Ban a user + description: | + Bans a user temporarily or permanently. Banned users cannot sign in + and all their active sessions are immediately revoked. + Omitting banned_until clears any previous expiry. Deleted accounts cannot be banned. + + - Omit `banned_until` for a permanent ban + - Provide `banned_until` ISO timestamp for a temporary ban + operationId: banAuthUser + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: userId + in: path + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + type: object + properties: + banned_until: + type: string + format: date-time + description: When the ban expires (omit for permanent ban) + example: '2026-12-31T23:59:59Z' + responses: + '200': + description: User banned successfully + content: + application/json: + schema: + $ref: '#/components/schemas/BanUserResponse' + '404': + description: User not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: Deleted accounts cannot be banned or restored + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/auth/users/{userId}/unban: + post: + tags: + - Auth Admin + summary: Unban a user + description: | + Removes a ban from a user, restoring their ability to sign in. + The user's status is set back to 'active'. Deleted accounts cannot be restored. + operationId: unbanAuthUser + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: userId + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: User unbanned successfully + content: + application/json: + schema: + $ref: '#/components/schemas/UnbanUserResponse' + '404': + description: User not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: Deleted accounts cannot be banned or restored + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/email-templates: + get: + tags: + - Auth Configuration + summary: List email templates + description: Returns all custom email templates for this project. + operationId: listEmailTemplates + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + responses: + '200': + description: Email templates list + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/EmailTemplate' + post: + tags: + - Auth Configuration + summary: Create email template + description: | + Creates a custom email template for the project. Custom email templates + are a SUPERAGENT feature: requests from a HOBBY project owner are + rejected with 403, and HOBBY projects always send the built-in default + templates regardless of any previously saved custom rows. + Every project is created with one template per type, so customizing one + is usually a PUT; creating a type the project already has returns 409. + Valid template types: welcome, confirmation, password_reset, password_changed + operationId: createEmailTemplate + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateEmailTemplateRequest' + responses: + '201': + description: Template created + content: + application/json: + schema: + $ref: '#/components/schemas/EmailTemplate' + '400': + description: Invalid template type or subject containing a literal interior carriage return or newline + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Custom email templates require the SUPERAGENT plan + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: The project already has a template of this type + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/email-templates/{type}: + get: + tags: + - Auth Configuration + summary: Get email template + operationId: getEmailTemplate + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: type + in: path + required: true + schema: + type: string + enum: + - welcome + - confirmation + - password_reset + - password_changed + responses: + '200': + description: Email template + content: + application/json: + schema: + $ref: '#/components/schemas/EmailTemplate' + '404': + description: Template not found + put: + tags: + - Auth Configuration + summary: Update email template + description: | + Updates a custom email template. Custom email templates are a SUPERAGENT + feature: requests from a HOBBY project owner are rejected with 403 + (including after a downgrade), so a HOBBY project cannot modify + templates and always sends the built-in defaults. + operationId: updateEmailTemplate + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: type + in: path + required: true + schema: + type: string + enum: + - welcome + - confirmation + - password_reset + - password_changed + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateEmailTemplateRequest' + responses: + '200': + description: Template updated + content: + application/json: + schema: + $ref: '#/components/schemas/EmailTemplate' + '400': + description: Subject contains a literal interior carriage return or newline + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Custom email templates require the SUPERAGENT plan + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Template not found + delete: + tags: + - Auth Configuration + summary: Delete email template + description: | + Deletes a custom template, reverting to the default. Custom email + templates are a SUPERAGENT feature: requests from a HOBBY project owner + are rejected with 403. + operationId: deleteEmailTemplate + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: type + in: path + required: true + schema: + type: string + enum: + - welcome + - confirmation + - password_reset + - password_changed + responses: + '204': + description: Template deleted + '403': + description: Custom email templates require the SUPERAGENT plan + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Template not found + /email-templates/defaults: + get: + tags: + - Auth Configuration + summary: Get default email templates + description: Returns the default email templates used when no custom template is configured. + operationId: getDefaultEmailTemplates + responses: + '200': + description: Default templates + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/DefaultEmailTemplate' + /email-templates/defaults/{type}: + get: + tags: + - Auth Configuration + summary: Get default email template by type + operationId: getDefaultEmailTemplate + parameters: + - name: type + in: path + required: true + schema: + type: string + enum: + - welcome + - confirmation + - password_reset + - password_changed + responses: + '200': + description: Default template + content: + application/json: + schema: + $ref: '#/components/schemas/DefaultEmailTemplate' + '404': + description: Template type not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/auth/config: + get: + tags: + - Auth Configuration + summary: Get auth configuration + operationId: getAuthConfig + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + responses: + '200': + description: Auth configuration + content: + application/json: + schema: + $ref: '#/components/schemas/AuthConfig' + put: + tags: + - Auth Configuration + summary: Update auth configuration + description: | + Updates the project's auth configuration. Only the fields present in + the body are changed. + operationId: updateAuthConfig + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAuthConfigRequest' + responses: + '200': + description: Configuration updated + content: + application/json: + schema: + $ref: '#/components/schemas/AuthConfig' + '400': + description: Invalid auth configuration, including a subject with a literal interior carriage return or newline + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: | + The update would turn on, widen, or otherwise edit the email domain + allowlist (`allowed_email_domains`, `allowed_email_domains_mode`) + for a project that is not on the SUPERAGENT plan. A HOBBY project keeps + whatever allowlist it already has — parked, enforcing nothing until + it upgrades — and may still remove it, so a downgrade never leaves a + project locked out of its own signups. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/auth/config/test-email: + post: + tags: + - Auth Configuration + summary: Send a test email using the project's saved SMTP config + description: | + Sends a diagnostic email to `to_email` using the project's + persisted `auth_config` SMTP credentials. If `html_body` or + `text_body` is supplied, the override path is taken: those + values (plus optional `subject`) are rendered through + html/text templates against the project's `Data` and + used as the body — used by the template editor's "Send Test" + affordance to preview an unsaved template. With both bodies + omitted, a hardcoded diagnostic message is sent and any + `subject` field is ignored. Sending `subject` alone (no + bodies) is rejected with 400 to avoid a silently-dropped + subject or a blank message. Also rejects with 400 if + `email_enabled=false`, `smtp_host` is empty, or the saved + `smtp_password` can't be read and must be set again. + Sender values with interior line breaks return 400 before SMTP delivery. + Rendered override subjects containing a line break have outer whitespace + trimmed; any remaining interior line break returns 400 before delivery. + operationId: testEmailConfig + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TestEmailRequest' + responses: + '200': + description: Test email sent + content: + application/json: + schema: + $ref: '#/components/schemas/TestEmailResponse' + '400': + description: Invalid request, unsafe email headers, or email delivery not configured + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + description: Project not found + '502': + description: Template render failure or SMTP delivery failed + /projects/{id}/auth/hosted-pages/{pageType}: + get: + tags: + - Auth Configuration + summary: Get hosted auth page + description: | + Returns the saved HTML/CSS for the page type, or `page: null` when the + project has not customized it yet. Always returns `defaults` (the theme + shell to seed an editor with, which is valid input to the update endpoint) + and `runtime` (the script the rendered page runs, plus a preview harness). + operationId: getAuthHostedPage + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: pageType + in: path + required: true + schema: + $ref: '#/components/schemas/HostedAuthPageType' + responses: + '200': + description: Hosted page loaded + content: + application/json: + schema: + $ref: '#/components/schemas/AuthHostedPageResponse' + put: + tags: + - Auth Configuration + summary: Update hosted auth page + description: | + Saves the current HTML/CSS for this page type. + Security validation rejects script tags, javascript: URLs, inline event handlers, iframe/object/embed/meta/link tags in HTML, + and closing style/head tags in CSS. + operationId: updateAuthHostedPage + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: pageType + in: path + required: true + schema: + $ref: '#/components/schemas/HostedAuthPageType' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAuthHostedPageRequest' + responses: + '200': + description: Hosted page updated + content: + application/json: + schema: + $ref: '#/components/schemas/AuthHostedPageResponse' + '400': + description: Invalid input or unsafe markup + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + description: Project not found + /projects/{id}/auth/pages/appearance: + get: + tags: + - Auth Configuration + summary: Get managed auth page appearance + operationId: getAuthPageAppearance + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + responses: + '200': + description: Saved appearance and effective plan state + content: + application/json: + schema: + $ref: '#/components/schemas/AuthPageAppearanceResponse' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Access denied + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Appearance could not be read + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/auth/pages/theme: + put: + tags: + - Auth Configuration + summary: Save the managed auth page theme + operationId: updateAuthPageTheme + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAuthPageThemeRequest' + responses: + '200': + description: Theme saved + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAuthPageThemeRequest' + '400': + description: Invalid or unreadable theme + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Plan does not permit customisation + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Theme could not be saved + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + tags: + - Auth Configuration + summary: Clear the managed auth page theme + operationId: deleteAuthPageTheme + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + responses: + '204': + description: Theme cleared + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Plan does not permit customisation + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Theme could not be cleared + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/auth/pages/{pageType}/layout: + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: pageType + in: path + required: true + schema: + $ref: '#/components/schemas/HostedAuthPageType' + put: + tags: + - Auth Configuration + summary: Save one managed auth page layout + operationId: updateAuthPageLayout + security: + - UserToken: [] + - ProjectAccessToken: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAuthPageLayoutRequest' + responses: + '200': + description: Layout saved + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAuthPageLayoutRequest' + '400': + description: Invalid page type or layout + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Plan does not permit customisation + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Layout could not be saved + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + tags: + - Auth Configuration + summary: Clear one managed auth page layout + operationId: deleteAuthPageLayout + security: + - UserToken: [] + - ProjectAccessToken: [] + responses: + '204': + description: Layout cleared + '400': + description: Invalid page type + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Plan does not permit customisation + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Layout could not be cleared + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/auth/pages/{pageType}/preview: + get: + tags: + - Auth Configuration + summary: Render a short-lived managed auth page preview + description: | + Public HTML endpoint for a preview URL returned by the POST operation. + The signed ticket contains the unsaved appearance, expires shortly, and + runs the production page runtime against mocked authentication responses. + operationId: renderAuthPagePreview + security: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: pageType + in: path + required: true + schema: + $ref: '#/components/schemas/HostedAuthPageType' + - name: ticket + in: query + required: true + schema: + type: string + minLength: 1 + maxLength: 4096 + description: Short-lived signed preview ticket returned by the POST operation. + responses: + '200': + description: Rendered preview document + content: + text/html: + schema: + type: string + '404': + description: Ticket is invalid or expired, its path does not match, or managed authentication is disabled + content: + text/plain: + schema: + type: string + '500': + description: Preview could not be rendered + content: + text/plain: + schema: + type: string + post: + tags: + - Auth Configuration + summary: Preview an unsaved managed auth page appearance + operationId: previewAuthPage + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: pageType + in: path + required: true + schema: + $ref: '#/components/schemas/HostedAuthPageType' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PreviewAuthPageRequest' + responses: + '200': + description: Short-lived URL for the rendered preview document + content: + application/json: + schema: + $ref: '#/components/schemas/PreviewAuthPageResponse' + '400': + description: Invalid page type or draft + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Access denied + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project not found or managed authentication is disabled + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Preview could not be rendered + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/auth/hosted/{pageType}: + get: + tags: + - Auth Configuration + summary: Render a managed auth page + description: | + Public HTML endpoint for signup, forgot-password, device approval, + verify-email, and reset-password pages. Login uses the path without a + page type. + Requires `Accept: text/html`. + Returns 404 when managed hosted pages are disabled for the project. + security: [] + operationId: renderManagedAuthPage + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: pageType + in: path + required: true + schema: + $ref: '#/components/schemas/HostedRenderablePageType' + responses: + '200': + description: Hosted auth page HTML + content: + text/html: + schema: + type: string + '400': + description: Invalid project id or unsupported Accept header + '404': + description: Managed pages disabled or page type not found + /projects/{id}/auth/hosted: + get: + tags: + - Auth Configuration + summary: Render default managed auth page + description: | + Public HTML endpoint for the managed login page. + Requires `Accept: text/html`. + security: [] + operationId: renderDefaultManagedAuthPage + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: action + in: query + required: false + schema: + type: string + enum: + - login + - signup + - forgot-password + - device + description: | + Optional deep-link action for the unified hosted page. Ignored when a + custom login page is configured. `action=device` renders the device + authorization approval UI inline (no redirect to any external app); + it signs the user in and calls `POST /auth/device/verify`. + - name: user_code + in: query + required: false + schema: + type: string + description: Device user code (from `POST /auth/device/authorize`) used with `action=device`. + - name: anon_key + in: query + required: false + schema: + type: string + description: Project anon key used by built-in managed auth flows (required for login/signup/device actions). + - name: state + in: query + required: false + schema: + type: string + description: | + Opaque one-time nonce generated by the client SDK before redirecting + here. On successful login/signup it is echoed back in the post-auth + redirect fragment as `state`, so the SDK can bind the returned session + to the flow it initiated (login-CSRF / session-fixation defense). The + SDK rejects a returned session whose `state` does not match. + responses: + '200': + description: Hosted auth page HTML + content: + text/html: + schema: + type: string + '400': + description: Invalid project id or unsupported Accept header + '404': + description: Managed pages disabled + /projects/{id}/auth/hosted/login/options: + get: + tags: + - Auth Configuration + summary: Get hosted login runtime options + description: | + Returns runtime options for the built-in managed login flow. + Requires `anon_key` query parameter. + Rate limited per project and client IP. Excess requests return `429` and `Retry-After`. + security: [] + operationId: getHostedLoginOptions + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: anon_key + in: query + required: true + schema: + type: string + responses: + '200': + description: Hosted login options returned + content: + application/json: + schema: + $ref: '#/components/schemas/HostedLoginOptionsResponse' + '401': + description: Invalid or missing anon key + '404': + description: Managed pages disabled + '429': + description: Rate limit exceeded + /projects/{id}/auth/hosted/login/check-email: + post: + tags: + - Auth Configuration + summary: Check whether email exists for hosted login flow + description: | + Used by the built-in managed login page to branch UI between signin and signup. + Requires anon key in Authorization header. + Rate limited per project and client IP. Excess requests return `429` and `Retry-After`. + security: [] + operationId: hostedLoginCheckEmail + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: Authorization + in: header + required: true + schema: + type: string + description: Bearer anon key (`Bearer `) + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/HostedLoginEmailCheckRequest' + responses: + '200': + description: Email existence evaluated + content: + application/json: + schema: + $ref: '#/components/schemas/HostedLoginEmailCheckResponse' + '401': + description: Invalid or missing anon key + '429': + description: Rate limit exceeded + /projects/{id}/auth/methods: + get: + tags: + - Auth Configuration + summary: Get all authentication methods + description: | + Returns all configured authentication methods for this project, + including email/password, anonymous, device authorization, and OAuth providers. + operationId: getAuthMethods + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + responses: + '200': + description: Authentication methods configuration + content: + application/json: + schema: + type: object + properties: + email_password: + type: object + properties: + enabled: + type: boolean + method: + type: string + name: + type: string + anonymous: + type: object + properties: + enabled: + type: boolean + method: + type: string + name: + type: string + oauth_providers: + type: array + items: + type: object + properties: + enabled: + type: boolean + method: + type: string + provider: + type: string + name: + type: string + redirect_url: + type: string + scopes: + type: array + items: + type: string + available_methods: + type: array + items: + type: string + example: + - email_password + - oauth_google + - oauth_github + put: + tags: + - Auth Configuration + summary: Configure authentication methods (unified) + description: | + Configure all authentication methods in a single request. + At least one method must remain enabled. + operationId: configureAuthMethods + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + requestBody: + content: + application/json: + schema: + type: object + properties: + enable_email_password: + type: boolean + enable_anonymous: + type: boolean + oauth_providers: + type: array + items: + type: object + properties: + provider: + type: string + enabled: + type: boolean + responses: + '200': + description: Methods configured + '400': + description: At least one method must be enabled + /projects/{id}/oauth/configs: + get: + tags: + - OAuth Configuration + summary: List OAuth configurations + description: List all OAuth provider configurations for this project + operationId: listOAuthConfigs + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + responses: + '200': + description: List of OAuth configurations + content: + application/json: + schema: + type: object + properties: + configs: + type: array + items: + $ref: '#/components/schemas/OAuthConfig' + post: + tags: + - OAuth Configuration + summary: Create OAuth configuration + description: Configure OAuth provider (Google, GitHub, Microsoft, Apple, Device) + operationId: createOAuthConfig + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateOAuthConfigRequest' + responses: + '201': + description: OAuth config created + content: + application/json: + schema: + $ref: '#/components/schemas/OAuthConfig' + '409': + description: Provider already configured + /projects/{id}/oauth/configs/{provider}: + get: + tags: + - OAuth Configuration + summary: Get OAuth configuration + operationId: getOAuthConfig + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: provider + in: path + required: true + schema: + type: string + enum: + - google + - github + - microsoft + - apple + - device + - name: client_id + in: query + required: false + schema: + type: string + description: Required when `provider=device` to select a specific device client. + responses: + '200': + description: OAuth configuration + content: + application/json: + schema: + $ref: '#/components/schemas/OAuthConfig' + put: + tags: + - OAuth Configuration + summary: Update OAuth configuration + operationId: updateOAuthConfig + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: provider + in: path + required: true + schema: + type: string + enum: + - google + - github + - microsoft + - apple + - device + - name: client_id + in: query + required: false + schema: + type: string + description: Required when `provider=device` to select a specific device client. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateOAuthConfigRequest' + responses: + '200': + description: OAuth config updated + content: + application/json: + schema: + $ref: '#/components/schemas/OAuthConfig' + delete: + tags: + - OAuth Configuration + summary: Delete OAuth configuration + operationId: deleteOAuthConfig + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: provider + in: path + required: true + schema: + type: string + enum: + - google + - github + - microsoft + - apple + - device + - name: client_id + in: query + required: false + schema: + type: string + description: Required when `provider=device` to select a specific device client. + responses: + '204': + description: OAuth config deleted + /projects/{id}/oauth/providers: + get: + tags: + - OAuth Configuration + summary: List available OAuth providers + description: Get list of supported OAuth providers and their default scopes + operationId: listAvailableOAuthProviders + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + responses: + '200': + description: Available providers + content: + application/json: + schema: + type: object + properties: + providers: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + default_scopes: + type: array + items: + type: string + /auth/oauth/{provider}/authorize: + get: + tags: + - OAuth Authentication + summary: Start OAuth authorization + description: | + Redirects user to OAuth provider for authorization. + Handles CSRF protection with state parameter. + Project is identified via the anon_key query parameter. + operationId: authOAuthAuthorize + parameters: + - name: provider + in: path + required: true + schema: + type: string + enum: + - google + - github + - microsoft + - apple + - name: anon_key + in: query + required: true + schema: + type: string + description: Project anon key (required - identifies the project) + - name: redirect_url + in: query + schema: + type: string + description: | + URL to redirect to after the OAuth flow (optional). Must exactly + match an entry in the project's `allowed_redirect_urls`, including + its query string, or be the project's own managed hosted-auth page + URL. + - name: client_state + in: query + schema: + type: string + maxLength: 255 + description: | + Optional application nonce. It is stored with the server-generated + provider state and echoed to redirect_url as `state`. + - name: response_mode + in: query + schema: + type: string + enum: + - code + description: | + Set to `code` to receive a short-lived authorization code at + redirect_url, then use POST /auth/oauth/exchange to obtain the + session. `redirect_url` is required in this mode. When omitted, the + established session-fragment response is retained for compatibility + with existing clients. + responses: + '307': + description: Redirect to OAuth provider + '400': + description: | + OAuth provider is disabled for this project, or `redirect_url` is + not registered in `allowed_redirect_urls` + '404': + description: OAuth provider not configured + /auth/oauth/{provider}/callback: + get: + tags: + - OAuth Authentication + summary: OAuth callback handler + description: | + Handles OAuth provider callback with authorization code. + Exchanges code for tokens and creates/signs in user. + operationId: authOAuthCallback + parameters: + - name: provider + in: path + required: true + schema: + type: string + enum: + - google + - github + - microsoft + - apple + - name: code + in: query + required: true + schema: + type: string + - name: state + in: query + required: true + schema: + type: string + - name: error + in: query + schema: + type: string + responses: + '200': + description: Existing user signed in (when redirect_url was omitted) + content: + application/json: + schema: + $ref: '#/components/schemas/AuthTokenResponse' + '201': + description: New user created and signed in (when redirect_url was omitted) + content: + application/json: + schema: + $ref: '#/components/schemas/AuthTokenResponse' + '303': + description: | + Redirect to the exact registered redirect_url. Flows that requested + response_mode=code receive a short-lived, single-use `code` and + optional application `state`; compatibility flows receive the + established session fragment. + '400': + description: | + Missing/invalid code or state, the state parameter expired, the + provider was disabled after the flow started, or the flow's stored + redirect_url is no longer registered in allowed_redirect_urls (both + re-checked at callback time) + '403': + description: | + The provider's email domain is not in `allowed_email_domains`. Creating + an account is refused under `signup` and `signup_and_signin`; signing in + an already-linked account is refused under `signup_and_signin`, as it is + when the account's canonical email is outside the list. A new account + at a reserved domain (`anonymous.volcano.internal`, `volcano.local`) is + refused whatever the project allows. + '404': + description: | + The provider's configuration was removed after the flow started + (re-checked at callback time), or the account a link started from + was deleted + '409': + description: Email already exists (requires linking) + /auth/oauth/exchange: + post: + tags: + - OAuth Authentication + summary: Exchange OAuth authorization code + description: | + Atomically consumes a short-lived callback code and returns the user's + session. The request must use the same project anon key and exact + redirect_url that initiated the flow. + operationId: authOAuthExchange + security: + - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - code + - redirect_url + properties: + code: + type: string + redirect_url: + type: string + format: uri + responses: + '200': + description: Authorization code consumed and session created + content: + application/json: + schema: + $ref: '#/components/schemas/AuthTokenResponse' + '400': + description: Invalid, expired, consumed, or redirect-mismatched code + '401': + description: Missing or invalid project anon key; or invalid auth proxy metadata + '403': + description: | + Email confirmation is now required, or the account's canonical email or + the provider identity's email is not in `allowed_email_domains` while + `allowed_email_domains_mode` is `signup_and_signin`. Both are re-checked here because the code outlives + the callback that issued it. + '429': + description: Too many exchange attempts from this client + /auth/device/authorize: + post: + tags: + - OAuth Authentication + summary: Start RFC8628 device authorization + description: | + Starts OAuth 2.0 Device Authorization Grant (RFC 8628). + Returns `device_code` for the CLI and `user_code` for browser verification. + + By default the returned `verification_uri` / `verification_uri_complete` + point at the project's managed device-approval page served by this API + (`/projects/{projectId}/auth/hosted?action=device&user_code=...&anon_key=...`), + which requires managed auth enabled and a default anon key for the + project. + + Projects can override this by setting `device_verification_url` on the + auth config (`PATCH /auth/config`). When set, that URL is returned as-is + with the `user_code` appended (no `action=device` hint and no embedded + anon key — the page brings its own), so a CLI's `login` command surfaces + the project's own RFC 8628 approval page. With a custom URL, device login + does **not** require managed auth to be enabled; the custom page's origin + must be in the project's auth CORS allowlist to call + `POST /auth/device/verify`. Either way the verification page must + authenticate the end user and call `POST /auth/device/verify` with the + `user_code`. See the device-auth guide for both approaches. + operationId: authDeviceAuthorize + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - client_id + properties: + client_id: + type: string + description: Enabled `device` OAuth client ID for the target project + responses: + '200': + description: Device authorization started + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceAuthorizationResponse' + '400': + description: Invalid request or unauthorized client + content: + application/json: + schema: + $ref: '#/components/schemas/OAuthErrorResponse' + /auth/device/token: + post: + tags: + - OAuth Authentication + summary: Poll device token endpoint + description: | + RFC8628 token polling endpoint. + Returns OAuth errors such as `authorization_pending`, `slow_down`, `access_denied`, and `expired_token`. + operationId: authDeviceToken + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - grant_type + - device_code + - client_id + properties: + grant_type: + type: string + enum: + - urn:ietf:params:oauth:grant-type:device_code + device_code: + type: string + client_id: + type: string + responses: + '200': + description: Device flow completed, auth-user session minted + content: + application/json: + schema: + $ref: '#/components/schemas/AuthTokenResponse' + '400': + description: Polling state/error response + content: + application/json: + schema: + $ref: '#/components/schemas/OAuthErrorResponse' + '403': + description: | + `access_denied` - the approving account's canonical email, or the email + of any of its identities, is not in `allowed_email_domains` while `allowed_email_domains_mode` is + `signup_and_signin`. Re-checked here because approval and redemption + are separate requests. + content: + application/json: + schema: + $ref: '#/components/schemas/OAuthErrorResponse' + /auth/device/verify: + post: + tags: + - OAuth Authentication + summary: Approve or deny a device code + description: | + Browser-side endpoint for authenticated auth-users to approve (`approve`) or deny (`deny`) a `user_code`. + + Called by the verification page after the end user signs in. The grant is + scoped to the project the auth-user token belongs to: approving a + `user_code` issued for a different project returns `403`. This endpoint + does not require managed auth to be enabled, so a custom verification page + (hosted anywhere) can drive approval — it just needs an authenticated + project auth-user access token and, for cross-origin browser calls, the + page origin allowed in the project's auth CORS settings. + operationId: authDeviceVerify + security: + - AuthUserAccessToken: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - user_code + properties: + user_code: + type: string + action: + type: string + enum: + - approve + - deny + default: approve + responses: + '200': + description: Verification action accepted + content: + application/json: + schema: + type: object + properties: + success: + type: boolean + status: + type: string + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/platform/exchange: + post: + tags: + - OAuth Authentication + summary: Exchange auth-user device session for platform token + description: | + Exchanges a verified auth-user device-flow session into a platform token for CLI usage. + The target platform user is derived from authenticated auth-user mapping; client cannot select another user. + operationId: authPlatformExchange + security: + - AuthUserAccessToken: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - client_id + properties: + client_id: + type: string + responses: + '200': + description: Platform token minted + content: + application/json: + schema: + $ref: '#/components/schemas/PlatformExchangeResponse' + '403': + description: | + Exchange not allowed for this session/client/project, or the + account's canonical email, or the email of any of its identities, is + not in `allowed_email_domains` while `allowed_email_domains_mode` is + `signup_and_signin`. The domain is re-checked here because the minted platform token outlives the + session it is exchanged from. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/oauth/providers: + get: + tags: + - OAuth Authentication + summary: List user's linked providers + description: | + Lists the OAuth providers linked to the signed-in user, with the + user's own account ID at each provider. Match on `provider_user_id`, + which never changes, rather than on the login or email. For + GitHub, it is the numeric user ID that GitHub reports elsewhere, such + as a webhook's `sender.id`. + operationId: authListOAuthProviders + security: + - AuthUserAccessToken: [] + responses: + '200': + description: Linked providers + content: + application/json: + schema: + type: object + properties: + providers: + type: array + items: + type: object + required: + - provider + - provider_user_id + - linked_at + - updated_at + properties: + provider: + type: string + provider_user_id: + type: string + description: | + The user's account ID at the provider, as a string. + It stays the same when the user renames the account. + example: '583231' + provider_login: + type: string + description: | + The account's login at the provider when it was + linked, such as a GitHub username. It isn't updated + when the user renames the account. Omitted for + providers without logins. + example: octocat + linked_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/oauth/{provider}/link: + post: + tags: + - OAuth Authentication + summary: Link OAuth provider to current user + description: | + Generates authorization URL to link OAuth provider to existing account. + User must be authenticated. + operationId: authLinkOAuthProvider + security: + - AuthUserAccessToken: [] + parameters: + - name: provider + in: path + required: true + schema: + type: string + enum: + - google + - github + - microsoft + - apple + - name: redirect_url + in: query + schema: + type: string + description: | + URL to redirect to after linking completes (optional). Same + allowed_redirect_urls requirement as GET /auth/oauth/{provider}/authorize. + - name: client_state + in: query + schema: + type: string + maxLength: 255 + description: | + Optional application nonce echoed to redirect_url as `state`. + - name: response_mode + in: query + schema: + type: string + enum: + - code + description: | + Set to `code` to receive a short-lived authorization code at + redirect_url. `redirect_url` is required in this mode. When + omitted, the established session-fragment response is retained for + compatibility with existing clients. + responses: + '200': + description: Authorization URL generated + content: + application/json: + schema: + type: object + properties: + authorization_url: + type: string + '400': + description: redirect_url is not registered in allowed_redirect_urls + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: OAuth provider not configured + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: Provider already linked + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/oauth/{provider}/unlink: + delete: + tags: + - OAuth Authentication + summary: Unlink OAuth provider + description: | + Remove OAuth provider from user's account. Refused when the account would + have no other way to sign in: another linked OAuth provider that's enabled + for the project, or a password while email/password sign-in is on for the + project (`enable_email_password`). + operationId: authUnlinkOAuthProvider + security: + - AuthUserAccessToken: [] + parameters: + - name: provider + in: path + required: true + schema: + type: string + enum: + - google + - github + - microsoft + - apple + responses: + '204': + description: Provider unlinked + '400': + description: Cannot unlink last authentication method + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Provider not linked + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/oauth/{provider}/refresh-token: + post: + tags: + - OAuth Authentication + summary: Refresh OAuth provider token + description: | + Refresh the access token for an OAuth provider using its refresh token. + Allows calling provider APIs on user's behalf (e.g., Google Drive, GitHub repos). + operationId: refreshOAuthProviderToken + security: + - AuthUserAccessToken: [] + parameters: + - name: provider + in: path + required: true + schema: + type: string + enum: + - google + - github + - microsoft + - apple + responses: + '200': + description: Token refreshed successfully + content: + application/json: + schema: + type: object + properties: + message: + type: string + provider: + type: string + expires_in: + type: integer + '400': + description: No refresh token available or refresh failed + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Provider not linked + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/oauth/{provider}/token: + get: + tags: + - OAuth Authentication + summary: Get current provider access token + description: | + Get valid access token for OAuth provider. + Automatically refreshes if expired. + operationId: getOAuthProviderToken + security: + - AuthUserAccessToken: [] + parameters: + - name: provider + in: path + required: true + schema: + type: string + enum: + - google + - github + - microsoft + - apple + responses: + '200': + description: Current access token + content: + application/json: + schema: + type: object + properties: + message: + type: string + provider: + type: string + expires_in: + type: integer + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Provider not linked + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /auth/oauth/{provider}/call-api: + post: + tags: + - OAuth Authentication + summary: Call OAuth provider API + description: | + Make an authenticated request to an OAuth provider's API on behalf of the user. + The user's stored access token is automatically used and refreshed if needed. + + The request is always sent to the provider's fixed API base URL joined with + the caller-supplied `endpoint`. `endpoint` must be a relative path beginning + with `/` (optionally with a query string); it cannot change the target host. + Absolute URLs, protocol-relative `//host` values, or userinfo (`@host`) are + rejected with `400` so the request can never be redirected to another host. + + Examples of `endpoint`: + - Google userinfo: `/oauth2/v1/userinfo` + - GitHub repositories: `/user/repos` + - Microsoft Graph profile: `/me` + + The response wraps the provider's raw JSON value with request metadata. + An empty provider body is represented as `data: null`; the envelope + preserves the provider's HTTP status in `status_code`, including errors. + Provider response bodies are limited to 8 MiB after decompression. + Transport failures, invalid JSON (including invalid UTF-8), and oversized + bodies return `502`. Provider redirects to another origin are blocked and + return `400`. + operationId: callOAuthProviderAPI + security: + - AuthUserAccessToken: [] + parameters: + - name: provider + in: path + required: true + schema: + type: string + enum: + - google + - github + - microsoft + - apple + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - endpoint + properties: + endpoint: + type: string + description: | + Relative path on the provider's API, beginning with `/`. It is + joined with the provider's fixed base URL; it must not contain a + scheme, host, userinfo, or a leading `//`. + example: /user/repos + method: + type: string + enum: + - GET + - POST + default: GET + description: HTTP method to use + body: + type: object + additionalProperties: true + description: Request body for POST requests + responses: + '200': + description: Provider API response + content: + application/json: + schema: + type: object + description: OAuth provider API response envelope + required: + - provider + - endpoint + - status_code + - data + properties: + provider: + type: string + enum: + - google + - github + - microsoft + - apple + endpoint: + type: string + status_code: + type: integer + minimum: 100 + maximum: 599 + data: + description: Raw provider JSON value, or null when the provider returns no body + nullable: true + '400': + description: | + Invalid request (for example: missing `endpoint`, an `endpoint` that is + not a relative path, or an unsupported HTTP method), or a provider + redirect to another origin. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: OAuth provider configuration not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Failed to create the provider API request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '502': + description: Provider transport failure, invalid JSON, or response body larger than 8 MiB + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/anon-keys: + get: + tags: + - Anon Keys + summary: List anon keys + description: | + Supports two mutually exclusive pagination modes. Offset mode uses `page` + and `limit` and is the default when neither `cursor` nor `search` is + supplied (first page, default `limit`). Cursor mode uses `cursor` and + `limit`, supports `search` (case-insensitive name match), and returns + `next_cursor`. Sending both `page` and `cursor` (or `page` and `search`) + returns 400. + operationId: listAnonKeys + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/EndingBefore' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Search' + responses: + '200': + description: List of anon keys + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/AnonKey' + total: + type: integer + description: Total number of items matching the query (so the UI can render numbered pages). + has_more: + type: boolean + description: Whether a next page exists. + next_cursor: + type: string + description: Opaque cursor for the next page (cursor pagination only) + prev_cursor: + type: string + description: Opaque cursor for the previous page (cursor pagination only). Send as `ending_before`. + post: + tags: + - Anon Keys + summary: Create anon key + operationId: createAnonKey + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + properties: + name: + type: string + description: | + Key name for identification. + Can only contain letters, numbers, underscores, and hyphens. + pattern: ^[A-Za-z0-9_-]+$ + minLength: 1 + maxLength: 255 + example: frontend-app + permissions: + type: array + items: + type: string + enum: + - auth.signup + - auth.signin + - auth.refresh + - auth.logout + - auth.password_reset + - auth.confirm_email + - auth.resend_confirmation + - storage.upload + - storage.download + - storage.list + - storage.delete + - realtime.connect + - realtime.subscribe + - realtime.publish + - functions.invoke + description: | + Optional list of permissions for this key. + If not provided, defaults to auth-only permissions: auth.signup, auth.signin, auth.refresh, auth.logout, auth.password_reset, auth.confirm_email, auth.resend_confirmation. + Storage, realtime, and functions permissions must be explicitly added if needed. + example: + - auth.signup + - auth.signin + - auth.refresh + - auth.logout + responses: + '201': + description: Anon key created + content: + application/json: + schema: + $ref: '#/components/schemas/AnonKey' + '400': + description: Invalid key name or request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: Key with this name already exists + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/anon-keys/{keyId}: + get: + tags: + - Anon Keys + summary: Get anon key + description: Get details of a specific anon key + operationId: getAnonKey + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: keyId + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: Anon key details + content: + application/json: + schema: + $ref: '#/components/schemas/AnonKey' + '404': + description: Key not found + delete: + tags: + - Anon Keys + summary: Revoke anon key + description: Revokes key - it will immediately stop working + operationId: revokeAnonKey + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: keyId + in: path + required: true + schema: + type: string + format: uuid + responses: + '204': + description: Key revoked + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + description: Key not found + '409': + description: Cannot delete the project's default anon key + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/anon-keys/{keyId}/regenerate: + post: + tags: + - Anon Keys + summary: Regenerate anon key + description: Generate new JWT value for existing key + operationId: regenerateAnonKey + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: keyId + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: Key regenerated + content: + application/json: + schema: + $ref: '#/components/schemas/AnonKey' + '404': + description: Anon key not found, including deletion before the updated key can be returned + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/anon-keys/{keyId}/set-default: + post: + tags: + - Anon Keys + summary: Set default anon key + description: Promotes the given key to the project's configured default. At most one key per project can be default. + operationId: setDefaultAnonKey + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: keyId + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: Key set as default + content: + application/json: + schema: + $ref: '#/components/schemas/AnonKey' + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + description: Anon key not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/access-tokens: + get: + tags: + - Project Access Tokens + summary: List a project's access tokens + description: | + Lists the project's access tokens, newest first. Secrets are never + returned: only a hash is stored, so a token's value exists solely in the + response to the create call. + + Only tokens that can still authenticate are returned by default, so + revoked and expired ones are hidden. Pass `include_revoked=true` to see + them, which is how you find out what a key did before it stopped working. + + Delegated grants are hidden by default too. A first-party app you have + allowed to act on this project mints one every few minutes, and you + revoke the app's access as a whole rather than grant by grant. Pass + `include_delegated=true` to list them; they have scope `delegated`. + They never count toward the project's limit of 100 live tokens. + + Requires a platform token. A project access token cannot manage project + access tokens, so a leaked credential cannot enumerate or replace itself. + operationId: listProjectAccessTokens + security: + - UserToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Search' + - name: include_revoked + in: query + required: false + description: | + Include tokens that can no longer authenticate — both revoked and + expired ones. + schema: + type: boolean + default: false + - name: include_delegated + in: query + required: false + description: | + Include delegated grants: short tokens a first-party app mints for + one run from the access you allowed it. + schema: + type: boolean + default: false + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedProjectAccessTokens' + '401': + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - not the project owner, or a project access token was used + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + tags: + - Project Access Tokens + summary: Create a project access token + description: | + Creates a project access token and returns its secret. + + The secret is in this response and nowhere else. Only its hash is + stored, so it cannot be retrieved, displayed, or recovered later — save + it when you create it. + + The name must be unique within the project, so a retry cannot mint a + second credential. It cannot recover the first one either. A retry that + returns `409` with code `access_token_name_exists` means the original + create committed and its secret is unrecoverable: list the project's + tokens, revoke the one holding that name, and create it again. + + Requires a platform token. + operationId: createProjectAccessToken + security: + - UserToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateProjectAccessTokenRequest' + responses: + '201': + description: Token created - save the secret now, it cannot be retrieved again + content: + application/json: + schema: + $ref: '#/components/schemas/CreatedProjectAccessToken' + '400': + description: Bad request - invalid name, scope, or expiry + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - not the project owner, or a project access token was used + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: | + Duplicate name, token limit reached, or the project is being + deleted. Tell them apart with `code`, which is one of + `access_token_name_exists`, `access_token_limit_reached`, or + `project_deleting` — the message text is not a contract. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/access-tokens/usage: + get: + tags: + - Project Access Tokens + summary: Per-day request counts for every access token in a project + description: | + Returns a zero-filled daily series of request counts for each of the + project's access tokens, oldest first. Every day in the window is + present, so a gap reads as zero rather than missing. + + Revoked tokens are included, because the traffic they made before + revocation is usually the reason you are looking. Delegated grants are + not, as the token list hides them by default; read one grant's usage by + its ID. + + `days` defaults to 30 and is capped at 60, which is also how long per-day + counts are retained — a longer window cannot be answered. + + A platform token sees every token in the project. A project access token + sees only its own row, so it can watch its own traffic without being + able to enumerate the project's other credentials by name. + operationId: listProjectAccessTokensUsage + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: days + in: query + required: false + description: Number of trailing days to return (1-60, default 30). + schema: + type: integer + minimum: 1 + maximum: 60 + default: 30 + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectAccessTokenUsage' + '400': + description: Bad request - invalid window + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - not the project owner + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/access-tokens/{tokenId}: + get: + tags: + - Project Access Tokens + summary: Get a project access token + description: | + Returns one token's metadata. Never its secret, which is not stored in a + recoverable form. + + Requires a platform token. + operationId: getProjectAccessToken + security: + - UserToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/TokenId' + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessToken' + '401': + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - not the project owner, or a project access token was used + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Token not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + tags: + - Project Access Tokens + summary: Revoke a project access token + description: | + Revokes the token. It stops authenticating immediately in the region + handling this call and within seconds across Volcano's other regions. + + The record is kept rather than deleted, so the token's name, prefix, last + use, and request history stay available — which is what you need if you + are revoking because a secret leaked. Revoking an already-revoked token + succeeds. + + Revoking does not undo anything the token already did. Treat whatever it + could reach as exposed and rotate accordingly. + + Requires a platform token. + operationId: revokeProjectAccessToken + security: + - UserToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/TokenId' + responses: + '204': + description: Token revoked + '401': + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - not the project owner, or a project access token was used + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Token not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: Conflict - the project is being deleted + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/access-tokens/{tokenId}/usage: + get: + tags: + - Project Access Tokens + summary: Per-day request counts for one access token + description: | + Returns a zero-filled daily series of request counts for a single token, + oldest first, so the response always has exactly `days` entries. + + `days` defaults to 30 and is capped at 60, matching how long per-day + counts are retained. + + A project access token may read only its own usage; asking for another + token's returns `403`. A platform token may read any token in the + project. + operationId: getProjectAccessTokenUsage + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/TokenId' + - name: days + in: query + required: false + description: Number of trailing days to return (1-60, default 30). + schema: + type: integer + minimum: 1 + maximum: 60 + default: 30 + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectAccessTokenUsage' + '400': + description: Bad request - invalid window + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized - invalid or missing token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden - not the project owner + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Token not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/service-keys: + get: + tags: + - Service Keys + summary: List service keys (paginated) + description: | + List all service role keys for a project with pagination. + + **WARNING:** Service keys bypass RLS - for backend/admin use only! + operationId: listServiceKeys + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/EndingBefore' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Search' + responses: + '200': + description: Paginated list of service keys + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedServiceKeys' + post: + tags: + - Service Keys + summary: Create service key + description: | + Create a new service role key for admin operations. + + **WARNING:** Service keys bypass all RLS policies! + Store securely and NEVER expose in frontend code. + + A key that holds `ai.invoke` is an AI key for the Volcano AI gateway, + which calls models on the project's behalf. Volcano pays the model + provider for those calls; the project is not billed for them. It holds `ai.invoke` and nothing else, and is marked as created + by a person, so the gateway can tell it from every other key: a key + that holds `"*"`, and a key created before AI keys existed, never + count. Only a person creates one: signed in to the dashboard, or with + a `volcano login` token whose sign-in is live. A project access token, + a request made through MCP, a platform token created through the token + API, and a sign-in that ended get `403` with code `person_required`. + On a local server, the local platform token counts as the person. + Reading or regenerating an AI key takes the same person as creating + it, and lists leave its value out. An AI key only mints run tokens: + the database API and realtime refuse it, whether or not service key + scopes apply to them yet. While the `ai_gateway` capability + is unavailable, asking for `ai.invoke` answers `404` with code + `feature_unavailable`; existing keys keep working with the other + service key routes. + + A key that holds `grants.mint` lets a first-party app, such as the + Builder, mint delegated grants. It too holds that permission alone + and takes a person, as an AI key does. Only a registered first-party + app's project may hold one, and only its owner creates it: another + project gets `403` with code + `first_party_app_required`. The `ai_gateway` capability doesn't apply + to it, and it carries no AI marker. + operationId: createServiceKey + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + properties: + name: + type: string + description: | + Descriptive name for the key (e.g., "admin-dashboard", "background-jobs"). + Can only contain letters, numbers, underscores, and hyphens. + pattern: ^[A-Za-z0-9_-]+$ + minLength: 1 + maxLength: 255 + example: admin-dashboard + permissions: + type: array + items: + type: string + description: | + Optional least-privilege scope for the key. When omitted, empty, or + containing only blank strings, the key is granted full access (["*"]) + for backward compatibility. Provide an explicit list (e.g. + ["functions.invoke", "locks.manage"]) to restrict the key; "*" + grants everything. Scope enforcement applies to function invocation, + storage object operations, project locks, sandboxes, and server-side auth proxy + metadata (auth.signin, auth.signup, auth.refresh, auth.logout, + auth.password_reset). A key scoped to a list without "*" reads, stops, + and messages a durable execution only with the `client_token` its + start returned. Today the scope doesn't restrict the database API, and + restricts realtime only on a durable run's channel: every service key + queries every table with RLS bypassed, subscribes to every other channel, + and publishes on broadcast channels. Once Volcano applies scopes to the + database API and realtime, a key without "*" gets 403 from the database + API, needs realtime.subscribe for broadcast and presence channels and + realtime.publish to publish, and needs "*" for table changes. `ai.invoke` + and `grants.mint` are reserved: "*" doesn't include them, only a person + may ask for one, and it must be the key's only permission. + example: + - functions.invoke + - locks.manage + responses: + '201': + description: Service key created - save the key_value immediately! + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceKey' + '400': + description: Invalid key name or request, or `ai.invoke` or `grants.mint` asked for beside another permission. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: 'Code `person_required` means a person did not ask for a key that holds `ai.invoke` or `grants.mint`: a full-scope project access token, MCP, a platform token created through the token API, or a `volcano login` token whose sign-in ended made the request. Create the key signed in to the dashboard or with `volcano login`. Code `first_party_app_required` means `grants.mint` was asked for on a project that is not a registered first-party app''s. Without a code: the project belongs to another account, a read-only project access token made the request, or the account is read-only.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not found. Code `feature_unavailable` means `ai.invoke` was asked for while the `ai_gateway` capability is unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: Key with this name already exists + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/service-keys/{keyId}: + get: + tags: + - Service Keys + summary: Get service key + description: Get details of a specific service key + operationId: getServiceKey + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: keyId + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: Service key details + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceKey' + '403': + description: | + Without a code: the key belongs to another project, or a read-only + project access token asked for a credential. + Code `person_required` means the key holds `ai.invoke` or + `grants.mint` and a person signed in did not make the request: a + full-scope project access token, MCP, a platform token created + through the token API, or a `volcano login` token whose sign-in + ended made it. Use the dashboard or `volcano login`. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Key not found + delete: + tags: + - Service Keys + summary: Delete service key + description: | + Permanently delete a service key. + Any services using this key will immediately lose access. + operationId: deleteServiceKey + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: keyId + in: path + required: true + schema: + type: string + format: uuid + responses: + '204': + description: Key deleted + /projects/{id}/service-keys/{keyId}/regenerate: + post: + tags: + - Service Keys + summary: Regenerate service key + description: | + Generate new JWT value for existing key. + The old key stops working within a few seconds. + Update your backend services with the new key before regenerating in production. + operationId: regenerateServiceKey + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: keyId + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: Key regenerated - save the new key_value immediately! + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceKey' + '403': + description: | + Without a code: the key belongs to another project, or a read-only + project access token asked to regenerate it. + Code `person_required` means the key holds `ai.invoke` or + `grants.mint` and a person signed in did not make the request: a + full-scope project access token, MCP, a platform token created + through the token API, or a `volcano login` token whose sign-in + ended made it. Use the dashboard or `volcano login`. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/storage/buckets: + get: + tags: + - Storage Buckets + summary: List all storage buckets in a project + description: | + With no pagination params, returns the full bucket list as a bare array + (legacy). Supplying `cursor`, `ending_before`, `search`, or `limit` + switches to keyset (cursor) pagination and returns a paginated envelope + with `next_cursor`/`prev_cursor` and a filtered `total`. + operationId: listStorageBuckets + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/EndingBefore' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Search' + responses: + '200': + description: | + Either the full bucket list (bare array, legacy) or a paginated + envelope when cursor pagination is requested. + content: + application/json: + schema: + oneOf: + - type: array + items: + $ref: '#/components/schemas/StorageBucket' + - $ref: '#/components/schemas/PaginatedStorageBuckets' + post: + tags: + - Storage Buckets + summary: Create a new storage bucket + operationId: createStorageBucket + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateStorageBucketRequest' + responses: + '201': + description: Bucket created + content: + application/json: + schema: + $ref: '#/components/schemas/StorageBucket' + '409': + description: Bucket already exists + /projects/{id}/storage/buckets/{bucketName}: + get: + tags: + - Storage Buckets + summary: Get storage bucket by name + operationId: getStorageBucket + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/BucketName' + responses: + '200': + description: Bucket details + content: + application/json: + schema: + $ref: '#/components/schemas/StorageBucket' + '404': + description: Bucket not found + patch: + tags: + - Storage Buckets + summary: Update storage bucket settings + operationId: updateStorageBucket + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/BucketName' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateStorageBucketRequest' + responses: + '200': + description: Bucket updated + content: + application/json: + schema: + $ref: '#/components/schemas/StorageBucket' + delete: + tags: + - Storage Buckets + summary: Delete storage bucket and all objects + operationId: deleteStorageBucket + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/BucketName' + responses: + '200': + description: Bucket deleted + /projects/{id}/storage/buckets/{bucketName}/policies: + get: + tags: + - Storage Policies + summary: List storage policies for a bucket + operationId: listStoragePolicies + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/BucketName' + responses: + '200': + description: List of policies + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/StoragePolicy' + post: + tags: + - Storage Policies + summary: Create a storage policy + operationId: createStoragePolicy + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/BucketName' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateStoragePolicyRequest' + responses: + '201': + description: Policy created + content: + application/json: + schema: + $ref: '#/components/schemas/StoragePolicy' + /projects/{id}/storage/buckets/{bucketName}/policies/{policyId}: + delete: + tags: + - Storage Policies + summary: Delete a storage policy + operationId: deleteStoragePolicy + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/BucketName' + - name: policyId + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: Policy deleted + '404': + description: Project, bucket, or policy not found. Also returned when the policy ID is malformed or belongs to another bucket. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/storage/objects: + get: + tags: + - Storage Admin + summary: List all storage objects in a project + description: | + Returns a paginated list of all storage objects across all buckets in the project. + Supports filtering by owner and pagination. + operationId: listStorageObjectsAdmin + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - name: owner_id + in: query + description: Filter by owner user ID + schema: + type: string + format: uuid + - name: page + in: query + description: Page number (1-based) + schema: + type: integer + default: 1 + minimum: 1 + - name: limit + in: query + description: Items per page + schema: + type: integer + default: 50 + minimum: 1 + maximum: 100 + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/EndingBefore' + - $ref: '#/components/parameters/Offset' + - $ref: '#/components/parameters/Search' + responses: + '200': + description: Paginated list of storage objects + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/StorageObjectWithBucket' + page: + type: integer + limit: + type: integer + total: + type: integer + has_more: + type: boolean + next_cursor: + type: string + description: Opaque cursor for the next page (cursor pagination only) + prev_cursor: + type: string + description: Opaque cursor for the previous page (cursor pagination only). Send as `ending_before`. + /projects/{id}/storage/stats: + get: + tags: + - Storage Admin + summary: Get storage statistics for a project + description: Returns aggregate storage statistics including bucket count, object count, and total size. + operationId: getStorageStats + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + responses: + '200': + description: Storage statistics + content: + application/json: + schema: + $ref: '#/components/schemas/StorageStats' + /projects/{id}/realtime/config: + get: + tags: + - Realtime + summary: Get realtime configuration for a project + description: Returns the realtime configuration including enabled features and limits. + operationId: getRealtimeConfig + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + responses: + '200': + description: Realtime configuration + content: + application/json: + schema: + $ref: '#/components/schemas/RealtimeConfig' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + put: + tags: + - Realtime + summary: Update realtime configuration for a project + description: Updates realtime settings including feature toggles and limits. + operationId: updateRealtimeConfig + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateRealtimeConfigRequest' + responses: + '200': + description: Updated realtime configuration + content: + application/json: + schema: + $ref: '#/components/schemas/RealtimeConfig' + '400': + description: Invalid configuration values + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/realtime/stats: + get: + tags: + - Realtime + summary: Get realtime statistics for a project + description: Returns realtime usage statistics including connection counts and subscribed tables. + operationId: getRealtimeStats + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + responses: + '200': + description: Realtime statistics + content: + application/json: + schema: + $ref: '#/components/schemas/RealtimeStats' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /realtime/v1/publish: + post: + tags: + - Realtime + summary: Publish a message to a Realtime channel + description: | + Sends one message to a broadcast or grant channel of the project + embedded in the service-role key, for a backend that holds no + WebSocket, such as a function. The key needs `realtime.publish`. + + `channel` is a client channel: `broadcast:`, or + `grant:` for a channel only Realtime grant holders watch. Every + subscriber receives `{"type": , "payload": }` as the + message data, the shape `channel.on(, ...)` matches. + + The publish is metered like any server publish: the publish plus one + per subscriber it reaches. Messages are not stored; a subscriber that + was not connected misses it. A project's publishes share the rate a + WebSocket client publishes at; over it the answer is 429 + `realtime_publish_rate_limited`. + operationId: publishRealtimeMessage + security: + - ServiceRoleKey: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RealtimePublishRequest' + responses: + '202': + description: The message was sent to the channel's subscribers + content: + application/json: + schema: + $ref: '#/components/schemas/RealtimePublishResult' + '400': + description: 'The body breaks the schema, such as a channel that is not `broadcast:` or `grant:`, an invalid event or payload; these answers carry no code. Code `invalid_channel`: the server refuses the channel''s name. Code `feature_unavailable`: a grant channel while Realtime grants are off.' + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Missing or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: A non-service credential was supplied or the service key lacks `realtime.publish` + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Publishing over HTTP is not available here (`feature_unavailable`). `GET /capabilities` lists `realtime.http_publish` unavailable while it is. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: Realtime, or broadcast for a broadcast channel, is off for the project (`realtime_disabled`) + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: The message is larger than the project's Realtime message size (`message_too_large`) + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: The project used its monthly Realtime messages (`realtime_message_limit_exceeded`), or is publishing faster than its publish rate (`realtime_publish_rate_limited`) + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: | + Realtime is paused (`feature_paused`); try again after + `Retry-After`. Without a code, the message could not be metered + or sent. + headers: + Retry-After: + description: Seconds to wait before trying again. Sent with `feature_paused`. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /storage/{bucketName}: + get: + tags: + - Storage Objects + summary: List objects in a bucket + operationId: listStorageObjects + security: + - AnonKey: [] + - ServiceRoleKey: [] + - AuthUserAccessToken: [] + parameters: + - $ref: '#/components/parameters/BucketName' + - name: prefix + in: query + description: Filter objects by path prefix + schema: + type: string + - name: limit + in: query + description: Maximum objects to return + schema: + type: integer + default: 50 + maximum: 1000 + - name: cursor + in: query + description: Pagination cursor + schema: + type: string + responses: + '200': + description: List of objects + content: + application/json: + schema: + $ref: '#/components/schemas/StorageListResponse' + '403': + description: Access denied by storage policy + '429': + $ref: '#/components/responses/BandwidthCapExceeded' + /locks/{key}/lease: + post: + tags: + - Locks + summary: Acquire a project lock + description: | + Acquires a project-scoped lease using the project embedded in the service-role key. + The caller must hold the `locks.manage` permission. Repeating the request with the + same lock token is idempotent and resets that lease to the requested TTL. A different + live owner receives `409 lock_held`; a caller whose own lease already lapsed receives + `409 lock_ownership_lost`. + operationId: acquireProjectLock + security: + - ServiceRoleKey: [] + parameters: + - $ref: '#/components/parameters/LockKey' + - $ref: '#/components/parameters/LockToken' + - $ref: '#/components/parameters/LockRequestId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectLockLeaseRequest' + responses: + '201': + description: Lease acquired + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectLockLease' + '400': + description: Invalid lock key, token, or TTL + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Missing or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: A non-service credential was supplied or the service key lacks `locks.manage` + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: | + The lock is held by another live lease (`lock_held`), or the caller's own lease + lapsed and is not yet reclaimable (`lock_ownership_lost`). + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Project lock request limit exceeded + headers: + Retry-After: + description: Seconds until the current fixed-minute window ends. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Lock service unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + patch: + tags: + - Locks + summary: Renew a project lock + description: | + Renews a lease owned by the supplied lock token. The request must arrive + more than one second before `expires_at`; this safety margin prevents + clock skew between regional API instances from resurrecting an expired + lease. + operationId: renewProjectLock + security: + - ServiceRoleKey: [] + parameters: + - $ref: '#/components/parameters/LockKey' + - $ref: '#/components/parameters/LockToken' + - $ref: '#/components/parameters/LockRequestId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectLockLeaseRequest' + responses: + '200': + description: Lease renewed + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectLockLease' + '400': + description: Invalid lock key, token, or TTL + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Missing or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: A non-service credential was supplied or the service key lacks `locks.manage` + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: The lease expired or is owned by another token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Project lock request limit exceeded + headers: + Retry-After: + description: Seconds until the current fixed-minute window ends. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Lock service unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + tags: + - Locks + summary: Release a project lock + description: Releases a lease only when the supplied lock token still owns it. + operationId: releaseProjectLock + security: + - ServiceRoleKey: [] + parameters: + - $ref: '#/components/parameters/LockKey' + - $ref: '#/components/parameters/LockToken' + - $ref: '#/components/parameters/LockRequestId' + responses: + '204': + description: Lease released + '400': + description: Invalid lock key or token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Missing or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: A non-service credential was supplied or the service key lacks `locks.manage` + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: The lease is owned by another token + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Project lock request limit exceeded + headers: + Retry-After: + description: Seconds until the current fixed-minute window ends. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Lock service unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /locks/{key}: + get: + tags: + - Locks + summary: Read a project lock + description: | + Reports whether the lock is currently held, when its lease expires, and the + holder's fencing token. `held` follows takeover eligibility rather than raw + expiry, so `held: false` means an acquire would succeed now. No lock token is + required, making this usable for monitoring and recovery. + operationId: getProjectLock + security: + - ServiceRoleKey: [] + parameters: + - $ref: '#/components/parameters/LockKey' + - $ref: '#/components/parameters/LockRequestId' + responses: + '200': + description: Current lock state + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectLockState' + '400': + description: Invalid lock key + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Missing or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: A non-service credential was supplied or the service key lacks `locks.manage` + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Project lock request limit exceeded + headers: + Retry-After: + description: Seconds until the current fixed-minute window ends. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Lock service unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + delete: + tags: + - Locks + summary: Force release a project lock + description: | + Drops the lease whatever token holds it, for recovering a lock whose holder + died without releasing. Use `DELETE /locks/{key}/lease` for normal release. + + This breaks mutual exclusion by itself: the previous holder keeps working + until its own renewal fails. Guard the protected resource with the lease's + `fencing_token`, which the next acquisition raises, so a write from the + displaced holder can be rejected. Succeeds when the lock is already absent. + operationId: forceReleaseProjectLock + security: + - ServiceRoleKey: [] + parameters: + - $ref: '#/components/parameters/LockKey' + - $ref: '#/components/parameters/LockRequestId' + responses: + '204': + description: Lock released + '400': + description: Invalid lock key + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Missing or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: A non-service credential was supplied or the service key lacks `locks.manage` + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: Project lock request limit exceeded + headers: + Retry-After: + description: Seconds until the current fixed-minute window ends. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Lock service unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /storage/{bucketName}/move: + post: + tags: + - Storage Objects + summary: Move/rename an object + operationId: moveStorageObject + security: + - ServiceRoleKey: [] + - AuthUserAccessToken: [] + parameters: + - $ref: '#/components/parameters/BucketName' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/StorageMoveRequest' + responses: + '200': + description: Object moved + content: + application/json: + schema: + $ref: '#/components/schemas/StorageObject' + '403': + description: Access denied by storage policy + '429': + $ref: '#/components/responses/BandwidthCapExceeded' + /storage/{bucketName}/copy: + post: + tags: + - Storage Objects + summary: Copy an object + operationId: copyStorageObject + security: + - ServiceRoleKey: [] + - AuthUserAccessToken: [] + parameters: + - $ref: '#/components/parameters/BucketName' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/StorageCopyRequest' + responses: + '201': + description: Object copied + content: + application/json: + schema: + $ref: '#/components/schemas/StorageObject' + '403': + description: Access denied by storage policy + '429': + $ref: '#/components/responses/BandwidthCapExceeded' + /storage/{bucketName}/{path}: + post: + tags: + - Storage Objects + summary: Upload a file or create resumable session + description: | + Unified endpoint for file uploads. Behavior depends on Content-Type and headers: + + **Simple Upload (multipart/form-data):** + Upload a complete file in a single request. Best for files under 100MB. + + **Create Resumable Session (application/json):** + Create a session for chunked uploads. Best for large files or unreliable networks. + Requires: `Content-Type: application/json` with body `{"filename": "...", "content_type": "...", "total_size": ...}` + + **Complete Resumable Session:** + Complete a session after all parts are uploaded. + Requires: `X-Upload-Session` header with session ID and `X-Upload-Complete: true` header. + + **Resumable Session Ownership:** + A session created with a user access token remains bound to that user. A session + created with an anon key remains bound to that exact anon key. Reuse the same + identity or anon key for part uploads, status, completion, and abort requests; + an ownership mismatch returns `404`. + operationId: uploadStorageObject + security: + - AnonKey: [] + - ServiceRoleKey: [] + - AuthUserAccessToken: [] + parameters: + - $ref: '#/components/parameters/BucketName' + - name: path + in: path + required: true + description: Object path within bucket + schema: + type: string + - name: X-Upload-Session + in: header + required: false + description: Upload session ID (for completing resumable uploads) + schema: + type: string + - name: X-Upload-Complete + in: header + required: false + description: Set to "true" to complete a resumable upload session + schema: + type: string + enum: + - 'true' + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + required: + - file + properties: + file: + type: string + format: binary + description: File to upload (simple upload) + application/json: + schema: + $ref: '#/components/schemas/CreateUploadSessionRequest' + responses: + '200': + description: Resumable upload completed (when X-Upload-Complete=true) + content: + application/json: + schema: + $ref: '#/components/schemas/CompleteUploadSessionResponse' + '201': + description: File uploaded or session created + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/StorageObject' + - $ref: '#/components/schemas/CreateUploadSessionResponse' + '400': + description: | + Bad request. This can occur when: + - MIME type is not in the bucket's allowed_mime_types list + - File exceeds the bucket's configured file_size_limit + - File exceeds the global maximum upload size (5GB) + - Invalid request body or missing required fields + '403': + description: Access denied by storage policy + '404': + description: Resumable upload session not found or not owned by this credential + '413': + description: | + File size exceeds plan-based limits. This occurs when: + - File exceeds the plan-based maximum file size (HOBBY or SUPERAGENT tier) + - The account on the HOBBY plan holds its file-storage allowance. + Enforcement is eventual: uploads are accepted until Volcano's + next allowance check sees the account at its allowance + '429': + $ref: '#/components/responses/BandwidthCapExceeded' + put: + tags: + - Storage Objects + summary: Upload a part of a resumable upload + description: | + Upload a single part of a resumable upload session. + + **Requirements:** + - Part numbers start at 1 + - All parts except the last must be at least 5MB + - Maximum part size is 25MB + - Parts can be uploaded in any order + - Re-uploading a part overwrites the previous upload + - Anonymous sessions must reuse the exact anon key that created the session + operationId: uploadPart + security: + - AnonKey: [] + - ServiceRoleKey: [] + - AuthUserAccessToken: [] + parameters: + - $ref: '#/components/parameters/BucketName' + - name: path + in: path + required: true + description: Object path within bucket + schema: + type: string + - name: X-Upload-Session + in: header + required: true + description: Upload session ID + schema: + type: string + - name: X-Part-Number + in: header + required: true + description: Part number (1 to 10000) + schema: + type: integer + minimum: 1 + maximum: 10000 + requestBody: + required: true + content: + application/octet-stream: + schema: + type: string + format: binary + responses: + '200': + description: Part uploaded + content: + application/json: + schema: + $ref: '#/components/schemas/UploadSessionPart' + '400': + description: Invalid part number or part data + '403': + description: Access denied + '404': + description: Session not found or not owned by this credential + get: + tags: + - Storage Objects + summary: Download a file or get upload session status + description: | + Download a file, or get the status of a resumable upload session. + + **File Download (default):** + Downloads the file at the specified path. + + **Session Status (with X-Upload-Session header):** + Returns the status of a resumable upload session, including which parts have been uploaded. + Anonymous sessions must reuse the exact anon key that created the session. + operationId: downloadStorageObject + security: + - AnonKey: [] + - ServiceRoleKey: [] + - AuthUserAccessToken: [] + parameters: + - $ref: '#/components/parameters/BucketName' + - name: path + in: path + required: true + description: Object path within bucket + schema: + type: string + - name: Range + in: header + required: false + description: | + HTTP Range header for partial downloads. + Format: bytes=start-end or bytes=start- + Examples: bytes=0-1023, bytes=1000- + schema: + type: string + pattern: ^bytes=\d+-\d*$ + - name: X-Upload-Session + in: header + required: false + description: Upload session ID (to get session status instead of downloading) + schema: + type: string + responses: + '200': + description: File content or session status + headers: + Content-Type: + schema: + type: string + Content-Length: + schema: + type: integer + ETag: + schema: + type: string + content: + application/octet-stream: + schema: + type: string + format: binary + application/json: + schema: + $ref: '#/components/schemas/UploadSessionStatusResponse' + '206': + description: Partial content (range request) + '400': + description: Invalid Range header format + '403': + description: Access denied by storage policy + '404': + description: Object or session not found, or session not owned by this credential + '416': + $ref: '#/components/responses/StorageRangeNotSatisfiable' + '429': + $ref: '#/components/responses/BandwidthCapExceeded' + delete: + tags: + - Storage Objects + summary: Delete a file or abort upload session + description: | + Delete a file, or abort a resumable upload session. + + **File Delete (default):** + Deletes the file at the specified path. + + **Abort Session (with X-Upload-Session header):** + Aborts a resumable upload session and cleans up any uploaded parts. + Anonymous sessions must reuse the exact anon key that created the session. + operationId: deleteStorageObject + security: + - AnonKey: [] + - ServiceRoleKey: [] + - AuthUserAccessToken: [] + parameters: + - $ref: '#/components/parameters/BucketName' + - name: path + in: path + required: true + description: Object path within bucket + schema: + type: string + - name: X-Upload-Session + in: header + required: false + description: Upload session ID (to abort session instead of deleting file) + schema: + type: string + responses: + '200': + description: Object deleted or session aborted + '403': + description: Access denied by storage policy + '404': + description: Object or session not found, or session not owned by this credential + '429': + $ref: '#/components/responses/BandwidthCapExceeded' + /storage/{bucketName}/{path}/visibility: + patch: + tags: + - Storage Objects + summary: Update file visibility (public/private) + description: | + Change whether a file is publicly accessible. Only the file owner or a service key can change visibility. + If the bucket defines UPDATE policies, the owner must also satisfy one of them. + + - Public files can be downloaded with just an anon key (no user authentication required) + - Private files (default) require authentication and must pass policy checks + - All downloads go through the Volcano API - there is no direct access to the underlying store + operationId: updateStorageObjectVisibility + security: + - ServiceRoleKey: [] + - AuthUserAccessToken: [] + parameters: + - $ref: '#/components/parameters/BucketName' + - name: path + in: path + required: true + description: Object path within bucket + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/StorageVisibilityRequest' + responses: + '200': + description: Visibility updated + content: + application/json: + schema: + $ref: '#/components/schemas/StorageObject' + '403': + description: Not the file owner or denied by the bucket's UPDATE policies + '404': + description: Object not found + /public/{projectId}/{bucketName}/{path}: + get: + tags: + - Storage Objects + summary: Download a public file (no authentication required) + description: | + Download a file that has been marked as public. This endpoint requires NO authentication. + + **Access Requirements:** + - The file must have `is_public: true` set via the visibility endpoint + - Private files will return 403 Forbidden + + **Use Cases:** + - Shareable public URLs for profile pictures, public documents, etc. + - Embedding public files on external websites + - Direct linking without requiring SDK or authentication + + **URL Format:** + ``` + GET /public/{projectId}/{bucketName}/{path} + ``` + + **Example:** + ``` + https://api.volcano.dev/public/abc123/avatars/user-photo.jpg + ``` + + **CORS:** + This endpoint allows all origins since the file is already public. + operationId: downloadPublicFile + parameters: + - name: projectId + in: path + required: true + description: Project ID + schema: + type: string + format: uuid + - $ref: '#/components/parameters/BucketName' + - name: path + in: path + required: true + description: Object path within bucket + schema: + type: string + responses: + '200': + description: File content + content: + '*/*': + schema: + type: string + format: binary + '206': + description: Partial content (range request) + '404': + description: Not found (file doesn't exist or is not public) + '416': + $ref: '#/components/responses/StorageRangeNotSatisfiable' + '429': + $ref: '#/components/responses/BandwidthCapExceeded' + /health: + get: + tags: + - System + summary: Health check endpoint + description: Returns server health status. Used for load balancer and monitoring checks. + operationId: healthCheck + responses: + '200': + description: Server is healthy + content: + text/plain: + schema: + type: string + example: OK + /capabilities: + get: + tags: + - System + summary: List capabilities + description: | + Lists which product capabilities accept new work in this environment. Check it + to decide what to offer, instead of calling a route to see whether it fails. + + | ID | Covers | + | --- | --- | + | `sandboxes` | The Sandbox API: presets, templates, sessions, and executions | + | `sandboxes.sessions` | Starting and resuming sessions, and one-shot executions | + | `sandboxes.custom_templates` | Deploying a custom template; its validation waits while `sandboxes.sessions` is unavailable | + | `sandboxes.network_isolation` | Creating sessions and one-shot executions with `network.egress` `deny_all`; existing `deny_all` sessions work either way | + | `sandboxes.output_not_kept` | Commands that keep no output: `keep_output: false` on a command, and `executions.keep_output: false` on a session; commands that keep output work either way | + | `issues` | The Issues API: listing, reading, and updating grouped runtime errors | + | `issues.create` | Writing an issue with `POST /issues`; written issues already recorded read and update either way | + | `lavaflow` | LavaFlow, which diagnoses a project's issues and opens pull requests that fix them. Here it reports only whether LavaFlow is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | + | `lavaflow.merge` | LavaFlow merging its fixes, with `autonomy: merge`. Here it reports only whether merging is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | + | `lavaflow.lineage` | LavaFlow following up its fixes: linking a fix's recurrence or a new issue its deploy caused to the fix, the follow-up runs, and the lineage holds. Here it reports only whether fix lineage is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | + | `lavaflow.open_pr_ci_start` | A fix a person merges, as under `autonomy: open_pr`, opening ready for review with LavaFlow running its CI once, unless the repository may run CI outside GitHub Actions; unavailable, such a fix opens as a draft whose commit skips CI. Here it reports only whether this is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | + | `lavaflow.code_quality` | LavaFlow Code Quality, which reviews the code each frontend production deploy changes. Here it reports only whether Code Quality is released in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | + | `lavaflow.slack` | Reporting problems to LavaFlow from Slack: installing the Volcano Slack app, connecting Slack identities, and binding channels to projects. Here it reports whether LavaFlow is released, the Slack app is set up, and Slack reports have launched in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | + | `lavaflow.aikido` | LavaFlow fixing the security issues Aikido finds: connecting an Aikido workspace and binding projects to it. Here it reports whether LavaFlow is released and Aikido reports have launched in this environment; whether a project has it comes from `GET /projects/{id}/capabilities` | + | `functions.response_streaming` | Streaming an HTTP-mode function's response on its own URL as the function writes it | + | `frontend_routes` | Creating and changing Frontend routes; listing, deleting, and serving existing ones work either way | + | `frontends.candidates` | Creating, redeploying, promoting and rolling back to a frontend Candidate; reading, deleting and rolling back to the frontend's own runtime always work | + | `databases.migrations` | Starting migration runs and recording a baseline; reading history and runs works either way | + | `shares` | Creating, switching on and publishing shares, and forking one | + | `ai_gateway` | The Volcano AI gateway: creating a key that holds `ai.invoke` with `POST /projects/{id}/service-keys`, and minting the first run token of a run; reading, regenerating and deleting existing keys, and reading, extending, revoking and minting again for a run already minted for, work either way | + | `realtime.http_publish` | Publishing a message with `POST /realtime/v1/publish`; while Realtime is paused it stays available, and the route answers `503` `feature_paused` | + + A capability missing from the list is unavailable, and a capability under + another, such as `sandboxes.sessions`, is unavailable whenever its parent is. + While a capability is unavailable, requests that start new work answer `404` + or `400` with code `feature_unavailable`; refresh this list when you receive + that code. Reading, deleting, and terminating what already exists keep + working unless the whole feature is absent from the environment. Every caller + in an environment gets the same answer; `GET /projects/{id}/capabilities` + answers for one project. + + `functions.response_streaming` refuses nothing: while it is unavailable, a + function's own URL still answers and sends a streamed response whole, once + the function finishes, up to 6 MiB with headers; a larger one fails the + invocation. Frontend Function routes stream either way. + + After these, the list names each first-party app Volcano runs in this + environment, such as `builder`, by its own ID. Such an app is available + while it accepts new work. When only the app's own release is off, work + it already accepted continues; when first-party app mounts are off, its + mount refuses every request with 404 `feature_unavailable`. + operationId: listCapabilities + security: [] + responses: + '200': + description: Capabilities in this environment + content: + application/json: + schema: + $ref: '#/components/schemas/CapabilityList' + example: + data: + - id: sandboxes + status: available + - id: sandboxes.sessions + status: available + - id: sandboxes.custom_templates + status: unavailable + - id: sandboxes.network_isolation + status: available + - id: sandboxes.output_not_kept + status: available + - id: issues + status: available + - id: functions.response_streaming + status: available + - id: frontend_routes + status: available + - id: frontends.candidates + status: unavailable + - id: databases.migrations + status: available + - id: shares + status: unavailable + - id: ai_gateway + status: unavailable + /openapi.json: + get: + tags: + - System + summary: Fetch the OpenAPI specification as JSON + description: | + Returns this specification as a self-contained JSON document, with every + reference resolved. It is generated from the same document the server + validates requests against, so a client generated from it cannot + describe a different API than the one that answers. + + No credential is required: a client generator fetches this by URL before + its user has a token, and every path here is already published in the + API reference. + + The response carries a strong `ETag`; send it back as `If-None-Match` to + get `304 Not Modified` instead of the whole document. + operationId: getOpenAPISpecJSON + security: [] + parameters: + - $ref: '#/components/parameters/IfNoneMatch' + responses: + '200': + description: The OpenAPI specification + headers: + ETag: + $ref: '#/components/headers/ETag' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAPISpecDocument' + '304': + $ref: '#/components/responses/OpenAPISpecNotModified' + '429': + $ref: '#/components/responses/OpenAPISpecThrottled' + head: + tags: + - System + summary: Check the JSON OpenAPI specification + description: | + The headers `GET /openapi.json` would return, so a cache can pick up the + current `ETag` without transferring the document. + operationId: headOpenAPISpecJSON + security: [] + parameters: + - $ref: '#/components/parameters/IfNoneMatch' + responses: + '200': + $ref: '#/components/responses/OpenAPISpecHeaders' + '304': + $ref: '#/components/responses/OpenAPISpecNotModified' + '429': + $ref: '#/components/responses/OpenAPISpecThrottled' + /openapi.yaml: + get: + tags: + - System + summary: Fetch the OpenAPI specification as YAML + description: | + The same document as `/openapi.json`, serialized as YAML for tools that + prefer it. See that operation for caching and authentication notes. + operationId: getOpenAPISpecYAML + security: [] + parameters: + - $ref: '#/components/parameters/IfNoneMatch' + responses: + '200': + description: The OpenAPI specification + headers: + ETag: + $ref: '#/components/headers/ETag' + content: + application/yaml: + schema: + $ref: '#/components/schemas/OpenAPISpecDocument' + '304': + $ref: '#/components/responses/OpenAPISpecNotModified' + '429': + $ref: '#/components/responses/OpenAPISpecThrottled' + head: + tags: + - System + summary: Check the YAML OpenAPI specification + description: | + The headers `GET /openapi.yaml` would return, so a cache can pick up the + current `ETag` without transferring the document. + operationId: headOpenAPISpecYAML + security: [] + parameters: + - $ref: '#/components/parameters/IfNoneMatch' + responses: + '200': + $ref: '#/components/responses/OpenAPISpecHeaders' + '304': + $ref: '#/components/responses/OpenAPISpecNotModified' + '429': + $ref: '#/components/responses/OpenAPISpecThrottled' + /mcp: + post: + tags: + - System + summary: Model Context Protocol endpoint + description: | + Streamable-HTTP MCP endpoint: one JSON-RPC 2.0 object per request, one + response per request. There is no server-to-client stream, so a `GET` + returns `405`, and a batched array is rejected. + + Authenticated with a **project access token**. The endpoint takes its + project from the credential, so a platform token is refused with `403` — + it names no project, and letting a tool argument choose one would hand an + agent its own blast radius. + + Scope carries over from the REST API. A `read_only` token is not offered + mutating tools or credential-returning reads, and is refused if it calls + one anyway. Revoking the token ends MCP access on the same path it ends + API access. + + Methods: `initialize`, `notifications/initialized`, `ping`, + `tools/list`, `tools/call`. See the + [MCP guide](https://docs.volcano.dev/platform/interfaces/mcp) for the + tool surface and client configuration. + operationId: callMCP + security: + - ProjectAccessToken: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + description: A JSON-RPC 2.0 request object. + required: + - jsonrpc + - method + properties: + jsonrpc: + type: string + enum: + - '2.0' + method: + type: string + description: The MCP method to call. + id: + description: | + Request identifier, echoed verbatim. Omit it to send a + notification, which is answered with `202` and no body. + oneOf: + - type: string + - type: integer + params: + type: object + additionalProperties: true + responses: + '200': + description: A JSON-RPC response object + content: + application/json: + schema: + type: object + required: + - jsonrpc + - id + properties: + jsonrpc: + type: string + enum: + - '2.0' + id: + description: Echoes the request's id. Null when the request could not be read well enough to determine one. + nullable: true + oneOf: + - type: string + - type: integer + result: + type: object + additionalProperties: true + error: + type: object + required: + - code + - message + properties: + code: + type: integer + message: + type: string + '202': + description: A notification was accepted; there is no body + '401': + description: Not authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: | + The credential is valid but may not use this endpoint — most often a + platform token, which names no project. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '413': + description: The JSON-RPC frame exceeds the 1 MiB limit +components: + headers: + ETag: + description: | + Strong validator for the returned document. Send it back as `If-None-Match` + to revalidate without transferring the document again. + required: true + schema: + type: string + example: '"9f2c1e0b5a"' + DatabaseQueryProxyMs: + description: | + Milliseconds Volcano spent before running the query, counted from the + request arriving: authenticating the caller, validating the request, + resolving the database, and building the SQL. Does not include query + execution. Also present when the query itself failed. + schema: + type: integer + minimum: 0 + DatabaseQueryProxyHandlerMs: + description: | + The part of `X-Volcano-Proxy-Ms` spent in the query endpoint itself. + Subtract it from `X-Volcano-Proxy-Ms` to see what authentication and + request validation cost. Also present when the query itself failed. + schema: + type: integer + minimum: 0 + DatabaseQueryComputeMs: + description: | + Milliseconds the database took to run the query and return its rows. + Does not include Volcano's preparation. Also present when the query + itself failed. + schema: + type: integer + minimum: 0 + securitySchemes: + AnonKey: + type: http + scheme: bearer + bearerFormat: JWT + description: | + Project-specific public key for frontend authentication. + Required for signup, signin, refresh, and logout endpoints. + Get from Project Settings → Authentication → Anon Keys. + Safe to expose in frontend code (scoped to project, limited permissions). + AuthUserAccessToken: + type: http + scheme: bearer + bearerFormat: JWT + description: | + Auth user access token obtained from signup/signin. + Used for authenticated function invocation and user profile access. + Functions invoked with access tokens receive user context in event.__volcano_auth. + Expires after configured lifetime (default: 1 hour). + ServiceRoleKey: + type: http + scheme: bearer + bearerFormat: JWT + description: | + Service role key for admin operations. + **WARNING:** Bypasses Row-Level Security - backend use only! + Create via POST /projects/{id}/service-keys. + Used for function invocation with full database access. + UserToken: + type: http + scheme: bearer + bearerFormat: opaque + description: | + Platform token, which acts on every project in your account. + Obtain one by running `volcano login`, or from the dashboard. + + For CI, scripts, and agents, prefer a project access token + (`pt-`) instead: it reaches only the project it was created in, + so a leak does not expose the rest of your account. See the + ProjectAccessToken scheme. + ProjectAccessToken: + type: http + scheme: bearer + bearerFormat: opaque + description: | + Project access token, scoped to a single project. Starts with `pt-`. + + Accepted on that project's control-plane routes and refused + everywhere else, including account-wide endpoints and any other + project. A `read_only` token additionally refuses mutations. + + Create one with POST /projects/{id}/access-tokens using a platform + token. The secret is returned once and is not recoverable, so a + project access token cannot create, list, read, or revoke project + access tokens. + parameters: + AuthProxyAuthorization: + name: X-Volcano-Proxy-Authorization + in: header + required: false + description: | + Trusted server-side auth proxy credential in `Bearer SERVICE_KEY` + form. When supplied, `X-Volcano-Client-IP` is also required. The service + key must belong to the anon key's project and hold this operation's scope: + `auth.signup` for signup and anonymous signup, `auth.signin` for signin + and OAuth code exchange, `auth.refresh` for refresh, `auth.logout` for + logout, and `auth.password_reset` for forgot-password and reset-password. + The password policy accepts any service key for the project. Never expose + a service key to browser code. + schema: + type: string + AuthProxyClientIP: + name: X-Volcano-Client-IP + in: header + required: false + description: | + Original browser IPv4 or IPv6 address supplied by a trusted server-side + auth proxy. The proxy must derive this value from its platform-verified + request metadata, never from a browser-supplied header. Requires a valid + `X-Volcano-Proxy-Authorization` header. + schema: + type: string + BackupName: + name: backupName + in: path + required: true + schema: + type: string + minLength: 1 + maxLength: 128 + description: | + Backup name, unique within the database, exactly as returned by the list + endpoint. + + Deliberately looser than the names you can create: a backup made by a + schedule is named for you, so reading or deleting one accepts any name a + backup can have. + BranchName: + name: branchName + in: path + required: true + schema: + type: string + pattern: ^[a-z0-9_]+$ + maxLength: 64 + description: Branch name (unique within the parent database, lowercase letters, numbers, and underscores only) + BucketName: + name: bucketName + in: path + required: true + schema: + type: string + pattern: ^[a-zA-Z0-9_-]+$ + minLength: 1 + maxLength: 64 + description: Storage bucket name + Cursor: + name: cursor + in: query + required: false + schema: + type: string + description: | + Opaque keyset pagination cursor from a previous response's `next_cursor` + — pages forward. Mutually exclusive with `page` and `ending_before`; + combining them returns 400. When supplied, the request's `search` and + `limit` must match the values bound to the cursor or the request returns 400. + EndingBefore: + name: ending_before + in: query + required: false + schema: + type: string + description: | + Opaque keyset pagination cursor from a previous response's `prev_cursor` + — pages backward (the page immediately preceding this cursor). Mutually + exclusive with `page` and `cursor`; combining them returns 400. `search` + and `limit` must match the values bound to the cursor or the request + returns 400. + DatabaseName: + name: databaseName + in: path + required: true + schema: + type: string + pattern: ^[a-z0-9_]+$ + maxLength: 64 + description: Database name (unique within project, lowercase letters, numbers, and underscores only) + DeploymentId: + name: deploymentId + in: path + required: true + schema: + type: string + format: uuid + description: Frontend deployment ID + SessionListPage: + name: page + in: query + description: | + Page number (1-indexed). Omit it for the first page, and always with + `cursor` or `ending_before`. + schema: + type: integer + minimum: 1 + SessionListLimit: + name: limit + in: query + description: Number of sessions per page (max 100, default 20) + schema: + type: integer + minimum: 1 + maximum: 100 + SessionListSort: + name: sort + in: query + description: | + Sort key. `last_activity` (default) orders by most recent activity and + supports offset pagination only. `created_at` orders by session start + and supports both offset and cursor pagination. + schema: + type: string + enum: + - last_activity + - created_at + default: last_activity + SessionListStatus: + name: status + in: query + description: | + Filter by whether the session can still be refreshed. Omit for every + stored session, including expired ones. `expired` is not supported + with cursor pagination. + schema: + type: string + enum: + - active + - expired + SessionListCursor: + name: cursor + in: query + description: | + Opaque keyset cursor from a previous response's `next_cursor`. Requires + `sort=created_at`; mutually exclusive with `page` and `ending_before`. + schema: + type: string + SessionListEndingBefore: + name: ending_before + in: query + description: | + Opaque keyset cursor from a previous response's `prev_cursor`, paging + backward. Requires `sort=created_at`; mutually exclusive with `page` + and `cursor`. + schema: + type: string + SessionListOffset: + name: offset + in: query + description: | + Bounded number of rows to skip past the cursor anchor (the hybrid + jump, maximum 100000). Ignored unless `cursor` or `ending_before` is + supplied. + schema: + type: integer + minimum: 0 + maximum: 100000 + VariableEnvironmentId: + name: environmentId + in: path + required: true + schema: + type: string + format: uuid + description: Variable Environment ID + FrontendId: + name: frontendId + in: path + required: true + schema: + type: string + format: uuid + description: Frontend ID + FrontendCandidateId: + name: candidateId + in: path + required: true + schema: + type: string + format: uuid + description: Frontend Candidate ID + FunctionCandidateId: + name: candidateId + in: path + required: true + schema: + type: string + format: uuid + description: Function preview (Candidate) ID + FrontendFunctionRouteId: + name: routeId + in: path + required: true + schema: + type: string + format: uuid + description: Frontend Function route ID + FrontendRouteId: + name: routeId + in: path + required: true + schema: + type: string + format: uuid + description: Frontend route ID + FrontendCustomDomainHostname: + name: domain + in: path + required: true + schema: + type: string + minLength: 1 + maxLength: 253 + description: The custom domain's hostname, such as `www.example.com` + FunctionId: + name: functionId + in: path + required: true + schema: + type: string + format: uuid + description: Function ID + DurableFunctionId: + name: functionId + in: path + required: true + schema: + type: string + description: Durable function ID, or its name within the project + DurableExecutionId: + name: executionId + in: path + required: true + schema: + type: string + format: uuid + description: Durable execution ID + DurableApprovalId: + name: approvalId + in: path + required: true + schema: + type: string + format: uuid + description: Durable approval ID + IssueId: + name: issueId + in: path + required: true + schema: + type: string + format: uuid + description: Issue ID + IssueCursor: + name: cursor + in: query + required: false + schema: + type: string + description: | + Opaque cursor from a previous response's `next_cursor`. Pages forward; + keep the same filters while paging. + DurableApprovalFunctionFilter: + name: function + in: query + required: false + schema: + type: string + minLength: 1 + maxLength: 255 + description: | + Only approvals requested by this durable function, given by id or by + name. A name also matches approvals from a deleted function of that + name. + DurableMessageIdempotencyKey: + name: Idempotency-Key + in: header + required: false + description: | + Makes a send safe to retry. A repeat with a key the same sender has + used on the execution returns the first message and sends nothing. + Keys of different senders never collide. Up to 255 printable ASCII + characters. + schema: + type: string + minLength: 1 + maxLength: 255 + pattern: ^[ -~]+$ + DurableClientToken: + name: X-Volcano-Client-Token + in: header + required: false + description: | + The `client_token` the execution's start returned. Lets an anon key, a + service key scoped to a list without `*`, or a user who did not start + the execution, reach it. + schema: + type: string + maxLength: 128 + DurableMessageDirectionFilter: + name: direction + in: query + required: false + description: Return only messages travelling this way. + schema: + $ref: '#/components/schemas/DurableMessageDirection' + DurableMessageNameFilter: + name: name + in: query + required: false + description: Return only messages with this name. + schema: + $ref: '#/components/schemas/DurableMessageName' + DurableMessageAfter: + name: after + in: query + required: false + description: Return only messages whose `seq` is greater than this. + schema: + type: integer + format: int64 + minimum: 0 + default: 0 + DurableMessageLimit: + name: limit + in: query + required: false + description: Most messages to return. + schema: + type: integer + minimum: 1 + maximum: 500 + default: 100 + Limit: + name: limit + in: query + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + default: 10 + description: Number of items per page (max 100) + LockKey: + name: key + in: path + required: true + description: Project-local lock name. + schema: + type: string + minLength: 1 + maxLength: 128 + pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$ + LockToken: + name: X-Volcano-Lock-Token + in: header + required: true + description: Opaque UUID generated once by the caller and retained for the lease lifetime. + schema: + type: string + format: uuid + LockRequestId: + name: X-Volcano-Request-Id + in: header + required: true + description: | + UUID correlating this request across client and server logs. Repeat safety comes from + the lock token, so a retry under a reused request ID still counts against the quota. + schema: + type: string + format: uuid + DeploymentOperation: + name: operation + in: query + required: false + description: Restrict a deployment feed to one kind of operation. + schema: + type: string + enum: + - deploy + - redeploy + - update + - delete + DeploymentOwnerId: + name: owner_id + in: query + required: false + description: | + The user who owns the projects whose deployments to return + (`projects.user_id`). This is ownership, not the actor that started the + deployment — see `initiated_by_user_id` for that. Not a UUID: platform + user ids are opaque strings. + schema: + type: string + maxLength: 255 + DeploymentOrder: + name: order + in: query + required: false + description: | + Sort key and direction. `created_at.desc` (default) is the feed order. + `completed_at.asc` orders finished attempts by completion, oldest first, + and excludes attempts that never completed. + schema: + type: string + enum: + - created_at.desc + - completed_at.asc + default: created_at.desc + DeploymentResourceType: + name: resource_type + in: query + required: false + description: | + Restrict a deployment feed to a single resource type. Omit to return + both Function and Frontend deployments. + schema: + type: string + enum: + - function + - frontend + FunctionKindFilter: + name: function_kind + in: query + required: false + description: | + Restrict results to functions of one kind. Omit to include both + standard and durable functions. + schema: + $ref: '#/components/schemas/FunctionKindFilter' + DeploymentStatus: + name: status + in: query + required: false + description: Restrict a deployment feed to attempts in one status. + schema: + type: string + enum: + - queued + - provisioning + - active + - degraded + - failed + - superseded + - deleting + - deleted + Offset: + name: offset + in: query + required: false + schema: + type: integer + minimum: 0 + default: 0 + description: | + Bounded row offset past the keyset anchor named by `cursor` (forward) or + `ending_before` (backward) — the hybrid jump. Seek to the anchor, then + skip this many rows within. Used for numbered jump-to-page: from the + current page, seek to its next/prev cursor and offset the remaining + pages. Only honored on the cursor pagination path; ignored otherwise. + Page: + name: page + in: query + required: false + schema: + type: integer + minimum: 1 + description: | + Page number (1-indexed) for offset pagination. Declares no schema + default so the request validator does not inject one: handlers that omit + `page` see it unset (nil) and default to 1 in code, while cursor-first + endpoints (e.g. the project deployments feed) can detect its absence to + stay in keyset/search mode. Supplying `page` selects offset pagination. + LavaflowDays: + name: days + in: query + required: false + schema: + type: integer + minimum: 1 + maximum: 217 + default: 30 + description: Number of UTC days in the window, ending today. + LavaflowResourceIdFilter: + name: resource_id + in: query + required: false + schema: + type: string + format: uuid + description: Only runs for issues of this resource. + LavaflowRunId: + name: run_id + in: path + required: true + schema: + type: string + format: uuid + description: LavaFlow run ID + LavaflowRunCursor: + name: cursor + in: query + required: false + schema: + type: string + description: | + Opaque cursor from a previous response's `next_cursor`. Pages forward, + and works only for the same `project_id` and caller; keep the same + filters while paging. + LavaflowRunLimit: + name: limit + in: query + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + default: 25 + description: Number of runs per page (max 100) + LavaflowScanLimit: + name: limit + in: query + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + default: 25 + description: Number of scans per page (max 100) + LavaflowRunStatusFilter: + name: status + in: query + required: false + schema: + $ref: '#/components/schemas/LavaflowRunStatus' + description: Only runs in this status. + SlackRedirect: + name: redirect + in: query + required: false + description: Where to send the browser after Slack's callback. It must be on the Volcano dashboard's origin, or `http` to `127.0.0.1` or `[::1]` with a port. + schema: + type: string + LavaflowCategoryFilter: + name: category + in: query + required: false + schema: + type: string + enum: + - bug + - performance + - security + - improvement + - configuration + - dependency + - external + - uncategorized + description: Only runs in this category; `uncategorized` for runs without one. + LavaflowInvolvedResourceFilter: + name: involved_resource_id + in: query + required: false + schema: + type: string + format: uuid + description: 'Only runs that involve this function, durable function or frontend in any role: the issue came from it, the diagnosis traced the cause to it, or the fix changes it.' + LavaflowIssueIdFilter: + name: issue_id + in: query + required: false + schema: + type: string + format: uuid + description: Only runs on this issue. An issue the project doesn't have answers `404`, like an unknown issue. + LavaflowPullRequestStateFilter: + name: pull_request_state + in: query + required: false + schema: + type: string + enum: + - open + - merged + - closed + - none + description: Only runs whose pull request is in this state; `none` for runs without one. + LavaflowRunDays: + name: days + in: query + required: false + schema: + type: integer + minimum: 1 + maximum: 90 + description: Only runs created in the last `days` UTC days, today included. Omit for every run. + LavaflowRunOrder: + name: order + in: query + required: false + schema: + type: string + enum: + - created_at.desc + - created_at.asc + - issue_events.desc + default: created_at.desc + description: '`created_at.desc` is newest first and `created_at.asc` oldest first. `issue_events.desc` orders by the issue''s current `event_count`, most first, then newest first. That count grows as errors arrive or scans see a finding again, so paging this order can skip runs, not only move them between pages. To read every run, for an export say, page `created_at.desc` or `created_at.asc`. A cursor works only with the order it came from.' + LavaflowRunInclude: + name: include + in: query + required: false + style: form + explode: false + schema: + type: array + uniqueItems: true + items: + type: string + enum: + - counts + description: '`counts` adds `counts` to the response. Ask on the first page; the counts don''t depend on the cursor.' + ProjectId: + name: id + in: path + required: true + schema: + type: string + format: uuid + description: Project ID + ProjectIdQuery: + name: project_id + in: query + required: true + schema: + type: string + format: uuid + description: The project to read. A project the caller can't read answers like one that doesn't exist. + ConnectorId: + name: connector_id + in: path + required: true + description: The connector's ID, from listing connectors + schema: + type: string + format: uuid + ItemProjectIdQuery: + name: project_id + in: query + required: false + schema: + type: string + format: uuid + description: Optional. The item's own project authorizes the request; when given, the item must belong to this project, or it answers like an unknown one. + ShareId: + name: share_id + in: path + required: true + schema: + type: string + pattern: ^[A-Za-z0-9]{12}$ + description: Share ID, the 12 characters at the end of the share's deploy URL + ShareIdQuery: + name: share_id + in: query + required: true + schema: + type: string + pattern: ^[A-Za-z0-9]{12}$ + description: The share to read. The share's own project authorizes the read; a share the caller can't read answers like one that doesn't exist. + ShareReleaseCursor: + name: cursor + in: query + required: false + schema: + type: string + description: | + Opaque cursor from a previous response's `next_cursor`. Pages forward, and + works only for the same `share_id` and `limit`. + TokenId: + name: tokenId + in: path + required: true + schema: + type: string + format: uuid + description: Project access token ID + Search: + name: search + in: query + required: false + schema: + type: string + maxLength: 256 + description: | + Case-insensitive substring match on the resource `name`. See the + endpoint description for supported pagination modes. + RestoreId: + name: restoreId + in: path + required: true + schema: + type: string + format: uuid + description: Database restore ID + MigrationRunId: + name: runId + in: path + required: true + schema: + type: string + format: uuid + description: Database migration run ID + SchedulerId: + name: schedulerId + in: path + required: true + schema: + type: string + format: uuid + description: Function scheduler ID + VariableName: + name: name + in: path + required: true + schema: + type: string + minLength: 1 + maxLength: 256 + pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ + description: Variable name. Function runtime names such as AWS_REGION are reserved and cannot be updated. + IfNoneMatch: + name: If-None-Match + in: header + required: false + description: | + Entity tag from an earlier response, returning `304 Not Modified` while it + still matches. Accepts the full condition: `*`, a comma-separated list, and + weak tags of the form `W/"tag"`. + schema: + type: string + example: '"9f2c1e0b5a"' + responses: + StorageRangeNotSatisfiable: + description: The requested byte range does not overlap the file content. + headers: + Content-Range: + description: Current file size as `bytes */size`, when available. + schema: + type: string + pattern: ^bytes \*/\d+$ + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + OpenAPISpecThrottled: + description: | + Too many requests for the specification from one address. The document + carries an `ETag`; revalidate with `If-None-Match` rather than + re-fetching it. + headers: + Retry-After: + description: Seconds to wait before requesting the specification again. + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/Error' BandwidthCapExceeded: description: | - The platform user exceeded their billing-cycle bandwidth allowance (aggregate - ingress + egress across owned projects). Enforcement is eventual: - requests are rejected until the allowance increases or the next - anniversary cycle begins. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - DatabaseQueryCapExceeded: + The platform user exceeded their billing-cycle bandwidth allowance (aggregate + ingress + egress across owned projects). Enforcement is eventual: + requests are rejected until the allowance increases or the next + anniversary cycle begins. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + DatabaseQueryCapExceeded: + description: | + The query was rejected by a billing-cycle allowance: either the owning + platform user's bandwidth allowance (aggregate ingress + egress across + owned projects) or their database-request allowance. Enforcement is + eventual: queries are rejected until the allowance increases or the + next anniversary cycle begins. The error message identifies the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + DatabaseBranchQueryUnavailable: + description: | + The branch exists but cannot serve queries: it is still provisioning, + being reset, expired, or its parent is being restored. Distinct from + `404` so a caller waiting on a branch can tell it apart from a typo. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + OpenAPISpecNotModified: + description: | + The specification still matches the supplied `If-None-Match`, so no body + is returned. + headers: + ETag: + $ref: '#/components/headers/ETag' + OpenAPISpecHeaders: + description: | + The headers a `GET` would return, without the document. The declared + `ETag` is the one to revalidate against. + headers: + ETag: + $ref: '#/components/headers/ETag' + schemas: + AccountSession: + type: object + description: A sign-in to your Volcano account, from the CLI or a browser. + properties: + id: + type: string + format: uuid + description: Unique session identifier + user_id: + type: string + format: uuid + description: | + The sign-in identity (auth user) the session belongs to. This is + not your account ID: an identity linked to your account has its + own ID. + provider: + type: string + description: | + How the session was created: `email`, `google`, `github`, + `microsoft`, `apple`, or `device:` for a device-code + login such as the `volcano` CLI. More values may be added; use + `kind` to tell CLI logins from browser sign-ins. + example: github + kind: + type: string + description: | + `cli` for a device-code login, such as `volcano login`, and + `browser` for every other sign-in. + enum: + - cli + - browser + example: cli + user_agent: + type: string + description: Browser/device user agent string + ip_address: + type: string + description: IP address of the client when the session was created + last_ip_address: + type: string + description: IP address of the most recent activity (token refresh) + expires_at: + type: string + format: date-time + description: When this session expires + last_activity_at: + type: string + format: date-time + description: Last activity timestamp + session_started_at: + type: string + format: date-time + description: When the session was created + is_active: + type: boolean + description: Whether the session is currently active (not expired) + is_current: + type: boolean + description: Whether this is the session making the current request + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + required: + - id + - user_id + - provider + - kind + - expires_at + - is_active + - is_current + AccountSessionList: + type: object + description: | + A page of sessions. Without `sort` the body is the legacy + `sessions`/`total`/`page`/`limit`/`total_pages` shape; with + `sort=created_at` and a cursor it is the shared `data` envelope. + properties: + sessions: + type: array + items: + $ref: '#/components/schemas/AccountSession' + total: + type: integer + description: Total number of sessions + page: + type: integer + description: Current page number + limit: + type: integer + description: Number of sessions per page + total_pages: + type: integer + description: Total number of pages + data: + type: array + description: Sessions for this page (cursor pagination only) + items: + $ref: '#/components/schemas/AccountSession' + has_more: + type: boolean + description: Whether a further page exists (cursor pagination only) + next_cursor: + type: string + description: Opaque cursor for the next page (cursor pagination only) + prev_cursor: + type: string + description: Opaque cursor for the previous page (cursor pagination only). Send as `ending_before`. + SandboxPreset: + type: object + additionalProperties: false + properties: + id: + type: string + runtime: + type: string + version: + type: string + memory_mb: + type: integer + enum: + - 1024 + - 2048 + regions: + type: array + items: + type: string + required: + - id + - runtime + - version + - memory_mb + - regions + SandboxTemplate: + type: object + additionalProperties: false + properties: + id: + type: string + format: uuid + project_id: + type: string + format: uuid + name: + type: string + pattern: ^[a-z][a-z0-9-]{0,62}$ + preset: + type: string + memory_mb: + type: integer + status: + type: string + enum: + - ready + - unavailable + - deleting + x-enum-varnames: + - SandboxTemplateStatusReady + - SandboxTemplateStatusUnavailable + - SandboxTemplateStatusDeleting + created_at: + type: string + format: date-time + required: + - id + - project_id + - name + - status + - created_at + CreateSandboxTemplateRequest: + type: object + additionalProperties: false + properties: + name: + type: string + pattern: ^[a-z][a-z0-9-]{0,62}$ + preset: + type: string + description: Preset ID from the available Sandbox preset catalog. + memory_mb: + type: integer + enum: + - 1024 + - 2048 + default: 1024 + required: + - name + - preset + UpdateSandboxTemplateRequest: + type: object + additionalProperties: false + properties: + name: + type: string + pattern: ^[a-z][a-z0-9-]{0,62}$ + required: + - name + SandboxSession: + type: object + additionalProperties: false + properties: + id: + type: string + format: uuid + project_id: + type: string + format: uuid + last_error_code: + type: string + description: Last recorded lifecycle reason, such as sandbox_run_hook_timeout or sandbox_authority_or_expiry. Historical information, not a current error; use state for the current session state. Retained when later observations supply no reason, including after termination or recovery. Omitted when no reason is known. Values may be added; this field does not imply whether a command ran or whether it can be retried. + sandbox_id: + type: string + format: uuid + nullable: true + description: Explicit template used to create the session. Null when created directly from a preset. + state: + type: string + enum: + - starting + - running + - suspending + - suspended + - resuming + - terminating + - terminated + - unknown + desired_state: + type: string + enum: + - running + - suspended + - terminated + region: + type: string + memory_mb: + type: integer + created_at: + type: string + format: date-time + started_at: + type: string + format: date-time + expires_at: + type: string + format: date-time + nullable: true + description: Absolute VM expiry. Null means unlimited in local mode. + network: + $ref: '#/components/schemas/SandboxSessionNetwork' + executions: + $ref: '#/components/schemas/SandboxSessionExecutions' + limits: + $ref: '#/components/schemas/SandboxSessionAppliedLimits' + required: + - id + - project_id + - sandbox_id + - state + - desired_state + - region + - memory_mb + - created_at + - expires_at + - network + - executions + SandboxSessionNetwork: + type: object + additionalProperties: false + properties: + egress: + type: string + enum: + - default + - deny_all + description: The outbound network policy the session was created with. It never changes. + applied: + type: string + enum: + - default + - deny_all + - unknown + description: The outbound network policy Volcano last observed on the session's VM, never the request alone. It is `unknown` until the session is first observed, from a suspend or resume request until it is observed again, briefly while Volcano rolls out an update, and whenever the observation does not match the request. A terminated session keeps what Volcano last observed, so a `deny_all` session ended because Volcano observed outbound access reads `default`. A session first reports `state` `running` only once its network has been observed. To depend on `deny_all`, wait for `running`, then terminate the session unless `applied` is `deny_all`. Act on `applied` only while the session is `running`, and on a later `unknown` only while `desired_state` is `running`. + required: + - egress + - applied + SandboxSessionNetworkRequest: + type: object + additionalProperties: false + description: Outbound network policy for the session. Omitting `network` is the same as `egress` `default`. + properties: + egress: + type: string + enum: + - default + - deny_all + x-enum-varnames: + - SandboxSessionNetworkRequestEgressDefault + - SandboxSessionNetworkRequestEgressDenyAll + description: '`default` gives the session the region''s standard outbound internet access. `deny_all` gives it no outbound network for its whole lifetime: DNS lookups, internet and link-local addresses, and connections back out through Volcano all fail, and the session accepts no port access. Commands, files and the rest of the session API work as usual. The policy cannot be changed after creation; suspend and resume keep it. Check `network.applied` before relying on it. Where `GET /capabilities` lists `sandboxes.network_isolation` as unavailable, `deny_all` answers `400` with code `feature_unavailable`.' + required: + - egress + CreateSandboxSessionRequest: + type: object + additionalProperties: false + properties: + preset: + type: string + description: Preset ID from the available Sandbox preset catalog. + sandbox_id: + type: string + format: uuid + memory_mb: + description: Baseline memory in MiB. Cloud HOBBY supports 1024; SUPERAGENT supports 1024 or 2048. Omission uses the preset or template default; a template requiring more than the plan permits is rejected. Local sessions are exempt from cloud plan limits. + type: integer + enum: + - 1024 + - 2048 + region: + type: string + pattern: ^(aws-)?[a-z]{2}(-[a-z]+)+-[0-9]+$ + description: Region such as `us-east-1`, from the preset catalog. Region IDs issued by earlier versions of the API are still accepted. A temporarily unavailable region answers 400 with code `sandbox_region_unavailable`. + max_duration_seconds: + type: integer + minimum: 0 + maximum: 2147483647 + description: Inherits the template TTL when omitted (cloud default 3600 seconds; local default 0, unlimited). Cloud HOBBY accepts 30–3600 seconds; SUPERAGENT accepts 30–28800 seconds. Inherited template defaults are clamped to the plan limit; explicit values above it are rejected. Local accepts 0 for unlimited or a positive lifetime. + network: + $ref: '#/components/schemas/SandboxSessionNetworkRequest' + executions: + $ref: '#/components/schemas/SandboxSessionExecutions' + limits: + $ref: '#/components/schemas/SandboxSessionLimits' + required: + - region + oneOf: + - required: + - preset + not: + required: + - sandbox_id + - required: + - sandbox_id + not: + required: + - preset + SandboxSessionLimits: + type: object + additionalProperties: false + minProperties: 1 + description: | + Caps the session's code runs under, enforced inside the session. Each + cap is an upper bound; the session's own size still bounds both. + properties: + vcpus: + type: integer + minimum: 1 + maximum: 4 + description: | + CPU time the session's commands and template service may use + together, in vCPUs. A 1024 MiB session has 2 vCPUs and a 2048 MiB + session has 4; asking for more answers 400 with code + `sandbox_limits_exceed_session`. + disk_mib: + type: integer + minimum: 64 + maximum: 6144 + description: | + Space the session can write beyond its image's contents, in MiB. + It covers every path commands and the template service can write, + including `/workspace` and `/tmp`. A write past it fails with + `ENOSPC`. `/dev/shm` is memory, capped separately at 64 MiB. + SandboxSessionAppliedLimits: + type: object + additionalProperties: false + description: | + The caps the session enforces, as the session reports them. Present only + when the session was created with `limits`. The session stays + `starting` until `applied` is known. + properties: + vcpus: + type: integer + description: Enforced vCPU cap. Never higher than requested; lower when the session has fewer vCPUs. + disk_mib: + type: integer + description: Enforced disk cap in MiB. Never higher than requested; lower when the session's disk has less free space. + applied: + $ref: '#/components/schemas/SandboxLimitsApplied' + required: + - applied + SandboxLimitsApplied: + type: string + description: | + `enforced` when every requested cap is enforced, `not_enforced` when the + session could not enforce them, and `unknown` until the session reports. + Terminate a session that reports anything but `enforced` if you rely on + the caps. + enum: + - enforced + - not_enforced + - unknown + x-enum-varnames: + - SandboxLimitsEnforced + - SandboxLimitsNotEnforced + - SandboxLimitsUnknown + SandboxCommandRequest: + type: object + additionalProperties: false + properties: + command: + type: string + minLength: 1 + maxLength: 65536 + timeout_seconds: + type: integer + minimum: 0 + maximum: 2147483647 + description: Command execution time from process start. Cloud defaults to 60 seconds and accepts 1–28800; local defaults to 0 (unlimited) and accepts nonnegative values. VM expiry always takes precedence. Cloud synchronous requests must return within the public connection idle limit (1000 seconds); use a session with a background process and short polling requests for longer work. + environment: + type: object + additionalProperties: + type: string + maxProperties: 64 + keep_output: + type: boolean + description: Set false to keep no output. stdout and stderr are returned once in this response, and Volcano's control plane never stores them in the execution journal, database, logs or traces. This does not cover the Sandbox's memory or a suspended session's snapshot. A retry with the same Idempotency-Key returns the exit code with `output_kept` false and empty streams, without running the command again. Omit it to use the session's `executions.keep_output`. True in a session that keeps no output is refused with 400 and code `sandbox_session_keeps_no_output`. False is refused with 400 and code `feature_unavailable` while the `sandboxes.output_not_kept` capability is unavailable. + required: + - command + SandboxExecutionRequest: + type: object + additionalProperties: false + properties: + preset: + type: string + description: Preset ID from the available Sandbox preset catalog. + sandbox_id: + type: string + format: uuid + memory_mb: + description: Baseline memory in MiB. Cloud HOBBY supports 1024; SUPERAGENT supports 1024 or 2048. Omission uses the preset or template default; a template requiring more than the plan permits is rejected. Local sessions are exempt from cloud plan limits. + type: integer + enum: + - 1024 + - 2048 + region: + type: string + pattern: ^(aws-)?[a-z]{2}(-[a-z]+)+-[0-9]+$ + description: Region such as `us-east-1`, from the preset catalog. Region IDs issued by earlier versions of the API are still accepted. A temporarily unavailable region answers 400 with code `sandbox_region_unavailable`. + max_duration_seconds: + type: integer + minimum: 0 + maximum: 2147483647 + description: Absolute VM lifetime including startup, bounded by environment capacity policy. Inherits the template TTL when omitted (cloud default 3600 seconds; local default 0, unlimited). Cloud HOBBY accepts 30–3600 seconds; SUPERAGENT accepts 30–28800 seconds. Inherited template defaults are clamped to the plan limit; explicit values above it are rejected. Local accepts 0 for unlimited or a positive lifetime. The VM is reclaimed early when the command finishes. + command: + type: string + minLength: 1 + maxLength: 65536 + timeout_seconds: + type: integer + minimum: 0 + maximum: 2147483647 + description: Command execution time from process start. Cloud defaults to 60 seconds and accepts 1–28800; local defaults to 0 (unlimited) and accepts nonnegative values. VM expiry always takes precedence. Cloud synchronous requests must return within the public connection idle limit (1000 seconds); use a session with a background process and short polling requests for longer work. + environment: + type: object + additionalProperties: + type: string + maxProperties: 64 + network: + $ref: '#/components/schemas/SandboxSessionNetworkRequest' + keep_output: + type: boolean + default: true + description: Set false to keep no output. stdout and stderr are returned once in this response, and Volcano's control plane never stores them in the execution journal, database, logs or traces. This does not cover the Sandbox's memory or a suspended session's snapshot. A retry with the same Idempotency-Key returns the exit code with `output_kept` false and empty streams, without running the command again. False is refused with 400 and code `feature_unavailable` while the `sandboxes.output_not_kept` capability is unavailable. + required: + - region + - command + oneOf: + - required: + - preset + not: + required: + - sandbox_id + - required: + - sandbox_id + not: + required: + - preset + SandboxCommandResult: + type: object + additionalProperties: false + properties: + stdout: + type: string + description: The first 1 MiB (1,048,576 bytes) the command wrote to stdout. Empty in a replay of a command that kept no output. + stderr: + type: string + description: The first 1 MiB (1,048,576 bytes) the command wrote to stderr. Empty in a replay of a command that kept no output. + exit_code: + type: integer + stdout_truncated: + type: boolean + description: True when the command wrote more than 1 MiB to stdout. False in a replay of a command that kept no output. + stderr_truncated: + type: boolean + description: True when the command wrote more than 1 MiB to stderr. False in a replay of a command that kept no output. + timed_out: + type: boolean + output_kept: + type: boolean + description: False when the command kept no output. Its streams appear only in the response to the request that ran it, and Volcano's control plane never stores them in the execution journal, database, logs or traces. This does not cover the Sandbox's memory or a suspended session's snapshot. A retry with the same Idempotency-Key returns them empty. + required: + - stdout + - stderr + - exit_code + - stdout_truncated + - stderr_truncated + - timed_out + - output_kept + SandboxExecutionResult: + type: object + additionalProperties: false + properties: + stdout: + type: string + description: The first 1 MiB (1,048,576 bytes) the command wrote to stdout. Empty in a replay of a command that kept no output. + stderr: + type: string + description: The first 1 MiB (1,048,576 bytes) the command wrote to stderr. Empty in a replay of a command that kept no output. + exit_code: + type: integer + stdout_truncated: + type: boolean + description: True when the command wrote more than 1 MiB to stdout. False in a replay of a command that kept no output. + stderr_truncated: + type: boolean + description: True when the command wrote more than 1 MiB to stderr. False in a replay of a command that kept no output. + timed_out: + type: boolean + output_kept: + type: boolean + description: False when the command kept no output. Its streams appear only in the response to the request that ran it, and Volcano's control plane never stores them in the execution journal, database, logs or traces. This does not cover the Sandbox's memory or a suspended session's snapshot. A retry with the same Idempotency-Key returns them empty. + session_id: + type: string + format: uuid + region: + type: string + duration_ms: + type: integer + format: int64 + minimum: 0 + required: + - stdout + - stderr + - exit_code + - stdout_truncated + - stderr_truncated + - timed_out + - output_kept + - session_id + - region + - duration_ms + SandboxFileWriteRequest: + type: object + additionalProperties: false + properties: + path: + type: string + minLength: 1 + maxLength: 4096 + data: + type: string + format: byte + maxLength: 11184812 + required: + - path + - data + SandboxFileReadRequest: + type: object + additionalProperties: false + properties: + path: + type: string + minLength: 1 + maxLength: 4096 + required: + - path + SandboxFileResult: + type: object + additionalProperties: false + properties: + data: + type: string + format: byte + required: + - data + SandboxFileArchiveForm: + type: object + description: Send `project_id`, `session_id` and `path`, in any order, then the `archive` part. + properties: + project_id: + type: string + format: uuid + session_id: + type: string + format: uuid + path: + type: string + minLength: 1 + maxLength: 4096 + description: Workspace directory to extract into, relative to `/workspace`. It must name a directory below the workspace root; a path that resolves to the root or to `/`, such as `.`, `./`, `/`, `/workspace` or `/workspace/.`, is refused. + archive: + type: string + format: binary + description: A tar archive, optionally gzip-compressed. + required: + - project_id + - session_id + - path + - archive + SandboxFileArchive: + type: object + additionalProperties: false + properties: + project_id: + type: string + format: uuid + session_id: + type: string + format: uuid + path: + type: string + files: + type: integer + format: int64 + minimum: 0 + description: Regular files written. + bytes: + type: integer + format: int64 + minimum: 0 + description: Bytes of file content written. + required: + - project_id + - session_id + - path + - files + - bytes + SandboxFilePartRequest: + type: object + additionalProperties: false + properties: + project_id: + type: string + format: uuid + session_id: + type: string + format: uuid + path: + type: string + minLength: 1 + maxLength: 4096 + description: Workspace file to write, relative to `/workspace`. + offset: + type: integer + format: int64 + minimum: 0 + description: Byte offset of this part's data in the file. + size: + type: integer + format: int64 + minimum: 1 + maximum: 1073741824 + description: Size of the whole file in bytes, at most 1 GiB. + sha256: + type: string + pattern: ^[0-9a-f]{64}$ + description: Lowercase hex SHA-256 of the whole file. + data: + type: string + format: byte + minLength: 4 + maxLength: 11184812 + description: This part's bytes, at most 8 MiB. + required: + - project_id + - session_id + - path + - offset + - size + - sha256 + - data + SandboxFilePart: + type: object + additionalProperties: false + properties: + project_id: + type: string + format: uuid + session_id: + type: string + format: uuid + path: + type: string + offset: + type: integer + format: int64 + minimum: 0 + size: + type: integer + format: int64 + minimum: 1 + received: + type: integer + format: int64 + minimum: 1 + description: Bytes of the file received through the end of this part. + complete: + type: boolean + description: True when this part finished the file and it is now at `path`. + required: + - project_id + - session_id + - path + - offset + - size + - received + - complete + SandboxFileEntry: + type: object + additionalProperties: false + properties: + path: + type: string + description: Path relative to the workspace root, usable with the read and write file routes. + type: + type: string + enum: + - file + - directory + - symlink + - other + description: Entry type from the entry itself. A symlink is reported, never followed. + size: + type: integer + format: int64 + minimum: 0 + description: Size in bytes of a regular file; 0 for every other type. + mode: + type: integer + minimum: 0 + maximum: 4095 + description: Permission bits, including setuid, setgid and sticky (`st_mode & 07777`). For example, 420 is `0644` and 493 is `0755`. + sha256: + type: string + pattern: ^[0-9a-f]{64}$ + description: Lowercase hex SHA-256 of a regular file's content, present only when `include_sha256` is true and the file could be hashed. + sha256_skipped: + type: string + enum: + - budget + - changing + - unreadable + description: Why a regular file has no `sha256` when `include_sha256` is true. `budget` is a file over 256 MiB. `changing` is a file that changed while it was hashed or kept changing; list it again later. `unreadable` is a file the session user doesn't own, whose owner-read bit (`0400`) is clear, or that has more than one hard link. Treat such a file as unverified. + unreadable: + type: boolean + description: 'True on a directory the session user can''t list; the listing doesn''t enter it. The user''s permission bits on the directory lack read or execute: the owner bits when the user owns it, the group bits when it belongs to the user''s group, and the other bits otherwise. Absent on every other entry.' + unsupported_names: + type: integer + minimum: 1 + description: 'In a recursive listing, how many names directly inside this directory no entry can carry: names that are not UTF-8, or whose path would pass 4096 bytes. The listing skips them and everything below them. Absent when there are none.' + required: + - path + - type + - size + - mode + SandboxFileListResult: + type: object + additionalProperties: false + properties: + project_id: + type: string + format: uuid + description: The project the session belongs to. + session_id: + type: string + format: uuid + description: The session listed. + entries: + type: array + items: + $ref: '#/components/schemas/SandboxFileEntry' + description: Entries sorted by path, compared one path element at a time by bytes, so a directory comes right before its contents. + unsupported_names: + type: integer + minimum: 1 + description: 'How many names directly inside the listed directory no entry can carry: names that are not UTF-8, or whose path would pass 4096 bytes. The listing skips them and everything below them. Every page reports it. Absent when there are none.' + next_cursor: + type: string + description: Present when more entries remain. Pass it as `cursor` to get the next page. + required: + - project_id + - session_id + - entries + SandboxSubjectGrantRequest: + type: object + additionalProperties: false + properties: + expires_at: + type: string + format: date-time + required: + - expires_at + SandboxAccessRequest: + type: object + additionalProperties: false + properties: + port: + type: integer + minimum: 1 + maximum: 65532 + expires_in_seconds: + type: integer + minimum: 1 + maximum: 300 + default: 300 + required: + - port + SandboxAccess: + type: object + additionalProperties: false + properties: + url: + type: string + format: uri + token: + type: string + expires_at: + type: string + format: date-time + required: + - url + - token + - expires_at + SandboxBuildLogPage: + type: object + required: + - data + properties: + data: + type: array + items: + type: object + required: + - timestamp + - message + properties: + timestamp: + type: string + format: date-time + message: + type: string + next_cursor: + type: string + description: Opaque cursor for the next page. Absent when caught up. + SandboxDeployment: + type: object + additionalProperties: false + properties: + id: + type: string + format: uuid + status: + type: string + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + required: + - id + - status + - created_at + - updated_at + SandboxPagination: + type: object + additionalProperties: false + properties: + limit: + type: integer + has_more: + type: boolean + next_cursor: + type: string + required: + - limit + - has_more + SandboxTemplatePage: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/SandboxTemplate' + pagination: + $ref: '#/components/schemas/SandboxPagination' + required: + - data + - pagination + SandboxSessionPage: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/SandboxSession' + pagination: + $ref: '#/components/schemas/SandboxPagination' + required: + - data + - pagination + SandboxDeploymentPage: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/SandboxDeployment' + pagination: + $ref: '#/components/schemas/SandboxPagination' + required: + - data + - pagination + SandboxPresetList: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/SandboxPreset' + required: + - data + Capability: + type: object + additionalProperties: false + description: A product capability and whether it accepts new work in this environment. + properties: + id: + type: string + description: Stable capability ID, such as `sandboxes`, `sandboxes.sessions`, `sandboxes.custom_templates`, or `issues`. New IDs may appear at any time. + example: sandboxes.sessions + status: + $ref: '#/components/schemas/CapabilityStatus' + code: + type: string + description: Why an `unavailable` capability refuses new work, named like the error code its requests answer with, such as `plan_required`. Absent on any other status, and when requests answer `feature_unavailable`. Treat an unknown code as absent. + example: plan_required + required: + - id + - status + CapabilityStatus: + type: string + enum: + - available + - unavailable + - read_only + x-enum-varnames: + - CapabilityStatusAvailable + - CapabilityStatusUnavailable + - CapabilityStatusReadOnly + description: '`available` means the capability accepts new work; a temporary outage still answers `503`. `unavailable` means requests that start new work answer `404` or `400` with code `feature_unavailable`, or with the capability''s `code` when it has one; while the owner''s plan can''t be read, they answer `403` without a code. `read_only` means the capability takes no new work for the project, but what the project already has stays readable; only a project''s list reports it. Treat any other value as `unavailable`.' + CapabilityList: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/Capability' + required: + - data + SandboxCapacity: + type: object + additionalProperties: false + properties: + region: + type: string + allocated_memory_mb: + type: integer + format: int64 + minimum: 0 + required: + - region + - allocated_memory_mb + SandboxCapacityList: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/SandboxCapacity' + required: + - data + PublishSandboxPresetRequest: + type: object + additionalProperties: false + properties: + id: + type: string + format: uuid + preset: + type: string + enum: + - python3.12 + - node22 + memory_mb: + type: integer + enum: + - 1024 + - 2048 + deployment_id: + type: string + format: uuid + required: + - id + - preset + - memory_mb + - deployment_id + AnonKey: + type: object + properties: + id: + type: string + format: uuid + project_id: + type: string + format: uuid + name: + type: string + key_value: + type: string + description: JWT token - use this in frontend Authorization header + permissions: + type: array + items: + type: string + description: | + Permissions granted to this anon key. + Auth permissions: auth.signup, auth.signin, auth.refresh, auth.logout, auth.password_reset, auth.confirm_email, auth.resend_confirmation + Storage permissions: storage.upload, storage.download, storage.list, storage.delete + Realtime permissions: realtime.connect, realtime.subscribe, realtime.publish + Functions permissions: functions.invoke + example: + - auth.signup + - auth.signin + - auth.refresh + - auth.logout + is_default: + type: boolean + description: Whether this is the project's configured default anon key. Only one key per project can be default. + created_at: + type: string + format: date-time + required: + - id + - name + - key_value + AuthConfig: + type: object + properties: + project_id: + type: string + format: uuid + access_token_lifetime: + type: integer + description: Access token lifetime in seconds + default: 3600 + refresh_token_lifetime: + type: integer + description: Refresh token lifetime in seconds + default: 2592000 + refresh_token_reuse_interval: + type: integer + description: A refresh within this many seconds of the refresh token being issued returns the same refresh token instead of rotating it, so concurrent refreshes from several tabs all succeed + default: 10 + inactivity_timeout: + type: integer + description: Force re-login after inactivity (seconds, 0=never) + default: 0 + max_session_duration: + type: integer + description: Force re-login after duration (seconds, 0=never) + default: 0 + min_password_length: + type: integer + minimum: 15 + maximum: 128 + default: 15 + description: Configured minimum password length in Unicode characters. + password_policy: + $ref: '#/components/schemas/AuthPasswordPolicy' + require_uppercase: + type: boolean + default: false + require_lowercase: + type: boolean + default: false + require_numbers: + type: boolean + default: false + require_special_chars: + type: boolean + default: false + enable_signup: + type: boolean + description: Master switch - allow new user signups via ANY provider + default: true + enable_email_password: + type: boolean + description: Enable email/password authentication as a provider + default: true + rate_limit_signup: + type: integer + description: Signups per hour per IP + default: 100 + rate_limit_signin: + type: integer + description: Signins per hour per IP + default: 100 + rate_limit_token_refresh: + type: integer + description: Refreshes per hour per IP + default: 1000 + rate_limit_password_reset: + type: integer + description: Password reset requests per hour per IP. Unlike the other limits, 0 applies the default of 10 instead of turning the limit off. + default: 10 + cors_enabled: + type: boolean + default: false + cors_allowed_origins: + type: array + items: + type: string + example: + - https://myapp.com + - http://localhost:3000 + enable_anonymous_signins: + type: boolean + description: Allow creating users without email/password + default: false + allowed_email_domains: + type: array + description: | + Email domains allowed to create users in this project. Applies to + email/password signup, OAuth/SSO signup, anonymous conversion, and + email changes. Empty (the default) allows every domain. + + Entries are stored normalized (lowercase, no `@` prefix) and match + the domain part exactly: `domain1.com` does not cover + `mail.domain1.com`. Signups from other domains are rejected with + 403, and `allowed_email_domains_mode` decides whether sign-in is + covered as well. + + The allowlist is a SUPERAGENT feature to configure and to enforce. A + downgrade parks it: the domains are still returned here and stop + being applied until the project is back on SUPERAGENT. + items: + type: string + example: + - domain1.com + - domain2.com + allowed_email_domains_mode: + type: string + description: | + How far `allowed_email_domains` reaches. `signup` only gates account + creation, so accounts that predate the list keep signing in. + `signup_and_signin` also refuses to issue a session to an account + whose domain is not listed. `disabled` keeps the list without + enforcing it. + enum: + - disabled + - signup + - signup_and_signin + default: signup + platform_token_ttl: + type: integer + description: TTL in seconds for platform tokens minted via `/auth/platform/exchange` + default: 2592000 + allow_password_reset: + type: boolean + description: Enable forgot password flow + default: true + password_reset_timeout: + type: integer + description: Recovery token expiry in seconds + default: 3600 + max_password_history: + type: integer + description: Number of previous passwords to remember (0=disabled) + default: 0 + cors_allow_credentials: + type: boolean + description: Allow credentials in CORS requests + default: true + cors_max_age: + type: integer + description: CORS preflight cache duration (seconds) + default: 86400 + cors_allow_frontend_previews: + type: boolean + description: Allow the exact origins of the project's own live frontend previews in its CORS checks, in addition to `cors_allowed_origins`. A preview's origin stops being allowed within seconds of the preview being deleted or expiring, with no configuration change. + default: false + frontend_preview_origins: + type: array + readOnly: true + description: Origins of the project's live frontend previews that its CORS checks currently allow. Empty unless `cors_allow_frontend_previews` is true. Omitted when the live previews could not be read; the rest of the response, and any update it answers, is unaffected. + items: + type: string + require_email_confirmation: + type: boolean + description: Require users to confirm email before sign-in. Can only be true when email_enabled is true. + default: false + email_confirmation_timeout: + type: integer + description: Email confirmation token expiry in seconds. + default: 86400 + auto_link_verified_oauth: + type: boolean + description: Link a verified OAuth identity to an existing confirmed account with the same email instead of returning a conflict. Requires require_email_confirmation to be true. + default: false + email_enabled: + type: boolean + description: Enable transactional email sending (confirmation, reset, change notifications). Must be true when require_email_confirmation is true. + default: false + email_from_address: + type: string + description: Sender email address. New or changed values containing carriage returns or newlines return 400. Unchanged stored or exported values are preserved. Leading and trailing whitespace in previously saved settings is trimmed in responses and exports, and ignored when sending. + email_from_name: + type: string + description: Sender display name; supports punctuation and Unicode. New or changed values containing carriage returns or newlines return 400. Unchanged stored or exported values are preserved. Leading and trailing whitespace in previously saved settings is trimmed in responses and exports, and ignored when sending. + smtp_host: + type: string + smtp_port: + type: integer + default: 587 + smtp_username: + type: string + smtp_password_configured: + type: boolean + description: Whether an SMTP password is configured. The password itself is never returned. + default: false + smtp_use_tls: + type: boolean + default: true + email_confirmation_subject: + type: string + email_password_reset_subject: + type: string + email_password_changed_subject: + type: string + managed_auth_enabled: + type: boolean + description: Enables project-hosted managed auth pages. + default: false + post_auth_redirect_url: + type: string + description: Default redirect target after successful hosted auth. + allowed_redirect_urls: + type: array + description: Redirect allowlist used to validate post_auth_redirect_url and post_logout_redirect_url. + items: + type: string + post_logout_redirect_url: + type: string + description: Redirect target after logout from hosted pages. + device_verification_url: + type: string + description: | + Optional override for the device-authorization verification page. + When set, POST /auth/device/authorize returns this URL (with the + user_code) as verification_uri/verification_uri_complete instead of + the built-in managed device page. Lets a CLI surface the project's + own RFC 8628 approval page. Empty falls back to the managed page. + example: https://app.acme.com/device + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + required: + - password_policy + AuthInsightsInterval: + type: string + enum: + - day + - week + - month + AuthInsightsResponse: + type: object + additionalProperties: false + properties: + project_id: + type: string + format: uuid + observed_at: + type: string + format: date-time + window: + $ref: '#/components/schemas/AuthInsightsWindow' + summary: + $ref: '#/components/schemas/AuthInsightsSummary' + series: + type: array + items: + $ref: '#/components/schemas/AuthInsightsSeriesPoint' + required: + - project_id + - observed_at + - window + - summary + - series + AuthInsightsSeriesPoint: + type: object + additionalProperties: false + properties: + bucket_start: + type: string + format: date + signups: + type: integer + format: int64 + minimum: 0 + description: Registrations during the bucket. Subsequent deletion does not subtract from this count. Historical counts removed before deletion-history collection cannot be reconstructed. + signins: + type: integer + format: int64 + minimum: 0 + description: Successful session creations during the bucket. + banned_users: + type: integer + format: int64 + minimum: 0 + description: Users registered in this bucket who are currently banned. Excludes deleted users, lifted bans, expired temporary bans, and internal test identities. + deleted_users: + type: integer + format: int64 + minimum: 0 + description: Users registered in this bucket who are now deleted, counted once across soft and hard deletion. Grouped by signup date, not deletion date. + available_users: + type: integer + format: int64 + minimum: 0 + description: Currently available users registered in this bucket (signups minus banned_users minus deleted_users). Unban or expiry restores availability in the original signup bucket. This measures account availability, not return activity. + deletions: + type: integer + format: int64 + minimum: 0 + description: Accounts deleted during this bucket, counted once across soft and hard deletion. + net_growth: + type: integer + format: int64 + description: Registrations minus deletions during this bucket. May be negative. Bans do not affect this value. + is_partial: + type: boolean + description: Whether the requested window or observation time clips this bucket. + required: + - bucket_start + - signups + - signins + - is_partial + - deletions + - banned_users + - deleted_users + - available_users + - net_growth + AuthInsightsSummary: + type: object + additionalProperties: false + properties: + total_users: + type: integer + format: int64 + minimum: 0 + description: Current auth-user count, excluding accounts with deleted status. + deleted_users: + type: integer + format: int64 + minimum: 0 + description: Recorded deletions, excluding internal test identities. Includes soft and hard deletion, counted once per account. + active_users_1d: + type: integer + format: int64 + minimum: 0 + description: Distinct users active in the trailing 24 hours, including activity before account deletion. + active_users_30d: + type: integer + format: int64 + minimum: 0 + description: Distinct users with a successful session creation or refresh in the trailing 30 days, including activity before account deletion. + required: + - total_users + - active_users_30d + - active_users_1d + - deleted_users + AuthInsightsWindow: + type: object + additionalProperties: false + properties: + from: + type: string + format: date + to: + type: string + format: date + interval: + $ref: '#/components/schemas/AuthInsightsInterval' + required: + - from + - to + - interval + AuthHostedPage: + type: object + properties: + id: + type: string + format: uuid + project_id: + type: string + format: uuid + page_type: + $ref: '#/components/schemas/HostedAuthPageType' + html: + type: string + description: HTML content for this page type. + css: + type: string + description: CSS content for this page type. + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + AuthPageAppearanceResponse: + type: object + required: + - theme + - layouts + - customisation_allowed + - parked + - defaults + - options + properties: + theme: + $ref: '#/components/schemas/AuthPageTheme' + layouts: + type: object + additionalProperties: + $ref: '#/components/schemas/AuthPageLayout' + customisation_allowed: + type: boolean + parked: + type: object + additionalProperties: + type: boolean + description: Per-page saved-but-not-live state. + defaults: + $ref: '#/components/schemas/AuthPageAppearanceDefaults' + options: + $ref: '#/components/schemas/AuthPageAppearanceOptions' + AuthPageDensity: + type: string + enum: + - compact + - comfortable + - spacious + AuthPageFont: + type: string + enum: + - system + - humanist + - geometric + - slab + - mono + AuthPageLayout: + type: string + enum: + - centered + - split-left + - split-right + AuthPageRadius: + type: string + enum: + - none + - small + - medium + - large + AuthPageScale: + type: string + enum: + - small + - default + - large + AuthPageTheme: + type: object + additionalProperties: false + required: + - version + - colors + - font + - scale + - density + - radius + properties: + version: + type: integer + enum: + - 1 + colors: + $ref: '#/components/schemas/AuthPageThemeColors' + font: + $ref: '#/components/schemas/AuthPageFont' + scale: + $ref: '#/components/schemas/AuthPageScale' + density: + $ref: '#/components/schemas/AuthPageDensity' + radius: + $ref: '#/components/schemas/AuthPageRadius' + AuthHostedPageResponse: + type: object + required: + - page + - defaults + - runtime + properties: + page: + allOf: + - $ref: '#/components/schemas/AuthHostedPage' + nullable: true + description: The saved page, or null when the project has not customized this page type yet. + defaults: + $ref: '#/components/schemas/AuthHostedPageDefaults' + runtime: + $ref: '#/components/schemas/AuthHostedPageRuntime' + AuthIdentity: + type: object + description: | + A real email identity owned by the account. One account can own multiple + identities (for example a work email plus a personal email linked via OAuth). + properties: + id: + type: string + format: uuid + description: Unique identity identifier + email: + type: string + format: email + description: The email address this identity represents + email_verified: + type: boolean + description: Whether ownership of this email has been verified + is_primary: + type: boolean + description: Whether the account's primary sign-in method resolves to this identity + created_at: + type: string + format: date-time + required: + - id + - email + - email_verified + - is_primary + - created_at + AuthIdentitiesResponse: + type: object + properties: + identities: + type: array + items: + $ref: '#/components/schemas/AuthIdentity' + required: + - identities + AuthMethodSummary: + type: object + description: | + A single sign-in method the account owns (password, an OAuth provider, or an + active anonymous method). `is_primary` reflects the account's primary_method_id. + properties: + id: + type: string + format: uuid + description: Unique method identifier + type: + type: string + x-go-type: string + description: The kind of sign-in method + enum: + - password + - oauth + - anonymous + provider: + type: string + description: OAuth provider name; present only when type is oauth + example: google + identity_id: + type: string + description: | + The identity this method signs in to — a UUID for password/oauth methods, + empty for anonymous methods. + email: + type: string + description: The email of the method's identity (empty for anonymous) + is_primary: + type: boolean + description: Whether this is the account's primary sign-in method + last_used_at: + type: string + format: date-time + description: When this method was last used to sign in, if ever + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + required: + - id + - type + - identity_id + - email + - is_primary + - created_at + - updated_at + AuthMethodsResponse: + type: object + properties: + methods: + type: array + items: + $ref: '#/components/schemas/AuthMethodSummary' + required: + - methods + AuthPasswordPolicy: + type: object + additionalProperties: false + description: Effective backend-enforced password policy. + properties: + effective_min_length: + type: integer + minimum: 15 + maximum: 128 + description: Effective minimum password length in Unicode characters. + min_configurable_length: + type: integer + minimum: 15 + maximum: 15 + description: Lowest minimum password length accepted by the auth configuration endpoint. + max_length: + type: integer + minimum: 128 + maximum: 128 + description: Maximum password length in Unicode characters. + require_uppercase: + type: boolean + description: Whether passwords must contain an ASCII uppercase letter (A-Z). + require_lowercase: + type: boolean + description: Whether passwords must contain an ASCII lowercase letter (a-z). + require_numbers: + type: boolean + description: Whether passwords must contain an ASCII digit (0-9). + require_special_chars: + type: boolean + description: Whether passwords must contain one of the backend-supported special characters. + compromised_passwords_rejected: + type: boolean + description: Whether common and known-compromised passwords are rejected by the backend. + required: + - effective_min_length + - min_configurable_length + - max_length + - require_uppercase + - require_lowercase + - require_numbers + - require_special_chars + - compromised_passwords_rejected + AuthSession: + type: object + description: An authentication session for a user + properties: + id: + type: string + format: uuid + description: Unique session identifier + user_id: + type: string + format: uuid + description: The user this session belongs to + provider: + type: string + description: Authentication provider used to create this session + enum: + - email + - google + - github + - microsoft + - apple + - anonymous + example: email + user_agent: + type: string + description: Browser/device user agent string + example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) + ip_address: + type: string + description: IP address of the client when the session was created + example: 192.168.1.1 + last_ip_address: + type: string + description: IP address of the most recent activity (token refresh) + example: 192.168.1.100 + expires_at: + type: string + format: date-time + description: When this session expires + last_activity_at: + type: string + format: date-time + description: Last activity timestamp + session_started_at: + type: string + format: date-time + description: When the session was created + is_active: + type: boolean + description: Whether the session is currently active (not expired) + is_current: + type: boolean + description: Whether this is the session making the current request + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + required: + - id + - user_id + - provider + - expires_at + - is_active + - is_current + AuthSignupResponse: + type: object + description: | + Uniform, session-less response returned by POST /auth/signup. It carries no + tokens and no user object, and is identical for a new account and for an + already-registered email (anti-enumeration). Clients obtain a session with a + subsequent POST /auth/signin. + properties: + confirmation_required: + type: boolean + description: | + Whether the project requires email confirmation. Reflects project config + only (identical for a new and an existing email), so it leaks nothing about + account existence. + message: + type: string + description: Human-readable acknowledgement. + required: + - confirmation_required + - message + AuthTokenResponse: + type: object + properties: + access_token: + type: string + description: JWT access token (expires after configured lifetime) + token_type: + type: string + example: bearer + expires_in: + type: integer + description: Access token lifetime in seconds + refresh_token: + type: string + x-go-type-skip-optional-pointer: true + description: | + Long-lived token for getting new access tokens. Omitted when the + request uses eligible HttpOnly cookie session storage. + user: + $ref: '#/components/schemas/AuthUser' + required: + - access_token + - token_type + - expires_in + - user + AuthUser: + type: object + properties: + id: + type: string + format: uuid + project_id: + type: string + format: uuid + email: + type: string + format: email + email_confirmed: + type: boolean + user_metadata: + type: object + additionalProperties: true + description: User-editable metadata + app_metadata: + type: object + additionalProperties: true + description: Application-controlled metadata (read-only for users) + avatar_url: + type: string + format: uri + description: User avatar URL (from OAuth provider or manually set) + status: + type: string + enum: + - active + - banned + - deleted + banned_until: + type: string + format: date-time + nullable: true + description: When temporary ban expires (null if not banned or permanent) + last_sign_in_at: + type: string + format: date-time + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + required: + - id + - email + - status + BanUserResponse: + type: object + description: Response when banning a user + properties: + message: + type: string + example: User banned until 2026-12-31T23:59:59Z + user_id: + type: string + format: uuid + email: + type: string + format: email + status: + type: string + enum: + - banned + banned_until: + type: string + format: date-time + nullable: true + description: When the ban expires (null for permanent ban) + required: + - message + - user_id + - email + - status + BatchFunctionDeployFailure: + type: object + properties: + name: + type: string + function_id: + type: string + format: uuid + operation: + type: string + enum: + - deploy + - update + error: + type: string + required: + - name + - error + BatchFunctionDeployResponse: + type: object + properties: + batch_id: + type: string + format: uuid + data: + type: array + description: Functions whose deployment workflows were started successfully + items: + $ref: '#/components/schemas/Function' + failed: + type: array + description: Functions that failed before their workflow started. Successful functions are left running; failed new functions are deleted and failed updates are rolled back where possible. + items: + $ref: '#/components/schemas/BatchFunctionDeployFailure' + required: + - batch_id + - data + CompleteUploadSessionResponse: + type: object + description: Response when completing an upload + properties: + object: + $ref: '#/components/schemas/StorageObject' + CreateDatabaseBackupRequest: + type: object + properties: + name: + type: string + description: | + Backup name, unique within the database. Names beginning with + `volcano-` are reserved for the platform's own snapshots, and names + beginning with `before-migration-` for the backups migration runs + take. + pattern: ^[a-z0-9][a-z0-9_-]{0,62}$ + maxLength: 63 + example: before_migration + required: + - name + CreateDatabaseBranchRequest: + type: object + properties: + name: + type: string + description: | + Branch name, unique within the parent database. Names beginning + with `migration_rehearsal_` are reserved for the branches migration + runs rehearse on. + pattern: ^[a-z0-9_]+$ + maxLength: 64 + example: feature_checkout + ttl_seconds: + type: integer + format: int64 + minimum: 3600 + maximum: 2592000 + description: | + How long the branch should live, between one hour and 30 days. + Defaults to 7 days when omitted. + example: 86400 + required: + - name + CreateDatabaseRestoreRequest: + type: object + description: | + Names what to restore. Supply exactly one of `backup_name` or + `restore_to`. + properties: + backup_name: + type: string + minLength: 1 + maxLength: 128 + description: | + A backup of this database to restore, exactly as returned by the list + endpoint. + + Deliberately looser than the names you can create, like the backup + path parameter: a backup made by a schedule is named for you, so + restoring one accepts any name a backup can have. + example: before_migration + restore_to: + type: string + format: date-time + description: | + A point in time to restore to, which must fall inside the + `restore_window` reported when listing backups. + example: '2026-01-15T09:30:00Z' + CreateDatabaseRequest: + type: object + description: | + Create a new PostgreSQL database. Volcano automatically sets up: + - Auth helpers (auth.uid(), auth.email(), auth.role()) + - Database roles (anon for unauthenticated, authenticated for signed-in users) + - Secure multi-tenant isolation + - Ready for Row-Level Security + properties: + name: + type: string + description: Database name (must be unique within project) + pattern: ^[a-z0-9_]+$ + maxLength: 64 + example: my_database + region: + type: string + description: | + Region for database hosting, such as `us-east-1`. The accepted values + are the regions this environment runs in, so read them from + `GET /databases/regions` rather than hardcoding a list. A region the + environment does not offer is rejected with 400. Region IDs issued by + earlier versions of the API are still accepted. + example: us-east-1 + pg_version: + type: string + description: | + PostgreSQL major version. `GET /databases/postgres-versions` lists + the versions this environment accepts; local mode accepts only the + version its server runs. Any other value is rejected with 400. + example: '18' + enum: + - '16' + - '17' + - '18' + database_type: + type: string + description: | + Compute size tier (optional, defaults to volcano-db-xs). + Determines autoscaling limits for the database. + enum: + - volcano-db-xs + - volcano-db-s + - volcano-db-m + - volcano-db-l + - volcano-db-xl + - volcano-db-2xl + default: volcano-db-xs + example: volcano-db-xs + required: + - name + - region + - pg_version + CreateEmailTemplateRequest: + type: object + properties: + template_type: + type: string + enum: + - welcome + - confirmation + - password_reset + - password_changed + description: Type of email template + subject: + type: string + description: Subject template. After Go template whitespace trimming, literal interior carriage returns or newlines return 400. Outer whitespace and trailing block-scalar newlines are allowed. + example: Confirm your email + html_body: + type: string + description: | + HTML template body. Available placeholders: + - {{.Token}} - The confirmation/reset token + - {{.ProjectName}} - The project name + - {{.Email}} - User's email address + text_body: + type: string + description: Plain text template body (same placeholders as HTML) + required: + - template_type + - subject + - html_body + - text_body + CreateFrontendCustomDomainRequest: + type: object + additionalProperties: false + properties: + domain: + type: string + maxLength: 253 + description: 'Fully-qualified domain name (hostname only, no scheme/path). Managed TLS (`tls.mode: managed`) accepts at most 219 characters; BYOC accepts 253.' + example: app.example.com + tls: + $ref: '#/components/schemas/FrontendCustomDomainTLSConfig' + required: + - domain + - tls + CreateFrontendDomainRequest: + type: object + additionalProperties: false + properties: + domain: + type: string + maxLength: 253 + description: 'Fully-qualified domain name (hostname only, no scheme/path). Managed TLS (`tls.mode: managed`) accepts at most 219 characters; BYOC accepts 253.' + example: www.example.com + tls: + $ref: '#/components/schemas/FrontendCustomDomainTLSConfig' + redirect: + $ref: '#/components/schemas/FrontendCustomDomainRedirectRequest' + required: + - domain + - tls + CreateFunctionSchedulerRequest: + type: object + required: + - name + - schedule + properties: + name: + type: string + maxLength: 200 + enabled: + type: boolean + default: true + schedule: + $ref: '#/components/schemas/ScheduleRequest' + payload: + type: object + additionalProperties: true + regions: + type: array + description: Optional single explicit deployed region. If omitted, the scheduler chooses one deployed region and invokes according to the cron expression. + maxItems: 1 + items: + type: string + CreateOAuthConfigRequest: + type: object + required: + - provider + properties: + provider: + type: string + enum: + - google + - github + - microsoft + - apple + - device + example: google + client_id: + type: string + example: 123456789.apps.googleusercontent.com + description: Required for non-device providers. Must not be provided for `provider=device`; server always auto-generates it. + client_secret: + type: string + example: GOCSPX-abc123def456 + description: Required for non-device providers. Must not be provided for `provider=device`; server always auto-generates it. + redirect_url: + type: string + description: Required for non-device providers. Not used for `provider=device`. + format: uri + example: https://yourapp.com/auth/callback + scopes: + type: array + items: + type: string + example: + - openid + - email + - profile + description: Optional for non-device providers, uses provider defaults if omitted. Not used for `provider=device`. + CreateProjectRequest: + type: object + description: Request to create a new project + properties: + name: + type: string + description: | + Project name. A name you already use is not refused: the project is + created with a short random suffix added to it. + Can only contain letters, numbers, underscores, and hyphens. + pattern: ^[A-Za-z0-9_-]+$ + minLength: 1 + maxLength: 255 + example: my-awesome-app + template_id: + type: string + description: Optional trusted starter template identifier. The server resolves immutable source and database initialization artifacts. Callers cannot supply artifact locations or database credentials. Creation accepts an asynchronous installation; poll the individual project until template_installation.status is ready before using the app. Use pixel-board, trellini, or collab-pad for the configured starter bundles. The official-starter legacy identifier has environment-specific availability. + enum: + - pixel-board + - trellini + - collab-pad + - official-starter + example: pixel-board + all_regions: + type: boolean + description: | + Optional region policy. + - `true` (default): project functions deploy to all configured regions + - `false`: project deploys only to `selected_regions` + default: true + selected_regions: + type: array + items: + type: string + description: | + Optional region subset. Requires `all_regions=false`. + Region names must be a subset of platform `AWS_REGIONS`. + example: + - us-east-1 + - us-west-2 + required: + - name + CreateStorageBucketRequest: + type: object + properties: + name: + type: string + description: Bucket name (alphanumeric, dashes, underscores) + pattern: ^[a-zA-Z0-9_-]+$ + minLength: 1 + maxLength: 64 + file_size_limit: + type: integer + format: int64 + description: Maximum file size in bytes + allowed_mime_types: + type: array + items: + type: string + description: Allowed MIME types (e.g., ["image/png", "image/jpeg"]) + required: + - name + CreateStoragePolicyRequest: + type: object + properties: + name: + type: string + description: Policy name + operation: + type: string + enum: + - SELECT + - INSERT + - UPDATE + - DELETE + description: Operation this policy applies to + definition: + type: string + description: Policy expression + required: + - name + - operation + - definition + CreateUploadSessionRequest: + type: object + description: Request to create a resumable upload session + properties: + object_path: + type: string + description: Target file path within the bucket + example: videos/large-file.mp4 + content_type: + type: string + description: MIME type of the file + example: video/mp4 + total_size: + type: integer + format: int64 + description: Total file size in bytes (max 5TB) + minimum: 1 + maximum: 5497558138880 + example: 5368709120 + part_size: + type: integer + format: int64 + description: 'Part size in bytes (default: 25MB, min: 5MB, max: 25MB)' + minimum: 5242880 + maximum: 26214400 + example: 26214400 + required: + - object_path + - content_type + - total_size + CreateUploadSessionResponse: + type: object + description: Response when creating an upload session + properties: + session_id: + type: string + description: Upload session ID + example: session-abc123 + part_size: + type: integer + format: int64 + description: Actual part size to use + example: 26214400 + total_parts: + type: integer + description: Number of parts to upload + example: 52 + expires_at: + type: string + format: date-time + description: When the session expires (7 days from creation) + example: '2024-01-22T10:30:00Z' + CreateVariableRequest: + type: object + properties: + shared: + type: boolean + description: Include this name in the project's shared function variables. Omission preserves existing membership; new variables default to true for legacy clients. Send false explicitly to create a non-shared variable. + name: + type: string + description: Project variable name. Function runtime names such as AWS_REGION are reserved and return 400; see the environment variables guide for the full list. + minLength: 1 + maxLength: 256 + pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ + value: + type: string + required: + - name + - value + VariableEnvironment: + type: object + description: Stable identity for a Project-owned variable Environment. + properties: + id: + type: string + format: uuid + project_id: + type: string + format: uuid + name: + type: string + pattern: ^[A-Za-z0-9_-]{1,64}$ + minLength: 1 + maxLength: 64 + is_global: + type: boolean + description: Whether this is the reserved Global Environment. + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + required: + - id + - project_id + - name + - is_global + - created_at + - updated_at + VariableEnvironmentList: + type: object + properties: + data: + type: array + maxItems: 101 + items: + $ref: '#/components/schemas/VariableEnvironment' + required: + - data + CreateVariableEnvironmentRequest: + type: object + additionalProperties: false + properties: + name: + type: string + description: Leading and trailing ASCII whitespace is trimmed before validating 1–64 ASCII letters, digits, underscores, or hyphens. Global is reserved. + pattern: ^[ \t\n\f\r]*[A-Za-z0-9_-]{1,64}[ \t\n\f\r]*$ + required: + - name + RenameVariableEnvironmentRequest: + type: object + additionalProperties: false + properties: + name: + type: string + description: Leading and trailing ASCII whitespace is trimmed before validating 1–64 ASCII letters, digits, underscores, or hyphens. Global is reserved. + pattern: ^[ \t\n\f\r]*[A-Za-z0-9_-]{1,64}[ \t\n\f\r]*$ + required: + - name + Database: + type: object + description: | + PostgreSQL database with automatic scalability and security features. + properties: + id: + type: string + format: uuid + project_id: + type: string + format: uuid + name: + type: string + description: Database name + pattern: ^[a-z0-9_]+$ + maxLength: 64 + status: + type: string + enum: + - provisioning + - active + - failed + - restoring + - deleting + description: | + Database status. `restoring` means a restore is replacing the + database's data: it does not accept connections, and the operations + that would race the restore are rejected until it finishes. Its + branches keep serving throughout. + provisioning_started_at: + type: string + format: date-time + description: Timestamp when the current provisioning phase started + connection_string: + type: string + description: | + Secure PostgreSQL connection URI for your database. + + The database is identified by the globally-unique username + (`volcano_client_{database_id}`) already in this URI; the + `application_name` parameter only selects the access mode: + - `volcano_full_access` — Full admin access (DDL, migrations) + - `volcano_user_access:{user_id}` — User impersonation (RLS enforced) + - `volcano_user_access` — Anonymous access (anon role, RLS enforced) + region: + type: string + description: Region where the database is hosted + example: us-east-1 + pg_version: + type: string + description: PostgreSQL major version + example: '18' + database_type: + type: string + description: | + Database size tier that determines available RAM and scaling limits. + enum: + - volcano-db-xs + - volcano-db-s + - volcano-db-m + - volcano-db-l + - volcano-db-xl + - volcano-db-2xl + example: volcano-db-xs + storage_bytes: + type: integer + format: int64 + minimum: 0 + description: | + Latest observed storage for this database, in bytes: its own on-disk + size, plus what each branch has diverged from it, plus what its + backups cost to hold. This is the figure the storage allowance is + enforced against, and the stats endpoint breaks it down. A + point-in-time gauge recorded by a background pass, so it may be + absent until the database has been sampled, and it can trail the + stats endpoint's `current_storage_bytes`, which measures on request. + Summing the latest samples for every database in a project produces + the project's "Database Storage (Bytes)" usage gauge. Populated on + database list responses; single-database responses omit it. + last_invoked_at: + type: string + format: date-time + description: Most recent request timestamp for this database + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + required: + - id + - project_id + - name + - status + - created_at + - updated_at + DatabaseBackup: + type: object + description: | + A point-in-time copy of a database, kept by the storage provider and + restorable in place. + + Backups cover the database itself, not its branches. Restoring one + replaces the database's data and keeps its connection string. + properties: + name: + type: string + description: | + Backup name, unique within the database. Backups you create are + named by you; scheduled backups are named by the storage provider. + source: + type: string + enum: + - manual + - scheduled + - migration + description: | + Whether the backup was requested explicitly, produced by the backup + schedule, or taken before migrations were applied to the database. + Only `manual` backups count against the plan's backup allowance. + size_bytes: + type: integer + format: int64 + minimum: 0 + description: | + Storage the backup occupies. Absent until the provider has costed + it, which takes a few minutes after the backup is taken; absent is + not the same as empty. + expires_at: + type: string + format: date-time + description: | + When the backup is deleted automatically, from the plan's retention. + Absent means it is kept until deleted explicitly. + created_at: + type: string + format: date-time + description: The point in time the backup captures. + required: + - name + - source + - created_at + DatabaseBackupList: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/DatabaseBackup' + restore_window: + $ref: '#/components/schemas/DatabaseRestoreWindow' + required: + - data + DatabaseBackupSchedule: + type: object description: | - The query was rejected by a billing-cycle allowance: either the owning - platform user's bandwidth allowance (aggregate ingress + egress across - owned projects) or their database-request allowance. Enforcement is - eventual: queries are rejected until the allowance increases or the - next anniversary cycle begins. The error message identifies the resource. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - DatabaseBranchQueryUnavailable: + The database's automated backup schedule. An empty list means no + scheduled backups; sending one clears the schedule. + properties: + entries: + type: array + items: + $ref: '#/components/schemas/DatabaseBackupScheduleEntry' + required: + - entries + DatabaseBackupScheduleEntry: + type: object + description: One recurrence of the automated backup schedule. + properties: + frequency: + type: string + enum: + - daily + - weekly + - monthly + hour: + type: integer + minimum: 0 + maximum: 23 + description: Hour of the day in UTC. + day: + type: integer + minimum: 1 + maximum: 28 + description: | + Day of the week (1-7, Monday to Sunday) for a weekly schedule, or day + of the month (1-28) for a monthly one. Required for both, ignored for + a daily schedule. Monthly stops at 28 so the schedule fires in every + month. + retention_seconds: + type: integer + format: int64 + minimum: 3600 + description: | + How long each backup from this recurrence is kept. Clamped to the + plan's retention, and defaulted to it when omitted. + required: + - frequency + - hour + DatabaseBranch: + type: object + description: | + A copy-on-write fork of a database, for development and testing. + + A branch starts as an exact copy of its parent's data and diverges from + there. It has its own connection string and its own credential, so a + branch password cannot reach the parent. + + Every branch expires. `expires_at` is a hard deadline: once it passes the + branch stops accepting connections and is deleted. Use `PATCH` to extend + a branch you are still working on. + properties: + id: + type: string + format: uuid + database_id: + type: string + format: uuid + description: The parent database this branch was forked from. + project_id: + type: string + format: uuid + name: + type: string + description: Branch name, unique within the parent database. + pattern: ^[a-z0-9_]+$ + maxLength: 64 + status: + type: string + enum: + - provisioning + - active + - failed + - deleting + description: | + Branch status. A new branch starts `provisioning` and is not + connectable until it reports `active`; poll this endpoint until it + does. `connection_string` is only present while `active`. + + `provisioning` also covers a branch being rebuilt after a `reset`, + and a build that is between retries, so it is the status to keep + waiting on. `failed` is terminal: it means the platform gave up, and + the branch will not become `active` on its own. + connection_string: + type: string + description: | + PostgreSQL connection URI for this branch. Present only while the + branch is `active`. + + The URI carries the branch's own globally-unique username and + password; `application_name` selects the access mode exactly as it + does for the parent database: + - `volcano_full_access` — Full admin access (DDL, migrations) + - `volcano_user_access:{user_id}` — User impersonation (RLS enforced) + - `volcano_user_access` — Anonymous access (anon role, RLS enforced) + ttl_seconds: + type: integer + format: int64 + minimum: 1 + description: | + The lifetime the branch was created with. Resetting a branch re-arms + this same duration, so a reset never shortens a branch's remaining + life. + expires_at: + type: string + format: date-time + description: | + When the branch stops serving connections and becomes eligible for + deletion. Enforced on the connection path, so it holds even if + reclamation is delayed. + storage_bytes: + type: integer + format: int64 + minimum: 0 + description: | + Bytes this branch has diverged from its parent, which is what a + branch actually costs. Shared pages are not counted twice. Counts + against the parent database's storage allowance. Absent until the + branch has been sampled. + last_invoked_at: + type: string + format: date-time + description: Most recent request timestamp for this branch + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + required: + - id + - database_id + - project_id + - name + - status + - ttl_seconds + - expires_at + - created_at + - updated_at + DatabaseBranchList: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/DatabaseBranch' + required: + - data + DatabaseBranchStorage: + type: object + description: One branch's contribution to its parent database's storage. + properties: + id: + type: string + format: uuid + name: + type: string + description: Branch name + storage_bytes: + type: integer + format: int64 + minimum: 0 + description: | + Bytes this branch has diverged from its parent. Pages the branch + still shares with the parent are not counted, so this is what the + branch actually adds to the total rather than its apparent size. + required: + - id + - name + - storage_bytes + DatabaseSelectRequest: + type: object + properties: + table: + type: string + description: Table name to query + example: posts + select: + type: array + items: + type: string + description: Columns to select (omit for *) + example: + - id + - title + - content + - created_at + filters: + type: array + items: + $ref: '#/components/schemas/DatabaseQueryFilter' + description: WHERE conditions (combined with AND) + example: + - column: status + operator: eq + value: published + - column: views + operator: gt + value: 100 + order: + type: array + items: + $ref: '#/components/schemas/DatabaseQueryOrder' + description: ORDER BY clauses + example: + - column: created_at + ascending: false + limit: + type: integer + minimum: 1 + maximum: 1000 + description: Maximum rows to return + example: 10 + offset: + type: integer + minimum: 0 + description: Number of rows to skip (for pagination) + example: 0 + required: + - table + DatabaseInsertRequest: + type: object + properties: + table: + type: string + description: Table name + example: posts + values: + type: object + additionalProperties: true + description: | + Column values to insert. JSON objects and arrays are stored as JSON, + so send them to `json` or `jsonb` columns. For a Postgres array + column, send an array literal string such as `"{a,b}"`. + example: + title: My New Post + content: This is the content + status: draft + required: + - table + - values + DatabaseUpdateRequest: + type: object + properties: + table: + type: string + description: Table name + example: posts + values: + type: object + additionalProperties: true + description: | + Column values to update. JSON objects and arrays are stored as JSON, + so send them to `json` or `jsonb` columns. For a Postgres array + column, send an array literal string such as `"{a,b}"`. + example: + title: Updated Title + status: published + filters: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/DatabaseQueryFilter' + description: | + WHERE conditions for which rows to update. At least one filter is + required; a filterless update is rejected to avoid rewriting every + row. + example: + - column: id + operator: eq + value: post-uuid + required: + - table + - values + - filters + DatabaseDeleteRequest: + type: object + properties: + table: + type: string + description: Table name + example: posts + filters: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/DatabaseQueryFilter' + description: WHERE conditions (required for safety) + example: + - column: id + operator: eq + value: post-uuid + required: + - table + - filters + DatabaseQueryResult: + type: object description: | - The branch exists but cannot serve queries: it is still provisioning, - being reset, expired, or its parent is being restored. Distinct from - `404` so a caller waiting on a branch can tell it apart from a typo. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - OpenAPISpecNotModified: + Rows returned by a data API request. RLS-filtered unless the request was + made with a service key. + properties: + data: + type: array + items: + type: object + additionalProperties: true + description: Result rows + count: + type: integer + description: Number of rows returned + DatabaseRestore: + type: object description: | - The specification still matches the supplied `If-None-Match`, so no body - is returned. - headers: - ETag: - $ref: '#/components/headers/ETag' - OpenAPISpecHeaders: + A restore of a database, either from a named backup or to a point in + time. Restores run in the background and take longer than a request, so + the database is unavailable until this reports `completed`. + properties: + id: + type: string + format: uuid + database_id: + type: string + format: uuid + project_id: + type: string + format: uuid + kind: + type: string + enum: + - snapshot + - point_in_time + description: | + Whether the restore targets a named backup or an arbitrary point in + time. Both replace the database's data in place. + status: + type: string + enum: + - pending + - running + - completed + - failed + - exhausted + description: | + Restore status. `pending` and `running` both mean the restore is + still in flight and the database is not connectable; an attempt that + fails with tries left goes back to `pending`. `failed` and + `exhausted` both mean Volcano gave up: the database is left `failed` + if its data may already have been replaced, and `active` if the + restore never started — a backup that no longer exists at the + provider ends the restore without touching the database. A restore + cannot be cancelled once it starts. + backup_name: + type: string + description: | + The backup restored, kept even if that backup is later deleted. + Absent for a point-in-time restore. + restore_to: + type: string + format: date-time + description: The point in time restored to. Absent for a backup restore. + error: + type: string + description: Why the most recent attempt failed, when one has. + completed_at: + type: string + format: date-time + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + required: + - id + - database_id + - project_id + - kind + - status + - created_at + - updated_at + DatabaseRestoreList: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/DatabaseRestore' + required: + - data + DatabaseRestoreWindow: + type: object description: | - The headers a `GET` would return, without the document. The declared - `ETag` is the one to revalidate against. - headers: - ETag: - $ref: '#/components/headers/ETag' - schemas: - SandboxPreset: + The span a point-in-time restore may target. Absent from the response + when the owner's plan does not include point-in-time restore, and while + the storage provider has no history window in place yet — briefly the + case after an upgrade, since the window is applied asynchronously. The + window is read from the provider rather than from the plan, so it never + advertises a point a restore could not actually reach. + properties: + earliest_restore_at: + type: string + format: date-time + description: | + The oldest point that can still be restored. Moves forward + continuously as history ages out, so treat it as a lower bound at + the moment it was read rather than a fixed value. + latest_restore_at: + type: string + format: date-time + description: The most recent point that can be restored, which is now. + DatabaseRestoreConflictError: + description: | + A restore refused by the database's state. With code + `migration_run_in_progress`, `run_id` names the migration run backing up + or applying to the database. + allOf: + - $ref: '#/components/schemas/Error' + - type: object + properties: + run_id: + type: string + format: uuid + DatabaseMigrationFile: type: object - additionalProperties: false + description: One migration file and its SQL. properties: - id: - type: string - runtime: - type: string - version: + name: type: string - memory_mb: - type: integer - enum: - - 1024 - - 2048 - regions: + minLength: 5 + maxLength: 320 + pattern: ^([a-z0-9_]+/)?[^/\\]+\.sql$ + description: | + The file's path under `volcano/migrations/`: a file name such as + `001_create_users.sql`, or `/001_create_users.sql` in a + project with more than one database, where `` must be + this database. Every file in a request takes the same form. Files + run in byte order of their file name, which the history records. + example: 001_create_users.sql + sql: + type: string + maxLength: 1048576 + description: | + The file's SQL, at most 1 MiB. A file may hold several statements + and runs in one transaction. A file cannot commit, roll back, use + savepoints, or `COPY` from the client; such a file fails with + `migration_failed`. A statement that cannot run in a transaction, + such as `CREATE INDEX CONCURRENTLY`, goes alone in a file whose + first line is `-- volcano:no-transaction`. That file runs outside a + transaction and runs again from its start when a run retries it. A + run refuses with `invalid_file`, before anything runs, a file with + the marker on any other line, and a marked file that builds an + unnamed index with `CREATE INDEX CONCURRENTLY` or starts with + `COPY`. + required: + - name + - sql + DatabaseMigrationFilesRequest: + type: object + properties: + files: type: array + minItems: 1 + maxItems: 1000 items: - type: string + $ref: '#/components/schemas/DatabaseMigrationFile' required: - - id - - runtime - - version - - memory_mb - - regions - SandboxTemplate: + - files + DatabaseMigrationHistoryEntry: type: object - additionalProperties: false + description: One file the database's migration history records. properties: - id: - type: string - format: uuid - project_id: - type: string - format: uuid name: type: string - pattern: ^[a-z][a-z0-9-]{0,62}$ - preset: + example: 001_create_users.sql + checksum: type: string - memory_mb: - type: integer + description: | + `sha256:` and the hex digest of the file as recorded, with a leading + byte order mark removed and CRLF line endings converted to LF. + example: sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 status: type: string enum: - - ready - - unavailable - - deleting - created_at: + - applied + - baselined + description: | + `applied`: a run ran the file and it committed. `baselined`: the file + was recorded as applied without running. + applied_at: type: string format: date-time + run_id: + type: string + format: uuid + description: The run that recorded the file. Absent for a baseline. required: - - id - - project_id - name + - checksum - status - - created_at - CreateSandboxTemplateRequest: + - applied_at + DatabaseMigrations: + type: object + properties: + history: + type: array + description: Every file the history records, in name order. + items: + $ref: '#/components/schemas/DatabaseMigrationHistoryEntry' + active_run_id: + type: string + format: uuid + description: The run that is queued or running, if any. + required: + - history + DatabaseMigrationBaseline: + type: object + properties: + recorded: + type: array + description: | + The files this request recorded, in name order. Empty when the + history already recorded every file. + items: + type: string + required: + - recorded + DatabaseMigrationConflictError: + description: | + A migration request refused by the database's state. With code + `migration_run_in_progress`, `run_id` names the run that is queued or + running. + allOf: + - $ref: '#/components/schemas/Error' + - type: object + properties: + run_id: + type: string + format: uuid + DatabaseMigrationRunFile: type: object - additionalProperties: false properties: name: type: string - pattern: ^[a-z][a-z0-9-]{0,62}$ - preset: + example: 001_create_users.sql + outcome: type: string - description: Preset ID from the available Sandbox preset catalog. - memory_mb: - type: integer enum: - - 1024 - - 2048 - default: 1024 + - pending + - already_applied + - applied + - failed + - not_run + - unknown + description: | + `pending`: not settled yet, including a file the run will try again + on its next attempt. `already_applied`: the history already recorded + it, so it did not run; a file can also end this way in `apply`, when + another session applied or baselined it after the run planned. + `applied`: this run applied it. `failed`: its own SQL failed and + its transaction rolled back, in the rehearsal or in the database as + the run's `phase` says, including when the run's time limit stopped + it; a file whose `COMMIT` failed is `unknown` instead. A file whose + first line is `-- volcano:no-transaction` runs outside a + transaction, so nothing rolls back what it did before failing, such + as the invalid index a failed `CREATE INDEX CONCURRENTLY` leaves. + `not_run`: the run ended before the file committed, without its + SQL failing: before `apply`, after an earlier file failed or lost + its `COMMIT`, or after the connection was lost or Volcano's own + statements around the file failed, which rolled it back. `unknown`: + the run ended in `apply` without confirming whether the file ran, + for example because its attempts ran out, its `COMMIT` failed or + was cut short, or it ran outside a transaction and the connection + was lost or Volcano's own statements after it failed. The file may + have committed. The database's history says whether a file that + ran in a transaction committed, and the next run's plan applies a + file only if the history does not record it. + While the run is `queued` or `running`, each attempt reads the + history again before it runs a file, and sets every file the run + has not applied from it: `already_applied` if the history holds + it, `pending` otherwise. The exception is a file that runs outside + a transaction: it is `unknown` from just before Volcano sends it + until Volcano confirms what became of it. If it may have run, it + stays `unknown` until an attempt applies it or the history holds + it, and keeps the `error` of a later attempt that fails it. + error: + $ref: '#/components/schemas/DatabaseMigrationFileError' required: - name - - preset - UpdateSandboxTemplateRequest: + - outcome + DatabaseMigrationFileError: type: object - additionalProperties: false + description: | + The database's error for a `failed` file, or for an `unknown` file + that runs outside a transaction, when a later attempt failed it after + an earlier one may have run it. `message` is the database's own + message and can quote values from the file or the data. properties: - name: + message: type: string - pattern: ^[a-z][a-z0-9-]{0,62}$ + description: | + At most 8 KiB (8,192 bytes). A longer message is cut and ends with + ` … [truncated]`. Volcano reads each reply the database sends about + the file up to 4 MiB, which leaves room for a reply that quotes the + whole file twice. A larger reply is not read: the file fails, and + this message says so instead. + example: column "email" of relation "users" already exists + sqlstate: + type: string + description: The Postgres error code, when the database reported one. + example: '42701' + line: + type: integer + minimum: 1 + description: The line of the file the database reported, when known. required: - - name - SandboxSession: + - message + DatabaseMigrationWarning: type: object - additionalProperties: false + description: A condition the run reports that did not stop it. properties: - id: + code: type: string - format: uuid - project_id: + enum: + - out_of_order + - missing_file + - rehearsal_skipped + - backup_skipped + - backup_prune_failed + - warnings_truncated + description: | + `out_of_order`: a pending file sorts before one the history already + records; it still ran. `missing_file`: the history records a file + the run did not include. `rehearsal_skipped`: the files were not + rehearsed, because branches are not available here or on the plan. + `backup_skipped`: no backup was taken, because backups are not + available here or on the plan. `backup_prune_failed`: Volcano + could not delete older migration backups beyond the 20 it keeps; + the run's outcome is unaffected, and the next run that takes a + backup tries again. `warnings_truncated`: the run raised more than + 100 warnings; it is the last one, and its message says how many + more were not kept. + file: + type: string + description: The file the warning is about, when it is about one. + message: type: string - format: uuid - sandbox_id: + required: + - code + - message + DatabaseMigrationRunError: + type: object + description: Why the run failed, or why its last attempt did. + properties: + code: + type: string + enum: + - migration_failed + - checksum_mismatch + - history_missing + - history_too_large + - invalid_file + - invalid_layout + - plan_changed + - branch_limit + - rehearsal_unavailable + - backup_failed + - restore_in_progress + - database_unavailable + - owner_not_active + - locked + - connection_failed + - timeout + - attempts_exhausted + - internal_error + - operator_failed + description: | + Stable machine-readable reason. `migration_failed`: a file's SQL, + or its `COMMIT`, failed; `phase` says whether in the rehearsal, + leaving the database untouched, or in the database, where the files + before it stay applied. `checksum_mismatch`: an applied file changed. + `history_missing`: the database's history table is gone though + migrations ran there; record a baseline of the files already + applied. Dropping the whole `_volcano_migrations` schema is not + supported and not detected: the database reads as new, and the run + applies every file again. `history_too_large`: the history has + more than the 1,000 entries Volcano reads. `invalid_file`: a file + Volcano refuses to run. `invalid_layout`: file paths that do not map + to the database. + `plan_changed`: the history changed after the rehearsal. + `branch_limit`: the rehearsal branch would exceed the plan's branch + allowance. `backup_failed` and `rehearsal_unavailable`: Volcano + could not take the backup or prepare the rehearsal. + `restore_in_progress` and `database_unavailable`: the database could + not take the run. `owner_not_active`: the project owner's account + was not `active` when Volcano picked the run up, or before its + `backup` or `apply`, or before a file in `apply` unless held + `read_only` only for the plan's limits, so the run applied nothing + further; files it already applied stay applied. + `locked`: another session held the migration lock, + or a file, or Volcano's drop of a failed build's index, waited too + long for a lock. `connection_failed`: the + database could not be reached, or the connection was lost, + including while a file ran. `internal_error`: Volcano failed for a + reason of its own, such as its own statements around a file. + `timeout` and `attempts_exhausted`: the run could not finish. + `operator_failed`: Volcano ended a run that stopped making + progress; read the history to see which files were applied, then + start a new run. + message: + type: string + description: | + What happened, naming files and Postgres error codes. The + database's own message is on the failed file. + required: + - code + - message + DatabaseMigrationRun: + type: object + description: | + One application of migration files to a database. A run plans the files + against the database's history, rehearses the pending ones on a + short-lived branch, takes a backup, and applies them. + properties: + id: type: string format: uuid - nullable: true - description: Explicit template used to create the session. Null when created directly from a preset. - state: + database: + $ref: '#/components/schemas/ResourceReference' + status: type: string enum: - - starting + - queued - running - - suspending - - suspended - - resuming - - terminating - - terminated - - unknown - desired_state: + - succeeded + - failed + description: | + `queued` and `running` mean the run has not ended; a run waiting + to retry stays `running`. `succeeded`: every pending file was + applied, or none was pending. `failed`: `error` says why. + phase: type: string enum: - - running - - suspended - - terminated - region: + - plan + - rehearse + - backup + - apply + x-enum-varnames: + - DatabaseMigrationRunPhasePlan + - DatabaseMigrationRunPhaseRehearse + - DatabaseMigrationRunPhaseBackup + - DatabaseMigrationRunPhaseApply + description: | + The step the run is on, or the one it ended on. `plan` compares the + files with the history. `rehearse` applies the pending files to a + short-lived branch of the database, which is deleted afterwards. + `backup` takes the backup named by `backup_name`. `apply` applies + the files to the database. + source: type: string - memory_mb: - type: integer - created_at: + enum: + - git_deploy + - api + description: What started the run. + commit_sha: type: string - format: date-time + description: The commit whose files the run applies. Present for `git_deploy` runs. + backup_name: + type: string + description: | + The backup the run takes before it applies the files, named once + the run starts taking it. It is listed with the database's backups + with `source: migration`. A run that ended in its `backup` phase + may name a backup that was never created. + example: before-migration-7f3a1c2e-5d4b-4a91-8c6f-2b1e9d0a4c73 + files: + type: array + description: | + The run's files, in the order they run, with what became of each. + Absent when listing runs. + items: + $ref: '#/components/schemas/DatabaseMigrationRunFile' + warnings: + type: array + maxItems: 101 + description: | + A run keeps at most 100 warnings, keeping those about the run, such + as a skipped backup, ahead of those about files. A run that raised + more ends the list with a `warnings_truncated` warning. + items: + $ref: '#/components/schemas/DatabaseMigrationWarning' + error: + $ref: '#/components/schemas/DatabaseMigrationRunError' started_at: type: string format: date-time - expires_at: + description: When a worker first picked the run up. + completed_at: + type: string + format: date-time + created_at: + type: string + format: date-time + updated_at: type: string format: date-time - nullable: true - description: Absolute VM expiry. Null means unlimited in local mode. required: - id - - project_id - - sandbox_id - - state - - desired_state - - region - - memory_mb + - database + - status + - phase + - source + - warnings - created_at - - expires_at - CreateSandboxSessionRequest: + - updated_at + DatabaseMigrationRunList: type: object - additionalProperties: false properties: - preset: + data: + type: array + items: + $ref: '#/components/schemas/DatabaseMigrationRun' + required: + - data + DatabaseStats: + type: object + properties: + current_storage_bytes: + type: integer + format: int64 + minimum: 0 + description: | + On-disk size right now, in bytes: the database itself, plus every + branch's divergence from it, plus what its backups cost to hold. This + is the figure the storage allowance is enforced against. `branches` + and `backup_storage_bytes` break it down. + current_storage_mb: + type: number + format: double + minimum: 0 + description: '`current_storage_bytes` expressed in megabytes.' + branches: + type: array + description: | + Per-branch contribution to `current_storage_bytes`. Empty when the + database has no branches. A branch that has not diverged from its + parent contributes nothing. + items: + $ref: '#/components/schemas/DatabaseBranchStorage' + backup_storage_bytes: + type: integer + format: int64 + minimum: 0 + description: | + What this database's backups contribute to `current_storage_bytes`. + + A backup taken on request is charged as a full copy of the database + as it was at that moment, so two backups of a 2 GB database are 4 GB. + A backup schedule is charged its first snapshot in full and each + later one only for the storage it adds. Deleting a backup releases + its storage immediately. + + Sampled from the provider rather than measured live, so it can lag a + change by a few minutes, and a backup taken seconds ago may not be + costed yet. Zero on a plan without backups. + storage_bytes: + type: integer + format: int64 + description: Total storage used in bytes (data + WAL) + data_written_bytes: + type: integer + format: int64 + description: Total data written in bytes + data_transfer_bytes: + type: integer + format: int64 + description: Total data transferred in bytes + compute_time_seconds: + type: number + format: double + description: Total CPU seconds consumed + active_time_seconds: + type: number + format: double + description: Total active compute time in seconds + time_range: type: string - description: Preset ID from the available Sandbox preset catalog. - sandbox_id: + description: Time range of the metrics (e.g., "2024-01-01T00:00:00Z to 2024-01-02T00:00:00Z") + granularity: type: string - format: uuid - memory_mb: - description: Baseline memory in MiB. Cloud HOBBY supports 1024; SUPERAGENT supports 1024 or 2048. Omission uses the preset or template default; a template requiring more than the plan permits is rejected. Local sessions are exempt from cloud plan limits. - type: integer enum: - - 1024 - - 2048 - region: - type: string - pattern: ^(aws-)?[a-z]{2}(-[a-z]+)+-[0-9]+$ - description: Region such as `us-east-1`. Region IDs issued by earlier versions of the API are still accepted. - max_duration_seconds: - type: integer - minimum: 0 - maximum: 2147483647 - description: Inherits the template TTL when omitted (cloud default 3600 seconds; local default 0, unlimited). Cloud HOBBY accepts 30–3600 seconds; SUPERAGENT accepts 30–28800 seconds. Inherited template defaults are clamped to the plan limit; explicit values above it are rejected. Local accepts 0 for unlimited or a positive lifetime. + - hourly + - daily + - monthly + description: Granularity of the aggregated metrics required: - - region - oneOf: - - required: - - preset - not: - required: - - sandbox_id - - required: - - sandbox_id - not: - required: - - preset - SandboxCommandRequest: + - current_storage_bytes + - current_storage_mb + - backup_storage_bytes + - storage_bytes + - data_written_bytes + - data_transfer_bytes + - compute_time_seconds + - active_time_seconds + DatabaseQueryPerformanceResponse: type: object - additionalProperties: false properties: - command: - type: string - minLength: 1 - maxLength: 65536 - timeout_seconds: + data: + type: array + items: + $ref: '#/components/schemas/DatabaseQueryPerformanceItem' + required: + - data + UpdateDatabaseBranchRequest: + type: object + description: Replace the branch's lifetime and restart its countdown from now. + properties: + ttl_seconds: type: integer - minimum: 0 - maximum: 2147483647 - description: Command execution time from process start. Cloud defaults to 60 seconds and accepts 1–28800; local defaults to 0 (unlimited) and accepts nonnegative values. VM expiry always takes precedence. Cloud synchronous requests must return within the public connection idle limit (1000 seconds); use a session with a background process and short polling requests for longer work. - environment: - type: object - additionalProperties: - type: string - maxProperties: 64 + format: int64 + minimum: 3600 + maximum: 2592000 + description: The new lifetime, between one hour and 30 days. + example: 86400 required: - - command - SandboxExecutionRequest: + - ttl_seconds + DeviceAuthorizationResponse: type: object - additionalProperties: false properties: - preset: + device_code: type: string - description: Preset ID from the available Sandbox preset catalog. - sandbox_id: + user_code: type: string - format: uuid - memory_mb: - description: Baseline memory in MiB. Cloud HOBBY supports 1024; SUPERAGENT supports 1024 or 2048. Omission uses the preset or template default; a template requiring more than the plan permits is rejected. Local sessions are exempt from cloud plan limits. - type: integer - enum: - - 1024 - - 2048 - region: + verification_uri: type: string - pattern: ^(aws-)?[a-z]{2}(-[a-z]+)+-[0-9]+$ - description: Region such as `us-east-1`. Region IDs issued by earlier versions of the API are still accepted. - max_duration_seconds: - type: integer - minimum: 0 - maximum: 2147483647 - description: Absolute VM lifetime including startup, bounded by environment capacity policy. Inherits the template TTL when omitted (cloud default 3600 seconds; local default 0, unlimited). Cloud HOBBY accepts 30–3600 seconds; SUPERAGENT accepts 30–28800 seconds. Inherited template defaults are clamped to the plan limit; explicit values above it are rejected. Local accepts 0 for unlimited or a positive lifetime. The VM is reclaimed early when the command finishes. - command: + description: | + Browser verification URL. Points at the project's managed device + approval page served by this API: + `/projects/{projectId}/auth/hosted?action=device&anon_key=...`. + Requires the project to have managed auth enabled and a default anon + key. A custom CLI may ignore this and direct users to its own + RFC 8628-compatible page instead (see the device-auth guide). + verification_uri_complete: type: string - minLength: 1 - maxLength: 65536 - timeout_seconds: + description: | + Same as `verification_uri` but with the `user_code` prefilled + (`&user_code=...`). This is the URL most device clients open. + expires_in: + type: integer + interval: type: integer - minimum: 0 - maximum: 2147483647 - description: Command execution time from process start. Cloud defaults to 60 seconds and accepts 1–28800; local defaults to 0 (unlimited) and accepts nonnegative values. VM expiry always takes precedence. Cloud synchronous requests must return within the public connection idle limit (1000 seconds); use a session with a background process and short polling requests for longer work. - environment: - type: object - additionalProperties: - type: string - maxProperties: 64 required: - - region - - command - oneOf: - - required: - - preset - not: - required: - - sandbox_id - - required: - - sandbox_id - not: - required: - - preset - SandboxCommandResult: + - device_code + - user_code + - verification_uri + - verification_uri_complete + - expires_in + - interval + DefaultEmailTemplate: type: object - additionalProperties: false + description: Built-in email template used when no custom template applies. properties: - stdout: + type: type: string - stderr: + enum: + - welcome + - confirmation + - password_reset + - password_changed + x-enum-varnames: + - DefaultEmailTemplateWelcome + - DefaultEmailTemplateConfirmation + - DefaultEmailTemplatePasswordReset + - DefaultEmailTemplatePasswordChanged + subject: type: string - exit_code: - type: integer - stdout_truncated: - type: boolean - stderr_truncated: - type: boolean - timed_out: - type: boolean + html_body: + type: string + description: HTML template with placeholders + text_body: + type: string + description: Plain text template with placeholders required: - - stdout - - stderr - - exit_code - - stdout_truncated - - stderr_truncated - - timed_out - SandboxExecutionResult: + - type + - subject + - html_body + - text_body + EmailTemplate: type: object - additionalProperties: false + description: Custom email template properties: - stdout: - type: string - stderr: + id: type: string - exit_code: - type: integer - stdout_truncated: - type: boolean - stderr_truncated: - type: boolean - timed_out: - type: boolean - session_id: + format: uuid + project_id: type: string format: uuid - region: + template_type: type: string - duration_ms: - type: integer - format: int64 - minimum: 0 - required: - - stdout - - stderr - - exit_code - - stdout_truncated - - stderr_truncated - - timed_out - - session_id - - region - - duration_ms - SandboxFileWriteRequest: - type: object - additionalProperties: false - properties: - path: + enum: + - welcome + - confirmation + - password_reset + - password_changed + subject: type: string - minLength: 1 - maxLength: 4096 - data: + example: Confirm your email address + html_body: type: string - format: byte - maxLength: 11184812 - required: - - path - - data - SandboxFileReadRequest: + description: HTML template with placeholders + text_body: + type: string + description: Plain text template with placeholders + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + required: + - template_type + Error: type: object - additionalProperties: false properties: - path: + error: type: string - minLength: 1 - maxLength: 4096 + code: + type: string + description: 'Stable machine-readable error code when a specific recovery path is available. `plan_required` (403) means the project owner''s plan does not include the requested feature or option; upgrading the plan unlocks it. `person_required` (403) means a project access token tried to change LavaFlow settings, which only the project''s owner changes, with a platform token, or that the change needs the owner''s own credential that expires, a project repository, and an owner whose GitHub account can push to it; `error` says which. A 403 without a code leaves the reason unspecified: it can be an access refusal, a reached limit, or a plan check that could not read the owner''s plan. Match on the code, not the message text.' required: - - path - SandboxFileResult: + - error + ImportProvider: + type: string + enum: + - vercel + default: vercel + x-enum-varnames: + - ImportProviderVercel + ImportConnectStartResponse: type: object - additionalProperties: false properties: - data: + authorization_url: type: string - format: byte required: - - data - SandboxSubjectGrantRequest: + - authorization_url + ImportConnection: type: object - additionalProperties: false properties: + id: + type: string + format: uuid + provider: + $ref: '#/components/schemas/ImportProvider' + account_id: + type: string + account_name: + type: string + configuration_id: + type: string + granted_scopes: + type: array + items: + type: string + status: + type: string expires_at: type: string format: date-time + nullable: true + last_authenticated_at: + type: string + format: date-time + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time required: - - expires_at - SandboxAccessRequest: + - id + - provider + - account_id + - account_name + - configuration_id + - granted_scopes + - status + - last_authenticated_at + - created_at + - updated_at + ImportConnectionsResponse: type: object - additionalProperties: false properties: - port: - type: integer - minimum: 1 - maximum: 65532 - expires_in_seconds: - type: integer - minimum: 1 - maximum: 300 - default: 300 + connections: + type: array + items: + $ref: '#/components/schemas/ImportConnection' required: - - port - SandboxAccess: + - connections + ImportSource: type: object - additionalProperties: false properties: - url: + id: type: string - format: uri - token: + name: type: string - expires_at: + account_id: + type: string + framework: type: string - format: date-time required: - - url - - token - - expires_at - SandboxBuildLogPage: + - id + - name + - account_id + - framework + ImportSourcesResponse: type: object - required: - - data properties: - data: + sources: type: array items: - type: object - required: - - timestamp - - message - properties: - timestamp: - type: string - format: date-time - message: - type: string - next_cursor: + $ref: '#/components/schemas/ImportSource' + required: + - sources + ProjectImportTarget: + type: string + enum: + - production + x-enum-varnames: + - ProjectImportTargetProduction + ProjectImportDestinationMode: + type: string + enum: + - create + x-enum-varnames: + - ProjectImportDestinationCreate + ProjectImportDisposition: + type: string + enum: + - automatic + - manual + - deferred + - unsupported + x-enum-varnames: + - ProjectImportDispositionAutomatic + - ProjectImportDispositionManual + - ProjectImportDispositionDeferred + - ProjectImportDispositionUnsupported + ProjectImportImpact: + type: string + enum: + - none + - warning + - blocking + x-enum-varnames: + - ProjectImportImpactNone + - ProjectImportImpactWarning + - ProjectImportImpactBlocking + ProjectImportReadiness: + type: string + enum: + - importable + - needs_input + - blocked + x-enum-varnames: + - ProjectImportReadinessImportable + - ProjectImportReadinessNeedsInput + - ProjectImportReadinessBlocked + ProjectImportActionCode: + type: string + enum: + - project.create + - git.connect + - frontend.configure + - variable.set + x-enum-varnames: + - ProjectImportActionProjectCreate + - ProjectImportActionGitConnect + - ProjectImportActionFrontendConfigure + - ProjectImportActionVariableSet + ProjectImportResourceKind: + type: string + enum: + - project + - git_repository + - frontend + - variable + - domain + x-enum-varnames: + - ProjectImportResourceProject + - ProjectImportResourceGitRepository + - ProjectImportResourceFrontend + - ProjectImportResourceVariable + - ProjectImportResourceDomain + ProjectImportPreflightRequest: + type: object + properties: + connection_id: type: string - description: Opaque cursor for the next page. Absent when caught up. - SandboxDeployment: + format: uuid + source_id: + type: string + minLength: 1 + project_name: + type: string + maxLength: 255 + pattern: ^[A-Za-z0-9_-]+$ + target: + $ref: '#/components/schemas/ProjectImportTarget' + confirm_environment_variable_read: + type: boolean + default: false + description: Set to true only after the user confirms an immediately preceding disclosure that the Vercel Integration grant permits reads and writes, while this preflight reads production variable values only. When false or omitted, preflight reads variable metadata only and reports readable values as manual input. + required: + - connection_id + - source_id + - project_name + - target + ProjectImportStartRequest: + type: object + properties: + connection_id: + type: string + format: uuid + source_id: + type: string + minLength: 1 + maxLength: 255 + project_name: + type: string + maxLength: 255 + pattern: ^[A-Za-z0-9_-]+$ + target: + $ref: '#/components/schemas/ProjectImportTarget' + confirm_environment_variable_read: + type: boolean + enum: + - true + preflight_fingerprint: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + required: + - connection_id + - source_id + - project_name + - target + - confirm_environment_variable_read + - preflight_fingerprint + ProjectImportRunStatus: + type: string + enum: + - pending + - running + - succeeded + - failed + - superseded + x-enum-varnames: + - ProjectImportRunStatusPending + - ProjectImportRunStatusRunning + - ProjectImportRunStatusSucceeded + - ProjectImportRunStatusFailed + - ProjectImportRunStatusSuperseded + ProjectImportRun: type: object - additionalProperties: false properties: id: type: string - format: uuid + provider: + $ref: '#/components/schemas/ImportProvider' + source_id: + type: string + destination_project_name: + type: string + resource: + $ref: '#/components/schemas/ResourceReference' + deployment: + $ref: '#/components/schemas/DeploymentReference' status: + $ref: '#/components/schemas/ProjectImportRunStatus' + error_code: + type: string + description: 'Set when `status` is `failed`: `import.deployment_skipped` when the import''s deployment was skipped, otherwise the error code of the Git deployment run the import started (see `GitDeploymentRunError.code`), such as `source_invalid`, `deploy_refused`, `child_deploy_failed`, `child_deploy_not_started`, or `deploy_failed`. Treat a code you do not know as a failure.' + error_message: type: string created_at: type: string @@ -17267,730 +27303,677 @@ components: format: date-time required: - id + - provider + - source_id + - destination_project_name + - resource + - deployment - status - created_at - updated_at - SandboxPagination: + ProjectImportDestination: type: object - additionalProperties: false properties: - limit: - type: integer - has_more: - type: boolean - next_cursor: + mode: + $ref: '#/components/schemas/ProjectImportDestinationMode' + project_name: type: string + target: + $ref: '#/components/schemas/ProjectImportTarget' required: - - limit - - has_more - SandboxTemplatePage: - type: object - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/SandboxTemplate' - pagination: - $ref: '#/components/schemas/SandboxPagination' - required: - - data - - pagination - SandboxSessionPage: - type: object - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/SandboxSession' - pagination: - $ref: '#/components/schemas/SandboxPagination' - required: - - data - - pagination - SandboxDeploymentPage: - type: object - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/SandboxDeployment' - pagination: - $ref: '#/components/schemas/SandboxPagination' - required: - - data - - pagination - SandboxPresetList: - type: object - additionalProperties: false - properties: - data: - type: array - items: - $ref: '#/components/schemas/SandboxPreset' - required: - - data - Capability: + - mode + - project_name + - target + ProjectImportResource: type: object - additionalProperties: false - description: A product capability and whether it accepts new work in this environment. properties: - id: + kind: + $ref: '#/components/schemas/ProjectImportResourceKind' + name: type: string - description: Stable capability ID, such as `sandboxes`, `sandboxes.sessions`, `sandboxes.custom_templates`, `issues`, or `autofix`. New IDs may appear at any time. - example: sandboxes.sessions - status: - $ref: '#/components/schemas/CapabilityStatus' + source_id: + type: string + minLength: 1 + description: Stable provider identifier for a scoped source resource. + scope: + type: string + minLength: 1 + description: URL-encoded source scope, including target, branch, and custom environment identifiers. required: - - id - - status - CapabilityStatus: - type: string - enum: - - available - - unavailable - description: '`available` means the capability accepts new work; a temporary outage still answers `503`. `unavailable` means requests that start new work answer `404` or `400` with code `feature_unavailable`. Treat any other value as `unavailable`.' - CapabilityList: + - kind + - name + ProjectImportAction: type: object - additionalProperties: false properties: - data: - type: array - items: - $ref: '#/components/schemas/Capability' + code: + $ref: '#/components/schemas/ProjectImportActionCode' + resource: + $ref: '#/components/schemas/ProjectImportResource' + disposition: + $ref: '#/components/schemas/ProjectImportDisposition' required: - - data - SandboxCapacity: + - code + - resource + - disposition + ProjectImportFinding: type: object - additionalProperties: false properties: - region: + code: + type: string + pattern: ^(vercel|volcano|import)\.[a-z0-9_]+$ + resource: + $ref: '#/components/schemas/ProjectImportResource' + disposition: + $ref: '#/components/schemas/ProjectImportDisposition' + impact: + $ref: '#/components/schemas/ProjectImportImpact' + message: + type: string + remediation: type: string - allocated_memory_mb: - type: integer - format: int64 - minimum: 0 required: - - region - - allocated_memory_mb - SandboxCapacityList: + - code + - resource + - disposition + - impact + - message + - remediation + SharedVariablesReplaceResult: type: object additionalProperties: false + required: + - skipped_functions properties: - data: + skipped_functions: type: array + description: Functions the replacement changes whose variables were not synchronized. items: - $ref: '#/components/schemas/SandboxCapacity' - required: - - data - PublishSandboxPresetRequest: + $ref: '#/components/schemas/SkippedServedFunction' + SkippedServedFunction: type: object additionalProperties: false - properties: - id: - type: string - format: uuid - preset: - type: string - enum: - - python3.12 - - node22 - memory_mb: - type: integer - enum: - - 1024 - - 2048 - deployment_id: - type: string - format: uuid required: - id - - preset - - memory_mb - - deployment_id - AnonKey: - type: object + - name + - code + - message properties: id: type: string format: uuid - project_id: - type: string - format: uuid + description: Function ID. name: type: string - key_value: + description: Function name. + code: type: string - description: JWT token - use this in frontend Authorization header - permissions: - type: array - items: - type: string description: | - Permissions granted to this anon key. - Auth permissions: auth.signup, auth.signin, auth.refresh, auth.logout, auth.password_reset, auth.confirm_email, auth.resend_confirmation - Storage permissions: storage.upload, storage.download, storage.list, storage.delete - Realtime permissions: realtime.connect, realtime.subscribe, realtime.publish - Functions permissions: functions.invoke - example: - - auth.signup - - auth.signin - - auth.refresh - - auth.logout - is_default: - type: boolean - description: Whether this is the project's configured default anon key. Only one key per project can be default. - created_at: + Why the function was left out. Clients must accept codes not listed here. + `function_served_by_candidate` - a promoted preview serves the function and keeps the + variables it was built with. + message: type: string - format: date-time - required: - - id - - name - - key_value - AuthConfig: + description: What brings the function in line. + ProjectImportSummary: type: object properties: - project_id: - type: string - format: uuid - access_token_lifetime: - type: integer - description: Access token lifetime in seconds - default: 3600 - refresh_token_lifetime: - type: integer - description: Refresh token lifetime in seconds - default: 2592000 - refresh_token_reuse_interval: - type: integer - description: A refresh within this many seconds of the refresh token being issued returns the same refresh token instead of rotating it, so concurrent refreshes from several tabs all succeed - default: 10 - inactivity_timeout: - type: integer - description: Force re-login after inactivity (seconds, 0=never) - default: 0 - max_session_duration: + automatic: type: integer - description: Force re-login after duration (seconds, 0=never) - default: 0 - min_password_length: + minimum: 0 + manual: type: integer - minimum: 15 - maximum: 128 - default: 15 - description: Configured minimum password length in Unicode characters. - password_policy: - $ref: '#/components/schemas/AuthPasswordPolicy' - require_uppercase: - type: boolean - default: false - require_lowercase: - type: boolean - default: false - require_numbers: - type: boolean - default: false - require_special_chars: - type: boolean - default: false - enable_signup: - type: boolean - description: Master switch - allow new user signups via ANY provider - default: true - enable_email_password: - type: boolean - description: Enable email/password authentication as a provider - default: true - rate_limit_signup: + minimum: 0 + deferred: type: integer - description: Signups per hour per IP - default: 100 - rate_limit_signin: + minimum: 0 + unsupported: type: integer - description: Signins per hour per IP - default: 100 - rate_limit_token_refresh: + minimum: 0 + warnings: type: integer - description: Refreshes per hour per IP - default: 1000 - rate_limit_password_reset: + minimum: 0 + blocking: type: integer - description: Password reset requests per hour per IP. Unlike the other limits, 0 applies the default of 10 instead of turning the limit off. - default: 10 - cors_enabled: - type: boolean - default: false - cors_allowed_origins: + minimum: 0 + required: + - automatic + - manual + - deferred + - unsupported + - warnings + - blocking + ProjectImportReport: + type: object + properties: + schema_version: + type: string + provider: + $ref: '#/components/schemas/ImportProvider' + source: + $ref: '#/components/schemas/ImportSource' + destination: + $ref: '#/components/schemas/ProjectImportDestination' + actions: type: array items: - type: string - example: - - https://myapp.com - - http://localhost:3000 - enable_anonymous_signins: - type: boolean - description: Allow creating users without email/password - default: false - allowed_email_domains: + $ref: '#/components/schemas/ProjectImportAction' + findings: type: array - description: | - Email domains allowed to create users in this project. Applies to - email/password signup, OAuth/SSO signup, anonymous conversion, and - email changes. Empty (the default) allows every domain. - - Entries are stored normalized (lowercase, no `@` prefix) and match - the domain part exactly: `domain1.com` does not cover - `mail.domain1.com`. Signups from other domains are rejected with - 403, and `allowed_email_domains_mode` decides whether sign-in is - covered as well. - - The allowlist is a SUPERAGENT feature to configure and to enforce. A - downgrade parks it: the domains are still returned here and stop - being applied until the project is back on SUPERAGENT. items: - type: string - example: - - domain1.com - - domain2.com - allowed_email_domains_mode: + $ref: '#/components/schemas/ProjectImportFinding' + summary: + $ref: '#/components/schemas/ProjectImportSummary' + readiness: + $ref: '#/components/schemas/ProjectImportReadiness' + source_fingerprint: type: string - description: | - How far `allowed_email_domains` reaches. `signup` only gates account - creation, so accounts that predate the list keep signing in. - `signup_and_signin` also refuses to issue a session to an account - whose domain is not listed. `disabled` keeps the list without - enforcing it. - enum: - - disabled - - signup - - signup_and_signin - default: signup - platform_token_ttl: - type: integer - description: TTL in seconds for platform tokens minted via `/auth/platform/exchange` - default: 2592000 - allow_password_reset: - type: boolean - description: Enable forgot password flow - default: true - password_reset_timeout: - type: integer - description: Recovery token expiry in seconds - default: 3600 - max_password_history: - type: integer - description: Number of previous passwords to remember (0=disabled) - default: 0 - cors_allow_credentials: - type: boolean - description: Allow credentials in CORS requests - default: true - cors_max_age: - type: integer - description: CORS preflight cache duration (seconds) - default: 86400 - require_email_confirmation: - type: boolean - description: Require users to confirm email before sign-in. Can only be true when email_enabled is true. - default: false - email_confirmation_timeout: - type: integer - description: Email confirmation token expiry in seconds. - default: 86400 - auto_link_verified_oauth: - type: boolean - description: Link a verified OAuth identity to an existing confirmed account with the same email instead of returning a conflict. Requires require_email_confirmation to be true. - default: false - email_enabled: - type: boolean - description: Enable transactional email sending (confirmation, reset, change notifications). Must be true when require_email_confirmation is true. - default: false - email_from_address: + capability_fingerprint: type: string - email_from_name: + fingerprint: type: string - smtp_host: + generated_at: type: string - smtp_port: - type: integer - default: 587 - smtp_username: + format: date-time + required: + - schema_version + - provider + - source + - destination + - actions + - findings + - summary + - readiness + - source_fingerprint + - capability_fingerprint + - fingerprint + - generated_at + GitConnection: + type: object + properties: + id: type: string - smtp_password_configured: - type: boolean - description: Whether an SMTP password is configured. The password itself is never returned. - default: false - smtp_use_tls: - type: boolean - default: true - email_confirmation_subject: + format: uuid + provider: type: string - email_password_reset_subject: + provider_user_id: type: string - email_password_changed_subject: + provider_login: type: string - managed_auth_enabled: - type: boolean - description: Enables project-hosted managed auth pages. - default: false - post_auth_redirect_url: + status: type: string - description: Default redirect target after successful hosted auth. - allowed_redirect_urls: - type: array - description: Redirect allowlist used to validate post_auth_redirect_url and post_logout_redirect_url. - items: - type: string - post_logout_redirect_url: + last_authenticated_at: type: string - description: Redirect target after logout from hosted pages. - device_verification_url: + format: date-time + created_at: type: string - description: | - Optional override for the device-authorization verification page. - When set, POST /auth/device/authorize returns this URL (with the - user_code) as verification_uri/verification_uri_complete instead of - the built-in managed device page. Lets a CLI surface the project's - own RFC 8628 approval page. Empty falls back to the managed page. - example: https://app.acme.com/device + format: date-time + updated_at: + type: string + format: date-time + required: + - id + - provider + - provider_user_id + - provider_login + - status + - last_authenticated_at + - created_at + - updated_at + SlackTeamId: + type: string + description: A Slack workspace ID, such as `T0123ABCD`. + pattern: ^T[A-Z0-9]{2,31}$ + SlackChannelId: + type: string + description: A Slack channel ID, such as `C0123ABCD`. + pattern: ^[CG][A-Z0-9]{2,31}$ + SlackAuthorizationResponse: + type: object + properties: + authorization_url: + type: string + description: The Slack page to send the browser to. + required: + - authorization_url + SlackConnection: + type: object + description: A Slack identity connected to the caller's Volcano account. + properties: + id: + type: string + format: uuid + team_id: + $ref: '#/components/schemas/SlackTeamId' + team_name: + type: string + description: The workspace's name, or empty until the Volcano app is installed in it. + slack_user_id: + type: string + description: The Slack user ID Slack verified. + installed: + type: boolean + description: Whether the Volcano app is installed in the workspace. created_at: type: string format: date-time - updated_at: + required: + - id + - team_id + - team_name + - slack_user_id + - installed + - created_at + SlackConnectionsResponse: + type: object + properties: + connections: + type: array + items: + $ref: '#/components/schemas/SlackConnection' + required: + - connections + SlackChannel: + type: object + properties: + id: + $ref: '#/components/schemas/SlackChannelId' + name: type: string - format: date-time + is_private: + type: boolean required: - - password_policy - AuthInsightsInterval: + - id + - name + - is_private + SlackChannelsResponse: + type: object + properties: + channels: + type: array + items: + $ref: '#/components/schemas/SlackChannel' + required: + - channels + ConnectorType: type: string + description: The outside service a connector links to. enum: - - day - - week - - month - AuthInsightsResponse: + - slack + - aikido + Connector: type: object - additionalProperties: false + description: A link from Volcano to an outside service. A `slack` connector is a Slack workspace the Volcano app is installed in, shared by every Volcano account with a Slack identity connected there. An `aikido` connector is an Aikido workspace one Volcano account connected with its own credentials. properties: - project_id: + id: type: string format: uuid - observed_at: + type: + $ref: '#/components/schemas/ConnectorType' + name: + type: string + description: The connector's name in its service, such as the Slack or Aikido workspace's name. + slack: + $ref: '#/components/schemas/SlackConnector' + aikido: + $ref: '#/components/schemas/AikidoConnector' + removable: + type: boolean + description: Whether the caller can remove the connector. Only the person who installed the Volcano app in a Slack workspace can; an `aikido` connector is always the caller's own. + created_at: type: string format: date-time - window: - $ref: '#/components/schemas/AuthInsightsWindow' - summary: - $ref: '#/components/schemas/AuthInsightsSummary' - series: - type: array - items: - $ref: '#/components/schemas/AuthInsightsSeriesPoint' required: - - project_id - - observed_at - - window - - summary - - series - AuthInsightsSeriesPoint: + - id + - type + - name + - removable + - created_at + SlackConnector: type: object - additionalProperties: false + description: A `slack` connector's workspace. Present when `type` is `slack`. properties: - bucket_start: - type: string - format: date - signups: - type: integer - format: int64 - minimum: 0 - description: Registrations during the bucket. Subsequent deletion does not subtract from this count. Historical counts removed before deletion-history collection cannot be reconstructed. - signins: - type: integer - format: int64 - minimum: 0 - description: Successful session creations during the bucket. - banned_users: - type: integer - format: int64 - minimum: 0 - description: Users registered in this bucket who are currently banned. Excludes deleted users, lifted bans, expired temporary bans, and internal test identities. - deleted_users: - type: integer - format: int64 - minimum: 0 - description: Users registered in this bucket who are now deleted, counted once across soft and hard deletion. Grouped by signup date, not deletion date. - available_users: - type: integer - format: int64 - minimum: 0 - description: Currently available users registered in this bucket (signups minus banned_users minus deleted_users). Unban or expiry restores availability in the original signup bucket. This measures account availability, not return activity. - deletions: - type: integer - format: int64 - minimum: 0 - description: Accounts deleted during this bucket, counted once across soft and hard deletion. - net_growth: + team_id: + $ref: '#/components/schemas/SlackTeamId' + required: + - team_id + AikidoConnector: + type: object + description: An `aikido` connector's workspace. Present when `type` is `aikido`. + properties: + region: + $ref: '#/components/schemas/AikidoRegion' + workspace_id: type: integer format: int64 - description: Registrations minus deletions during this bucket. May be negative. Bans do not affect this value. - is_partial: - type: boolean - description: Whether the requested window or observation time clips this bucket. + description: The workspace's ID in Aikido, which its webhook deliveries name. required: - - bucket_start - - signups - - signins - - is_partial - - deletions - - banned_users - - deleted_users - - available_users - - net_growth - AuthInsightsSummary: + - region + - workspace_id + AikidoRegion: + type: string + description: 'The Aikido region the workspace lives in: `eu` for app.aikido.dev, `us` for app.us.aikido.dev, `au` for app.au.aikido.dev, and `me` for app.me.aikido.dev.' + enum: + - eu + - us + - au + - me + AikidoSeverity: + type: string + description: An Aikido issue severity, lowest first. + enum: + - low + - medium + - high + - critical + ConnectorCreate: type: object additionalProperties: false properties: - total_users: - type: integer - format: int64 - minimum: 0 - description: Current auth-user count, excluding accounts with deleted status. - deleted_users: - type: integer - format: int64 - minimum: 0 - description: Recorded deletions, excluding internal test identities. Includes soft and hard deletion, counted once per account. - active_users_1d: - type: integer - format: int64 - minimum: 0 - description: Distinct users active in the trailing 24 hours, including activity before account deletion. - active_users_30d: - type: integer - format: int64 - minimum: 0 - description: Distinct users with a successful session creation or refresh in the trailing 30 days, including activity before account deletion. + type: + type: string + description: The service to connect. Slack installs with `POST /user/slack/installations`. + enum: + - aikido + aikido: + $ref: '#/components/schemas/AikidoConnectorCreate' required: - - total_users - - active_users_30d - - active_users_1d - - deleted_users - AuthInsightsWindow: + - type + - aikido + AikidoConnectorCreate: type: object additionalProperties: false + description: The Aikido workspace's REST API client and webhook signing secret. properties: - from: + region: + $ref: '#/components/schemas/AikidoRegion' + client_id: type: string - format: date - to: + minLength: 1 + maxLength: 512 + client_secret: type: string - format: date - interval: - $ref: '#/components/schemas/AuthInsightsInterval' + minLength: 1 + maxLength: 512 + webhook_secret: + type: string + minLength: 1 + maxLength: 512 + description: The signing secret from Aikido's webhooks page, which verifies its deliveries. required: - - from - - to - - interval - AuthHostedPage: + - region + - client_id + - client_secret + - webhook_secret + ConnectorsResponse: + type: object + properties: + connectors: + type: array + items: + $ref: '#/components/schemas/Connector' + required: + - connectors + LavaflowConnectorBinding: type: object + description: 'A place in a connector that reports problems to LavaFlow for a project: a Slack channel, or an Aikido workspace''s issues on the project''s repository.' properties: id: type: string format: uuid + description: The binding's ID, which removing it takes. project_id: type: string format: uuid - page_type: - $ref: '#/components/schemas/HostedAuthPageType' - html: - type: string - description: HTML content for this page type. - css: + connector_type: + $ref: '#/components/schemas/ConnectorType' + connector_id: type: string - description: CSS content for this page type. + format: uuid + description: The connector the binding reports through. Omitted while the Volcano app is not installed in the binding's Slack workspace; the binding reports again once it is. + slack: + $ref: '#/components/schemas/LavaflowSlackBinding' + aikido: + $ref: '#/components/schemas/LavaflowAikidoBinding' created_at: type: string format: date-time - updated_at: + required: + - id + - project_id + - connector_type + - created_at + LavaflowSlackBinding: + type: object + description: The Slack channel a binding reports from. Present when `connector_type` is `slack`. + properties: + team_id: + $ref: '#/components/schemas/SlackTeamId' + team_name: type: string - format: date-time - AuthPageAppearanceResponse: + description: The workspace's name, or empty while the Volcano app is not installed in it. + channel_id: + $ref: '#/components/schemas/SlackChannelId' + required: + - team_id + - team_name + - channel_id + LavaflowAikidoBinding: type: object + description: The Aikido workspace a binding reports issues from. Present when `connector_type` is `aikido`. + properties: + workspace_name: + type: string + min_severity: + $ref: '#/components/schemas/AikidoSeverity' required: - - theme - - layouts - - customisation_allowed - - parked - - defaults - - options + - workspace_name + - min_severity + LavaflowConnectorBindingsResponse: + type: object properties: - theme: - $ref: '#/components/schemas/AuthPageTheme' - layouts: - type: object - additionalProperties: - $ref: '#/components/schemas/AuthPageLayout' - customisation_allowed: - type: boolean - parked: - type: object - additionalProperties: - type: boolean - description: Per-page saved-but-not-live state. - defaults: - $ref: '#/components/schemas/AuthPageAppearanceDefaults' - options: - $ref: '#/components/schemas/AuthPageAppearanceOptions' - AuthPageDensity: - type: string - enum: - - compact - - comfortable - - spacious - AuthPageFont: - type: string - enum: - - system - - humanist - - geometric - - slab - - mono - AuthPageLayout: - type: string - enum: - - centered - - split-left - - split-right - AuthPageRadius: - type: string - enum: - - none - - small - - medium - - large - AuthPageScale: - type: string - enum: - - small - - default - - large - AuthPageTheme: + bindings: + type: array + items: + $ref: '#/components/schemas/LavaflowConnectorBinding' + required: + - bindings + LavaflowConnectorBindingCreate: type: object additionalProperties: false - required: - - version - - colors - - font - - scale - - density - - radius properties: - version: - type: integer - enum: - - 1 - colors: - $ref: '#/components/schemas/AuthPageThemeColors' - font: - $ref: '#/components/schemas/AuthPageFont' - scale: - $ref: '#/components/schemas/AuthPageScale' - density: - $ref: '#/components/schemas/AuthPageDensity' - radius: - $ref: '#/components/schemas/AuthPageRadius' - AuthHostedPageResponse: + project_id: + type: string + format: uuid + description: The project the place reports for. + connector_id: + type: string + format: uuid + description: The connector to bind, from `GET /connectors`. + slack: + $ref: '#/components/schemas/LavaflowSlackBindingTarget' + aikido: + $ref: '#/components/schemas/LavaflowAikidoBindingTarget' + required: + - project_id + - connector_id + description: Send exactly one of `slack` and `aikido`, matching the connector's type. + oneOf: + - required: + - slack + - required: + - aikido + LavaflowSlackBindingTarget: type: object + additionalProperties: false + description: The channel to bind, for a `slack` connector. + properties: + channel_id: + $ref: '#/components/schemas/SlackChannelId' required: - - page - - defaults - - runtime + - channel_id + LavaflowAikidoBindingTarget: + type: object + additionalProperties: false + description: What an `aikido` connector reports for the project. Send `aikido`, not `slack`, for an `aikido` connector. properties: - page: + min_severity: allOf: - - $ref: '#/components/schemas/AuthHostedPage' - nullable: true - description: The saved page, or null when the project has not customized this page type yet. - defaults: - $ref: '#/components/schemas/AuthHostedPageDefaults' - runtime: - $ref: '#/components/schemas/AuthHostedPageRuntime' - AuthIdentity: + - $ref: '#/components/schemas/AikidoSeverity' + description: 'The lowest severity that starts a LavaFlow run. Defaults to `high`: each run counts against the project''s LavaFlow runs.' + GitConnectStartResponse: type: object - description: | - A real email identity owned by the account. One account can own multiple - identities (for example a work email plus a personal email linked via OAuth). properties: - id: + authorization_url: type: string - format: uuid - description: Unique identity identifier - email: + required: + - authorization_url + VerifiedDomain: + type: object + description: A domain the account owns, along with every name below it. + properties: + domain: type: string - format: email - description: The email address this identity represents - email_verified: - type: boolean - description: Whether ownership of this email has been verified - is_primary: - type: boolean - description: Whether the account's primary sign-in method resolves to this identity - created_at: + example: example.com + verified_at: type: string format: date-time + description: When the account last proved ownership. + required: + - domain + - verified_at + VerifiedDomainsResponse: + type: object + properties: + domains: + type: array + items: + $ref: '#/components/schemas/VerifiedDomain' + required: + - domains + VerifyDomainRequest: + type: object + properties: + domain: + type: string + minLength: 1 + maxLength: 253 + description: The domain to verify, such as `example.com`. + required: + - domain + GitConnectionsResponse: + type: object + properties: + connections: + type: array + items: + $ref: '#/components/schemas/GitConnection' + required: + - connections + GitInstallation: + type: object + properties: + id: + type: integer + format: int64 + account_login: + type: string + account_type: + type: string + repository_selection: + type: string required: - id - - email - - email_verified - - is_primary - - created_at - AuthIdentitiesResponse: + - account_login + - account_type + - repository_selection + GitInstallationsResponse: type: object properties: - identities: + installations: type: array items: - $ref: '#/components/schemas/AuthIdentity' + $ref: '#/components/schemas/GitInstallation' required: - - identities - AuthMethodSummary: + - installations + GitRepository: + allOf: + - $ref: '#/components/schemas/GitRepositoryReference' + - type: object + properties: + default_branch: + type: string + private: + type: boolean + is_empty: + type: boolean + description: Whether the repository has no commits and can receive an initial source export. + required: + - default_branch + - private + - is_empty + GitRepositoriesResponse: + type: object + properties: + repositories: + type: array + items: + $ref: '#/components/schemas/GitRepository' + required: + - repositories + Share: type: object - description: | - A single sign-in method the account owns (password, an OAuth provider, or an - active anonymous method). `is_primary` reflects the account's primary_method_id. properties: id: type: string - format: uuid - description: Unique method identifier - type: + pattern: ^[A-Za-z0-9]{12}$ + description: The link's public identifier. Its address is `https://volcano.dev/deploy/`. + project_id: type: string - x-go-type: string - description: The kind of sign-in method - enum: - - password - - oauth - - anonymous - provider: + format: uuid + suggested_name: type: string - description: OAuth provider name; present only when type is oauth - example: google - identity_id: + description: A project name for clients to offer a visitor as the default. The create request still carries its own `name`; Volcano does not fill one in from the link. + description: type: string - description: | - The identity this method signs in to — a UUID for password/oauth methods, - empty for anonymous methods. - email: + maxLength: 280 + description: What the project does, in the owner's words, shown to visitors before they deploy. One line of plain text; empty when the owner wrote none. + allow_reshare: + type: boolean + description: Whether the projects made from this link, and the projects made from those, may be shared again by their owners. False by default, so a copy of this project cannot create, draft, publish or switch on a deploy link of its own, and its links serve nothing. Read at each request, so switching it off stops copies' links that are already on. + status: type: string - description: The email of the method's identity (empty for anonymous) - is_primary: + enum: + - active + - disabled + description: Whether the owner, or Volcano, has the link on. An `active` link can still not serve; see `serving`. + serving: type: boolean - description: Whether this is the account's primary sign-in method - last_used_at: + description: | + Whether the link's address serves its current release now: it is + `active`, published, and nothing stops it, such as deploy links not being + available in this environment, the project being deleted, the owner's + account not allowing traffic, or the project being a copy that may no + longer be shared. An `active` link that is not serving + answers visitors as one switched off, and switching it on again changes + nothing until what stops it is resolved. + disabled_reason: type: string - format: date-time - description: When this method was last used to sign in, if ever + nullable: true + example: owner + description: | + Why the link is off. Set only while it is disabled. New reasons can be + added, so treat an unknown one as disabled. `owner`: its owner switched + it off. `operator`: Volcano took it down; its owner cannot switch it back + on or delete it (`PATCH` and `DELETE` answer `403` with code + `operator_disabled`), but can still edit it. While it is down, its + project cannot be shared any more (no new link, draft or publish, and no + link switched on), and no project made from it, or from a copy of it, can + be shared either. + current_release: + allOf: + - $ref: '#/components/schemas/ShareReleaseRef' + nullable: true + description: The release visitors are offered. Null until the first publish; until then the link's preview answers `404`. created_at: type: string format: date-time @@ -17999,730 +27982,1018 @@ components: format: date-time required: - id - - type - - identity_id - - email - - is_primary + - project_id + - suggested_name + - description + - allow_reshare + - status + - serving + - current_release - created_at - updated_at - AuthMethodsResponse: + ShareReleaseRef: type: object properties: - methods: + id: + type: string + format: uuid + published_at: + type: string + format: date-time + required: + - id + - published_at + SharesResponse: + type: object + properties: + shares: type: array items: - $ref: '#/components/schemas/AuthMethodSummary' + $ref: '#/components/schemas/Share' required: - - methods - AuthPasswordPolicy: + - shares + ShareCreateRequest: type: object additionalProperties: false - description: Effective backend-enforced password policy. properties: - effective_min_length: - type: integer - minimum: 15 - maximum: 128 - description: Effective minimum password length in Unicode characters. - min_configurable_length: - type: integer - minimum: 15 - maximum: 15 - description: Lowest minimum password length accepted by the auth configuration endpoint. - max_length: - type: integer - minimum: 128 - maximum: 128 - description: Maximum password length in Unicode characters. - require_uppercase: - type: boolean - description: Whether passwords must contain an ASCII uppercase letter (A-Z). - require_lowercase: - type: boolean - description: Whether passwords must contain an ASCII lowercase letter (a-z). - require_numbers: - type: boolean - description: Whether passwords must contain an ASCII digit (0-9). - require_special_chars: + project_id: + type: string + format: uuid + description: The project to share. A project the caller can't share answers like one that doesn't exist. + suggested_name: + type: string + maxLength: 64 + pattern: ^[A-Za-z0-9_-]*$ + description: A project name for clients to offer visitors as the default; the create request still carries its own `name`. It may contain only letters, numbers, underscores and hyphens. + description: + type: string + maxLength: 280 + description: What the project does, shown to visitors before they deploy. One line of plain text with no control characters; surrounding spaces are trimmed. + allow_reshare: type: boolean - description: Whether passwords must contain one of the backend-supported special characters. - compromised_passwords_rejected: + description: Lets the projects made from this link be shared again by their owners. Defaults to false. + required: + - project_id + ShareUpdateRequest: + type: object + additionalProperties: false + minProperties: 1 + properties: + suggested_name: + type: string + maxLength: 64 + pattern: ^[A-Za-z0-9_-]*$ + description: + type: string + maxLength: 280 + description: What the project does, shown to visitors before they deploy. One line of plain text with no control characters; surrounding spaces are trimmed. Send an empty string to remove it. + allow_reshare: type: boolean - description: Whether common and known-compromised passwords are rejected by the backend. + description: Lets the projects made from this link be shared again by their owners. Switching it off stops their copies, and copies of those, from sharing again, read at each request, including links of theirs that are already on. + status: + type: string + enum: + - active + - disabled + ShareReleaseCreateRequest: + type: object + additionalProperties: false + properties: + share_id: + type: string + pattern: ^[A-Za-z0-9]{12}$ + description: The share to publish to. Its own project authorizes the publish. + draft_id: + type: string + minLength: 1 + maxLength: 128 + description: | + The `draft_id` of the draft the owner reviewed. If a fresh build of the + project is not that draft, nothing is published and the answer is `409` + `draft_changed` with the new draft. + variables: + type: array + maxItems: 100 + items: + type: string + minLength: 1 + maxLength: 256 + description: | + Every name in the draft's `variables`, which a project created from the + release gets. Values are never carried: each is created empty unless the + visitor gives one. + service_key_functions: + type: array + maxItems: 100 + items: + type: string + minLength: 1 + maxLength: 255 + description: | + The functions that receive the new project's `VOLCANO_SERVICE_KEY`, which + bypasses row-level security. Must be exactly the draft's + `service_key_functions`. required: - - effective_min_length - - min_configurable_length - - max_length - - require_uppercase - - require_lowercase - - require_numbers - - require_special_chars - - compromised_passwords_rejected - AuthSession: + - share_id + - draft_id + - variables + - service_key_functions + ForkCreateRequest: type: object - description: An authentication session for a user + additionalProperties: false properties: - id: + share_id: type: string - format: uuid - description: Unique session identifier - user_id: + pattern: ^[A-Za-z0-9]{12}$ + description: The share to fork, the id at the end of its deploy URL. + release_id: type: string format: uuid - description: The user this session belongs to - provider: + description: The `release.id` the share's preview returned, so only the release the visitor saw is installed. + name: + type: string + minLength: 1 + maxLength: 255 + description: The new project's name, which may contain only letters, numbers, underscores and hyphens. A name you already use gets a short random suffix. An invalid name answers `400` before anything is counted against the share or your hourly fork limit. + variables: + type: object + maxProperties: 100 + additionalProperties: + type: string + maxLength: 4096 + description: | + Values for the variables the preview lists, by name. Any may be left out + and is then created empty; only listed names are accepted (`422` + otherwise). Each value is at most 4096 bytes of UTF-8, since a function's + environment is limited in bytes; a longer one, or one containing a NUL + character, answers `400`. Values are never logged, and `Idempotency-Key` compares only the names given a value. + required: + - share_id + - release_id + - name + ShareReleaseFunction: + type: object + properties: + name: + type: string + kind: type: string - description: Authentication provider used to create this session enum: - - email - - google - - github - - microsoft - - apple - - anonymous - example: email - user_agent: + - standard + - durable + visibility: type: string - description: Browser/device user agent string - example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) - ip_address: + description: The function's invocation visibility, as installed. + invocation_mode: type: string - description: IP address of the client when the session was created - example: 192.168.1.1 - last_ip_address: + description: The function's invocation mode, when it is not the default. + http_auth_mode: type: string - description: IP address of the most recent activity (token refresh) - example: 192.168.1.100 - expires_at: + description: | + How the function's HTTP invocations authenticate, when its invocation + settings are not the default; omitted means `volcano`. `none` lets + anyone call the function without a credential in every project made from + the release. Releases published before this was recorded omit it. + openapi_spec_sha256: type: string - format: date-time - description: When this session expires - last_activity_at: + pattern: ^[0-9a-f]{64}$ + description: | + The SHA-256 of the function's OpenAPI document as the release carries it, + when it has one, so a draft shows when the document changed. Releases + published before this was recorded omit it. + variable_scope: type: string - format: date-time - description: Last activity timestamp - session_started_at: + enum: + - scoped + description: | + `scoped` when the function receives only the variables it declares, as + your project's function does, listed in `variables`. Omitted when it + receives every variable shared with functions. The service key is not + part of it: `service_key_functions` says which functions receive that. + Releases published before this was recorded omit it. + variables: + type: array + items: + type: string + description: For a `scoped` function, the variables it declares that a project made from the release has. + required: + - name + - kind + ShareReleaseOmission: + type: object + description: Something a release does not carry. + properties: + kind: type: string - format: date-time - description: When the session was created - is_active: - type: boolean - description: Whether the session is currently active (not expired) - is_current: - type: boolean - description: Whether this is the session making the current request - created_at: + enum: + - no_source + - database + - sandbox + - secret_file + - unsupported_entry + description: | + `no_source`: a function or frontend whose current deployment has no stored + source to carry. `database`: a database; a visitor's project starts without + one. `sandbox`: a sandbox, which releases do not deploy. `secret_file`: a + file that may hold credentials, such as a dotenv or `.envrc` file, a tool's + token file like `.netrc` or an `.npmrc` holding a registry credential, a + private key, a credential JSON or a Terraform variables file. `unsupported_entry`: a file that is not a regular file, + such as a symbolic link. + resource: type: string - format: date-time - updated_at: + description: The function, frontend, database or sandbox, when there is one. + path: type: string - format: date-time + description: The file left out, for a file. required: - - id - - user_id - - provider - - expires_at - - is_active - - is_current - AuthSignupResponse: + - kind + ShareReleaseDraft: type: object - description: | - Uniform, session-less response returned by POST /auth/signup. It carries no - tokens and no user object, and is identical for a new account and for an - already-registered email (anti-enumeration). Clients obtain a session with a - subsequent POST /auth/signin. properties: - confirmation_required: - type: boolean - description: | - Whether the project requires email confirmation. Reflects project config - only (identical for a new and an existing email), so it leaks nothing about - account existence. - message: + draft_id: type: string - description: Human-readable acknowledgement. + description: | + Opaque. Names exactly what a release built now would carry: each + function's and frontend's current deployment, and everything the draft + lists, including each function's settings (`http_auth_mode`, + `openapi_spec_sha256`, `variable_scope`), the `variables`, the + `frontend_variables` and the `omissions`. It stays the same while those + do, and changes when a function or frontend is redeployed or anything the + draft lists changes. A sandbox is not part of it, since a release does not + carry one: rebuilding only a sandbox leaves it unchanged. Send it with the + publish. + functions: + type: array + items: + $ref: '#/components/schemas/ShareReleaseFunction' + frontends: + type: array + items: + type: string + variables: + type: array + items: + $ref: '#/components/schemas/ShareVariable' + description: The project's variables a visitor could be asked to supply. Volcano's own, such as `VOLCANO_API_URL`, are never listed. + service_key_functions: + type: array + items: + type: string + description: The functions whose code reads `VOLCANO_SERVICE_KEY`. A release gives them the visitor project's service key once the owner confirms them. + omissions: + type: array + items: + $ref: '#/components/schemas/ShareReleaseOmission' + frontend_variables: + type: object + additionalProperties: + type: array + items: + type: string + description: | + The draft's variables each frontend receives, by frontend name, as your + project's frontend of that name selects them by its variable scope now. + A frontend receives no others. required: - - confirmation_required - - message - AuthTokenResponse: + - draft_id + - functions + - frontends + - variables + - service_key_functions + - omissions + - frontend_variables + ShareDraftChangedError: type: object properties: - access_token: - type: string - description: JWT access token (expires after configured lifetime) - token_type: + error: type: string - example: bearer - expires_in: - type: integer - description: Access token lifetime in seconds - refresh_token: + code: type: string - x-go-type-skip-optional-pointer: true - description: | - Long-lived token for getting new access tokens. Omitted when the - request uses eligible HttpOnly cookie session storage. - user: - $ref: '#/components/schemas/AuthUser' + enum: + - draft_changed + draft: + $ref: '#/components/schemas/ShareReleaseDraft' required: - - access_token - - token_type - - expires_in - - user - AuthUser: + - error + - code + - draft + ShareRelease: type: object properties: id: type: string format: uuid + share_id: + type: string + pattern: ^[A-Za-z0-9]{12}$ project_id: type: string format: uuid - email: - type: string - format: email - email_confirmed: - type: boolean - user_metadata: - type: object - additionalProperties: true - description: User-editable metadata - app_metadata: - type: object - additionalProperties: true - description: Application-controlled metadata (read-only for users) - avatar_url: - type: string - format: uri - description: User avatar URL (from OAuth provider or manually set) - status: - type: string - enum: - - active - - banned - - deleted - banned_until: + published_at: type: string format: date-time - nullable: true - description: When temporary ban expires (null if not banned or permanent) - last_sign_in_at: + published_by: type: string - format: date-time - created_at: + description: The id of the user who published the release. + sha256: type: string - format: date-time - updated_at: + pattern: ^[0-9a-f]{64}$ + description: The digest of the stored release archive. An install refuses an archive that does not match it. + size_bytes: + type: integer + format: int64 + functions: + type: array + items: + $ref: '#/components/schemas/ShareReleaseFunction' + frontends: + type: array + items: + type: string + variables: + type: array + items: + $ref: '#/components/schemas/ShareVariable' + service_key_functions: + type: array + items: + type: string + omissions: + type: array + items: + $ref: '#/components/schemas/ShareReleaseOmission' + required: + - id + - share_id + - project_id + - published_at + - published_by + - sha256 + - size_bytes + - functions + - frontends + - variables + - service_key_functions + - omissions + PaginatedShareReleases: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/ShareRelease' + limit: + type: integer + description: Number of items per page + has_more: + type: boolean + description: Whether a next page exists + next_cursor: type: string - format: date-time + description: Opaque cursor for the next page, present if has_more is true. It works only for the same share_id and limit. required: - - id - - email - - status - BanUserResponse: + - data + - limit + - has_more + SharePreview: type: object - description: Response when banning a user properties: - message: - type: string - example: User banned until 2026-12-31T23:59:59Z - user_id: - type: string - format: uuid - email: + id: type: string - format: email - status: + pattern: ^[A-Za-z0-9]{12}$ + suggested_name: type: string - enum: - - banned - banned_until: + description: A project name the link's owner suggests, for clients to offer as the default. The create request still carries its own `name`; Volcano does not fill one in from the link. + description: type: string - format: date-time - nullable: true - description: When the ban expires (null for permanent ban) + description: What the project does, in the owner's words. Plain text; empty when the owner wrote none. + release: + $ref: '#/components/schemas/SharePreviewRelease' required: - - message - - user_id - - email - - status - BatchFunctionDeployFailure: + - id + - suggested_name + - description + - release + SharePreviewRelease: type: object + description: The release a project created from the link installs. properties: - name: - type: string - function_id: + id: type: string format: uuid - operation: - type: string - enum: - - deploy - - update - error: + description: Send it as `release_id` in `POST /forks` to confirm this release. + published_at: type: string - required: - - name - - error - BatchFunctionDeployResponse: - type: object - properties: - batch_id: + format: date-time + sha256: type: string - format: uuid - data: + pattern: ^[0-9a-f]{64}$ + description: The digest of the stored release archive. + frontends: type: array - description: Functions whose deployment workflows were started successfully items: - $ref: '#/components/schemas/Function' - failed: + type: string + description: Names of the frontends installing the release creates. + functions: type: array - description: Functions that failed before their workflow started. Successful functions are left running; failed new functions are deleted and failed updates are rolled back where possible. items: - $ref: '#/components/schemas/BatchFunctionDeployFailure' + type: string + description: Names of the functions installing the release creates. + service_key_functions: + type: array + items: + type: string + description: | + Names of the functions that receive the new project's `VOLCANO_SERVICE_KEY`, + which bypasses row-level security. Show them to the visitor before they + confirm. Empty when no function receives it. + variables: + type: array + items: + $ref: '#/components/schemas/ShareVariable' + description: | + The project variables the new project gets, sorted by name. A visitor may + give a value for any of them as `variables` when creating + the fork with `POST /forks`; each one left out is created empty, for the visitor to set + later. Volcano's own variables, such as `VOLCANO_API_URL`, are never + listed: the install sets them. + omissions: + type: array + items: + $ref: '#/components/schemas/ShareReleaseOmission' + description: What the release does not carry. A `database` entry means the new project starts without that database. required: - - batch_id - - data - CompleteUploadSessionResponse: - type: object - description: Response when completing an upload - properties: - object: - $ref: '#/components/schemas/StorageObject' - CreateDatabaseBackupRequest: + - id + - published_at + - sha256 + - frontends + - functions + - service_key_functions + - variables + - omissions + ShareVariable: type: object + description: A project variable a deploy link's release declares. A project created from the link always gets it. properties: name: type: string + description: The variable's name. + required: + type: boolean description: | - Backup name, unique within the database. Names beginning with - `volcano-` are reserved for the platform's own snapshots. - pattern: ^[a-z0-9][a-z0-9_-]{0,62}$ - maxLength: 63 - example: before_migration + Always true: a project created from the link always gets this variable, + created empty when the visitor gives no value. It never means a value must + be given. + secret: + type: boolean + description: | + Whether to treat the value as a secret: take it masked and never show it back. Only a + `NEXT_PUBLIC_` name, which a Next.js build copies into the browser, is not secret. + unshared: + type: boolean + description: | + True when the source project gives the variable only to the scoped + functions that declare it, not to every function, and so does a project + made from the release. Omitted when false. required: - name - CreateDatabaseBranchRequest: + - required + - secret + ShareKindCount: type: object properties: - name: + kind: type: string - description: Branch name (must be unique within the parent database) - pattern: ^[a-z0-9_]+$ - maxLength: 64 - example: feature_checkout - ttl_seconds: + enum: + - click + - preview + - confirm + - accepted + - ready + - failed + events: type: integer format: int64 - minimum: 3600 - maximum: 2592000 - description: | - How long the branch should live, between one hour and 30 days. - Defaults to 7 days when omitted. - example: 86400 + visitors: + type: integer + format: int64 + description: Unique daily visitors among the events that carried one. A visitor is pseudonymised per day, so one who returns on another day counts again. required: - - name - CreateDatabaseRestoreRequest: + - kind + - events + - visitors + ShareDailyCount: type: object - description: | - Names what to restore. Supply exactly one of `backup_name` or - `restore_to`. properties: - backup_name: + day: type: string - minLength: 1 - maxLength: 128 - description: | - A backup of this database to restore, exactly as returned by the list - endpoint. - - Deliberately looser than the names you can create, like the backup - path parameter: a backup made by a schedule is named for you, so - restoring one accepts any name a backup can have. - example: before_migration - restore_to: + format: date + description: UTC day. + kind: + type: string + enum: + - click + - preview + - confirm + - accepted + - ready + - failed + events: + type: integer + format: int64 + required: + - day + - kind + - events + ShareStats: + type: object + properties: + since: type: string format: date-time - description: | - A point in time to restore to, which must fall inside the - `restore_window` reported when listing backups. - example: '2026-01-15T09:30:00Z' - CreateDatabaseRequest: + description: Start of the counted window. + totals: + type: array + items: + $ref: '#/components/schemas/ShareKindCount' + daily: + type: array + items: + $ref: '#/components/schemas/ShareDailyCount' + required: + - since + - totals + - daily + ProjectGitConnection: type: object - description: | - Create a new PostgreSQL database. Volcano automatically sets up: - - Auth helpers (auth.uid(), auth.email(), auth.role()) - - Database roles (anon for unauthenticated, authenticated for signed-in users) - - Secure multi-tenant isolation - - Ready for Row-Level Security properties: - name: + repo_installation_id: + type: integer + format: int64 + repo_id: + type: integer + format: int64 + description: Stable GitHub repository id (repository.id), the authoritative binding. + repo_full_name: type: string - description: Database name (must be unique within project) - pattern: ^[a-z0-9_]+$ - maxLength: 64 - example: my_database - region: + root_directory: type: string - description: | - Region for database hosting, such as `us-east-1`. The accepted values - are the regions this environment runs in, so read them from - `GET /databases/regions` rather than hardcoding a list. A region the - environment does not offer is rejected with 400. Region IDs issued by - earlier versions of the API are still accepted. - example: us-east-1 - pg_version: + production_branch: type: string - description: | - PostgreSQL major version. `GET /databases/postgres-versions` lists - the versions this environment accepts; local mode accepts only the - version its server runs. Any other value is rejected with 400. - example: '18' - enum: - - '16' - - '17' - - '18' - database_type: + description: The branch a push must land on to deploy. Follows the repository's GitHub default branch unless the project set its own, which a default-branch rename on GitHub then leaves alone. + production_branch_follows_default: + type: boolean + description: True when `production_branch` follows the repository's default branch and moves with a default-branch rename on GitHub. False when the project pinned a branch, even one that matches the current default. Pin a branch with `PUT /projects/{id}/git-connection/production-branch`; send an empty `production_branch` there to follow the default again. + updated_at: + type: string + format: date-time + description: 'When the connection last changed: its repository, root directory or production branch. Naming the branch it already uses, and other changes to the project, leave it alone. A connection that has not changed since Volcano began tracking this reports the project''s last change before then.' + required: + - repo_installation_id + - repo_id + - repo_full_name + - root_directory + - production_branch + - production_branch_follows_default + - updated_at + ProjectGitOwnerPush: + type: object + description: Whether the project owner can push to the project's connected repository. + properties: + repository_id: + type: integer + format: int64 + description: Stable GitHub repository id of the connected repository, the `repo_id` of the project's git connection. + can_push: + type: boolean + description: True when the project owner's GitHub account can push to the repository. + reason: type: string - description: | - Compute size tier (optional, defaults to volcano-db-xs). - Determines autoscaling limits for the database. enum: - - volcano-db-xs - - volcano-db-s - - volcano-db-m - - volcano-db-l - - volcano-db-xl - - volcano-db-2xl - default: volcano-db-xs - example: volcano-db-xs + - owner_not_connected + - owner_reconnect_required + - repository_access_lost + - no_push_permission + x-enum-varnames: + - ProjectGitOwnerPushReasonOwnerNotConnected + - ProjectGitOwnerPushReasonOwnerReconnectRequired + - ProjectGitOwnerPushReasonRepositoryAccessLost + - ProjectGitOwnerPushReasonNoPushPermission + description: 'Why `can_push` is false; absent when it is true. `owner_not_connected`: the owner has not connected a GitHub account. `owner_reconnect_required`: the owner''s GitHub connection expired or was revoked; the owner reconnects GitHub. `repository_access_lost`: the owner''s GitHub account can no longer see the repository. `no_push_permission`: the owner''s GitHub account can read the repository but not push to it.' + required: + - repository_id + - can_push + ProjectGitDeploySettings: + type: object + description: 'A project''s GitHub auto-deploy settings: what a push to the connected repo''s production branch deploys. All settings are default-off.' + properties: + auto_deploy_enabled: + type: boolean + description: Whether a production-branch push triggers a deployment. + deploy_functions: + type: boolean + description: Whether the repo's functions are deployed on push. + frontend_name: + type: string + description: Name of the frontend to build and deploy on push. Omitted when no frontend is deployed. Resolved at deploy time; need not exist yet. + frontend_app_root: + type: string + description: App root (subdirectory) the frontend builds from. Omitted for the repo root. + apply_migrations: + type: boolean + description: Whether a push applies the commit's pending migrations, the SQL files under volcano/migrations, before it deploys anything. Each database gets a migration run with source `git_deploy`; when one fails, nothing from the push deploys and the live version keeps serving. A push starts a migration run only while the project owner's account is `active`; otherwise it starts none, deploys nothing, and fails with code `owner_not_active`. A run an earlier attempt of the push started before the account changed keeps its outcome, but the push still deploys none of its code and fails with `owner_not_active`; its message says the schema changes stay. Nothing retries that push; push again once the account is `active`, and that push skips the migrations already applied. Reads back as saved even where the `databases.migrations` capability is unavailable; there, a push whose commit has migrations deploys nothing. + updated_at: + type: string + format: date-time + description: When the settings were last saved, or last changed by connecting a repository. Other changes to the project leave it alone. Settings a connection turned on before Volcano began tracking this report the project's last change before then; settings never saved or changed report when the project was created. required: - - name - - region - - pg_version - CreateEmailTemplateRequest: + - auto_deploy_enabled + - deploy_functions + - apply_migrations + - updated_at + UpdateProjectGitDeploySettingsRequest: type: object + description: Full replace of a project's Git auto-deploy settings, except apply_migrations, which keeps its saved value when omitted. properties: - template_type: + auto_deploy_enabled: + type: boolean + deploy_functions: + type: boolean + frontend_name: type: string - enum: - - welcome - - confirmation - - password_reset - - password_changed - description: Type of email template - subject: + description: Legacy frontend to deploy on push. In Git mode, explicitly send an empty string to stop deploying the selected frontend; omit frontend_app_root too. This keeps the serving frontend and Git handover intact. Omitting an existing selection or renaming it is refused in Git mode. In platform mode, omit or empty to deploy no frontend. Explicit source-layout mappings are independent of this legacy selection. + frontend_app_root: type: string - description: Email subject line - example: Confirm your email - html_body: + description: App root the frontend builds from. Requires frontend_name; omit for the repo root. + apply_migrations: + type: boolean + description: Apply the commit's pending migrations before each push deploys. Anyone who can push to the production branch can then run any SQL as the database owner, so protect that branch first. Off until set. Omit to leave the saved value unchanged. Turning it on answers `400` with code `feature_unavailable` where the `databases.migrations` capability is unavailable; `false`, or the saved `true` sent back, is accepted even there. While the project owner's account is `read_only`, the request answers `403` whatever it sends; an `inactive` owner's credentials answer `401`. + required: + - auto_deploy_enabled + - deploy_functions + GitDeploymentRunStatus: + type: string + enum: + - pending + - running + - succeeded + - failed + - superseded + - skipped + x-enum-varnames: + - GitDeploymentRunStatusPending + - GitDeploymentRunStatusRunning + - GitDeploymentRunStatusSucceeded + - GitDeploymentRunStatusFailed + - GitDeploymentRunStatusSuperseded + - GitDeploymentRunStatusSkipped + description: 'Where a run is. `pending` and `running` have not ended. `succeeded`: every deployment the run dispatched succeeded, or the commit only had migrations to apply. `failed`: `error` says why. `superseded`: a newer push replaced the run before it started. `skipped`: there was nothing to deploy; `error` says why.' + GitDeploymentRunError: + type: object + description: Why a run failed or was skipped. + properties: + code: type: string - description: | - HTML template body. Available placeholders: - - {{.Token}} - The confirmation/reset token - - {{.ProjectName}} - The project name - - {{.Email}} - User's email address - text_body: + description: 'Stable machine-readable reason. For a failed run: `migration_failed`, `migration_invalid_layout`, `migration_timeout`, `feature_unavailable`, `source_invalid`, `child_deploy_failed`, `child_deploy_not_started`, `deploy_refused`, `typescript_not_compiled`, `deploy_failed`, `max_attempts_exhausted`, `owner_not_active`, or `project_deleting`. `source_invalid`, `deploy_refused`, and `typescript_not_compiled` fail the same way if the same commit is pushed again; `child_deploy_not_started`, `deploy_failed`, and `max_attempts_exhausted` may succeed on another push; for `owner_not_active`, reactivating the owner''s account restores deployment eligibility; push again to deploy. `project_deleting` means the project is being deleted. For a skipped run: `auto_deploy_disabled`, `binding_changed`, `disconnected`, `project_missing`, or `nothing_to_deploy`. Treat a code you do not know as a failure.' + message: type: string - description: Plain text template body (same placeholders as HTML) + description: What happened. For `migration_failed`, `migration_invalid_layout`, `source_invalid`, `deploy_refused`, `child_deploy_not_started`, and `typescript_not_compiled` it names the database, files, resource, or setting at fault when Volcano has them. required: - - template_type - - subject - - html_body - - text_body - CreateFrontendCustomDomainRequest: + - code + - message + GitDeploymentMigrationRun: type: object - additionalProperties: false + description: A migration run a deployment run started. Get it at `GET /projects/{id}/databases/{databaseName}/migration-runs/{runId}` with `database.name` and `id`. properties: - domain: + id: type: string - maxLength: 253 - description: 'Fully-qualified domain name (hostname only, no scheme/path). Managed TLS (`tls.mode: managed`) accepts at most 219 characters; BYOC accepts 253.' - example: app.example.com - tls: - $ref: '#/components/schemas/FrontendCustomDomainTLSConfig' + format: uuid + database: + $ref: '#/components/schemas/ResourceReference' required: - - domain - - tls - CreateFunctionSchedulerRequest: + - id + - database + GitDeploymentRun: type: object - required: - - name - - schedule + description: One push's deployment through Git auto deploy. properties: - name: + id: type: string - maxLength: 200 - enabled: + format: uuid + status: + $ref: '#/components/schemas/GitDeploymentRunStatus' + branch: + type: string + description: The branch the push updated, the project's production branch at the time. + commit_sha: + type: string + description: The commit the run deploys. + apply_migrations: type: boolean - default: true - schedule: - $ref: '#/components/schemas/ScheduleRequest' - payload: - type: object - additionalProperties: true - regions: + description: 'Whether the run applies the commit''s migrations: the project''s `apply_migrations` Git deploy setting when the push arrived.' + migration_runs: type: array - description: Optional single explicit deployed region. If omitted, the scheduler chooses one deployed region and invokes according to the cron expression. - maxItems: 1 + description: The migration runs the run started, one per database, ordered by database name. Empty when it started none. items: - type: string - CreateOAuthConfigRequest: - type: object - required: - - provider - properties: - provider: - type: string - enum: - - google - - github - - microsoft - - apple - - device - example: google - client_id: + $ref: '#/components/schemas/GitDeploymentMigrationRun' + error: + $ref: '#/components/schemas/GitDeploymentRunError' + created_at: type: string - example: 123456789.apps.googleusercontent.com - description: Required for non-device providers. Must not be provided for `provider=device`; server always auto-generates it. - client_secret: + format: date-time + description: When the push was recorded. + started_at: type: string - example: GOCSPX-abc123def456 - description: Required for non-device providers. Must not be provided for `provider=device`; server always auto-generates it. - redirect_url: + format: date-time + description: When a worker first picked the run up. + completed_at: type: string - description: Required for non-device providers. Not used for `provider=device`. - format: uri - example: https://yourapp.com/auth/callback - scopes: + format: date-time + description: When the run ended. + required: + - id + - status + - branch + - commit_sha + - apply_migrations + - migration_runs + - created_at + PaginatedGitDeploymentRuns: + type: object + properties: + data: type: array items: - type: string - example: - - openid - - email - - profile - description: Optional for non-device providers, uses provider defaults if omitted. Not used for `provider=device`. - CreateProjectRequest: + $ref: '#/components/schemas/GitDeploymentRun' + limit: + type: integer + description: Number of items per page + has_more: + type: boolean + description: Whether a next page exists + next_cursor: + type: string + description: Opaque cursor for the next page (present if has_more is true) + required: + - data + - limit + - has_more + RealtimePublishRequest: type: object - description: Request to create a new project + additionalProperties: false properties: - name: + channel: type: string - description: | - Project name (must be unique). - Can only contain letters, numbers, underscores, and hyphens. - pattern: ^[A-Za-z0-9_-]+$ - minLength: 1 - maxLength: 255 - example: my-awesome-app - template_id: + maxLength: 75 + pattern: ^(broadcast|grant):[A-Za-z0-9_-]+(:[A-Za-z0-9_-]+)*$ + description: The client channel, `broadcast:` or `grant:`, with a name of at most 64 characters. + event: type: string - description: Optional trusted starter template identifier. The server resolves immutable source and database initialization artifacts. Callers cannot supply artifact locations or database credentials. Creation accepts an asynchronous installation; poll the individual project until template_installation.status is ready before using the app. Use pixel-board, trellini, or collab-pad for the configured starter bundles. The official-starter legacy identifier has environment-specific availability. Cannot be combined with initialPrompt. - enum: - - pixel-board - - trellini - - collab-pad - - official-starter - example: pixel-board - initialPrompt: + pattern: ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$ + description: The message type subscribers match on. + payload: + x-go-type: json.RawMessage + x-go-type-skip-optional-pointer: true + description: Any JSON value, sent to subscribers as `payload`. + required: + - channel + - event + - payload + RealtimePublishResult: + type: object + additionalProperties: false + properties: + channel: type: string - description: Optional initial builder prompt. Cannot be combined with template_id. - all_regions: - type: boolean - description: | - Optional region policy. - - `true` (default): project functions deploy to all configured regions - - `false`: project deploys only to `selected_regions` - default: true - selected_regions: - type: array - items: - type: string + description: The channel the message was sent to. + required: + - channel + ProjectLockLeaseRequest: + type: object + additionalProperties: false + properties: + ttl_seconds: + type: integer + minimum: 5 + maximum: 7776000 description: | - Optional region subset. Requires `all_regions=false`. - Region names must be a subset of platform `AWS_REGIONS`. - example: - - us-east-1 - - us-west-2 + Lease duration in seconds, from 5 seconds through 90 days, measured + from when the request is served. Renew before it elapses. A renewal + sets the new expiry outright, so a shorter TTL shortens the lease. + Renewals cannot extend an acquisition beyond its absolute 90-day + deadline. required: - - name - CreateStorageBucketRequest: + - ttl_seconds + ProjectLockLease: type: object + additionalProperties: false properties: - name: + expires_at: type: string - description: Bucket name (alphanumeric, dashes, underscores) - pattern: ^[a-zA-Z0-9_-]+$ - minLength: 1 - maxLength: 64 - file_size_limit: + format: date-time + description: Advisory lease expiry timestamp in UTC. + fencing_token: type: integer format: int64 - description: Maximum file size in bytes - allowed_mime_types: - type: array - items: - type: string - description: Allowed MIME types (e.g., ["image/png", "image/jpeg"]) + description: | + Monotonically increasing token for this acquisition. It rises whenever the + lock changes hands and stays the same across renewals of one lease. Pass it + to the resource you are protecting and reject any write carrying a token + lower than the highest already seen; that is what stops a displaced holder + from writing after its lease lapsed. required: - - name - CreateStoragePolicyRequest: + - expires_at + - fencing_token + ProjectLockState: type: object + additionalProperties: false properties: - name: + held: + type: boolean + description: | + Whether the lock is unavailable right now. False means an acquire would + succeed. It remains true during the brief grace window after expiry. + expires_at: type: string - description: Policy name - operation: + format: date-time + description: Advisory lease expiry timestamp in UTC. Present only when held. + fencing_token: + type: integer + format: int64 + description: Current holder's fencing token. Present only when held. + required: + - held + ProjectSourceExportState: + type: object + description: The project's source of truth and any pending Git transition. + properties: + mode: type: string enum: - - SELECT - - INSERT - - UPDATE - - DELETE - description: Operation this policy applies to - definition: + - platform + - git_exporting + - git_pending + - git + transition_started_at: type: string - description: Policy expression + format: date-time + nullable: true + description: When source export started, cleared if an incomplete transition is canceled. + exported_at: + type: string + format: date-time + nullable: true + description: When the initial export push entered deployment, or when a transition was canceled after its commit was reserved. Once set, the one-time export is consumed. + handed_over_at: + type: string + format: date-time + nullable: true + description: When a complete production-branch deployment first proved the repository could drive the project, null until then. Once set, the repository is the project's source of truth. required: - - name - - operation - - definition - CreateUploadSessionRequest: + - mode + - transition_started_at + - exported_at + - handed_over_at + ProjectSourceExport: type: object - description: Request to create a resumable upload session + description: The initial production-branch commit, and everything export could not carry. properties: - object_path: + repo_full_name: type: string - description: Target file path within the bucket - example: videos/large-file.mp4 - content_type: + branch: type: string - description: MIME type of the file - example: video/mp4 - total_size: - type: integer - format: int64 - description: Total file size in bytes (max 5TB) - minimum: 1 - maximum: 5497558138880 - example: 5368709120 - part_size: + description: The production branch that was created. + commit_sha: + type: string + file_count: type: integer - format: int64 - description: 'Part size in bytes (default: 25MB, min: 5MB, max: 25MB)' - minimum: 5242880 - maximum: 26214400 - example: 26214400 + skipped: + type: array + description: Resources whose source could not be taken, with the reason. Most often a resource that has never deployed successfully. + items: + $ref: '#/components/schemas/ProjectSourceExportSkip' + omitted: + type: array + description: Things deliberately left out of the branch. + items: + $ref: '#/components/schemas/ProjectSourceExportOmission' required: - - object_path - - content_type - - total_size - CreateUploadSessionResponse: + - repo_full_name + - branch + - commit_sha + - file_count + - skipped + - omitted + ExportProjectSourceRequest: type: object - description: Response when creating an upload session + additionalProperties: false properties: - session_id: + production_branch: type: string - description: Upload session ID - example: session-abc123 - part_size: + minLength: 1 + description: The currently configured production branch the user confirmed for export. + repo_id: type: integer format: int64 - description: Actual part size to use - example: 26214400 - total_parts: - type: integer - description: Number of parts to upload - example: 52 - expires_at: - type: string - format: date-time - description: When the session expires (7 days from creation) - example: '2024-01-22T10:30:00Z' - CreateVariableRequest: + description: | + The `repo_id` of the connected repository the user confirmed for + export, as the git connection reports it. When set, export answers + `409` if the project is now connected to a different repository, so + source is written only to the repository the user was shown. + required: + - production_branch + ProjectSourceExportSkip: type: object properties: - shared: - type: boolean - description: Include this name in the project's shared function variables. Omission preserves existing membership; new variables default to true for legacy clients. Send false explicitly to create a non-shared variable. + kind: + type: string + description: 'The kind of resource, "function" or "frontend". Deliberately not an enum: the generated constants would collide with an existing resource-type enum and rename its members.' name: type: string - description: Project variable name. Function runtime names such as AWS_REGION are reserved and return 400; see the environment variables guide for the full list. - minLength: 1 - maxLength: 256 - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - value: + reason: type: string required: + - kind - name - - value - VariableEnvironment: + - reason + ProjectSourceExportOmission: type: object - description: Stable identity for a Project-owned variable Environment. properties: - id: - type: string - format: uuid - project_id: - type: string - format: uuid - name: + kind: type: string - pattern: ^[A-Za-z0-9_-]{1,64}$ - minLength: 1 - maxLength: 64 - is_global: - type: boolean - description: Whether this is the reserved Global Environment. - created_at: + description: 'What was left out: migrations Volcano stores no copy of, variable values, a credential-shaped file, installed dependencies, or an archive entry a repository cannot carry.' + resource: type: string - format: date-time - updated_at: + description: The resource it came from, empty when project-wide. + path: type: string - format: date-time required: - - id - - project_id - - name - - is_global - - created_at - - updated_at - VariableEnvironmentList: + - kind + - resource + - path + SetProjectGitProductionBranchRequest: type: object properties: - data: - type: array - maxItems: 101 - items: - $ref: '#/components/schemas/VariableEnvironment' + production_branch: + type: string + maxLength: 255 + description: The branch a push must land on to deploy. Validated as a Git branch name only — it does not have to exist yet. An empty string follows the repository's default branch, including later renames. required: - - data - CreateVariableEnvironmentRequest: + - production_branch + SetProjectGitRootDirectoryRequest: type: object - additionalProperties: false properties: - name: + root_directory: type: string - description: Leading and trailing ASCII whitespace is trimmed before validating 1–64 ASCII letters, digits, underscores, or hyphens. Global is reserved. - pattern: ^[ \t\n\f\r]*[A-Za-z0-9_-]{1,64}[ \t\n\f\r]*$ + maxLength: 1024 + description: Monorepo subdirectory the project builds from, relative to the repository root. An empty string means the repository root. required: - - name - RenameVariableEnvironmentRequest: + - root_directory + ConnectProjectGitRequest: type: object - additionalProperties: false properties: - name: + connection_id: type: string - description: Leading and trailing ASCII whitespace is trimmed before validating 1–64 ASCII letters, digits, underscores, or hyphens. Global is reserved. - pattern: ^[ \t\n\f\r]*[A-Za-z0-9_-]{1,64}[ \t\n\f\r]*$ + format: uuid + description: The caller's user_git_connections row (see /user/git/connections). + installation_id: + type: integer + format: int64 + repository_id: + type: integer + format: int64 + description: Stable GitHub repository id (repository.id), the preferred selector. Either repository_id or repo_full_name is required; when both are given they must identify the same live repository. + repo_full_name: + type: string + deprecated: true + description: Deprecated selector kept for a compatibility window; prefer repository_id. Either repository_id or repo_full_name is required. + root_directory: + type: string + description: Monorepo subdirectory the project builds from. Omit for the repo root. + production_branch: + type: string + maxLength: 255 + description: 'The branch a push must land on to deploy, with three cases, because this is a full replace and a read-modify-write client sends back whatever it read. Omit it to follow the repository''s GitHub default branch, which also discards a branch set earlier. Send back the branch the project already deploys from, when that is the repository''s default, and nothing changes either way — a project pinned to that branch stays pinned. Sending the default branch when the project deploys from something else returns it to following the default, including on a rebind, where a pin describes a branch chosen for the repository being left. Any other branch becomes the project''s own choice, exempt from later default-branch renames. Validated as a Git branch name only: it does not have to exist yet, so a project can be pointed at a branch about to be pushed. Changing repository and naming a branch other than the new repository''s default in one request is refused with 400, because the branch named is almost always the previous repository''s, echoed back — connect first, then set the branch. A repository that reports no default branch, as one with no commits can, is connected only by naming a branch, and any branch is accepted for it, including on a rebind. An empty repository that still reports a default follows the rule above.' required: - - name - Database: + - connection_id + - installation_id + Frontend: type: object - description: | - PostgreSQL database with automatic scalability and security features. properties: + variable_scope: + type: string + enum: + - all + - shared + - scoped + description: All preserves access to all project variables. Shared includes the project frontend shared-variable list. Scoped includes only explicitly declared variables in builds and runtime. Omission preserves the stored selection. + declared_variables: + type: array + uniqueItems: true + items: + type: string + pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ + description: Names selected when variable_scope is scoped. Missing declared values reject deployment. Omission preserves the stored list; an empty list clears it. id: type: string format: uuid @@ -18731,76 +29002,98 @@ components: format: uuid name: type: string - description: Database name - pattern: ^[a-z0-9_]+$ - maxLength: 64 + maxLength: 63 + pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ + framework: + type: string + enum: + - nextjs + app_root: + type: string + maxLength: 1024 + description: Optional relative POSIX path from the uploaded archive root to the Next.js app that is deployed. status: type: string + description: | + Frontend lifecycle status. `degraded` means the regional runtime remains + available but edge synchronization exhausted its immediate retries; Volcano + retries edge recovery without rebuilding the frontend, and stops once a new + deployment is queued or the retry budget runs out, leaving the frontend + `degraded` until the next redeploy. A redeploy that fails over a serving + frontend stays `active` on the previous deployment, so `failed` means no + deployment is serving. enum: - provisioning - active - - failed - - restoring - - deleting - description: | - Database status. `restoring` means a restore is replacing the - database's data: it does not accept connections, and the operations - that would race the restore are rejected until it finishes. Its - branches keep serving throughout. + - degraded + - failed + - deleting provisioning_started_at: type: string format: date-time description: Timestamp when the current provisioning phase started - connection_string: + deployed_regions: + type: array + items: + type: string + current_deployment_id: type: string + format: uuid + description: Identifier of the latest frontend deployment operation + pending_deployment_id: + type: string + format: uuid + description: Newest queued deployment that will run after the current operation + serving_candidate_id: + type: string + format: uuid + nullable: true + readOnly: true description: | - Secure PostgreSQL connection URI for your database. - - The database is identified by the globally-unique username - (`volcano_client_{database_id}`) already in this URI; the - `application_name` parameter only selects the access mode: - - `volcano_full_access` — Full admin access (DDL, migrations) - - `volcano_user_access:{user_id}` — User impersonation (RLS enforced) - - `volcano_user_access` — Anonymous access (anon role, RLS enforced) - region: + The promoted Candidate whose runtime receives this frontend's traffic, the same as + `candidate_id` in `serving`. Null when the frontend serves its own runtime. While it is + set, `current_deployment_id` and `status` describe a deployment that receives no traffic, + and deploying the frontend is refused until it is rolled back. + site_url: type: string - description: Region where the database is hosted - example: us-east-1 - pg_version: + custom_domain: type: string - description: PostgreSQL major version - example: '18' - database_type: + description: Active custom domain hostname when configured + custom_domain_status: type: string - description: | - Database size tier that determines available RAM and scaling limits. + description: Current custom domain lifecycle status enum: - - volcano-db-xs - - volcano-db-s - - volcano-db-m - - volcano-db-l - - volcano-db-xl - - volcano-db-2xl - example: volcano-db-xs - storage_bytes: - type: integer - format: int64 - minimum: 0 + - pending_verification + - provisioning + - active + - detaching + - failed + - deleted + function_routes: + type: array + maxItems: 64 + items: + $ref: '#/components/schemas/FrontendFunctionRoute' description: | - Latest observed storage for this database, in bytes: its own on-disk - size, plus what each branch has diverged from it, plus what its - backups cost to hold. This is the figure the storage allowance is - enforced against, and the stats endpoint breaks it down. A - point-in-time gauge recorded by a background pass, so it may be - absent until the database has been sampled, and it can trail the - stats endpoint's `current_storage_bytes`, which measures on request. - Summing the latest samples for every database in a project produces - the project's "Database Storage (Bytes)" usage gauge. Populated on - database list responses; single-database responses omit it. + Paths on this frontend that forward to a public function, ordered + from most to least specific. Anyone who can load the frontend can + reach the target function at these paths without a credential. + frontend_routes: + type: array + maxItems: 64 + items: + $ref: '#/components/schemas/FrontendRoute' + description: | + Paths on this frontend served by another frontend in the project, + ordered from most to least specific. Function and Frontend routes + share one path namespace and the 64-route limit. + last_deployed_at: + type: string + format: date-time + description: Recorded completion time of the most recent deploy or redeploy with status active. Omitted when no such deployment has a recorded completion time. Site traffic, pending deployments, degraded deployments, failed deployments, and deletion do not change this value. last_invoked_at: type: string format: date-time - description: Most recent request timestamp for this database created_at: type: string format: date-time @@ -18811,195 +29104,66 @@ components: - id - project_id - name + - framework - status + - deployed_regions + - serving_candidate_id + - function_routes + - frontend_routes - created_at - updated_at - DatabaseBackup: - type: object - description: | - A point-in-time copy of a database, kept by the storage provider and - restorable in place. - - Backups cover the database itself, not its branches. Restoring one - replaces the database's data and keeps its connection string. - properties: - name: - type: string - description: | - Backup name, unique within the database. Backups you create are - named by you; scheduled backups are named by the storage provider. - source: - type: string - enum: - - manual - - scheduled - description: | - Whether the backup was requested explicitly or produced by the - backup schedule. Only `manual` backups count against the plan's - backup allowance. - size_bytes: - type: integer - format: int64 - minimum: 0 - description: | - Storage the backup occupies. Absent until the provider has costed - it, which takes a few minutes after the backup is taken; absent is - not the same as empty. - expires_at: - type: string - format: date-time - description: | - When the backup is deleted automatically, from the plan's retention. - Absent means it is kept until deleted explicitly. - created_at: - type: string - format: date-time - description: The point in time the backup captures. - required: - - name - - source - - created_at - DatabaseBackupList: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/DatabaseBackup' - restore_window: - $ref: '#/components/schemas/DatabaseRestoreWindow' - required: - - data - DatabaseBackupSchedule: - type: object - description: | - The database's automated backup schedule. An empty list means no - scheduled backups; sending one clears the schedule. - properties: - entries: - type: array - items: - $ref: '#/components/schemas/DatabaseBackupScheduleEntry' - required: - - entries - DatabaseBackupScheduleEntry: - type: object - description: One recurrence of the automated backup schedule. - properties: - frequency: - type: string - enum: - - daily - - weekly - - monthly - hour: - type: integer - minimum: 0 - maximum: 23 - description: Hour of the day in UTC. - day: - type: integer - minimum: 1 - maximum: 28 - description: | - Day of the week (1-7, Monday to Sunday) for a weekly schedule, or day - of the month (1-28) for a monthly one. Required for both, ignored for - a daily schedule. Monthly stops at 28 so the schedule fires in every - month. - retention_seconds: - type: integer - format: int64 - minimum: 3600 - description: | - How long each backup from this recurrence is kept. Clamped to the - plan's retention, and defaulted to it when omitted. - required: - - frequency - - hour - DatabaseBranch: + FrontendCandidate: type: object + additionalProperties: false description: | - A copy-on-write fork of a database, for development and testing. - - A branch starts as an exact copy of its parent's data and diverges from - there. It has its own connection string and its own credential, so a - branch password cannot reach the parent. - - Every branch expires. `expires_at` is a hard deadline: once it passes the - branch stops accepting connections and is deleted. Use `PATCH` to extend - a branch you are still working on. + A copy of a frontend built from an uploaded archive with the frontend's own configuration, so + it can be checked before anything is promoted. A Candidate is reachable by anyone who holds its + URL and is not indexed or listed; it is never public, and it does not claim to be private. properties: id: type: string format: uuid - database_id: - type: string - format: uuid - description: The parent database this branch was forked from. - project_id: + frontend_id: type: string format: uuid name: type: string - description: Branch name, unique within the parent database. - pattern: ^[a-z0-9_]+$ - maxLength: 64 + maxLength: 128 status: type: string enum: - - provisioning - - active - - failed + - creating + - ready - deleting + - error description: | - Branch status. A new branch starts `provisioning` and is not - connectable until it reports `active`; poll this endpoint until it - does. `connection_string` is only present while `active`. - - `provisioning` also covers a branch being rebuilt after a `reset`, - and a build that is between retries, so it is the status to keep - waiting on. `failed` is terminal: it means the platform gave up, and - the branch will not become `active` on its own. - connection_string: - type: string - description: | - PostgreSQL connection URI for this branch. Present only while the - branch is `active`. - - The URI carries the branch's own globally-unique username and - password; `application_name` selects the access mode exactly as it - does for the parent database: - - `volcano_full_access` — Full admin access (DDL, migrations) - - `volcano_user_access:{user_id}` — User impersonation (RLS enforced) - - `volcano_user_access` — Anonymous access (anon role, RLS enforced) - ttl_seconds: - type: integer - format: int64 - minimum: 1 - description: | - The lifetime the branch was created with. Resetting a branch re-arms - this same duration, so a reset never shortens a branch's remaining - life. - expires_at: - type: string - format: date-time - description: | - When the branch stops serving connections and becomes eligible for - deletion. Enforced on the connection path, so it holds even if - reclamation is delayed. - storage_bytes: - type: integer - format: int64 - minimum: 0 - description: | - Bytes this branch has diverged from its parent, which is what a - branch actually costs. Shared pages are not counted twice. Counts - against the parent database's storage allowance. Absent until the - branch has been sampled. - last_invoked_at: + `creating` until its first deployment succeeds, `ready` while it serves, `deleting` while + its runtime is removed, and `error` when its deletion gave up and needs an operator. + url: + type: string + format: uri + description: Where the Candidate is served. Absent until its first deployment succeeds. + expires_at: type: string format: date-time - description: Most recent request timestamp for this branch + description: When the Candidate is deleted on its own. Absent when it is kept until deleted. + current_deployment_id: + type: string + format: uuid + description: | + The deployment the Candidate serves. Absent until its first + deployment succeeds. It differs from `deployment` while a redeploy runs or after one failed. + deployment: + $ref: '#/components/schemas/FrontendCandidateDeployment' + configuration_status: + type: string + enum: + - current + - changed + description: | + Present while the Candidate serves a deployment. `current` means that deployment was built + with the variables the frontend selects now; `changed` means they differ, or can no longer + be resolved. Promotion refuses a Candidate whose status is `changed`. created_at: type: string format: date-time @@ -19008,445 +29172,415 @@ components: format: date-time required: - id - - database_id - - project_id + - frontend_id - name - status - - ttl_seconds - - expires_at - created_at - updated_at - DatabaseBranchList: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/DatabaseBranch' - required: - - data - DatabaseBranchStorage: + FunctionCandidate: type: object - description: One branch's contribution to its parent database's storage. + additionalProperties: false + description: | + A copy of an ordinary function built from an uploaded source with the function's own variables, + run on a runtime of its own and invoked at its own host with the project's service key only, so it + can be checked before it is promoted. It has none of the function's schedules or warmers. Fields + that do not apply yet are absent. properties: id: type: string format: uuid + function_id: + type: string + format: uuid name: type: string - description: Branch name - storage_bytes: - type: integer - format: int64 - minimum: 0 - description: | - Bytes this branch has diverged from its parent. Pages the branch - still shares with the parent are not counted, so this is what the - branch actually adds to the total rather than its apparent size. - required: - - id - - name - - storage_bytes - DatabaseSelectRequest: - type: object - properties: - table: + maxLength: 128 + slug: type: string - description: Table name to query - example: posts - select: - type: array - items: - type: string - description: Columns to select (omit for *) - example: - - id - - title - - content - - created_at - filters: - type: array - items: - $ref: '#/components/schemas/DatabaseQueryFilter' - description: WHERE conditions (combined with AND) - example: - - column: status - operator: eq - value: published - - column: views - operator: gt - value: 100 - order: - type: array - items: - $ref: '#/components/schemas/DatabaseQueryOrder' - description: ORDER BY clauses - example: - - column: created_at - ascending: false - limit: - type: integer - minimum: 1 - maximum: 1000 - description: Maximum rows to return - example: 10 - offset: - type: integer - minimum: 0 - description: Number of rows to skip (for pagination) - example: 0 - required: - - table - DatabaseInsertRequest: - type: object - properties: - table: + status: type: string - description: Table name - example: posts - values: - type: object - additionalProperties: true + enum: + - creating + - ready + - deleting + - error description: | - Column values to insert. JSON objects and arrays are stored as JSON, - so send them to `json` or `jsonb` columns. For a Postgres array - column, send an array literal string such as `"{a,b}"`. - example: - title: My New Post - content: This is the content - status: draft - required: - - table - - values - DatabaseUpdateRequest: - type: object - properties: - table: + `creating` until its first deployment succeeds, `ready` while it serves, `deleting` while its + runtime is removed, and `error` when its deletion gave up and needs an operator. A deleted + preview answers `404`. + exposure: type: string - description: Table name - example: posts - values: - type: object - additionalProperties: true - description: | - Column values to update. JSON objects and arrays are stored as JSON, - so send them to `json` or `jsonb` columns. For a Postgres array - column, send an array literal string such as `"{a,b}"`. - example: - title: Updated Title - status: published - filters: - type: array - minItems: 1 - items: - $ref: '#/components/schemas/DatabaseQueryFilter' + enum: + - private + description: A function preview is always private. Only the project's service key, with `functions.invoke`, can invoke it; signed-in users, anon keys and access tokens are refused. + url: + type: string + format: uri + description: Where the preview is invoked. Absent until its first deployment succeeds. + expires_at: + type: string + format: date-time + description: When the preview is deleted on its own. Absent when it is kept until deleted. A preview the function runs, or keeps for a rollback, is not deleted then; it expires once it is neither. + created_by: + type: string + description: The user who created the preview, when a user did. + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + current_deployment_id: + type: string + format: uuid description: | - WHERE conditions for which rows to update. At least one filter is - required; a filterless update is rejected to avoid rewriting every - row. - example: - - column: id - operator: eq - value: post-uuid - required: - - table - - values - - filters - DatabaseDeleteRequest: - type: object - properties: - table: + The deployment the preview serves. Absent until its first deployment succeeds. It differs from + `deployment` while a redeploy runs or after one failed. + deployment: + $ref: '#/components/schemas/FunctionCandidateDeployment' + configuration_status: type: string - description: Table name - example: posts - filters: - type: array - minItems: 1 - items: - $ref: '#/components/schemas/DatabaseQueryFilter' - description: WHERE conditions (required for safety) - example: - - column: id - operator: eq - value: post-uuid + enum: + - current + - changed + description: | + Present while the preview serves a deployment. `current` means that deployment was built with + the variables, runtime and handler the function would give that source now; `changed` means + they differ, or can no longer be resolved. Promotion refuses a preview whose status is + `changed`. + serving: + type: boolean + description: The function runs this preview's build. + kept_for_rollback: + type: boolean + description: A rollback of the function returns to this preview's build. required: - - table - - filters - DatabaseQueryResult: + - id + - function_id + - name + - slug + - status + - exposure + - created_at + - updated_at + - serving + - kept_for_rollback + FunctionCandidateList: type: object - description: | - Rows returned by a data API request. RLS-filtered unless the request was - made with a service key. + additionalProperties: false properties: data: type: array items: - type: object - additionalProperties: true - description: Result rows - count: - type: integer - description: Number of rows returned - DatabaseRestore: + $ref: '#/components/schemas/FunctionCandidate' + required: + - data + FunctionCandidateDeployment: type: object - description: | - A restore of a database, either from a named backup or to a point in - time. Restores run in the background and take longer than a request, so - the database is unavailable until this reports `completed`. + additionalProperties: false properties: id: type: string format: uuid - database_id: - type: string - format: uuid - project_id: - type: string - format: uuid - kind: - type: string - enum: - - snapshot - - point_in_time - description: | - Whether the restore targets a named backup or an arbitrary point in - time. Both replace the database's data in place. status: type: string enum: - - pending - - running - - completed + - provisioning + - active - failed - - exhausted - description: | - Restore status. `pending` and `running` both mean the restore is - still in flight and the database is not connectable; an attempt that - fails with tries left goes back to `pending`. `failed` and - `exhausted` both mean Volcano gave up: the database is left `failed` - if its data may already have been replaced, and `active` if the - restore never started — a backup that no longer exists at the - provider ends the restore without touching the database. A restore - cannot be cancelled once it starts. - backup_name: - type: string description: | - The backup restored, kept even if that backup is later deleted. - Absent for a point-in-time restore. - restore_to: + `provisioning` while the build and deploy run, `active` once the preview serves this + deployment, and `failed` when it could not be built or deployed. A failed deployment of a + preview that already served keeps the previous deployment serving. + operation: type: string - format: date-time - description: The point in time restored to. Absent for a backup restore. - error: + enum: + - deploy + - redeploy + image_digests: + type: array + description: | + The digest of the image this deployment published, per region. Present once the deployment + succeeded. A promotion points the function at this image and deploys nothing. + items: + $ref: '#/components/schemas/FunctionImageDigest' + configuration_digest: type: string - description: Why the most recent attempt failed, when one has. - completed_at: + pattern: ^sha256:[0-9a-f]{64}$ + description: Identifies the variables the build used without carrying any value. + regions: + type: array + items: + type: string + error_message: type: string - format: date-time + description: Why a failed deployment failed. created_at: type: string format: date-time - updated_at: + completed_at: type: string format: date-time + description: Set once the deployment is no longer provisioning. required: - id - - database_id - - project_id - - kind - status + - operation + - configuration_digest + - regions - created_at - - updated_at - DatabaseRestoreList: + FunctionCandidateDeploymentList: type: object + additionalProperties: false properties: data: type: array items: - $ref: '#/components/schemas/DatabaseRestore' + $ref: '#/components/schemas/FunctionCandidateDeployment' required: - data - DatabaseRestoreWindow: + FunctionServing: type: object + additionalProperties: false description: | - The span a point-in-time restore may target. Absent from the response - when the owner's plan does not include point-in-time restore, and while - the storage provider has no history window in place yet — briefly the - case after an upgrade, since the window is applied asynchronously. The - window is read from the provider rather than from the plan, so it never - advertises a point a restore could not actually reach. + What a function runs. Until a preview is promoted it runs its own build and `candidate_id` is + null. After a promotion, the function's traffic runs on that preview's runtime, nothing is rebuilt + or deployed, and `previous_candidate_id` is what a rollback returns to (null when that is the + function's own build). A preview the function runs cannot be deleted and does not expire. One kept + only as what a rollback returns to does not expire either, but it can be deleted, which gives up + that rollback; the function's own build stays one `to_production` rollback away. properties: - earliest_restore_at: + revision: + type: integer + format: int64 + minimum: 0 + description: Counts changes to what the function runs or can roll back to — promotions, rollbacks, a deployment that returns the traffic to the function's own build, and deleting the preview kept for a rollback. A promotion or rollback names the revision it read, so one that read before such a change fails with `409` (`stale_revision`) instead of overwriting it; read the serving state again and retry. + candidate_id: type: string - format: date-time - description: | - The oldest point that can still be restored. Moves forward - continuously as history ages out, so treat it as a lower bound at - the moment it was read rather than a fixed value. - latest_restore_at: + format: uuid + nullable: true + description: The preview whose build the function runs; null for its own. + previous_candidate_id: type: string - format: date-time - description: The most recent point that can be restored, which is now. - DatabaseStats: + format: uuid + nullable: true + description: The preview a rollback returns to; null for the function's own build. + activation: + $ref: '#/components/schemas/FunctionServingActivation' + production_environment: + $ref: '#/components/schemas/FunctionProductionEnvironment' + required: + - revision + - candidate_id + - previous_candidate_id + - production_environment + FunctionServingActivation: type: object + additionalProperties: false + description: | + The latest change to what serves the function's traffic: a promotion, a rollback, or a deployment + of the function that returned its traffic to its own build. Each takes effect at once. Absent until + the function's first promotion. properties: - current_storage_bytes: + id: + type: string + format: uuid + kind: + type: string + enum: + - promotion + - rollback + - deploy + x-enum-varnames: + - FunctionServingActivationKindPromotion + - FunctionServingActivationKindRollback + - FunctionServingActivationKindDeploy + description: '`deploy`: a successful deployment of the function cleared the preview pointers.' + status: + type: string + enum: + - applied + description: '`applied`: the change takes effect when it is recorded.' + revision: type: integer format: int64 - minimum: 0 - description: | - On-disk size right now, in bytes: the database itself, plus every - branch's divergence from it, plus what its backups cost to hold. This - is the figure the storage allowance is enforced against. `branches` - and `backup_storage_bytes` break it down. - current_storage_mb: - type: number - format: double - minimum: 0 - description: '`current_storage_bytes` expressed in megabytes.' - branches: + minimum: 1 + candidate_id: + type: string + format: uuid + description: The preview the activation pointed the function at. Absent for the function's own build. + image_digests: type: array - description: | - Per-branch contribution to `current_storage_bytes`. Empty when the - database has no branches. A branch that has not diverged from its - parent contributes nothing. + description: The digests of the image the activation pointed the function at. Absent for the function's own build. items: - $ref: '#/components/schemas/DatabaseBranchStorage' - backup_storage_bytes: - type: integer - format: int64 - minimum: 0 - description: | - What this database's backups contribute to `current_storage_bytes`. - - A backup taken on request is charged as a full copy of the database - as it was at that moment, so two backups of a 2 GB database are 4 GB. - A backup schedule is charged its first snapshot in full and each - later one only for the storage it adds. Deleting a backup releases - its storage immediately. - - Sampled from the provider rather than measured live, so it can lag a - change by a few minutes, and a backup taken seconds ago may not be - costed yet. Zero on a plan without backups. - storage_bytes: - type: integer - format: int64 - description: Total storage used in bytes (data + WAL) - data_written_bytes: - type: integer - format: int64 - description: Total data written in bytes - data_transfer_bytes: - type: integer - format: int64 - description: Total data transferred in bytes - compute_time_seconds: - type: number - format: double - description: Total CPU seconds consumed - active_time_seconds: - type: number - format: double - description: Total active compute time in seconds - time_range: - type: string - description: Time range of the metrics (e.g., "2024-01-01T00:00:00Z to 2024-01-02T00:00:00Z") - granularity: + $ref: '#/components/schemas/FunctionImageDigest' + required: + - id + - kind + - status + - revision + FunctionProductionEnvironment: + type: object + additionalProperties: false + description: | + Whether the function's own build has the project's current variables. While a preview serves the + function, `volcano config deploy` and replacing the shared variable list skip the function, so its + own build keeps the values it had. A rollback to the function's own build starts synchronizing them + as it returns the traffic, and the status reads `current` once that synchronization completes or a + deployment of the function activates. A synchronization that fails leaves it `out_of_date`. + properties: + status: type: string enum: - - hourly - - daily - - monthly - description: Granularity of the aggregated metrics + - current + - out_of_date + x-enum-varnames: + - FunctionProductionEnvironmentStatusCurrent + - FunctionProductionEnvironmentStatusOutOfDate + description: '`out_of_date`: a stored variable change skipped the function while a preview served it.' + out_of_date_since: + type: string + format: date-time + description: When the latest skipped change was stored. Absent while `status` is `current`. required: - - current_storage_bytes - - current_storage_mb - - backup_storage_bytes - - storage_bytes - - data_written_bytes - - data_transfer_bytes - - compute_time_seconds - - active_time_seconds - DatabaseQueryPerformanceResponse: + - status + FunctionImageDigest: type: object + additionalProperties: false + description: The content digest of a function image in one region. It names no registry or account. properties: - data: - type: array - items: - $ref: '#/components/schemas/DatabaseQueryPerformanceItem' + region: + type: string + description: The region the image was published to. Absent when the build published one image for every region. + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ required: - - data - UpdateDatabaseBranchRequest: + - digest + FunctionPromotionRequest: type: object - description: Replace the branch's lifetime and restart its countdown from now. + additionalProperties: false + required: + - expected_revision properties: - ttl_seconds: + expected_revision: type: integer format: int64 - minimum: 3600 - maximum: 2592000 - description: The new lifetime, between one hour and 30 days. - example: 86400 + minimum: 0 + description: The `revision` the caller read from `serving`. Refuses the promotion with `stale_revision` unless what the function runs is still at this revision. + FunctionRollbackRequest: + type: object + additionalProperties: false required: - - ttl_seconds - DeviceAuthorizationResponse: + - expected_revision + properties: + expected_revision: + type: integer + format: int64 + minimum: 0 + description: The `revision` the caller read from `serving`. Refuses the rollback with `stale_revision` unless what the function runs is still at this revision, so a retried rollback cannot undo itself. + to_production: + type: boolean + default: false + description: Return to the function's own build whatever it ran before. + FrontendCandidateDeployment: type: object + additionalProperties: false properties: - device_code: - type: string - user_code: + id: type: string - verification_uri: + format: uuid + status: type: string + enum: + - provisioning + - active + - failed description: | - Browser verification URL. Points at the project's managed device - approval page served by this API: - `/projects/{projectId}/auth/hosted?action=device&anon_key=...`. - Requires the project to have managed auth enabled and a default anon - key. A custom CLI may ignore this and direct users to its own - RFC 8628-compatible page instead (see the device-auth guide). - verification_uri_complete: + `provisioning` while the build and deploy run, `active` once the Candidate serves this + deployment, and `failed` when it could not be built or deployed. A failed deployment of a + Candidate that already served keeps the previous deployment serving. + configuration_digest: type: string - description: | - Same as `verification_uri` but with the `user_code` prefilled - (`&user_code=...`). This is the URL most device clients open. - expires_in: - type: integer - interval: - type: integer + pattern: ^sha256:[0-9a-f]{64}$ + description: Identifies the resolved configuration the deployment was built with. It carries no value. + error_message: + type: string + description: Why a failed deployment failed. + created_at: + type: string + format: date-time + completed_at: + type: string + format: date-time + description: Set once the deployment is no longer provisioning. required: - - device_code - - user_code - - verification_uri - - verification_uri_complete - - expires_in - - interval - EmailTemplate: + - id + - status + - configuration_digest + - created_at + FrontendServing: type: object - description: Custom email template + additionalProperties: false + description: | + What a frontend serves. Until a Candidate is promoted it serves its own runtime and + `candidate_id` is null. After a promotion, the frontend's traffic is routed to that + Candidate's runtime, nothing is rebuilt or copied, and `previous_candidate_id` is the runtime a + rollback returns to (null when that is the frontend's own). A Candidate that serves cannot be + deleted and does not expire. One kept only as the runtime a rollback returns to does not + expire either, but it can be deleted, which gives up that rollback; the frontend's own + runtime stays one `to_production` rollback away. properties: - id: + revision: + type: integer + format: int64 + minimum: 0 + description: Counts changes to what the frontend serves or can roll back to — promotions, rollbacks, and deleting the Candidate kept for a rollback. A promotion or rollback names the revision it read, so one that read before such a change fails with `409` instead of overwriting it; read the serving state again and retry. + candidate_id: type: string format: uuid - project_id: + nullable: true + previous_candidate_id: type: string format: uuid - template_type: - type: string - enum: - - welcome - - confirmation - - password_reset - - password_changed - subject: + nullable: true + required: + - revision + - candidate_id + - previous_candidate_id + FrontendCandidateList: + type: object + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/FrontendCandidate' + required: + - data + FrontendFunctionRoute: + type: object + additionalProperties: false + properties: + id: type: string - example: Confirm your email address - html_body: + format: uuid + project_id: type: string - description: HTML template with placeholders - text_body: + format: uuid + frontend_id: type: string - description: Plain text template with placeholders + format: uuid + function_id: + type: string + format: uuid + path_prefix: + type: string + minLength: 2 + maxLength: 512 + pattern: ^/[^?#\\]*[^/?#\\]$ + strip_prefix: + type: boolean created_at: type: string format: date-time @@ -19454,61 +29588,69 @@ components: type: string format: date-time required: - - template_type - - subject - - html_body - - text_body - Error: + - id + - project_id + - frontend_id + - function_id + - path_prefix + - strip_prefix + - created_at + - updated_at + FrontendFunctionRouteList: type: object + additionalProperties: false properties: - error: - type: string - code: - type: string - description: Stable machine-readable error code when a specific recovery path is available. + data: + type: array + items: + $ref: '#/components/schemas/FrontendFunctionRoute' required: - - error - ImportProvider: - type: string - enum: - - vercel - default: vercel - x-enum-varnames: - - ImportProviderVercel - ImportConnectStartResponse: + - data + CreateFrontendFunctionRouteRequest: type: object + additionalProperties: false properties: - authorization_url: + function_id: + type: string + format: uuid + path_prefix: type: string + minLength: 2 + maxLength: 512 + pattern: ^/[^?#\\]*[^/?#\\]$ + strip_prefix: + type: boolean + default: false required: - - authorization_url - ImportConnection: + - function_id + - path_prefix + FrontendRoute: type: object + additionalProperties: false + description: | + A path prefix on this Frontend's hostnames served by another Frontend in the Project, the + mounted Frontend. Paths are forwarded unchanged, so the mounted Frontend serves its prefix + as real pages (page directories or a matching `basePath`). properties: id: type: string format: uuid - provider: - $ref: '#/components/schemas/ImportProvider' - account_id: - type: string - account_name: - type: string - configuration_id: + project_id: type: string - granted_scopes: - type: array - items: - type: string - status: + format: uuid + frontend_id: type: string - expires_at: + format: uuid + description: The Frontend whose hostnames serve the route + target_frontend_id: type: string - format: date-time - nullable: true - last_authenticated_at: + format: uuid + description: The mounted Frontend + path_prefix: type: string - format: date-time + minLength: 2 + maxLength: 512 + pattern: ^/[^?#\\]*[^/?#\\]$ created_at: type: string format: date-time @@ -19517,206 +29659,302 @@ components: format: date-time required: - id - - provider - - account_id - - account_name - - configuration_id - - granted_scopes - - status - - last_authenticated_at + - project_id + - frontend_id + - target_frontend_id + - path_prefix - created_at - updated_at - ImportConnectionsResponse: + FrontendRouteList: type: object + additionalProperties: false properties: - connections: + data: type: array items: - $ref: '#/components/schemas/ImportConnection' + $ref: '#/components/schemas/FrontendRoute' required: - - connections - ImportSource: + - data + CreateFrontendRouteRequest: type: object + additionalProperties: false properties: - id: + target_frontend_id: type: string - name: + format: uuid + description: The Frontend to mount. It must be another Frontend in the Project. + path_prefix: type: string - account_id: + minLength: 2 + maxLength: 512 + pattern: ^/[^?#\\]*[^/?#\\]$ + required: + - target_frontend_id + - path_prefix + CreateFrontendDeploymentRequest: + type: object + additionalProperties: false + description: Deploys the build of an existing deployment instead of compiling the frontend's source. + properties: + source_deployment_id: type: string - framework: + format: uuid + description: An `active` or `degraded` deployment of another frontend in the same project. Its build is copied to this frontend and published without compiling it again. + required: + - source_deployment_id + FrontendCustomDomainTLSConfig: + type: object + description: 'TLS for a new custom domain. With `mode: managed`, Volcano issues and renews the certificate; omit every PEM field. With `mode: byoc`, send both `certificate_pem` and `private_key_pem`, plus an optional `certificate_chain_pem`.' + additionalProperties: false + not: + anyOf: + - allOf: + - properties: + mode: + enum: + - managed + required: + - mode + - anyOf: + - required: + - certificate_pem + - required: + - private_key_pem + - required: + - certificate_chain_pem + - allOf: + - properties: + mode: + enum: + - byoc + required: + - mode + - anyOf: + - not: + required: + - certificate_pem + - not: + required: + - private_key_pem + properties: + mode: + type: string + enum: + - managed + - byoc + default: byoc + description: managed for a Volcano-issued certificate; byoc to supply your own. + certificate_pem: + type: string + maxLength: 65536 + description: PEM-encoded certificate. Required when mode is byoc; not allowed when mode is managed. + private_key_pem: + type: string + maxLength: 65536 + description: PEM-encoded private key. Required when mode is byoc; not allowed when mode is managed. + certificate_chain_pem: type: string + maxLength: 65536 + description: Optional PEM-encoded certificate chain when mode is byoc; not allowed when mode is managed. required: - - id - - name - - account_id - - framework - ImportSourcesResponse: + - mode + FrontendCustomDomainResponse: + type: object + properties: + domain: + type: string + tls_mode: + type: string + enum: + - managed + - byoc + domain_status: + type: string + enum: + - pending_verification + - provisioning + - active + - detaching + - failed + - deleted + verification_status: + type: string + enum: + - pending + - verified + - failed + description: '`verified`: the domain is served by a validated certificate. `pending`: it is not served yet, is being re-validated after its certificate material was withdrawn, or Volcano is retrying after a failure. `failed`: a failure left the domain unserved, alongside `domain_status: failed`; managed domains report the cause in `failure_reason`.' + serving_certificate: + type: string + enum: + - uploaded + - managed + description: 'Certificate the domain serves, present only while it is active. `uploaded`: the BYOC certificate, including after the domain switched to managed TLS and until Volcano issues the managed one; `failure_reason` then reports an issuance failure. `managed`: a certificate Volcano issued.' + failure_reason: + type: string + description: Failure category, present when managed TLS setup has failed, or when issuance is failing for a domain that switched to managed TLS and still serves its uploaded certificate. Current values are provider, certificate, ownership, and internal; ownership means another account has already claimed the hostname through ownership verification. Treat unrecognized values as internal. + verification_records: + type: array + description: DNS records to publish now. For a managed domain whose hostname the account already owns, the create response names the `_acme-challenge` CNAME that authorizes certificate issuance and renewal. Otherwise it names the `_volcano` TXT record that proves ownership of the hostname's registrable domain, and reads return the CNAME once Volcano sees that record. Usually empty for BYOC. + items: + $ref: '#/components/schemas/FrontendDomainVerificationRecord' + required_routing_record: + allOf: + - $ref: '#/components/schemas/FrontendDomainRoutingRecord' + deprecated: true + description: Deprecated and no longer returned. Use routing_target_hostname as the DNS routing target. + routing_target_hostname: + type: string + description: DNS routing target hostname for this frontend. The DNS record type depends on whether the custom domain is a zone apex. + effective_urls: + type: array + items: + type: string + redirect: + allOf: + - $ref: '#/components/schemas/FrontendCustomDomainRedirect' + nullable: true + description: Where the domain redirects every request, or null when it serves the frontend. + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + required: + - domain + - tls_mode + - domain_status + - verification_status + - effective_urls + - redirect + - created_at + - updated_at + FrontendCustomDomainList: type: object properties: - sources: + data: type: array items: - $ref: '#/components/schemas/ImportSource' + $ref: '#/components/schemas/FrontendCustomDomainResponse' required: - - sources - ProjectImportTarget: - type: string - enum: - - production - x-enum-varnames: - - ProjectImportTargetProduction - ProjectImportDestinationMode: - type: string - enum: - - create - x-enum-varnames: - - ProjectImportDestinationCreate - ProjectImportDisposition: - type: string - enum: - - automatic - - manual - - deferred - - unsupported - x-enum-varnames: - - ProjectImportDispositionAutomatic - - ProjectImportDispositionManual - - ProjectImportDispositionDeferred - - ProjectImportDispositionUnsupported - ProjectImportImpact: - type: string - enum: - - none - - warning - - blocking - x-enum-varnames: - - ProjectImportImpactNone - - ProjectImportImpactWarning - - ProjectImportImpactBlocking - ProjectImportReadiness: - type: string - enum: - - importable - - needs_input - - blocked - x-enum-varnames: - - ProjectImportReadinessImportable - - ProjectImportReadinessNeedsInput - - ProjectImportReadinessBlocked - ProjectImportActionCode: - type: string - enum: - - project.create - - git.connect - - frontend.configure - - variable.set - x-enum-varnames: - - ProjectImportActionProjectCreate - - ProjectImportActionGitConnect - - ProjectImportActionFrontendConfigure - - ProjectImportActionVariableSet - ProjectImportResourceKind: - type: string - enum: - - project - - git_repository - - frontend - - variable - - domain - x-enum-varnames: - - ProjectImportResourceProject - - ProjectImportResourceGitRepository - - ProjectImportResourceFrontend - - ProjectImportResourceVariable - - ProjectImportResourceDomain - ProjectImportPreflightRequest: + - data + FrontendCustomDomainRedirect: type: object properties: - connection_id: - type: string - format: uuid - source_id: - type: string - minLength: 1 - project_name: + to: type: string - maxLength: 255 - pattern: ^[A-Za-z0-9_-]+$ - target: - $ref: '#/components/schemas/ProjectImportTarget' - confirm_environment_variable_read: - type: boolean - default: false - description: Set to true only after the user confirms an immediately preceding disclosure that the Vercel Integration grant permits reads and writes, while this preflight reads production variable values only. When false or omitted, preflight reads variable metadata only and reports readable values as manual input. + description: Hostname the domain redirects to. + status: + type: integer + enum: + - 301 + - 302 + - 307 + - 308 required: - - connection_id - - source_id - - project_name - - target - ProjectImportStartRequest: + - to + - status + FrontendCustomDomainRedirectRequest: type: object + additionalProperties: false + description: Redirects every request for the domain to `to`, another active domain of the same frontend that serves it, keeping the path and query string. properties: - connection_id: - type: string - format: uuid - source_id: + to: type: string minLength: 1 - maxLength: 255 - project_name: - type: string - maxLength: 255 - pattern: ^[A-Za-z0-9_-]+$ - target: - $ref: '#/components/schemas/ProjectImportTarget' - confirm_environment_variable_read: - type: boolean + maxLength: 253 + description: Hostname of an active domain of the same frontend that serves it. + example: www.example.com + status: + type: integer enum: - - true - preflight_fingerprint: - type: string - pattern: ^sha256:[0-9a-f]{64}$ + - 301 + - 302 + - 307 + - 308 + default: 308 + description: Redirect status. 301 and 308 are permanent, 302 and 307 temporary; 307 and 308 keep the request method and body. required: - - connection_id - - source_id - - project_name - - target - - confirm_environment_variable_read - - preflight_fingerprint - ProjectImportRunStatus: - type: string - enum: - - pending - - running - - succeeded - - failed - - superseded - x-enum-varnames: - - ProjectImportRunStatusPending - - ProjectImportRunStatusRunning - - ProjectImportRunStatusSucceeded - - ProjectImportRunStatusFailed - - ProjectImportRunStatusSuperseded - ProjectImportRun: + - to + UpdateFrontendCustomDomainRequest: + type: object + additionalProperties: false + properties: + redirect: + allOf: + - $ref: '#/components/schemas/FrontendCustomDomainRedirectRequest' + nullable: true + description: The redirect to set, or null to make the domain serve the frontend. + required: + - redirect + FrontendDeployment: type: object properties: id: type: string - provider: - $ref: '#/components/schemas/ImportProvider' - source_id: + format: uuid + frontend_id: type: string - destination_project_name: + format: uuid + project_id: type: string - resource: - $ref: '#/components/schemas/ResourceReference' - deployment: - $ref: '#/components/schemas/DeploymentReference' + format: uuid + operation: + type: string + enum: + - deploy + - redeploy + - delete status: - $ref: '#/components/schemas/ProjectImportRunStatus' - error_code: type: string + description: | + Deployment lifecycle status. A `degraded` redeploy remains available while + edge-only recovery is retried. A `failed` redeploy is recorded here while the + frontend keeps serving its previous deployment. + enum: + - queued + - provisioning + - active + - degraded + - failed + - superseded + - deleting + - deleted + deploy_source: + type: string + enum: + - git + - cli + - web + - api + - system + - unknown + description: What initiated this deployment. + initiated_by: + type: string + description: Platform user that triggered a request-initiated deployment; absent for git and system deployments. + commit: + $ref: '#/components/schemas/DeploymentCommit' + source_deployment_id: + type: string + format: uuid + description: The deployment whose build this deployment published instead of compiling its own source. Absent when the deployment compiled. + site_url: + type: string + build_duration_seconds: + type: integer + format: int64 + description: Total build time recorded for this deployment, in seconds. + build_count: + type: integer + description: Number of completed builds included in build_duration_seconds. + build_duration_recorded_at: + type: string + format: date-time + description: When the build time was last recorded. + progress: + $ref: '#/components/schemas/DeploymentProgress' error_message: type: string created_at: @@ -19727,3150 +29965,3900 @@ components: format: date-time required: - id - - provider - - source_id - - destination_project_name - - resource - - deployment + - frontend_id + - project_id + - operation - status + - deploy_source - created_at - updated_at - ProjectImportDestination: + FrontendDomainRoutingRecord: type: object properties: - mode: - $ref: '#/components/schemas/ProjectImportDestinationMode' - project_name: + record_type: + type: string + enum: + - CNAME + name: + type: string + value: type: string - target: - $ref: '#/components/schemas/ProjectImportTarget' required: - - mode - - project_name - - target - ProjectImportResource: + - record_type + - name + - value + FrontendDomainVerificationRecord: type: object + description: The DNS records currently required. Volcano may require an account-specific TXT ownership record for the hostname's domain before returning a CNAME that authorizes managed certificate issuance and renewal. Clients must follow the records returned for the current lifecycle state instead of assuming a fixed sequence. properties: - kind: - $ref: '#/components/schemas/ProjectImportResourceKind' name: type: string - source_id: + type: type: string - minLength: 1 - description: Stable provider identifier for a scoped source resource. - scope: + value: type: string - minLength: 1 - description: URL-encoded source scope, including target, branch, and custom environment identifiers. required: - - kind - name - ProjectImportAction: + - type + - value + FrontendCustomDomainConflictError: + description: 'Domain ownership conflict. With `code: ownership_verification_required`, the account has not proven it owns the domain: publish `required_record` in DNS and send the same request again. The retry succeeds once Volcano can see the record. With `code: custom_domain_releasing`, a removed domain still holds the hostname or the frontend while Volcano releases it: send the same request again after the response''s `Retry-After` seconds. A release that will not finish within a few minutes is a plain conflict. Other conflicts omit both fields.' + allOf: + - $ref: '#/components/schemas/Error' + - type: object + properties: + required_record: + $ref: '#/components/schemas/FrontendDomainVerificationRecord' + FrontendUsageDailyEntry: type: object + description: One day of request and error counts for a single frontend. properties: - code: - $ref: '#/components/schemas/ProjectImportActionCode' - resource: - $ref: '#/components/schemas/ProjectImportResource' - disposition: - $ref: '#/components/schemas/ProjectImportDisposition' + day: + type: string + format: date + description: UTC date (YYYY-MM-DD) the counts cover. + requests: + type: integer + format: int64 + description: Total requests served on this day. + errors: + type: integer + format: int64 + description: 5xx responses served on this day. + page_views: + type: integer + format: int64 + description: Navigable-document responses served on this day (text/html or Sec-Fetch-Dest=document) — strict subset of `requests`. required: - - code - - resource - - disposition - ProjectImportFinding: + - day + - requests + - errors + - page_views + FrontendUsageData: type: object + description: Monthly frontend request totals grouped by frontend. properties: - code: - type: string - pattern: ^(vercel|volcano|import)\.[a-z0-9_]+$ - resource: - $ref: '#/components/schemas/ProjectImportResource' - disposition: - $ref: '#/components/schemas/ProjectImportDisposition' - impact: - $ref: '#/components/schemas/ProjectImportImpact' - message: + frontend_id: type: string - remediation: + format: uuid + description: Frontend ID + frontend_name: type: string + description: Frontend name at the time usage was fetched + nullable: true + requests: + type: integer + format: int64 + description: Total requests for this frontend in the current usage month required: - - code - - resource - - disposition - - impact - - message - - remediation - ProjectImportSummary: + - frontend_id + - requests + FrontendUsageHistoryResponse: type: object + description: Zero-filled daily series of request + error counts for a single frontend, oldest first. properties: - automatic: - type: integer - minimum: 0 - manual: - type: integer - minimum: 0 - deferred: + frontend_id: + type: string + format: uuid + days: type: integer - minimum: 0 - unsupported: + description: Number of daily entries returned (always equal to the `days` query param after clamping). + daily: + type: array + items: + $ref: '#/components/schemas/FrontendUsageDailyEntry' + total_requests: type: integer - minimum: 0 - warnings: + format: int64 + total_errors: type: integer - minimum: 0 - blocking: + format: int64 + total_page_views: type: integer - minimum: 0 + format: int64 required: - - automatic - - manual - - deferred - - unsupported - - warnings - - blocking - ProjectImportReport: + - frontend_id + - days + - daily + - total_requests + - total_errors + - total_page_views + ProjectAccessToken: type: object + description: | + A project access token: a control-plane credential bound to a single + project. Unlike a platform token, which acts on every project its owner + has, this one is limited to the project it was created in. + + The secret itself is never returned here. Only its hash is stored, so + the plaintext exists solely in the response to the create call. properties: - schema_version: + id: type: string - provider: - $ref: '#/components/schemas/ImportProvider' - source: - $ref: '#/components/schemas/ImportSource' - destination: - $ref: '#/components/schemas/ProjectImportDestination' - actions: - type: array - items: - $ref: '#/components/schemas/ProjectImportAction' - findings: - type: array - items: - $ref: '#/components/schemas/ProjectImportFinding' - summary: - $ref: '#/components/schemas/ProjectImportSummary' - readiness: - $ref: '#/components/schemas/ProjectImportReadiness' - source_fingerprint: + format: uuid + project_id: type: string - capability_fingerprint: + format: uuid + name: type: string - fingerprint: + description: Unique per project. + token_prefix: type: string - generated_at: + description: First 12 characters of the secret, for recognising a token in a list. + scope: + $ref: '#/components/schemas/ProjectAccessTokenListedScope' + status: + type: string + enum: + - active + - revoked + - expired + description: | + `revoked` means the token was deliberately revoked, by you or by the + deletion of its project. `expired` means it simply reached + `expires_at`; nothing was taken away. Both are refused, and both keep + their record so a token's name, prefix, last use, and request history + remain available after a leak. + + A token revoked before its expiry passed stays `revoked`, because + that is the fact worth keeping. + token_source: + type: string + enum: + - api + - cli + - dashboard + description: What created the token. + expires_at: + type: string + format: date-time + nullable: true + description: Absent for a token that does not expire. + last_used_at: + type: string + format: date-time + nullable: true + description: Updated at most once every few minutes, so it may lag slightly. + created_at: type: string format: date-time + all_time_requests: + type: integer + format: int64 + description: Requests authenticated with this token since it was created. required: - - schema_version - - provider - - source - - destination - - actions - - findings - - summary - - readiness - - source_fingerprint - - capability_fingerprint - - fingerprint - - generated_at - GitConnection: + - id + - project_id + - name + - token_prefix + - scope + - status + - token_source + - created_at + - all_time_requests + ProjectAccessTokenScope: + type: string + description: | + What a project access token may do within its project. + + `full` is everything you can do to that one project, up to and including + deleting it. It cannot manage access tokens, so a leaked token cannot + mint a replacement or erase the record of its own use, but for a CI or + agent credential that only deploys, prefer `read_only` where the job + allows it. + + `read_only` refuses mutations. It is enforced by route classification + rather than HTTP method, so the log and metrics query endpoints remain + available even though they are POST requests that carry body filters. + + `read_only` also refuses the reads that return a credential — service + keys, anon keys, variable values, and database connection strings. Those + grant write access over the project's data and keep working after the + token that fetched them is revoked, so returning one to a read-only + credential would make the scope a formality. An anon key is included + because its permissions are chosen per key and may include uploading, + deleting, and publishing. + enum: + - full + - read_only + x-enum-varnames: + - ProjectAccessTokenScopeFull + - ProjectAccessTokenScopeReadOnly + ProjectAccessTokenListedScope: + type: string + description: | + A listed token's scope. `full` and `read_only` are the scopes you + choose when you create a token; see `ProjectAccessTokenScope`. + + `delegated` marks a delegated grant: a `pg-` token a first-party app + minted for one run from the access you allowed it. It is listed only + with `include_delegated=true`, and you cannot create one. + enum: + - full + - read_only + - delegated + x-enum-varnames: + - ProjectAccessTokenListedScopeFull + - ProjectAccessTokenListedScopeReadOnly + - ProjectAccessTokenListedScopeDelegated + CreateProjectAccessTokenRequest: type: object properties: - id: - type: string - format: uuid - provider: - type: string - provider_user_id: - type: string - provider_login: - type: string - status: - type: string - last_authenticated_at: - type: string - format: date-time - created_at: + name: type: string - format: date-time - updated_at: + minLength: 1 + maxLength: 100 + description: | + Held by any of the project's tokens you have not revoked, including + one that has expired. Creating a duplicate returns 409 with code + `access_token_name_exists`; revoking the holder frees the name, so a + rotation can keep the name its caller already references. + scope: + $ref: '#/components/schemas/ProjectAccessTokenScope' + expires_at: type: string format: date-time + description: Omit for a token that does not expire. required: - - id - - provider - - provider_user_id - - provider_login - - status - - last_authenticated_at - - created_at - - updated_at - GitConnectStartResponse: + - name + - scope + CreatedProjectAccessToken: + allOf: + - $ref: '#/components/schemas/ProjectAccessToken' + - type: object + properties: + token: + type: string + description: | + The secret. Returned only here, and not recoverable afterwards: + the server stores a hash rather than the value. Save it now. + required: + - token + PaginatedProjectAccessTokens: type: object properties: - authorization_url: + data: + type: array + items: + $ref: '#/components/schemas/ProjectAccessToken' + page: + type: integer + limit: + type: integer + total: + type: integer + has_more: + type: boolean + next: type: string required: - - authorization_url - VerifiedDomain: + - data + - page + - limit + - total + - has_more + ProjectAccessTokenUsage: type: object - description: A domain the account owns, along with every name below it. + description: | + Zero-filled daily request counts for a single token, oldest first. Every + day in the window is present, so a gap reads as zero rather than missing. + + Counts every request the token authenticated, including ones then + refused — a read-only token attempting a write, or a token presented on + another project's route. That is deliberate: after a leak, the probing + is the part you want to see, and a counter that hid it would make a + token look idle while it was being tried. properties: - domain: + token_id: type: string - example: example.com - verified_at: + format: uuid + name: type: string - format: date-time - description: When the account last proved ownership. - required: - - domain - - verified_at - VerifiedDomainsResponse: - type: object - properties: - domains: + token_prefix: + type: string + description: | + The token's display prefix, which identifies the credential when its + name does not. Revoking frees a name, so a project that rotated + `ci-deploy` has two entries here both called `ci-deploy`. Not usable + as a credential. + days: + type: integer + description: Number of daily entries returned, always equal to the requested window. + daily: type: array items: - $ref: '#/components/schemas/VerifiedDomain' + $ref: '#/components/schemas/ProjectAccessTokenUsageDailyEntry' + total_requests: + type: integer + format: int64 required: - - domains - VerifyDomainRequest: + - token_id + - name + - token_prefix + - days + - daily + - total_requests + ProjectAccessTokenUsageDailyEntry: type: object properties: - domain: + day: type: string - minLength: 1 - maxLength: 253 - description: The domain to verify, such as `example.com`. - required: - - domain - GitConnectionsResponse: - type: object - properties: - connections: - type: array - items: - $ref: '#/components/schemas/GitConnection' + format: date + description: UTC day. + requests: + type: integer + format: int64 required: - - connections - GitInstallation: + - day + - requests + Function: type: object properties: id: - type: integer - format: int64 - account_login: type: string - account_type: + format: uuid + project_id: type: string - repository_selection: + format: uuid + name: type: string - required: - - id - - account_login - - account_type - - repository_selection - GitInstallationsResponse: - type: object - properties: - installations: - type: array - items: - $ref: '#/components/schemas/GitInstallation' - required: - - installations - GitRepository: - type: object - properties: - id: - type: integer - format: int64 - description: Stable GitHub repository id (repository.id), unchanged by renames. - full_name: + maxLength: 63 + pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ + status: type: string - default_branch: + enum: + - provisioning + - active + - failed + - deleting + provisioning_started_at: type: string - private: + format: date-time + description: Timestamp when the current provisioning phase started + visibility: + $ref: '#/components/schemas/FunctionVisibility' + is_public: type: boolean - is_empty: + deprecated: true + description: Deprecated. `true` exactly when `visibility` is `public`. + invocation_mode: + $ref: '#/components/schemas/FunctionInvocationMode' + http_auth_mode: + $ref: '#/components/schemas/FunctionHTTPAuthMode' + openapi_spec: + type: object + nullable: true + additionalProperties: true + description: Optional OpenAPI 3.0 or 3.1 document describing an HTTP-mode function. + has_openapi_spec: type: boolean - description: Whether the repository has no commits and can receive an initial source export. - required: - - id - - full_name - - default_branch - - private - - is_empty - GitRepositoriesResponse: - type: object - properties: - repositories: + description: Whether OpenAPI metadata is configured; list responses omit the document itself. + invoke_url: + type: string + description: 'Canonical geo-routed HTTPS endpoint for invoking this function. Use it as-is: it does not share a domain with the API, so a host derived from the API URL will not reach the function. In local development it is `http://{id}.functions.localhost:8000/`, served by the local API. Omitted when the deployment serves no function invocation domain, so a client testing for an empty string never matches.' + deployed_regions: type: array items: - $ref: '#/components/schemas/GitRepository' - required: - - repositories - ProjectGitConnection: - type: object - properties: - repo_installation_id: - type: integer - format: int64 - repo_id: - type: integer - format: int64 - description: Stable GitHub repository id (repository.id), the authoritative binding. - repo_full_name: + type: string + description: Regions where this function is currently deployed + runtime: type: string - root_directory: + handler: + type: string + current_deployment_id: + type: string + format: uuid + description: Identifier of the latest function deployment operation + pending_deployment_id: + type: string + format: uuid + description: Newest queued deployment that will run after the current operation + serving_candidate_id: + type: string + format: uuid + nullable: true + readOnly: true + description: | + The promoted preview whose runtime receives this function's traffic, the same as + `candidate_id` in `serving`. Null when the function runs its own build. While it is set, + `current_deployment_id` and `status` describe the function's own build, which receives no + traffic until the function is rolled back. + last_invoked_at: type: string - production_branch: + format: date-time + description: Most recent successful invocation timestamp + created_at: type: string - description: The branch a push must land on to deploy. Follows the repository's GitHub default branch unless the project set its own, which a default-branch rename on GitHub then leaves alone. + format: date-time updated_at: type: string format: date-time required: - - repo_installation_id - - repo_id - - repo_full_name - - root_directory - - production_branch + - id + - project_id + - name + - status + - visibility + - is_public + - invocation_mode + - http_auth_mode + - openapi_spec + - has_openapi_spec + - deployed_regions + - serving_candidate_id + - created_at - updated_at - ProjectGitDeploySettings: + DurableFunction: type: object - description: 'A project''s GitHub auto-deploy settings: what a push to the connected repo''s production branch deploys. All settings are default-off.' + description: | + A durable function. Separate from `Function` because a durable function + is invoked only through its own execution endpoints, so it has no + invocation mode, HTTP auth mode, OpenAPI document or invoke URL, and it + carries a `durable` configuration that a standard function has no field + for. properties: - auto_deploy_enabled: - type: boolean - description: Whether a production-branch push triggers a deployment. - deploy_functions: - type: boolean - description: Whether the repo's functions are deployed on push. - frontend_name: + id: type: string - description: Name of the frontend to build and deploy on push. Omitted when no frontend is deployed. Resolved at deploy time; need not exist yet. - frontend_app_root: + format: uuid + project_id: type: string - description: App root (subdirectory) the frontend builds from. Omitted for the repo root. - updated_at: + format: uuid + name: + type: string + maxLength: 63 + pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ + status: + type: string + enum: + - provisioning + - active + - failed + - deleting + provisioning_started_at: type: string format: date-time - required: - - auto_deploy_enabled - - deploy_functions - - updated_at - UpdateProjectGitDeploySettingsRequest: - type: object - description: Full replace of a project's Git auto-deploy settings. - properties: - auto_deploy_enabled: - type: boolean - deploy_functions: + description: Timestamp when the current provisioning phase started + visibility: + allOf: + - $ref: '#/components/schemas/FunctionVisibility' + description: | + Who may start executions of this function through + `POST /durable-functions/{functionId}/executions`, and read and stop + them through `GET /durable-functions/{functionId}/executions/{executionId}` + and its `/stop`: service keys at every level (a scoped key needs + `functions.invoke`), signed-in users of the project from + `authenticated`, and anon keys holding `functions.invoke` only at + `public`. On the read and stop routes a service key holding `*`, + the default, reaches every execution. A service key scoped to a + list without `*` and an anon key reach the ones whose client token + they send, which the start returns, and a signed-in user also the + ones they started. The project-scoped routes under + `/projects/{id}/durable-functions` take the project owner's token or + a project access token, whatever this is set to. + + Set it when the function is deployed. Durable functions have no + update endpoint, so changing visibility later means redeploying. + + A durable function is startable, never invocable: it is not + reachable through `POST /functions/{functionId}/invoke` or a + function URL, which answer `404` at every level. + is_public: type: boolean - frontend_name: + deprecated: true + description: Deprecated. `true` exactly when `visibility` is `public`. + durable: + $ref: '#/components/schemas/DurableFunctionConfig' + deployed_regions: + type: array + items: + type: string + description: Regions where this function is currently deployed + runtime: type: string - description: Frontend to deploy on push. Omit or empty to deploy no frontend. - frontend_app_root: + handler: type: string - description: App root the frontend builds from. Requires frontend_name; omit for the repo root. + current_deployment_id: + type: string + format: uuid + description: Identifier of the latest deployment operation + pending_deployment_id: + type: string + format: uuid + description: Newest queued deployment that will run after the current operation + last_invoked_at: + type: string + format: date-time + description: Most recent successful invocation timestamp + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time required: - - auto_deploy_enabled - - deploy_functions - ProjectLockLeaseRequest: + - id + - project_id + - name + - status + - visibility + - is_public + - durable + - deployed_regions + - created_at + - updated_at + DurableFunctionConfig: type: object - additionalProperties: false + description: | + Execution limits the function was created with, derived from the + project's plan. Fixed for the life of the function: changing them means + creating a new one. + + The memory the function runs at, and the timeout on one attempt within + an execution, also come from the plan but are not reported here: they + are applied to the deployed function rather than recorded on it. Both + are published per plan in the plans and limits guide. properties: - ttl_seconds: + execution_timeout_seconds: type: integer - minimum: 5 - maximum: 7776000 + format: int64 description: | - Lease duration in seconds, from 5 seconds through 90 days, measured - from when the request is served. Renew before it elapses. A renewal - sets the new expiry outright, so a shorter TTL shortens the lease. - Renewals cannot extend an acquisition beyond its absolute 90-day - deadline. - required: - - ttl_seconds - ProjectLockLease: - type: object - additionalProperties: false - properties: - expires_at: - type: string - format: date-time - description: Advisory lease expiry timestamp in UTC. - fencing_token: + How long a whole execution may run, including time suspended in a + wait. This is not a limit on one attempt: an execution outlives any + single attempt by checkpointing and resuming, and the per-attempt + timeout is the plan's own, smaller number. + retention_days: type: integer format: int64 description: | - Monotonically increasing token for this acquisition. It rises whenever the - lock changes hands and stays the same across renewals of one lease. Pass it - to the resource you are protecting and reject any write carrying a token - lower than the highest already seen; that is what stops a displaced holder - from writing after its lease lapsed. + How long a finished execution's result and history are retained, for + as long as the function exists. Deleting the function, or its + project, ends retention early and takes the history with it. A + result or error Volcano has just read is kept in memory for up to + five minutes, so a read can still return it for up to five minutes + after retention ends. required: - - expires_at - - fencing_token - ProjectLockState: + - execution_timeout_seconds + - retention_days + DurableExecution: type: object - additionalProperties: false properties: - held: + id: + type: string + format: uuid + function_id: + type: string + format: uuid + name: + type: string + description: | + Idempotency key for the execution. Supplied by the client through + `X-Volcano-Execution-Name`, otherwise generated. + status: + $ref: '#/components/schemas/DurableExecutionStatus' + region: + type: string + description: | + Region the execution runs in. An execution is pinned to one region + for its whole life because its checkpoints live there. + result: + description: | + Whatever the function returned, verbatim. Absent while the execution + is still running, absent when the result was too large to return and + was checkpointed instead, and absent once the retention period has + lapsed. A result Volcano has just read can still be returned for up + to five minutes after that. + result_expired: type: boolean description: | - Whether the lock is unavailable right now. False means an acquire would - succeed. It remains true during the brief grace window after expiry. - expires_at: + `true` when the execution is terminal but its result is no longer + retained, which distinguishes a discarded result from an empty one. + Shortly after that the execution itself is dropped and reads answer + `404`. + + A result that was checkpointed rather than returned leaves this + unset, so it reads like a function that returned nothing. + error: + $ref: '#/components/schemas/DurableExecutionError' + created_at: type: string format: date-time - description: Advisory lease expiry timestamp in UTC. Present only when held. - fencing_token: - type: integer - format: int64 - description: Current holder's fencing token. Present only when held. + completed_at: + type: string + format: date-time + description: Present once the execution has reached a terminal status. + client_token: + type: string + description: | + Lets a browser read the execution, stop it, and read and send its + messages, and a service key scoped to a list without `*` do the + same. Returned only by the start whose input the execution runs, + never by a repeat under the same name or by a read. Send it as + `X-Volcano-Client-Token`. required: - - held - ProjectSourceExportState: + - id + - function_id + - name + - status + - region + - created_at + DurableExecutionStatus: + type: string + enum: + - pending + - running + - succeeded + - failed + - timed_out + - stopped + - unknown + description: | + Lifecycle state of an execution. `pending` covers the window between the + platform reserving the execution name and the function accepting the + start, and has no counterpart once the execution is under way. + `succeeded`, `failed`, `timed_out`, `stopped` and `unknown` are + terminal. + + `unknown` means the execution's outcome cannot be established, so no + result or error can be given for it. Either it was under way and was + never seen to finish, or its start failed with a `500` without the + platform establishing whether the execution began — which is why a + name whose start returned an error can later read as `unknown` rather + than not being found. It is terminal because nothing can settle it + later, and it is rare — treat it as an outcome to retry rather than a + state to wait on. A retry under the same name picks this execution back + up instead of starting a second one, and needs a free concurrency slot + because an `unknown` execution has given its own up. `completed_at` on + an `unknown` execution is when the platform gave up, not when the work + ended. + DurableExecutionError: type: object - description: The project's source of truth and any pending Git transition. + description: Why a failed or timed-out execution ended. properties: - mode: - type: string - enum: - - platform - - git_exporting - - git_pending - - git - transition_started_at: - type: string - format: date-time - nullable: true - description: When source export started, cleared if an incomplete transition is canceled. - exported_at: + type: type: string - format: date-time - nullable: true - description: When the initial export push entered deployment, or when a transition was canceled after its commit was reserved. Once set, the one-time export is consumed. - handed_over_at: + message: type: string - format: date-time - nullable: true - description: When a complete production-branch deployment first proved the repository could drive the project, null until then. Once set, the repository is the project's source of truth. - required: - - mode - - transition_started_at - - exported_at - - handed_over_at - ProjectSourceExport: + DurableExecutionOperationList: type: object - description: The initial production-branch commit, and everything export could not carry. + description: A durable execution's trace. properties: - repo_full_name: - type: string - branch: - type: string - description: The production branch that was created. - commit_sha: - type: string - file_count: - type: integer - skipped: + data: type: array - description: Resources whose source could not be taken, with the reason. Most often a resource that has never deployed successfully. + description: | + Every operation the execution began. The execution itself comes + first and is the only operation without a `parent_id`; the rest + follow in the order they started. items: - $ref: '#/components/schemas/ProjectSourceExportSkip' - omitted: + $ref: '#/components/schemas/DurableExecutionOperation' + invocations: type: array - description: Things deliberately left out of the branch. + description: | + When the function's code was running, oldest first. An execution + suspended in a wait holds no runtime, so the gaps between these are + not charged as compute. items: - $ref: '#/components/schemas/ProjectSourceExportOmission' - required: - - repo_full_name - - branch - - commit_sha - - file_count - - skipped - - omitted - ExportProjectSourceRequest: - type: object - additionalProperties: false - properties: - production_branch: + $ref: '#/components/schemas/DurableExecutionInvocation' + complete: + type: boolean + description: | + `true` once the execution has finished and nothing more will be + recorded. Its operations no longer change, and it is no longer + refreshed on read; a final invocation window can still be added + shortly after. + synced_at: type: string - minLength: 1 - description: The currently configured production branch the user confirmed for export. + format: date-time + description: | + When the trace was last refreshed. Absent before it has been + refreshed at all. A running execution's trace is usually within + about ten seconds of the execution, and further behind when many + executions are being watched at once. required: - - production_branch - ProjectSourceExportSkip: + - data + - invocations + - complete + DurableExecutionOperation: type: object + description: One operation on an execution's timeline. properties: - kind: + id: type: string - description: 'The kind of resource, "function" or "frontend". Deliberately not an enum: the generated constants would collide with an existing resource-type enum and rename its members.' + description: Identifies the operation within its execution. + parent_id: + type: string + description: | + The operation this one ran inside: a child context, map item or + parallel branch, or the execution itself for top-level work. Absent + only on the execution. name: type: string - reason: + description: | + The name the handler gave the operation. Map items and parallel + branches the handler did not name carry the SDK's positional name, + such as `map-item-0`. Absent for an unnamed operation. + type: type: string - required: - - kind - - name - - reason - ProjectSourceExportOmission: - type: object - properties: + enum: + - execution + - step + - wait + - callback + - context + - chained_invoke + description: The kind of checkpointed operation Volcano recorded. kind: type: string - description: 'What was left out: migrations Volcano stores no copy of, variable values, a credential-shaped file, installed dependencies, or an archive entry a repository cannot carry.' - resource: + enum: + - execution + - step + - wait + - wait_until + - callback + - child + - map + - map_item + - parallel + - parallel_branch + - invoke + description: | + The operation as the handler wrote it: `ctx.step` is `step`, + `ctx.wait` is `wait`, `ctx.waitUntil` is `wait_until`, `ctx.child` + is `child`, `ctx.map` is `map` with one `map_item` per item, and + `ctx.parallel` is `parallel` with one `parallel_branch` per branch. + status: type: string - description: The resource it came from, empty when project-wide. - path: + enum: + - running + - waiting + - retrying + - succeeded + - failed + - cancelled + - timed_out + - stopped + - unknown + description: | + Where the operation stands. `waiting` holds no runtime: a wait that + has not elapsed, or a `waitUntil` between checks. `retrying` is a step whose last attempt failed and + whose next one is scheduled at `next_attempt_at`. Work still open + when the execution ended is `cancelled` at the moment it ended. + `unknown` is only ever the execution itself, when its outcome was + lost with its history, as in the execution's own `unknown` status. + started_at: + type: string + format: date-time + ended_at: + type: string + format: date-time + description: Present once the operation has ended. + scheduled_end_at: + type: string + format: date-time + description: When a wait is due to elapse. + next_attempt_at: type: string + format: date-time + description: | + When a step's next attempt, or a `waitUntil`'s next check, is due. + Present only while one is scheduled. + attempts: + type: array + description: | + Each run of a step's body, in order. Present on steps and + `waitUntil` polls, where each check is an attempt. + items: + $ref: '#/components/schemas/DurableExecutionOperationAttempt' + error: + $ref: '#/components/schemas/DurableExecutionError' required: + - id + - type - kind - - resource - - path - SetProjectGitProductionBranchRequest: + - status + - started_at + DurableExecutionOperationAttempt: type: object + description: One run of a step's body. properties: - production_branch: + attempt: + type: integer + minimum: 1 + description: The attempt's number, starting at 1. + status: type: string - minLength: 1 - maxLength: 255 - description: The branch a push must land on to deploy. Validated as a Git branch name only — it does not have to exist yet. - required: - - production_branch - ConnectProjectGitRequest: - type: object - properties: - connection_id: + enum: + - running + - succeeded + - failed + description: | + How the attempt ended. A `waitUntil` check whose condition did not + hold yet is `succeeded`: the check ran, and the poll continues. + started_at: type: string - format: uuid - description: The caller's user_git_connections row (see /user/git/connections). - installation_id: - type: integer - format: int64 - repository_id: - type: integer - format: int64 - description: Stable GitHub repository id (repository.id), the preferred selector. Either repository_id or repo_full_name is required; when both are given they must identify the same live repository. - repo_full_name: + format: date-time + ended_at: type: string - deprecated: true - description: Deprecated selector kept for a compatibility window; prefer repository_id. Either repository_id or repo_full_name is required. - root_directory: + format: date-time + description: Present once the attempt has ended. + error: + $ref: '#/components/schemas/DurableExecutionError' + required: + - attempt + - status + - started_at + DurableExecutionInvocation: + type: object + description: A window in which the function's code was running. + properties: + started_at: type: string - description: Monorepo subdirectory the project builds from. Omit for the repo root. - production_branch: + format: date-time + ended_at: type: string - maxLength: 255 - description: 'The branch a push must land on to deploy, with three cases, because this is a full replace and a read-modify-write client sends back whatever it read. Omit it to follow the repository''s GitHub default branch, which also discards a branch set earlier. Send back the branch the project already deploys from, when that is the repository''s default, and nothing changes either way — a project pinned to that branch stays pinned. Sending the default branch when the project deploys from something else returns it to following the default, including on a rebind, where a pin describes a branch chosen for the repository being left. Any other branch becomes the project''s own choice, exempt from later default-branch renames. Validated as a Git branch name only: it does not have to exist yet, so a project can be pointed at a branch about to be pushed. Changing repository and naming a branch other than the new repository''s default in one request is refused with 400, because the branch named is almost always the previous repository''s, echoed back — connect first, then set the branch.' + format: date-time required: - - connection_id - - installation_id - Frontend: + - started_at + - ended_at + FunctionInvocationMode: + type: string + enum: + - rpc + - http + description: | + Invocation contract. `rpc` preserves the existing POST `{payload: ...}` contract; + `http` forwards HTTP request semantics to the function runtime. + FunctionHTTPAuthMode: + type: string + enum: + - volcano + - none + description: | + Authentication applied by the HTTP ingress. `none` is valid only for + HTTP-mode functions with `visibility: public` and is intended for + externally signed webhooks. + FunctionVisibility: + type: string + enum: + - private + - authenticated + - public + x-enum-varnames: + - FunctionVisibilityPrivate + - FunctionVisibilityAuthenticated + - FunctionVisibilityPublic + description: | + Who can invoke the function. Each level admits everything the one + before it does. + - `private`: service keys and the project's schedulers only. The + default for a new function. To any other credential the function + does not exist: it answers 404, like a missing one. + - `authenticated`: also any signed-in user of the project, including + anonymous sign-ins. The function receives their auth context. + - `public`: also anon keys holding `functions.invoke`, and Frontend + Function routes, which forward requests without a credential. + FunctionDeployment: type: object properties: - variable_scope: - type: string - enum: - - all - - shared - - scoped - description: All preserves access to all project variables. Shared includes the project frontend shared-variable list. Scoped includes only explicitly declared variables in builds and runtime. Omission preserves the stored selection. - declared_variables: - type: array - uniqueItems: true - items: - type: string - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - description: Names selected when variable_scope is scoped. Missing declared values reject deployment. Omission preserves the stored list; an empty list clears it. id: type: string format: uuid + function_id: + type: string + format: uuid project_id: type: string format: uuid - name: + batch_id: type: string - maxLength: 63 - pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ - framework: + format: uuid + operation: type: string enum: - - nextjs - app_root: - type: string - maxLength: 1024 - description: Optional relative POSIX path from the uploaded archive root to the Next.js app that is deployed. + - deploy + - update + - delete status: type: string - description: | - Frontend lifecycle status. `degraded` means the regional runtime remains - available but edge synchronization exhausted its immediate retries; Volcano - retries edge recovery without rebuilding the frontend, and stops once a new - deployment is queued or the retry budget runs out, leaving the frontend - `degraded` until the next redeploy. A redeploy that fails over a serving - frontend stays `active` on the previous deployment, so `failed` means no - deployment is serving. enum: + - queued - provisioning - active - - degraded - failed + - superseded - deleting - provisioning_started_at: + - deleted + deploy_source: type: string - format: date-time - description: Timestamp when the current provisioning phase started - deployed_regions: - type: array - items: - type: string - current_deployment_id: + enum: + - git + - cli + - web + - api + - system + - unknown + description: What initiated this deployment. + initiated_by: type: string - format: uuid - description: Identifier of the latest frontend deployment operation - pending_deployment_id: + description: Platform user that triggered a request-initiated deployment; absent for git and system deployments. + commit: + $ref: '#/components/schemas/DeploymentCommit' + build_duration_seconds: + type: integer + format: int64 + description: Total build time recorded for this deployment, in seconds. + build_count: + type: integer + description: Number of completed builds included in build_duration_seconds. + build_duration_recorded_at: type: string - format: uuid - description: Newest queued deployment that will run after the current operation - site_url: + format: date-time + description: When the build time was last recorded. + progress: + $ref: '#/components/schemas/DeploymentProgress' + error_message: type: string - custom_domain: + completed_at: type: string - description: Active custom domain hostname when configured - custom_domain_status: + format: date-time + created_at: type: string - description: Current custom domain lifecycle status - enum: - - pending_verification - - provisioning - - active - - detaching - - failed - - deleted - function_routes: - type: array - maxItems: 64 - items: - $ref: '#/components/schemas/FrontendFunctionRoute' + format: date-time + updated_at: + type: string + format: date-time + required: + - id + - function_id + - project_id + - operation + - status + - deploy_source + - created_at + - updated_at + FunctionInvocationRequest: + type: object + properties: + payload: + type: object + additionalProperties: true description: | - Paths on this frontend that forward to a public function, ordered - from most to least specific. Anyone who can load the frontend can - reach the target function at these paths without a credential. - last_deployed_at: + Payload to send to the function. + + If invoked with auth user token, Volcano automatically injects `__volcano_auth` context: + ```javascript + { + ...yourPayload, + __volcano_auth: { + user_id: "uuid", + email: "user@example.com", + project_id: "uuid", + role: "authenticated" | "anonymous" + } + } + ``` + + The top-level `__volcano_auth`, `__volcano_http` and `__volcano_mount` + keys are reserved; Volcano removes caller-supplied values for all three. + FunctionInvocationResponse: + type: object + description: Raw function response body returned by the invoked function. + additionalProperties: true + LogActivityBucket: + type: object + description: Log-event counts for one activity time bucket. The first and last buckets can extend past the requested window; they count only events inside it. + properties: + start_time: type: string format: date-time - description: Recorded completion time of the most recent deploy or redeploy with status active. Omitted when no such deployment has a recorded completion time. Site traffic, pending deployments, degraded deployments, failed deployments, and deletion do not change this value. - last_invoked_at: + description: Bucket start time, inclusive. + end_time: type: string format: date-time - created_at: + description: Bucket end time, exclusive. + counts: + type: object + description: Counts grouped by activity dimension. + properties: + levels: + type: object + additionalProperties: + type: integer + description: Counts by normalized log level. + regions: + type: object + additionalProperties: + type: integer + description: Counts by event region. + resource_ids: + type: object + additionalProperties: + type: integer + description: Counts by resource ID. + required: + - levels + - regions + - resource_ids + total: + type: integer + description: Total events in this bucket. + required: + - start_time + - end_time + - counts + - total + LogActivityRequest: + type: object + description: Activity request for bucketed log counts. + additionalProperties: false + properties: + resource: + $ref: '#/components/schemas/LogRequestResource' + q: + type: string + maxLength: 512 + description: Optional activity query. Supports quoted text, implicit AND, AND/OR/NOT, parentheses, and fields such as `level`, `region`, `invocation.id`, `resource.id`, `resource.name`, `function`, `frontend`, `database`, and `body`. + start_time: type: string format: date-time - updated_at: + description: Start of the window, inclusive. Defaults to 24 hours before `end_time`. + end_time: type: string format: date-time + description: End of the window, exclusive. Defaults to now. + bucket_count: + type: integer + minimum: 1 + maximum: 96 + description: Maximum number of buckets. Defaults to 24. Volcano picks the smallest bucket width from 1s, 2s, 5s, 10s, 15s, 30s, 1m, 2m, 5m, 10m, 15m, 30m, 1h, 2h, 3h, 6h, 12h, 1d, or a whole number of days that covers the window in at most this many buckets. Bucket edges fall on UTC multiples of the width, so they stay fixed as the window moves, and the response can contain fewer buckets. `1` returns one bucket that spans exactly the window. required: - - id - - project_id - - name - - framework - - status - - deployed_regions - - function_routes - - created_at - - updated_at - FrontendFunctionRoute: + - resource + LogActivityResponse: + type: object + description: Bucketed runtime log activity. + properties: + data: + type: array + items: + $ref: '#/components/schemas/LogActivityBucket' + total: + type: integer + description: Total events counted across all buckets. + required: + - data + - total + LogSearchRequest: type: object + description: Search request for project logs. additionalProperties: false properties: - id: + resource: + $ref: '#/components/schemas/LogRequestResource' + q: type: string - format: uuid - project_id: + maxLength: 512 + description: Optional log query. Supports quoted text, implicit AND, AND/OR/NOT, parentheses, and fields such as `level`, `region`, `invocation.id`, `resource.id`, `resource.name`, `function`, `frontend`, `database`, and `body`. + start_time: type: string - format: uuid - frontend_id: + format: date-time + description: Start time. + end_time: type: string - format: uuid - function_id: + format: date-time + description: End time. + limit: + type: integer + minimum: 1 + maximum: 1000 + default: 100 + description: Maximum number of records to return. + cursor: type: string - format: uuid - path_prefix: + description: Opaque pagination cursor from the previous response's `next_cursor`. + required: + - resource + LogStreamRequest: + type: object + description: Stream request for live project logs. Pagination cursors and fixed end times are not supported. + additionalProperties: false + properties: + resource: + $ref: '#/components/schemas/LogRequestResource' + q: type: string - minLength: 2 maxLength: 512 - pattern: ^/[^?#\\]*[^/?#\\]$ - strip_prefix: - type: boolean - created_at: - type: string - format: date-time - updated_at: + description: Optional log query using the same syntax as search and activity requests. + start_time: type: string format: date-time + description: Start time. + limit: + type: integer + minimum: 1 + maximum: 1000 + default: 100 + description: Maximum number of records to deliver on connect or reconnect before following new events. required: - - id - - project_id - - frontend_id - - function_id - - path_prefix - - strip_prefix - - created_at - - updated_at - FrontendFunctionRouteList: + - resource + LogSearchEvent: + allOf: + - $ref: '#/components/schemas/LogEvent' + - type: object + description: Runtime log event returned by project log search. Search results always include a stable event ID and owning resource. + properties: + id: + type: string + description: Opaque stable log event ID for pagination, deduplication, and display. + resource: + $ref: '#/components/schemas/LogResource' + required: + - id + - resource + LogSearchResponse: type: object - additionalProperties: false + description: Paginated project runtime log search response. properties: data: type: array items: - $ref: '#/components/schemas/FrontendFunctionRoute' + $ref: '#/components/schemas/LogSearchEvent' + description: Array of log events sorted by timestamp, newest first. + limit: + type: integer + description: Number of items requested per page. + has_more: + type: boolean + description: Whether the search may have more matching log events. A page can hold fewer than `limit` events, or none, while this is true; keep paging until it is false. + next_cursor: + type: string + description: Opaque cursor for the next page, present while `has_more` is true. Send this value as `cursor` on the next request, even when `data` is empty. required: - data - CreateFrontendFunctionRouteRequest: + - limit + - has_more + FunctionRegion: type: object - additionalProperties: false + required: + - code + - label + - flag properties: - function_id: + code: type: string - format: uuid - path_prefix: + example: us-east-1 + description: Region identifier accepted by function APIs. + label: type: string - minLength: 2 - maxLength: 512 - pattern: ^/[^?#\\]*[^/?#\\]$ - strip_prefix: - type: boolean - default: false - required: - - function_id - - path_prefix - FrontendCustomDomainTLSConfig: + example: NA-East + description: Human-readable region label suitable for display in pickers. + flag: + type: string + example: 🇺🇸 + description: Country flag emoji associated with the region's geography. + FunctionRuntimeOption: type: object - description: 'TLS for a new custom domain. With `mode: managed`, Volcano issues and renews the certificate; omit every PEM field. With `mode: byoc`, send both `certificate_pem` and `private_key_pem`, plus an optional `certificate_chain_pem`.' - additionalProperties: false - not: - anyOf: - - allOf: - - properties: - mode: - enum: - - managed - required: - - mode - - anyOf: - - required: - - certificate_pem - - required: - - private_key_pem - - required: - - certificate_chain_pem - - allOf: - - properties: - mode: - enum: - - byoc - required: - - mode - - anyOf: - - not: - required: - - certificate_pem - - not: - required: - - private_key_pem + required: + - name + - label + - language + - default + - durable_capable + - deployment properties: - mode: - type: string - enum: - - managed - - byoc - default: byoc - description: managed for a Volcano-issued certificate; byoc to supply your own. - certificate_pem: + name: type: string - maxLength: 65536 - description: PEM-encoded certificate. Required when mode is byoc; not allowed when mode is managed. - private_key_pem: + example: nodejs24.x + description: Runtime identifier accepted by function APIs. + label: type: string - maxLength: 65536 - description: PEM-encoded private key. Required when mode is byoc; not allowed when mode is managed. - certificate_chain_pem: + example: Node.js 24 + description: Human-readable runtime label suitable for display in pickers. + language: type: string - maxLength: 65536 - description: Optional PEM-encoded certificate chain when mode is byoc; not allowed when mode is managed. + example: nodejs + description: Runtime language family used by the CLI to choose defaults from source files. + default: + type: boolean + description: Whether this runtime is the CLI default for its language. + durable_capable: + type: boolean + description: Whether a durable function can be authored on this runtime. Only runtimes with a durable authoring API report true, and a durable deploy naming any other runtime is rejected. + deployment: + $ref: '#/components/schemas/FunctionRuntimeDeployment' + FunctionRuntimesResponse: + type: object required: - - mode - FrontendCustomDomainResponse: + - runtimes + properties: + runtimes: + type: array + items: + $ref: '#/components/schemas/FunctionRuntimeOption' + FunctionKindFilter: + type: string + enum: + - standard + - durable + description: | + A function kind to filter a list by. Unlike `FunctionKind` it has no + default: omitting the filter includes both kinds. + x-enum-varnames: + - FunctionKindFilterStandard + - FunctionKindFilterDurable + FunctionScheduler: type: object properties: - domain: + id: type: string - tls_mode: + format: uuid + project_id: type: string - enum: - - managed - - byoc - domain_status: + format: uuid + function_id: type: string - enum: - - pending_verification - - provisioning - - active - - detaching - - failed - - deleted - verification_status: + format: uuid + function_kind: + allOf: + - $ref: '#/components/schemas/FunctionKind' + description: | + Which collection the scheduled function belongs to. A project-wide + scheduler list mixes both kinds, and this is what says whether the + function is read back from `/projects/{id}/functions` or + `/projects/{id}/durable-functions` — and whether a tick invokes it + or starts a durable execution. + name: type: string - enum: - - pending - - verified - - failed - description: '`verified`: the domain is served by a validated certificate. `pending`: it is not served yet, is being re-validated after its certificate material was withdrawn, or Volcano is retrying after a failure. `failed`: a failure left the domain unserved, alongside `domain_status: failed`; managed domains report the cause in `failure_reason`.' - serving_certificate: + enabled: + type: boolean + schedule_kind: type: string enum: - - uploaded - - managed - description: 'Certificate the domain serves, present only while it is active. `uploaded`: the BYOC certificate, including after the domain switched to managed TLS and until Volcano issues the managed one; `failure_reason` then reports an issuance failure. `managed`: a certificate Volcano issued.' - failure_reason: - type: string - description: Failure category, present when managed TLS setup has failed, or when issuance is failing for a domain that switched to managed TLS and still serves its uploaded certificate. Current values are provider, certificate, ownership, and internal; ownership means another account has already claimed the hostname through ownership verification. Treat unrecognized values as internal. - verification_records: - type: array - description: DNS records to publish now. For a managed domain whose hostname the account already owns, the create response names the `_acme-challenge` CNAME that authorizes certificate issuance and renewal. Otherwise it names the `_volcano` TXT record that proves ownership of the hostname's registrable domain, and reads return the CNAME once Volcano sees that record. Usually empty for BYOC. - items: - $ref: '#/components/schemas/FrontendDomainVerificationRecord' - required_routing_record: - allOf: - - $ref: '#/components/schemas/FrontendDomainRoutingRecord' - deprecated: true - description: Deprecated and no longer returned. Use routing_target_hostname as the DNS routing target. - routing_target_hostname: + - cron + cron_expression: type: string - description: DNS routing target hostname for this frontend. The DNS record type depends on whether the custom domain is a zone apex. - effective_urls: + payload: + type: object + additionalProperties: true + regions: type: array items: type: string - created_at: + regions_explicit: + type: boolean + next_run_at: type: string format: date-time - updated_at: + last_started_at: type: string format: date-time - required: - - domain - - tls_mode - - domain_status - - verification_status - - effective_urls - - created_at - - updated_at - FrontendDeployment: - type: object - properties: - id: - type: string - format: uuid - frontend_id: + last_completed_at: type: string - format: uuid - project_id: + format: date-time + last_error: type: string - format: uuid - operation: + run_count: + type: integer + format: int64 + description: Total number of times this scheduler has executed. 0 for a scheduler that has never run. + health: type: string enum: - - deploy - - redeploy - - delete - status: + - healthy + - failing + description: '`failing` while `consecutive_failures` is above 0; `healthy` otherwise, including before its first run in the region the scheduler runs in now. A run from a region it moved away from does not count. For a durable function a run finishes when its execution does, so a run that starts but then fails counts as failed.' + consecutive_failures: + type: integer + format: int64 + minimum: 0 + description: How many runs in a row have failed in the region the scheduler runs in now. Resets to 0 when a run succeeds, and starts at 0 in a region it moves to. + last_run_status: type: string - description: | - Deployment lifecycle status. A `degraded` redeploy remains available while - edge-only recovery is retried. A `failed` redeploy is recorded here while the - frontend keeps serving its previous deployment. enum: - - queued - - provisioning - - active - - degraded + - succeeded - failed - - superseded - - deleting - - deleted - deploy_source: - type: string - enum: - - git - - cli - - web - - api - - system - - unknown - description: What initiated this deployment. - initiated_by: - type: string - description: Platform user that triggered a request-initiated deployment; absent for git and system deployments. - site_url: - type: string - build_duration_seconds: - type: integer - format: int64 - description: Total build time recorded for this deployment, in seconds. - build_count: - type: integer - description: Number of completed builds included in build_duration_seconds. - build_duration_recorded_at: + description: Outcome of the most recent finished run. Absent before the first. + last_success_at: type: string format: date-time - description: When the build time was last recorded. - progress: - $ref: '#/components/schemas/DeploymentProgress' - error_message: + description: When the most recent successful run finished. + last_failure_at: type: string + format: date-time + description: When the most recent failed run finished. created_at: type: string format: date-time updated_at: type: string format: date-time - required: - - id - - frontend_id - - project_id - - operation - - status - - deploy_source - - created_at - - updated_at - FrontendDomainRoutingRecord: + FunctionSchedulerListResponse: type: object properties: - record_type: - type: string - enum: - - CNAME - name: + data: + type: array + items: + $ref: '#/components/schemas/FunctionScheduler' + page: + type: integer + limit: + type: integer + total: + type: integer + has_more: + type: boolean + next_cursor: type: string - value: + description: Opaque cursor for the next page (cursor pagination only; present if has_more is true) + prev_cursor: type: string + description: Opaque cursor for the previous page (cursor pagination only; present when a previous page exists). Send as `ending_before`. required: - - record_type - - name - - value - FrontendDomainVerificationRecord: + - data + - page + - limit + - total + - has_more + HostedAuthPageType: + type: string + enum: + - login + - signup + - forgot-password + - device + - verify-email + - reset-password + HostedLoginEmailCheckRequest: type: object - description: The DNS records currently required. Volcano may require an account-specific TXT ownership record for the hostname's domain before returning a CNAME that authorizes managed certificate issuance and renewal. Clients must follow the records returned for the current lifecycle state instead of assuming a fixed sequence. + required: + - email properties: - name: - type: string - type: - type: string - value: + email: type: string - required: - - name - - type - - value - FrontendCustomDomainConflictError: - description: 'Domain ownership conflict. With `code: ownership_verification_required`, the account has not proven it owns the domain: publish `required_record` in DNS and send the same request again. The retry succeeds once Volcano can see the record. With `code: custom_domain_releasing`, a removed domain still holds the hostname or the frontend while Volcano releases it: send the same request again after the response''s `Retry-After` seconds. A release that will not finish within a few minutes is a plain conflict. Other conflicts omit both fields.' - allOf: - - $ref: '#/components/schemas/Error' - - type: object - properties: - required_record: - $ref: '#/components/schemas/FrontendDomainVerificationRecord' - FrontendUsageDailyEntry: + format: email + HostedLoginEmailCheckResponse: type: object - description: One day of request and error counts for a single frontend. properties: - day: + exists: + type: boolean + HostedLoginOptionsResponse: + type: object + properties: + require_email_confirmation: + type: boolean + email_password_enabled: + type: boolean + enable_signup: + type: boolean + post_auth_redirect_url: type: string - format: date - description: UTC date (YYYY-MM-DD) the counts cover. - requests: - type: integer - format: int64 - description: Total requests served on this day. - errors: - type: integer - format: int64 - description: 5xx responses served on this day. - page_views: - type: integer - format: int64 - description: Navigable-document responses served on this day (text/html or Sec-Fetch-Dest=document) — strict subset of `requests`. - required: - - day - - requests - - errors - - page_views - FrontendUsageData: + oauth_providers: + type: array + items: + type: string + HostedRenderablePageType: + type: string + enum: + - signup + - forgot-password + - device + - verify-email + - reset-password + LogEvent: type: object - description: Monthly frontend request totals grouped by frontend. + description: Historical log event returned by log APIs. properties: - frontend_id: + id: type: string - format: uuid - description: Frontend ID - frontend_name: + description: Opaque stable log event ID for pagination, deduplication, and display. + timestamp: type: string - description: Frontend name at the time usage was fetched + format: date-time + description: Event timestamp. + level: + $ref: '#/components/schemas/LiveLogLevel' + body: + description: Application log value. JSON arguments retain their JSON type. Strings containing a serialized JSON object or array are normalized to that object or array; all other strings remain strings. nullable: true - requests: - type: integer - format: int64 - description: Total requests for this frontend in the current usage month + oneOf: + - type: string + - type: object + additionalProperties: true + - type: array + items: {} + - type: number + format: double + - type: boolean + region: + type: string + description: Region where this log event originated. + resource: + $ref: '#/components/schemas/LogResource' + deployment: + $ref: '#/components/schemas/LogDeployment' + invocation_id: + type: string + description: Function invocation ID associated with this log event, when available. required: - - frontend_id - - requests - FrontendUsageHistoryResponse: + - timestamp + - body + LiveLogLevel: + type: string + enum: + - trace + - debug + - info + - warn + - error + - fatal + description: Canonical lowercase function runtime log level. + MetricUsageData: type: object - description: Zero-filled daily series of request + error counts for a single frontend, oldest first. + description: Usage data for one metric across totals, daily, and hourly windows. properties: - frontend_id: + metric: type: string - format: uuid - days: - type: integer - description: Number of daily entries returned (always equal to the `days` query param after clamping). - daily: - type: array - items: - $ref: '#/components/schemas/FrontendUsageDailyEntry' - total_requests: - type: integer - format: int64 - total_errors: + description: | + Metric name (for example, "Function & Frontend Invocations", "Frontend Requests", + "Durable Executions", "Durable Operations", "Durable Compute (MB-Seconds)", + "Build Seconds", + "Bandwidth Ingress (Bytes)", "Bandwidth Egress (Bytes)", + "Bandwidth Total (Bytes)", or "Database Storage (Bytes)"). Byte-based metrics are + reported in bytes. "Bandwidth Total (Bytes)" is derived (ingress + egress) and + is not billed separately. The three durable metrics are + counted separately from "Function & Frontend Invocations", which covers standard + invocations only. Operations and compute are counted when an execution finishes, + so they appear in the window the execution completed in rather than the one it + started in. "Durable Compute (MB-Seconds)" reports the memory the execution ran + at times the time it spent running, in megabyte-seconds; the allowance for it is + published in gigabyte-seconds, which is 1024 of these. + "Sandbox Running (MiB-Seconds)", "Sandbox Suspended (Seconds)", and + "Sandbox Uncertain (MiB-Seconds)" report cloud Sandbox usage. Running + reports configured baseline memory times confirmed runtime, not measured + CPU or elastic memory consumption. For sessions admitted after the pricing + release, confirmed running time consumes the account's runtime allowance; + SUPERAGENT overage debits credits according to the account's pricing terms. + Suspended time and uncertain usage do not consume runtime allowance or + debit credits. Uncertain includes observation gaps and unconfirmed state + transitions. Suspended reports duration, not snapshot size; snapshot costs + are included in runtime pricing. Local and platform image-validation + sessions do not contribute. Existing preview sessions remain unbilled, + and preview history is never charged retroactively. Displayed totals are + rounded down after aggregating millisecond measurements; billing uses + unrounded measurements in the monthly account billing cycle. + "Database Storage (Bytes)" is a current observed gauge, + not a cumulative counter. It is the sum of the latest samples exposed as + `storage_bytes` by the project's database list, so it includes what each + database's branches and backups hold, and it inherits that field's lag + behind a live measurement. + total: type: integer format: int64 - total_page_views: + description: Total usage for the current usage month + all_time: type: integer format: int64 + description: Lifetime cumulative usage across every month for this metric + daily: + type: array + description: Last 30 days of daily usage points + items: + $ref: '#/components/schemas/UsageDataPoint' + hourly: + type: array + description: Last 24 hours of hourly usage points + items: + $ref: '#/components/schemas/UsageDataPoint' required: - - frontend_id - - days + - metric + - total + - all_time - daily - - total_requests - - total_errors - - total_page_views - ProjectAccessToken: + - hourly + OAuthConfig: type: object - description: | - A project access token: a control-plane credential bound to a single - project. Unlike a platform token, which acts on every project its owner - has, this one is limited to the project it was created in. - - The secret itself is never returned here. Only its hash is stored, so - the plaintext exists solely in the response to the create call. properties: id: type: string format: uuid - project_id: - type: string - format: uuid - name: - type: string - description: Unique per project. - token_prefix: - type: string - description: First 12 characters of the secret, for recognising a token in a list. - scope: - $ref: '#/components/schemas/ProjectAccessTokenScope' - status: + provider: type: string enum: - - active - - revoked - - expired - description: | - `revoked` means the token was deliberately revoked, by you or by the - deletion of its project. `expired` means it simply reached - `expires_at`; nothing was taken away. Both are refused, and both keep - their record so a token's name, prefix, last use, and request history - remain available after a leak. - - A token revoked before its expiry passed stays `revoked`, because - that is the fact worth keeping. - token_source: + - google + - github + - microsoft + - apple + - device + client_id: type: string - enum: - - api - - cli - - dashboard - description: What created the token. - expires_at: + example: 123456789.apps.googleusercontent.com + client_secret: type: string - format: date-time - nullable: true - description: Absent for a token that does not expire. - last_used_at: + description: Masked in responses (shows only first/last 4 chars) + example: GOCS...**** + enabled: + type: boolean + redirect_url: type: string - format: date-time - nullable: true - description: Updated at most once every few minutes, so it may lag slightly. + format: uri + example: https://yourapp.com/auth/callback + scopes: + type: array + items: + type: string + example: + - openid + - email + - profile created_at: - type: string - format: date-time - all_time_requests: - type: integer - format: int64 - description: Requests authenticated with this token since it was created. - required: - - id - - project_id - - name - - token_prefix - - scope - - status - - token_source - - created_at - - all_time_requests - ProjectAccessTokenScope: - type: string - description: | - What a project access token may do within its project. - - `full` is everything you can do to that one project, up to and including - deleting it. It cannot manage access tokens, so a leaked token cannot - mint a replacement or erase the record of its own use, but for a CI or - agent credential that only deploys, prefer `read_only` where the job - allows it. - - `read_only` refuses mutations. It is enforced by route classification - rather than HTTP method, so the log and metrics query endpoints remain - available even though they are POST requests that carry body filters. - - `read_only` also refuses the reads that return a credential — service - keys, anon keys, variable values, and database connection strings. Those - grant write access over the project's data and keep working after the - token that fetched them is revoked, so returning one to a read-only - credential would make the scope a formality. An anon key is included - because its permissions are chosen per key and may include uploading, - deleting, and publishing. - enum: - - full - - read_only - x-enum-varnames: - - ProjectAccessTokenScopeFull - - ProjectAccessTokenScopeReadOnly - CreateProjectAccessTokenRequest: + type: string + format: date-time + updated_at: + type: string + format: date-time + OAuthErrorResponse: type: object properties: - name: + error: type: string - minLength: 1 - maxLength: 100 - description: | - Held by any of the project's tokens you have not revoked, including - one that has expired. Creating a duplicate returns 409 with code - `access_token_name_exists`; revoking the holder frees the name, so a - rotation can keep the name its caller already references. - scope: - $ref: '#/components/schemas/ProjectAccessTokenScope' - expires_at: + error_description: type: string - format: date-time - description: Omit for a token that does not expire. required: - - name - - scope - CreatedProjectAccessToken: - allOf: - - $ref: '#/components/schemas/ProjectAccessToken' - - type: object - properties: - token: - type: string - description: | - The secret. Returned only here, and not recoverable afterwards: - the server stores a hash rather than the value. Save it now. - required: - - token - PaginatedProjectAccessTokens: + - error + PaginatedAuthUsers: type: object properties: data: type: array items: - $ref: '#/components/schemas/ProjectAccessToken' + $ref: '#/components/schemas/AuthUser' page: type: integer + description: Current page number (1-indexed) limit: type: integer + description: Number of items per page total: type: integer + description: Total number of items across all pages has_more: type: boolean + description: Whether there are more pages available next: type: string + description: URL path to next page (only present if has_more is true) required: - data - page - limit - total - has_more - ProjectAccessTokenUsage: + PaginatedDatabases: type: object - description: | - Zero-filled daily request counts for a single token, oldest first. Every - day in the window is present, so a gap reads as zero rather than missing. - - Counts every request the token authenticated, including ones then - refused — a read-only token attempting a write, or a token presented on - another project's route. That is deliberate: after a leak, the probing - is the part you want to see, and a counter that hid it would make a - token look idle while it was being tried. properties: - token_id: - type: string - format: uuid - name: - type: string - token_prefix: - type: string - description: | - The token's display prefix, which identifies the credential when its - name does not. Revoking frees a name, so a project that rotated - `ci-deploy` has two entries here both called `ci-deploy`. Not usable - as a credential. - days: - type: integer - description: Number of daily entries returned, always equal to the requested window. - daily: + data: type: array items: - $ref: '#/components/schemas/ProjectAccessTokenUsageDailyEntry' - total_requests: + $ref: '#/components/schemas/Database' + page: type: integer - format: int64 - required: - - token_id - - name - - token_prefix - - days - - daily - - total_requests - ProjectAccessTokenUsageDailyEntry: - type: object - properties: - day: - type: string - format: date - description: UTC day. - requests: + description: Current page number (1-indexed) + limit: type: integer - format: int64 - required: - - day - - requests - Function: - type: object - properties: - id: - type: string - format: uuid - project_id: - type: string - format: uuid - name: - type: string - maxLength: 63 - pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ - status: - type: string - enum: - - provisioning - - active - - failed - - deleting - provisioning_started_at: - type: string - format: date-time - description: Timestamp when the current provisioning phase started - visibility: - $ref: '#/components/schemas/FunctionVisibility' - is_public: - type: boolean - deprecated: true - description: Deprecated. `true` exactly when `visibility` is `public`. - invocation_mode: - $ref: '#/components/schemas/FunctionInvocationMode' - http_auth_mode: - $ref: '#/components/schemas/FunctionHTTPAuthMode' - openapi_spec: - type: object - nullable: true - additionalProperties: true - description: Optional OpenAPI 3.0 or 3.1 document describing an HTTP-mode function. - has_openapi_spec: - type: boolean - description: Whether OpenAPI metadata is configured; list responses omit the document itself. - invoke_url: - type: string - description: 'Canonical geo-routed HTTPS endpoint for invoking this function. Use it as-is: it does not share a domain with the API, so a host derived from the API URL will not reach the function. Omitted when the deployment serves no public invocation domain, as in local development, so a client testing for an empty string never matches.' - deployed_regions: - type: array - items: - type: string - description: Regions where this function is currently deployed - runtime: - type: string - handler: - type: string - current_deployment_id: - type: string - format: uuid - description: Identifier of the latest function deployment operation - pending_deployment_id: - type: string - format: uuid - description: Newest queued deployment that will run after the current operation - last_invoked_at: - type: string - format: date-time - description: Most recent successful invocation timestamp - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - required: - - id - - project_id - - name - - status - - visibility - - is_public - - invocation_mode - - http_auth_mode - - openapi_spec - - has_openapi_spec - - deployed_regions - - created_at - - updated_at - DurableFunction: - type: object - description: | - A durable function. Separate from `Function` because a durable function - is invoked only through its own execution endpoints, so it has no - invocation mode, HTTP auth mode, OpenAPI document or invoke URL, and it - carries a `durable` configuration that a standard function has no field - for. - properties: - id: - type: string - format: uuid - project_id: - type: string - format: uuid - name: - type: string - maxLength: 63 - pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ - status: - type: string - enum: - - provisioning - - active - - failed - - deleting - provisioning_started_at: - type: string - format: date-time - description: Timestamp when the current provisioning phase started - visibility: - allOf: - - $ref: '#/components/schemas/FunctionVisibility' - description: | - Who may start executions of this function through - `POST /durable-functions/{functionId}/executions`: service keys at - every level, signed-in users of the project from `authenticated`, - and anon keys holding `functions.invoke` only at `public`. Reading - and stopping an execution always require the project owner's - token, whatever this is set to. - - Set it when the function is deployed. Durable functions have no - update endpoint, so changing visibility later means redeploying. - - A durable function is startable, never invocable: it is not - reachable through `POST /functions/{functionId}/invoke` or a - function URL, which answer `404` at every level. - is_public: + description: Number of items per page + total: + type: integer + description: Total number of items across all pages + has_more: type: boolean - deprecated: true - description: Deprecated. `true` exactly when `visibility` is `public`. - durable: - $ref: '#/components/schemas/DurableFunctionConfig' - deployed_regions: - type: array - items: - type: string - description: Regions where this function is currently deployed - runtime: - type: string - handler: - type: string - current_deployment_id: - type: string - format: uuid - description: Identifier of the latest deployment operation - pending_deployment_id: - type: string - format: uuid - description: Newest queued deployment that will run after the current operation - last_invoked_at: + description: Whether there are more pages available + next: type: string - format: date-time - description: Most recent successful invocation timestamp - created_at: + description: URL path to next page (only present if has_more is true) + next_cursor: type: string - format: date-time - updated_at: + description: Opaque cursor for the next page (cursor pagination only; present if has_more is true) + prev_cursor: type: string - format: date-time + description: Opaque cursor for the previous page (cursor pagination only; present when a previous page exists). Send as `ending_before`. required: - - id - - project_id - - name - - status - - visibility - - is_public - - durable - - deployed_regions - - created_at - - updated_at - DurableFunctionConfig: + - data + - page + - limit + - total + - has_more + PaginatedFrontendDeployments: type: object - description: | - Execution limits the function was created with, derived from the - project's plan. Fixed for the life of the function: changing them means - creating a new one. - - The memory the function runs at, and the timeout on one attempt within - an execution, also come from the plan but are not reported here: they - are applied to the deployed function rather than recorded on it. Both - are published per plan in the plans and limits guide. properties: - execution_timeout_seconds: + data: + type: array + items: + $ref: '#/components/schemas/FrontendDeployment' + page: type: integer - format: int64 - description: | - How long a whole execution may run, including time suspended in a - wait. This is not a limit on one attempt: an execution outlives any - single attempt by checkpointing and resuming, and the per-attempt - timeout is the plan's own, smaller number. - retention_days: + description: Current page number (1-indexed) + limit: type: integer - format: int64 - description: | - How long a finished execution's result and history are retained, for - as long as the function exists. Deleting the function, or its - project, ends retention early and takes the history with it. + description: Number of items per page + total: + type: integer + description: Total number of items across all pages + has_more: + type: boolean + description: Whether there are more pages available + next: + type: string + description: URL path to next page (only present if has_more is true) required: - - execution_timeout_seconds - - retention_days - DurableExecution: + - data + - page + - limit + - total + - has_more + PaginatedFrontends: type: object properties: - id: + data: + type: array + items: + $ref: '#/components/schemas/Frontend' + page: + type: integer + description: Current page number (1-indexed) + limit: + type: integer + description: Number of items per page + total: + type: integer + description: Total number of items across all pages + has_more: + type: boolean + description: Whether there are more pages available + next: type: string - format: uuid - function_id: + description: URL path to next page (offset pagination only; present if has_more is true) + next_cursor: type: string - format: uuid - name: + description: Opaque cursor for the next page (cursor pagination only; present if has_more is true) + prev_cursor: type: string - description: | - Idempotency key for the execution. Supplied by the client through - `X-Volcano-Execution-Name`, otherwise generated. - status: - $ref: '#/components/schemas/DurableExecutionStatus' - region: + description: Opaque cursor for the previous page (cursor pagination only; present when a previous page exists). Send as `ending_before`. + required: + - data + - page + - limit + - total + - has_more + PaginatedFunctionDeployments: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/FunctionDeployment' + page: + type: integer + description: Current page number (1-indexed) + limit: + type: integer + description: Number of items per page + total: + type: integer + description: Total number of items across all pages + has_more: + type: boolean + description: Whether there are more pages available + next: type: string - description: | - Region the execution runs in. An execution is pinned to one region - for its whole life because its checkpoints live there. - result: - description: | - Whatever the function returned, verbatim. Absent while the execution - is still running, absent when the result was too large to return and - was checkpointed instead, and absent once the retention period has - lapsed. A result Volcano has just read can still be returned for up - to five minutes after that. - result_expired: + description: URL path to next page (only present if has_more is true) + required: + - data + - page + - limit + - total + - has_more + PaginatedFunctions: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Function' + page: + type: integer + description: Current page number (1-indexed) + limit: + type: integer + description: Number of items per page + total: + type: integer + description: Total number of items across all pages + has_more: type: boolean - description: | - `true` when the execution is terminal but its result is no longer - retained, which distinguishes a discarded result from an empty one. - Shortly after that the execution itself is dropped and reads answer - `404`. - - A result that was checkpointed rather than returned leaves this - unset, so it reads like a function that returned nothing. - error: - $ref: '#/components/schemas/DurableExecutionError' - created_at: + description: Whether there are more pages available + next: type: string - format: date-time - completed_at: + description: URL path to next page (only present if has_more is true) + next_cursor: type: string - format: date-time - description: Present once the execution has reached a terminal status. - client_token: + description: Opaque cursor for the next page (cursor pagination only; present if has_more is true) + prev_cursor: type: string - description: | - Lets a browser read the execution, stop it, and read and send its - messages, and a service key scoped to a list without `*` read and - stop it. Returned only by the start whose input the execution runs, - never by a repeat under the same name or by a read. Send it as - `X-Volcano-Client-Token`. + description: Opaque cursor for the previous page (cursor pagination only; present when a previous page exists). Send as `ending_before`. required: - - id - - function_id - - name - - status - - region - - created_at - DurableExecutionStatus: - type: string - enum: - - pending - - running - - succeeded - - failed - - timed_out - - stopped - - unknown - description: | - Lifecycle state of an execution. `pending` covers the window between the - platform reserving the execution name and the function accepting the - start, and has no counterpart once the execution is under way. - `succeeded`, `failed`, `timed_out`, `stopped` and `unknown` are - terminal. - - `unknown` means the execution's outcome cannot be established, so no - result or error can be given for it. Either it was under way and was - never seen to finish, or its start failed with a `500` without the - platform establishing whether the execution began — which is why a - name whose start returned an error can later read as `unknown` rather - than not being found. It is terminal because nothing can settle it - later, and it is rare — treat it as an outcome to retry rather than a - state to wait on. A retry under the same name picks this execution back - up instead of starting a second one, and needs a free concurrency slot - because an `unknown` execution has given its own up. `completed_at` on - an `unknown` execution is when the platform gave up, not when the work - ended. - DurableExecutionError: + - data + - page + - limit + - total + - has_more + PaginatedDurableFunctions: type: object - description: Why a failed or timed-out execution ended. properties: - type: - type: string - message: - type: string - DurableExecutionOperationList: + data: + type: array + items: + $ref: '#/components/schemas/DurableFunction' + page: + type: integer + description: Current page number (1-indexed) + limit: + type: integer + description: Number of items per page + total: + type: integer + description: Total number of items across all pages + has_more: + type: boolean + description: Whether there are more pages available + required: + - data + - page + - limit + - total + - has_more + PaginatedDurableExecutions: type: object - description: A durable execution's trace. properties: data: type: array - description: | - Every operation the execution began. The execution itself comes - first and is the only operation without a `parent_id`; the rest - follow in the order they started. - items: - $ref: '#/components/schemas/DurableExecutionOperation' - invocations: - type: array - description: | - When the function's code was running, oldest first. An execution - suspended in a wait holds no runtime, so the gaps between these are - not charged as compute. items: - $ref: '#/components/schemas/DurableExecutionInvocation' - complete: + $ref: '#/components/schemas/DurableExecution' + page: + type: integer + description: Current page number (1-indexed) + limit: + type: integer + description: Number of items per page + total: + type: integer + description: Total number of items across all pages + has_more: type: boolean - description: | - `true` once the execution has finished and nothing more will be - recorded. Its operations no longer change, and it is no longer - refreshed on read; a final invocation window can still be added - shortly after. - synced_at: - type: string - format: date-time - description: | - When the trace was last refreshed. Absent before it has been - refreshed at all. A running execution's trace is usually within - about ten seconds of the execution, and further behind when many - executions are being watched at once. + description: Whether there are more pages available required: - data - - invocations - - complete - DurableExecutionOperation: + - page + - limit + - total + - has_more + DurableApproval: type: object - description: One operation on an execution's timeline. + description: An approval a durable workflow requested. properties: id: type: string - description: Identifies the operation within its execution. - parent_id: - type: string - description: | - The operation this one ran inside: a child context, map item or - parallel branch, or the execution itself for top-level work. Absent - only on the execution. + format: uuid + status: + $ref: '#/components/schemas/DurableApprovalStatus' name: type: string description: | - The name the handler gave the operation. Map items and parallel - branches the handler did not name carry the SDK's positional name, - such as `map-item-0`. Absent for an unnamed operation. - type: + The name the workflow gave the approval in `ctx.waitForApproval`. + title: type: string - enum: - - execution - - step - - wait - - callback - - context - - chained_invoke - description: The kind of checkpointed operation Volcano recorded. - kind: + description: type: string - enum: - - execution - - step - - wait - - wait_until - - callback - - child - - map - - map_item - - parallel - - parallel_branch - - invoke + details: description: | - The operation as the handler wrote it: `ctx.step` is `step`, - `ctx.wait` is `wait`, `ctx.waitUntil` is `wait_until`, `ctx.child` - is `child`, `ctx.map` is `map` with one `map_item` per item, and - `ctx.parallel` is `parallel` with one `parallel_branch` per branch. - status: + The JSON value the workflow attached for the person deciding, as + given. + function: + $ref: '#/components/schemas/DurableApprovalFunction' + execution: + $ref: '#/components/schemas/DurableApprovalExecution' + requested_at: type: string - enum: - - running - - waiting - - retrying - - succeeded - - failed - - cancelled - - timed_out - - stopped - - unknown - description: | - Where the operation stands. `waiting` holds no runtime: a wait that - has not elapsed, or a `waitUntil` between checks. `retrying` is a step whose last attempt failed and - whose next one is scheduled at `next_attempt_at`. Work still open - when the execution ended is `cancelled` at the moment it ended. - `unknown` is only ever the execution itself, when its outcome was - lost with its history, as in the execution's own `unknown` status. - started_at: + format: date-time + expires_at: type: string format: date-time - ended_at: + nullable: true + description: | + When the approval expires if nobody decides. Null when the + workflow set no timeout; the approval then lasts as long as its + execution. + decision: + $ref: '#/components/schemas/DurableApprovalDecision' + required: + - id + - status + - name + - title + - description + - function + - execution + - requested_at + - expires_at + - decision + DurableApprovalStatus: + type: string + enum: + - pending + - approved + - denied + - expired + - cancelled + description: | + `pending` means the workflow is waiting for a decision. `approved` and + `denied` are decisions a person made. `expired` means the workflow's + approval timeout passed first, and `cancelled` means the execution + ended while the approval was still pending. Every status but `pending` + is final. + DurableApprovalRegistration: + type: object + description: The registered approval, as the requesting workflow sees it. + properties: + id: + type: string + format: uuid + status: + $ref: '#/components/schemas/DurableApprovalStatus' + expires_at: type: string format: date-time - description: Present once the operation has ended. - scheduled_end_at: + nullable: true + required: + - id + - status + - expires_at + DurableApprovalStats: + type: object + properties: + from: type: string format: date-time - description: When a wait is due to elapse. - next_attempt_at: + to: type: string format: date-time + counts: + $ref: '#/components/schemas/DurableApprovalCounts' + approval_rate: + type: number + format: double + nullable: true description: | - When a step's next attempt, or a `waitUntil`'s next check, is due. - Present only while one is scheduled. - attempts: + `approved / (approved + denied)`, from 0 to 1. Null when nothing in + the window was decided. + median_seconds_to_decision: + type: number + format: double + nullable: true + description: Median time from request to decision. Null when nothing was decided. + p90_seconds_to_decision: + type: number + format: double + nullable: true + description: 90th percentile time from request to decision. Null when nothing was decided. + functions: type: array description: | - Each run of a step's body, in order. Present on steps and - `waitUntil` polls, where each check is an attempt. + The ten workflows that requested the most approvals, most first. + The rest are summed in `other_functions`. items: - $ref: '#/components/schemas/DurableExecutionOperationAttempt' - error: - $ref: '#/components/schemas/DurableExecutionError' + $ref: '#/components/schemas/DurableApprovalFunctionCounts' + other_functions: + $ref: '#/components/schemas/DurableApprovalCounts' + daily: + type: array + description: | + One entry per UTC day in the window that has approvals, oldest + first. Days with none are omitted. + items: + $ref: '#/components/schemas/DurableApprovalDailyCounts' required: - - id - - type - - kind - - status - - started_at - DurableExecutionOperationAttempt: + - from + - to + - counts + - approval_rate + - median_seconds_to_decision + - p90_seconds_to_decision + - functions + - other_functions + - daily + DurableApprovalDecisionRequest: type: object - description: One run of a step's body. properties: - attempt: - type: integer - minimum: 1 - description: The attempt's number, starting at 1. - status: + comment: + type: string + maxLength: 2000 + description: A note for the workflow and the approval's history. + additionalProperties: false + RequestDurableApprovalRequest: + type: object + properties: + execution_ref: type: string - enum: - - running - - succeeded - - failed - description: | - How the attempt ended. A `waitUntil` check whose condition did not - hold yet is `succeeded`: the check ran, and the poll continues. - started_at: + minLength: 1 + maxLength: 2048 + description: Opaque reference to the running execution, supplied by the SDK. + callback_id: type: string - format: date-time - ended_at: + minLength: 1 + maxLength: 1024 + description: Opaque approval reference, supplied by the SDK. + name: type: string - format: date-time - description: Present once the attempt has ended. - error: - $ref: '#/components/schemas/DurableExecutionError' + minLength: 1 + maxLength: 255 + title: + type: string + minLength: 1 + maxLength: 200 + description: + type: string + maxLength: 4000 + details: + x-go-type: json.RawMessage + x-go-type-skip-optional-pointer: true + description: | + Any JSON value to show the person deciding. A number's exponent must + be between -324 and 324, and a number too large or too precise to + store is refused with `400`. Numbers are read back written out in + full, so the exponents' absolute values may total at most 65,536. + The whole request is limited to 64 KiB. required: - - attempt - - status - - started_at - DurableExecutionInvocation: + - execution_ref + - callback_id + - name + - title + additionalProperties: false + PaginatedDurableApprovals: type: object - description: A window in which the function's code was running. properties: - started_at: - type: string - format: date-time - ended_at: - type: string - format: date-time + data: + type: array + items: + $ref: '#/components/schemas/DurableApproval' + page: + type: integer + description: Current page number (1-indexed) + limit: + type: integer + description: Number of items per page + total: + type: integer + description: Total number of items across all pages + has_more: + type: boolean + description: Whether there are more pages available required: - - started_at - - ended_at - FunctionInvocationMode: - type: string - enum: - - rpc - - http - description: | - Invocation contract. `rpc` preserves the existing POST `{payload: ...}` contract; - `http` forwards HTTP request semantics to the function runtime. - FunctionHTTPAuthMode: + - data + - page + - limit + - total + - has_more + DurableMessageName: type: string - enum: - - volcano - - none + minLength: 1 + maxLength: 237 + pattern: ^[ -~]+$ description: | - Authentication applied by the HTTP ingress. `none` is valid only for - HTTP-mode functions with `visibility: public` and is intended for - externally signed webhooks. - FunctionVisibility: + The name a workflow waits on or publishes under: up to 237 printable + ASCII characters. + DurableMessageDirection: type: string enum: - - private - - authenticated - - public + - in + - out x-enum-varnames: - - FunctionVisibilityPrivate - - FunctionVisibilityAuthenticated - - FunctionVisibilityPublic + - DurableMessageDirectionIn + - DurableMessageDirectionOut description: | - Who can invoke the function. Each level admits everything the one - before it does. - - `private`: service keys and the project's schedulers only. The - default for a new function. To any other credential the function - does not exist: it answers 404, like a missing one. - - `authenticated`: also any signed-in user of the project, including - anonymous sign-ins. The function receives their auth context. - - `public`: also anon keys holding `functions.invoke`, and Frontend - Function routes, which forward requests without a credential. - FunctionDeployment: + `in` is a message sent to the execution. `out` is one the execution + published. + DurableMessage: type: object + description: A message sent to, or published by, a durable execution. properties: id: type: string format: uuid - function_id: + execution_id: type: string format: uuid - project_id: + direction: + $ref: '#/components/schemas/DurableMessageDirection' + seq: + type: integer + format: int64 + description: | + Orders the execution's messages in both directions. It increases + with every message but can skip numbers. Pass the last one you read + as `after` to read what came next. + name: type: string - format: uuid - batch_id: + data: + x-go-type: json.RawMessage + x-go-type-skip-optional-pointer: true + nullable: true + description: The JSON value sent or published, or null. + sender: + $ref: '#/components/schemas/DurableMessageSender' + status: + $ref: '#/components/schemas/DurableMessageStatus' + delivered_at: type: string - format: uuid - operation: + format: date-time + nullable: true + description: When the execution received the message. Null until then, and for `out` messages. + sent_at: type: string - enum: - - deploy - - update - - delete - status: + format: date-time + required: + - id + - execution_id + - direction + - seq + - name + - data + - sender + - status + - delivered_at + - sent_at + DurableMessageList: + type: object + properties: + data: + type: array + description: Messages after `after`, oldest first. + items: + $ref: '#/components/schemas/DurableMessage' + has_more: + type: boolean + description: | + Whether more messages follow. Read them with `after` set to the + last message's `seq`. + required: + - data + - has_more + DurableMessageWait: + type: object + description: A wait an execution has open for a message. + properties: + id: type: string - enum: - - queued - - provisioning - - active - - failed - - superseded - - deleting - - deleted - deploy_source: + format: uuid + name: type: string - enum: - - git - - cli - - web - - api - - system - - unknown - description: What initiated this deployment. - initiated_by: + status: + $ref: '#/components/schemas/DurableMessageWaitStatus' + expires_at: type: string - description: Platform user that triggered a request-initiated deployment; absent for git and system deployments. - build_duration_seconds: - type: integer - format: int64 - description: Total build time recorded for this deployment, in seconds. - build_count: - type: integer - description: Number of completed builds included in build_duration_seconds. - build_duration_recorded_at: + format: date-time + nullable: true + description: When the wait times out. Null when the workflow set no timeout. + created_at: type: string format: date-time - description: When the build time was last recorded. - progress: - $ref: '#/components/schemas/DeploymentProgress' - error_message: + required: + - id + - name + - status + - expires_at + - created_at + DurableMessageWaitList: + type: object + properties: + data: + type: array + description: Open waits, oldest first. + items: + $ref: '#/components/schemas/DurableMessageWait' + required: + - data + SendDurableMessageRequest: + type: object + properties: + name: + $ref: '#/components/schemas/DurableMessageName' + data: + x-go-type: json.RawMessage + x-go-type-skip-optional-pointer: true + nullable: true + description: Any JSON value, up to 64 KiB. Omitted means null. + required: + - name + additionalProperties: false + RegisterDurableMessageWaitRequest: + type: object + properties: + execution_ref: type: string - completed_at: + minLength: 1 + maxLength: 2048 + description: Opaque reference to the running execution, supplied by the SDK. + callback_id: type: string - format: date-time - created_at: + minLength: 1 + maxLength: 1024 + description: Opaque wait reference, supplied by the SDK. + name: + $ref: '#/components/schemas/DurableMessageName' + required: + - execution_ref + - callback_id + - name + additionalProperties: false + DurableMessageWaitRegistration: + type: object + description: The registered wait, as the waiting workflow sees it. + properties: + id: type: string - format: date-time - updated_at: + format: uuid + status: + $ref: '#/components/schemas/DurableMessageWaitStatus' + expires_at: type: string format: date-time + nullable: true required: - id - - function_id - - project_id - - operation - status - - deploy_source - - created_at - - updated_at - FunctionInvocationRequest: + - expires_at + OpenDurableMessageSessionRequest: type: object properties: - payload: - type: object - additionalProperties: true - description: | - Payload to send to the function. - - If invoked with auth user token, Volcano automatically injects `__volcano_auth` context: - ```javascript - { - ...yourPayload, - __volcano_auth: { - user_id: "uuid", - email: "user@example.com", - project_id: "uuid", - role: "authenticated" | "anonymous" - } - } - ``` - FunctionInvocationResponse: - type: object - description: Raw function response body returned by the invoked function. - additionalProperties: true - LogActivityBucket: + execution_ref: + type: string + minLength: 1 + maxLength: 2048 + description: Opaque reference to the running execution, supplied by the SDK. + callback_id: + type: string + minLength: 1 + maxLength: 1024 + description: Opaque session reference, supplied by the SDK. + required: + - execution_ref + - callback_id + additionalProperties: false + DurableMessageSessionRegistration: type: object - description: Log-event counts for one activity time bucket. The first and last buckets can extend past the requested window; they count only events inside it. + description: | + The registered session. Its token reaches the workflow through the + workflow itself, never in this response. properties: - start_time: - type: string - format: date-time - description: Bucket start time, inclusive. - end_time: + id: type: string - format: date-time - description: Bucket end time, exclusive. - counts: - type: object - description: Counts grouped by activity dimension. - properties: - levels: - type: object - additionalProperties: - type: integer - description: Counts by normalized log level. - regions: - type: object - additionalProperties: - type: integer - description: Counts by event region. - resource_ids: - type: object - additionalProperties: - type: integer - description: Counts by resource ID. - required: - - levels - - regions - - resource_ids - total: - type: integer - description: Total events in this bucket. + format: uuid required: - - start_time - - end_time - - counts - - total - LogActivityRequest: + - id + PublishDurableMessageRequest: type: object - description: Activity request for bucketed log counts. + properties: + name: + $ref: '#/components/schemas/DurableMessageName' + data: + x-go-type: json.RawMessage + x-go-type-skip-optional-pointer: true + nullable: true + description: Any JSON value, up to 64 KiB. Omitted means null. + required: + - name additionalProperties: false + RegisterDurableCallbackRequest: + type: object properties: - resource: - $ref: '#/components/schemas/LogRequestResource' - q: + execution_ref: type: string - maxLength: 512 - description: Optional activity query. Supports quoted text, implicit AND, AND/OR/NOT, parentheses, and fields such as `level`, `region`, `invocation.id`, `resource.id`, `resource.name`, `function`, `frontend`, `database`, and `body`. - start_time: + minLength: 1 + maxLength: 2048 + description: Opaque reference to the running execution, supplied by the SDK. + callback_id: type: string - format: date-time - description: Start of the window, inclusive. Defaults to 24 hours before `end_time`. - end_time: + minLength: 1 + maxLength: 1024 + description: Opaque reference to the waiting step, supplied by the SDK. + name: + type: string + minLength: 1 + maxLength: 237 + pattern: ^[ -~]+$ + description: The waiting step's name, up to 237 printable ASCII characters. + operation_id: + type: string + minLength: 1 + maxLength: 64 + pattern: ^[0-9a-f]+$ + description: | + The operation an earlier run of the workflow opened the waiting step + under, supplied by the SDK when a replay registers it. Volcano then + looks for the step further back in the execution's history than a + first registration reads. + required: + - execution_ref + - callback_id + - name + additionalProperties: false + DurableCallbackRegistration: + type: object + description: The token for the waiting step, as the workflow receives it. + properties: + token: + $ref: '#/components/schemas/DurableCallbackToken' + expires_at: type: string format: date-time - description: End of the window, exclusive. Defaults to now. - bucket_count: - type: integer - minimum: 1 - maximum: 96 - description: Maximum number of buckets. Defaults to 24. Volcano picks the smallest bucket width from 1s, 2s, 5s, 10s, 15s, 30s, 1m, 2m, 5m, 10m, 15m, 30m, 1h, 2h, 3h, 6h, 12h, 1d, or a whole number of days that covers the window in at most this many buckets. Bucket edges fall on UTC multiples of the width, so they stay fixed as the window moves, and the response can contain fewer buckets. `1` returns one bucket that spans exactly the window. + nullable: true + description: | + When the waiting step's `timeout` passes and the token stops + working. Null when the workflow set no `timeout`. A step with a + heartbeat timeout also ends once that long passes without a + heartbeat, which can be before this time. required: - - resource - LogActivityResponse: + - token + - expires_at + SucceedDurableCallbackRequest: type: object - description: Bucketed runtime log activity. properties: - data: - type: array - items: - $ref: '#/components/schemas/LogActivityBucket' - total: - type: integer - description: Total events counted across all buckets. + token: + $ref: '#/components/schemas/DurableCallbackToken' + result: + x-go-type: json.RawMessage + x-go-type-skip-optional-pointer: true + description: | + Any JSON value other than null, up to 64 KiB. The waiting step + resolves with it. Null is refused because a timeout resolves the + step with null. required: - - data - - total - LogSearchRequest: + - token + - result + additionalProperties: false + FailDurableCallbackRequest: type: object - description: Search request for project logs. + properties: + token: + $ref: '#/components/schemas/DurableCallbackToken' + error: + $ref: '#/components/schemas/DurableCallbackError' + required: + - token + - error + additionalProperties: false + HeartbeatDurableCallbackRequest: + type: object + properties: + token: + $ref: '#/components/schemas/DurableCallbackToken' + required: + - token additionalProperties: false + DurableCallbackOutcome: + type: object properties: + status: + $ref: '#/components/schemas/DurableCallbackStatus' + required: + - status + Issue: + type: object + description: Runtime errors from one function or frontend, grouped by error type and stack, one LavaFlow Code Quality finding, failed builds of one function or frontend with the same first error, a user-reported project problem, or an issue a person wrote. A report or a written issue has a project resource, zero runtime occurrences, and the time it was made as its first and last seen times. + properties: + id: + type: string + format: uuid + project_id: + type: string + format: uuid resource: - $ref: '#/components/schemas/LogRequestResource' - q: + $ref: '#/components/schemas/ResourceReference' + title: + type: string + description: | + The error type and message, with values such as IDs, numbers, and + URLs replaced by placeholders like `` and ``. + error_type: + type: string + description: The exception class, such as `TypeError`. Omitted when the error has none. + culprit: + type: string + description: The innermost frame of your code in the stack, as `function (file)`. For a frontend's Next.js build output, the outermost route or page file of the build in the stack, such as `.next/server/app/checkout/route.js`, or without one, the outermost file of the build. For a minified file of a function's own bundle, the file alone. Omitted without a stack. + status: + $ref: '#/components/schemas/IssueStatus' + source: + allOf: + - $ref: '#/components/schemas/IssueSource' + description: Where the issue came from. A `code_quality` issue's `error_type` is the finding's rule, its `culprit` the enclosing function and file, and its `event_count` the scans that found it. A `build` issue's `title` is the build's first error, its `error_type` the tool's code, such as `TS2322` or `Type error`, its `culprit` the error's `file:line`, its `event_count` the failed deploys, and its `last_deployment_id` the latest of them. + finding: + allOf: + - $ref: '#/components/schemas/IssueFinding' + description: The finding behind a `code_quality` issue. Absent on a `runtime` issue. + description: + type: string + description: What the person who wrote a `request` issue asked for, as they wrote it, trimmed. Omitted for every other source. + exception: + type: boolean + description: | + Whether the issue holds an exception: one your code threw, or one it + logged with `console.error(err)` or Python's `logger.exception()`. + `false` for an error logged any other way, such as a structured log + line, a logger's error line, or a printed traceback, and for every + `code_quality` issue. `true` for every `build` issue: a failed build + stops its deploy as an exception stops a request. Once `true`, it + stays `true`. + event_count: + type: integer + format: int64 + description: Errors counted in this issue. A retried delivery can count an error twice. + first_seen_at: type: string - maxLength: 512 - description: Optional log query. Supports quoted text, implicit AND, AND/OR/NOT, parentheses, and fields such as `level`, `region`, `invocation.id`, `resource.id`, `resource.name`, `function`, `frontend`, `database`, and `body`. - start_time: + format: date-time + last_seen_at: type: string format: date-time - description: Start time. - end_time: + last_region: + type: string + description: The region that served the latest error, such as `us-east-1`. + last_deployment_id: + type: string + format: uuid + description: 'For a `build` issue, the latest deployment that failed in its build step. Omitted for every other issue: runtime errors are not tied to a deployment.' + sample_event_id: + type: string + description: The ID of the latest error's log event, while logs retain it. + sample_event_at: type: string format: date-time - description: End time. - limit: - type: integer - minimum: 1 - maximum: 1000 - default: 100 - description: Maximum number of records to return. - cursor: + description: When the latest error's log event was written. + resolved_at: type: string - description: Opaque pagination cursor from the previous response's `next_cursor`. - required: - - resource - LogStreamRequest: - type: object - description: Stream request for live project logs. Pagination cursors and fixed end times are not supported. - additionalProperties: false - properties: - resource: - $ref: '#/components/schemas/LogRequestResource' - q: + format: date-time + description: When the issue was resolved. Present only while it is resolved. + regressed_at: type: string - maxLength: 512 - description: Optional log query using the same syntax as search and activity requests. - start_time: + format: date-time + description: When a resolved issue was last seen again and reopened. + created_at: + type: string + format: date-time + updated_at: type: string format: date-time - description: Start time. - limit: - type: integer - minimum: 1 - maximum: 1000 - default: 100 - description: Maximum number of records to deliver on connect or reconnect before following new events. required: + - id + - project_id - resource - LogSearchEvent: - allOf: - - $ref: '#/components/schemas/LogEvent' - - type: object - description: Runtime log event returned by project log search. Search results always include a stable event ID and owning resource. - properties: - id: - type: string - description: Opaque stable log event ID for pagination, deduplication, and display. - resource: - $ref: '#/components/schemas/LogResource' - required: - - id - - resource - LogSearchResponse: + - title + - status + - source + - exception + - event_count + - first_seen_at + - last_seen_at + - created_at + - updated_at + IssueStatus: + type: string + enum: + - open + - resolved + - ignored + description: | + `open` until someone resolves or ignores the issue. A resolved issue + seen again reopens. A reported problem resolves when its LavaFlow fix + merges. Volcano ignores one whose report it deleted before any fix + merged, so it no longer counts toward the project's open issues. + IssueSource: + type: string + enum: + - runtime + - code_quality + - build + - report + - request + description: 'Where the issue came from: `runtime` for errors your code logged, `code_quality` for a LavaFlow Code Quality finding in code a deploy changed, `build` for deploys of one function or frontend that failed in its own build step, `report` for a problem reported for the project, such as through Slack, or `request` for an issue a person wrote with `POST /issues`. A later deploy that builds resolves a `build` issue. Deploys Volcano failed, such as a timeout or a refused build, never make one.' + PaginatedIssues: type: object - description: Paginated project runtime log search response. properties: data: type: array items: - $ref: '#/components/schemas/LogSearchEvent' - description: Array of log events sorted by timestamp, newest first. + $ref: '#/components/schemas/Issue' limit: type: integer - description: Number of items requested per page. + description: Number of items per page has_more: type: boolean - description: Whether the search may have more matching log events. A page can hold fewer than `limit` events, or none, while this is true; keep paging until it is false. + description: Whether a next page exists next_cursor: type: string - description: Opaque cursor for the next page, present while `has_more` is true. Send this value as `cursor` on the next request, even when `data` is empty. + description: Opaque cursor for the next page (present if has_more is true) required: - data - limit - has_more - FunctionRegion: + CreateIssueRequest: type: object - required: - - code - - label - - flag + additionalProperties: false + description: The project, and an issue a person writes on it, describing what to fix. properties: - code: + project_id: type: string - example: us-east-1 - description: Region identifier accepted by function APIs. - label: + format: uuid + description: The project to write the issue on. + description: type: string - example: NA-East - description: Human-readable region label suitable for display in pickers. - flag: + minLength: 1 + maxLength: 4000 + description: What to fix, in your words, up to 4,000 characters. It can span lines. Leading and trailing whitespace is trimmed, and a description of only whitespace is refused. + title: type: string - example: 🇺🇸 - description: Country flag emoji associated with the region's geography. - FunctionRuntimeOption: - type: object + minLength: 1 + maxLength: 200 + description: A title, on one line, up to 200 characters; whitespace, line breaks included, collapses to single spaces. Omitted, the title is the description's first line, cut to 80 characters with an ellipsis. required: - - name - - label - - language - - default - - durable_capable - - deployment + - project_id + - description + UpdateIssueRequest: + type: object + additionalProperties: false properties: - name: - type: string - example: nodejs24.x - description: Runtime identifier accepted by function APIs. - label: - type: string - example: Node.js 24 - description: Human-readable runtime label suitable for display in pickers. - language: - type: string - example: nodejs - description: Runtime language family used by the CLI to choose defaults from source files. - default: - type: boolean - description: Whether this runtime is the CLI default for its language. - durable_capable: - type: boolean - description: Whether a durable function can be authored on this runtime. Only runtimes with a durable authoring API report true, and a durable deploy naming any other runtime is rejected. - deployment: - $ref: '#/components/schemas/FunctionRuntimeDeployment' - FunctionRuntimesResponse: + status: + $ref: '#/components/schemas/IssueStatus' + required: + - status + LavaflowAutonomy: + type: string + enum: + - diagnose_only + - open_pr + - merge + description: How far LavaFlow goes on its own. `diagnose_only` stops at a diagnosis. `open_pr` also opens a pull request with a fix, and never merges it. `merge` also merges the fix once LavaFlow's reviewers pass it, its required checks pass, and nothing holds it; a held fix is handed to you for good. LavaFlow merges only into a base branch that requires at least one status check, through branch protection or a ruleset; on any other branch it holds every fix with `no_required_checks`. Turning on merge lets LavaFlow's fixes, including those from runs it starts on its own, run your CI with the secrets your pull request workflows get. Choosing `merge` needs the project's `lavaflow.merge` capability. + LavaflowMergePolicy: type: object + description: 'Your rules for fixes LavaFlow must never merge. They apply with `autonomy: merge`; at another autonomy they are saved and do nothing.' + properties: + human_review_paths: + type: array + maxItems: 50 + items: + type: string + minLength: 1 + maxLength: 200 + description: 'Globs of paths whose change LavaFlow never merges: a fix that changes one is held and handed to you. Paths are relative to the repository root, such as `db/migrations/**`. `*` and `?` match within one directory, `**/` spans any number of directories, and a final `**` matches the rest. A pattern that starts with `/`, `./` or `../`, ends with `/`, holds an empty, `.` or `..` segment, or holds a NUL character answers `400`. Volcano''s own held paths, such as deploy configuration and authentication code, are always held too. Defaults to none.' required: - - runtimes + - human_review_paths + LavaflowMergePolicyUpdate: + type: object + additionalProperties: false + minProperties: 1 + description: 'The merge policy fields to change. An omitted field keeps its saved value. Send `human_review_paths: []` to clear the paths.' properties: - runtimes: + human_review_paths: type: array + maxItems: 50 items: - $ref: '#/components/schemas/FunctionRuntimeOption' - FunctionKindFilter: + type: string + minLength: 1 + maxLength: 200 + LavaflowMergeStatus: type: string enum: - - standard - - durable - description: | - A function kind to filter a list by. Unlike `FunctionKind` it has no - default: omitting the filter includes both kinds. - x-enum-varnames: - - FunctionKindFilterStandard - - FunctionKindFilterDurable - FunctionScheduler: + - waiting_for_checks + - queued + - merged + - held + - stopped + description: '`waiting_for_checks`: LavaFlow waits for the checks on the fix''s commit. `queued`: the fix is in the repository''s merge queue. `merged`: the pull request merged. `held`: something in `hold_reasons` needs a person. LavaFlow commented on the pull request once and never merges, pushes to, rebases or dequeues it again; review it and merge it yourself if you want it. A fix a person merges (its autonomy is `open_pr`, merging was unavailable when it opened, or its run may only open a pull request) is always `held` for `person_merges` once LavaFlow has started its CI, or found it may not. `stopped`: LavaFlow left the pull request open for you, for `reason`.' + LavaflowMergeReason: + type: string + description: 'Why the merge stopped, or what a waiting merge is paused for. A stopped merge leaves the pull request open for you, and LavaFlow never merges, pushes to, rebases or dequeues it again; unless a reason says otherwise, review the change, then merge or close the pull request yourself. `review_unresolved`: LavaFlow''s review didn''t pass the fix; the run''s `review` says why. `checks_failed`: a check on the fix failed. `checks_timed_out`: the checks didn''t all finish within 24 hours. `blocked_by_rules`: a rule of the repository that LavaFlow can''t satisfy blocks the merge. `not_mergeable`: GitHub can''t merge the pull request, for example because it conflicts with its base branch; resolve the conflict first. `branch_behind`: the base branch requires the fix to be up to date with it, and LavaFlow doesn''t update fix branches; update the branch first. `removed_from_queue`: the fix isn''t in the merge queue, and LavaFlow can''t tell why, for example because its checks failed there or someone removed it. `reads_failed`: LavaFlow failed to read the pull request for about an hour while the fix may have been queued, so it took the fix out of the merge queue, when it could still reach it, and stopped, or failed to read the project''s settings or repository for about a day while merging was paused. For a fix a person merges, which LavaFlow never queues, it means only the latter, with its CI start paused instead of merging. `handed_off`: someone drafted or closed the pull request, or moved it to another branch, so LavaFlow stopped; nothing to do. `unreadable`: the pull request has more checks, reviews, labels or commits than LavaFlow reads, so it can''t judge the fix. `permission_missing`: the Volcano GitHub App, or the project owner''s GitHub account, lacks a permission the merge needs; grant the App''s requested permissions and make sure the owner can push. `repository_changed`: the project now deploys from another repository. `settings_changed`: the project''s settings no longer let LavaFlow merge, or, for a fix a person merges, start its CI: LavaFlow was turned off, `autonomy` is no longer `merge` (no longer `open_pr` or `merge` for a fix a person merges), the owner''s plan no longer includes LavaFlow, or the project is being deleted. `request_rejected`: GitHub refused LavaFlow''s request to start the checks on the fix. `ci_start_commit_mismatch`: GitHub reports a different commit from the one LavaFlow made to start the checks. `branch_refused`: LavaFlow didn''t start the fix''s checks because the pull request was no longer open, or its branch isn''t a LavaFlow branch of a pull request LavaFlow opened; LavaFlow never starts checks on the default or production branch. `head_unverified`: GitHub doesn''t report the fix''s head as the signed commit LavaFlow pushed, so LavaFlow didn''t start its checks. `checks_not_started`: LavaFlow couldn''t give the fix a commit message that runs CI. `queue_carries_ci_skip`: the repository''s merge queue could carry an instruction to skip checks, from the fix''s commits or its pull request''s title or description, into the base branch; reword LavaFlow''s commit to drop it and force-push, and take any such instruction out of the title and description, before you queue the fix. `merge_carries_ci_skip`: merging would carry an instruction to skip checks into the base branch, for example because the repository allows no squash merge; reword LavaFlow''s commit to drop it and force-push before you merge. After `request_rejected`, `ci_start_commit_mismatch` or `checks_not_started`, the fix''s CI didn''t start: push a commit to its branch to run it. `paused_too_long`: merging stayed paused for more than 7 days, or, for a fix a person merges, LavaFlow''s CI start for such fixes did. `cancelled`: the project is being deleted, so LavaFlow stopped waiting on the merge; nothing to do. `manual_deploy`: the fix merged and waits for you to deploy it. `paused`: merging is paused, and the merge waits. LavaFlow takes a queued fix out of the merge queue, so it shows `waiting_for_checks`, and queues it again when merging resumes. For a fix a person merges, LavaFlow''s CI start for such fixes is paused instead, whatever merging does, and LavaFlow never takes it out of a queue. New reasons may appear.' + LavaflowHoldReason: type: object + description: One reason LavaFlow holds the fix for a person. properties: - id: - type: string - format: uuid - project_id: + code: type: string - format: uuid - function_id: + description: 'Why the fix is held. `client_reported_commit`: the fix is built on a commit Volcano can''t tie to a push. `path`: it changes a path in `human_review_paths`, or deploy or infrastructure configuration Volcano always holds, such as `volcano-config.yaml`, Terraform files, a YAML or JSON file that declares a resource, a YAML template that mentions `apiVersion` or `kind`, a file in a Helm chart or Kustomize directory, or, in a repository too large to read in full, any file no other path reason holds. `sensitive_path`: it changes another path Volcano always holds: authentication or authorization code, Next.js middleware included; secret, key, certificate or cryptography files; a coding agent''s instructions or settings, or Git hook configuration; CI configuration; a dependency manifest or lockfile, or a `package.json` change to what installs or its install scripts; or runtime, container or other configuration files. `label`: the pull request has the `needs-human-review` label. `no_checks`: no CI ran on it. `required_check_skipped`: a required check was skipped. `no_required_checks`: the base branch requires no check, so passing checks alone don''t vouch for the fix. `changes_requested`: a reviewer requested changes. `repository_requires_approval`: the repository requires an approving review. `person_commits`: someone other than LavaFlow pushed to the fix''s branch. `rules_bypass`: the Volcano GitHub App can bypass a ruleset on the base branch. `unchecked_rules`: the base branch has a rule LavaFlow doesn''t check, such as required signatures. On a fix a person merges it names only rules that kept LavaFlow from starting the fix''s CI, such as `code_scanning` or `workflows`, or that LavaFlow couldn''t read them. `commit_convention`: no title can meet the repository''s commit convention. `ungated_workflows`: the fix opened past workflows that can run it with the repository''s secrets before a person approves it, as the project''s owner allowed, or LavaFlow couldn''t check its workflows, or, when LavaFlow was about to start its CI or add it to a merge queue, a workflow could run it with those secrets before a person approves it or couldn''t be read, so LavaFlow takes it no further and never merges it. A fix held for another reason before its CI starts lists it too when that check, run without starting CI, finds such a workflow or can''t finish. `ci_outside_actions`: when LavaFlow was about to start the fix''s CI, the repository could run CI, a build or a preview outside GitHub Actions: the root of the fix''s tree or its base branch''s holds another service''s configuration, such as `.travis.yml`, `.circleci/` or `netlify.toml`, which `paths` names, another app reported checks or statuses on the base branch, or LavaFlow couldn''t read them in full. LavaFlow starts CI only when it finds no sign of CI outside GitHub Actions, so it never starts this fix''s CI or merges it. `lineage_undoes_parent`: the fix follows up an earlier LavaFlow fix and deletes or changes lines that fix added, which could undo it. `lineage_cap`: the fix''s lineage opened as many pull requests as it may. `lineage_held`: an earlier pull request in the fix''s lineage was held, stopped or closed; one a person merges holds it only when closed. `recent_regressions`: fixes LavaFlow merged in the project recently caused new errors. `no_test`: the fix changes code the repository tests and adds no test, because testing it needs test infrastructure the repository doesn''t have or the change has no effect a test can observe. `choices_to_confirm`: the fix states behavior it decides beyond stopping the error, listed in the run''s `choices` and, on a private repository, under Choices to confirm in the pull request''s description, for a person to confirm, and LavaFlow''s reviewers didn''t all mark each choice as needing no person. It never applies alongside `person_merges`: the person confirms the choices while reviewing the fix. `risky_change`: the fix adds or removes a line that converts a value, such as with `float()` or `parseInt()`, in a file that names a rate limit or quota, authentication or authorization, or money, so values such as NaN, Infinity or a negative number could get past a check there; `paths` names the files. `review_notes`: LavaFlow''s reviewers passed the fix, but its review''s last round left notes, findings below `major` that a later round no longer sends back for revision, such as a decision the fix makes without stating it. `person_merges`: a person reviews and merges the fix, because the project''s autonomy is `open_pr`, merging was unavailable when it opened, or its run may only open a pull request; LavaFlow ran the fix''s CI once first unless another reason, or the CI start''s own checks, stopped it. Other codes name a concern LavaFlow''s reviewers raised. New codes may appear.' + question: type: string - format: uuid - function_kind: + description: 'Why LavaFlow holds the fix and what to check before you merge it, in one or two sentences to show as given. A reviewer''s reason is a question for you to answer. Reads `Hidden: this field matched a secret.` when it holds one of the project''s secret values or a secret gitleaks detects, or when one of its `paths` reads `""`. Every question reads `Hidden: the fix may add a credential.`, LavaFlow''s fixed sentences too, on a run whose `pull_request_skipped` is `possible_credential`.' + paths: + type: array + items: + type: string + description: The changed paths that matched, for a path code. For `ci_outside_actions`, the entries at the repository's root that another CI or preview service reads, whether or not the fix changes them. `""` for a path that holds a control character, one of the project's secret values or a secret gitleaks detects. + required: + - code + - question + - paths + LavaflowMerge: + type: object + description: 'Where the run''s merge stands. Present for a run that may merge its fix, once its pull request opens, and for a run whose fix a person merges (its autonomy is `open_pr`, merging was unavailable when it opened, or the run may only open a pull request) that opened ready for review: LavaFlow starts that fix''s CI once, then holds it for `person_merges` and never merges it.' + properties: + status: + $ref: '#/components/schemas/LavaflowMergeStatus' + reason: allOf: - - $ref: '#/components/schemas/FunctionKind' - description: | - Which collection the scheduled function belongs to. A project-wide - scheduler list mixes both kinds, and this is what says whether the - function is read back from `/projects/{id}/functions` or - `/projects/{id}/durable-functions` — and whether a tick invokes it - or starts a durable execution. - name: - type: string - enabled: + - $ref: '#/components/schemas/LavaflowMergeReason' + nullable: true + hold_reasons: + type: array + items: + $ref: '#/components/schemas/LavaflowHoldReason' + description: Why LavaFlow holds the fix. Empty unless `status` is `held`. + merged_by_lavaflow: type: boolean - schedule_kind: - type: string - enum: - - cron - cron_expression: - type: string - payload: - type: object - additionalProperties: true - regions: + nullable: true + description: 'Whether LavaFlow made the merge: `true` when it merged the fix''s commit itself or through the merge queue, `false` when someone else merged the pull request while LavaFlow waited. `null` unless `status` is `merged`.' + required: + - status + - reason + - hold_reasons + - merged_by_lavaflow + LavaflowInvolvedResource: + type: object + description: A resource a run involves, and how. + properties: + resource: + $ref: '#/components/schemas/LavaflowResourceReference' + roles: type: array + minItems: 1 items: type: string - regions_explicit: - type: boolean - next_run_at: + enum: + - issue + - cause + - fix + description: '`issue`: the issue came from it. `cause`: the issue came from it, or code the diagnosis cites as evidence is in its source. `fix`: the diagnosis proposes changing its source, or the fix changes it; a change to code that every function shares involves every function.' + required: + - resource + - roles + LavaflowIssueSummary: + type: object + description: The project issue a run works on. + properties: + id: type: string - format: date-time - last_started_at: + format: uuid + title: type: string - format: date-time - last_completed_at: + description: 'The issue''s title: the error type and message, a Code Quality finding''s title, or a reported problem''s title.' + culprit: type: string - format: date-time - last_error: + nullable: true + description: The innermost frame of your code, as `function (file)`; for a Code Quality finding, the symbol and file it is in, as `symbol (file)`, or the file alone; for a failed build, its first error's `file:line`. Null for an error without a stack and for a reported problem. + status: + $ref: '#/components/schemas/IssueStatus' + source: + $ref: '#/components/schemas/IssueSource' + severity: type: string - run_count: + enum: + - nit + - minor + - major + - critical + x-enum-varnames: + - LavaflowIssueSeverityNit + - LavaflowIssueSeverityMinor + - LavaflowIssueSeverityMajor + - LavaflowIssueSeverityCritical + description: The confirmed Code Quality finding's recorded severity. Omitted for other issue sources and when no canonical severity is known; absence does not mean the issue has low severity. + event_count: type: integer format: int64 - description: Total number of times this scheduler has executed. 0 for a scheduler that has never run. - created_at: + description: Errors the issue has grouped so far; for a Code Quality finding, the scans that saw it; for a failed build, the failed deploys; 0 for a reported problem. + last_seen_at: type: string format: date-time - updated_at: + resolved_at: type: string format: date-time - FunctionSchedulerListResponse: + nullable: true + description: When the issue was resolved; null unless it is resolved now. + regressed_at: + type: string + format: date-time + nullable: true + description: When the issue was last seen again after it was resolved, and reopened; null if it never was. + run_count: + type: integer + format: int64 + description: LavaFlow runs on this issue, this one included. + required: + - id + - title + - culprit + - status + - event_count + - last_seen_at + - resolved_at + - regressed_at + - run_count + LavaflowSettings: type: object + description: A project's LavaFlow settings. LavaFlow sends this project's logs and source code to an AI service that Volcano operates. properties: - data: - type: array - items: - $ref: '#/components/schemas/FunctionScheduler' - page: - type: integer - limit: - type: integer - total: - type: integer - has_more: + project_id: + type: string + format: uuid + description: The project the settings belong to. + enabled: type: boolean - next_cursor: + description: Whether LavaFlow works on the project's issues. Off by default. + autonomy: + $ref: '#/components/schemas/LavaflowAutonomy' + merge_policy: + $ref: '#/components/schemas/LavaflowMergePolicy' + code_quality: + $ref: '#/components/schemas/LavaflowCodeQualitySettings' + allow_ungated_workflows: + type: boolean + description: 'Whether LavaFlow opens a fix''s pull request even where a workflow could run it, or put its text into a command, with the repository''s secrets before a person approves it. Off by default; while off, such a fix stays on its run and no pull request opens. Only the project''s owner turns it on, signed in as a person: with the platform token `volcano login` stores, or another platform token that expires. It applies to the repository their GitHub account can push to. Connecting the project to another repository, or disconnecting it, turns it off, and connecting the first one again doesn''t turn it back on. Workflows in the repository may then run LavaFlow''s pull requests, or put their text into commands, with the repository''s secrets before a person reviews them. LavaFlow writes those changes from the project''s error logs, which its users can influence. Turn it on only if those workflows keep secrets away from untrusted code; gating them on a label a person adds is safer.' + updated_at: type: string - description: Opaque cursor for the next page (cursor pagination only; present if has_more is true) - prev_cursor: + format: date-time + nullable: true + description: When the settings were last saved, or last changed by connecting a repository. Null until they first are. + updated_by: type: string - description: Opaque cursor for the previous page (cursor pagination only; present when a previous page exists). Send as `ending_before`. + nullable: true + description: The user ID of the person who made the last save; null when no person made it, such as a project access token. + can_update: + type: boolean + description: 'Whether the caller can save the settings: true only for the project''s owner with a platform token while the owner''s account is active; false for any project access token and for a read-only account.' + repository: + allOf: + - $ref: '#/components/schemas/ProjectGitConnectionSummary' + nullable: true + description: The GitHub repository the project is linked to, as `GET /projects/{id}/git-connection` reports it. LavaFlow opens fix pull requests there, against `production_branch`. Null when the project has none. + fix_blocker: + allOf: + - $ref: '#/components/schemas/LavaflowFailure' + nullable: true + description: 'What in the project''s repository setup stops LavaFlow from fixing issues although it is on. Null when the repository setup doesn''t, and while the project''s `lavaflow` capability isn''t available; null doesn''t mean nothing else stops LavaFlow. `message` is text to show as given. `repository_required`: the project has no linked repository. With `autonomy` `open_pr` or `merge`, LavaFlow diagnoses issues but fixes none; turned on for a repository the project no longer links, it starts no runs. Link a repository with `PUT /projects/{id}/git-connection` or `volcano git connect `. Turned on with none, LavaFlow fixes issues in the first one linked, unless `message` asks to turn it on again after the link; linking the one it was turned on for resumes it. `repository_changed`: the project is linked to a repository LavaFlow wasn''t turned on for. LavaFlow starts no runs until the owner turns it on again, with `{"enabled": true}` or `volcano cloud lavaflow enable`, which makes the linked repository the one it fixes. New codes may appear; show the `message` of one you don''t know.' required: - - data - - page - - limit - - total - - has_more - HostedAuthPageType: - type: string - enum: - - login - - signup - - forgot-password - - device - - verify-email - - reset-password - HostedLoginEmailCheckRequest: + - project_id + - enabled + - autonomy + - merge_policy + - code_quality + - allow_ungated_workflows + - updated_at + - updated_by + - can_update + - repository + - fix_blocker + LavaflowSettingsUpdate: type: object - required: - - email + additionalProperties: false + minProperties: 2 + description: The project, and at least one field to change. An omitted field keeps its saved value. properties: - email: + project_id: type: string - format: email - HostedLoginEmailCheckResponse: - type: object - properties: - exists: + format: uuid + description: The project whose settings to change. + enabled: type: boolean - HostedLoginOptionsResponse: + autonomy: + $ref: '#/components/schemas/LavaflowAutonomy' + merge_policy: + $ref: '#/components/schemas/LavaflowMergePolicyUpdate' + code_quality: + $ref: '#/components/schemas/LavaflowCodeQualityUpdate' + allow_ungated_workflows: + type: boolean + description: 'Turns on opening fixes past ungated workflows, for the repository the project is connected to now; it applies only to that repository. Only the project''s owner turns it on, signed in as a person: with the platform token `volcano login` stores, or another platform token that expires. Their GitHub account must be able to push to that repository. A project access token, a platform token that never expires, or anyone else gets `403` with `person_required`. Any of the owner''s credentials turns it off. Workflows in the repository may then run LavaFlow''s pull requests, or put their text into commands, with the repository''s secrets before a person reviews them. LavaFlow writes those changes from the project''s error logs, which its users can influence. Turn it on only if those workflows keep secrets away from untrusted code; gating them on a label a person adds is safer. While LavaFlow is not available, only `false` is saved, and only with `enabled: false`.' + required: + - project_id + LavaflowRunCreate: type: object + additionalProperties: false + description: The project, and the issue to start a run on. properties: - require_email_confirmation: - type: boolean - email_password_enabled: - type: boolean - enable_signup: - type: boolean - post_auth_redirect_url: + project_id: type: string - oauth_providers: - type: array - items: - type: string - HostedRenderablePageType: - type: string - enum: - - signup - - forgot-password - - device - - verify-email - - reset-password - LogEvent: + format: uuid + description: The project the issue belongs to. + issue_id: + type: string + format: uuid + description: The issue to start a run on. + required: + - project_id + - issue_id + LavaflowHeldFixOpen: type: object - description: Historical log event returned by log APIs. + additionalProperties: false + description: The project, the run, and the diff and jobs of the held fix you read, by the digests the run served them with. properties: - id: + project_id: type: string - description: Opaque stable log event ID for pagination, deduplication, and display. - timestamp: + format: uuid + description: The project the run belongs to. + run_id: type: string - format: date-time - description: Event timestamp. - level: - $ref: '#/components/schemas/LiveLogLevel' - body: - description: Application log value. JSON arguments retain their JSON type. Strings containing a serialized JSON object or array are normalized to that object or array; all other strings remain strings. - nullable: true - oneOf: - - type: string - - type: object - additionalProperties: true - - type: array - items: {} - - type: number - format: double - - type: boolean - region: + format: uuid + description: The run whose held fix to open. + diff_sha256: type: string - description: Region where this log event originated. - resource: - $ref: '#/components/schemas/LogResource' - deployment: - $ref: '#/components/schemas/LogDeployment' - invocation_id: + pattern: ^[0-9a-f]{64}$ + description: The run's `diff_sha256`, as it served it. + example: 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 + jobs_sha256: type: string - description: Function invocation ID associated with this log event, when available. + pattern: ^[0-9a-f]{64}$ + description: The run's `held_workflows.jobs_sha256`, as it served it. + example: 2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae required: - - timestamp - - body - LiveLogLevel: - type: string - enum: - - trace - - debug - - info - - warn - - error - - fatal - description: Canonical lowercase function runtime log level. - MetricUsageData: + - project_id + - run_id + - diff_sha256 + - jobs_sha256 + LavaflowDayCounts: type: object - description: Usage data for one metric across totals, daily, and hourly windows. properties: - metric: + date: type: string - description: | - Metric name (for example, "Function & Frontend Invocations", "Frontend Requests", - "Durable Executions", "Durable Operations", "Durable Compute (MB-Seconds)", - "Build Seconds", - "Bandwidth Ingress (Bytes)", "Bandwidth Egress (Bytes)", - "Bandwidth Total (Bytes)", or "Database Storage (Bytes)"). Byte-based metrics are - reported in bytes. "Bandwidth Total (Bytes)" is derived (ingress + egress) and - is not billed separately. The three durable metrics are - counted separately from "Function & Frontend Invocations", which covers standard - invocations only. Operations and compute are counted when an execution finishes, - so they appear in the window the execution completed in rather than the one it - started in. "Durable Compute (MB-Seconds)" reports the memory the execution ran - at times the time it spent running, in megabyte-seconds; the allowance for it is - published in gigabyte-seconds, which is 1024 of these. - "Sandbox Running (MiB-Seconds)", "Sandbox Suspended (Seconds)", and - "Sandbox Uncertain (MiB-Seconds)" report cloud Sandbox usage. Running - reports configured baseline memory times confirmed runtime, not measured - CPU or elastic memory consumption. For sessions admitted after the pricing - release, confirmed running time consumes the account's runtime allowance; - SUPERAGENT overage debits credits according to the account's pricing terms. - Suspended time and uncertain usage do not consume runtime allowance or - debit credits. Uncertain includes observation gaps and unconfirmed state - transitions. Suspended reports duration, not snapshot size; snapshot costs - are included in runtime pricing. Local and platform image-validation - sessions do not contribute. Existing preview sessions remain unbilled, - and preview history is never charged retroactively. Displayed totals are - rounded down after aggregating millisecond measurements; billing uses - unrounded measurements in the monthly account billing cycle. - "Database Storage (Bytes)" is a current observed gauge, - not a cumulative counter. It is the sum of the latest samples exposed as - `storage_bytes` by the project's database list, so it includes what each - database's branches and backups hold, and it inherits that field's lag - behind a live measurement. - total: + format: date + issues_opened: type: integer format: int64 - description: Total usage for the current usage month - all_time: + description: Issues LavaFlow took on that UTC day. + pull_requests_opened: type: integer format: int64 - description: Lifetime cumulative usage across every month for this metric - daily: - type: array - description: Last 30 days of daily usage points - items: - $ref: '#/components/schemas/UsageDataPoint' - hourly: - type: array - description: Last 24 hours of hourly usage points - items: - $ref: '#/components/schemas/UsageDataPoint' + description: Pull requests with a fix LavaFlow opened that UTC day. required: - - metric - - total - - all_time - - daily - - hourly - OAuthConfig: + - date + - issues_opened + - pull_requests_opened + LavaflowStats: type: object properties: - id: - type: string - format: uuid - provider: - type: string - enum: - - google - - github - - microsoft - - apple - - device - client_id: - type: string - example: 123456789.apps.googleusercontent.com - client_secret: - type: string - description: Masked in responses (shows only first/last 4 chars) - example: GOCS...**** - enabled: - type: boolean - redirect_url: + project_id: type: string - format: uri - example: https://yourapp.com/auth/callback - scopes: - type: array - items: - type: string - example: - - openid - - email - - profile - created_at: + format: uuid + description: The project the counts are for. + window_start: type: string - format: date-time - updated_at: + format: date + description: The first UTC day in the window. + window_end: type: string - format: date-time - OAuthErrorResponse: + format: date + description: The last UTC day in the window, today. + days: + type: array + description: One entry per UTC day, oldest first, zeros included. + items: + $ref: '#/components/schemas/LavaflowDayCounts' + outcomes: + $ref: '#/components/schemas/LavaflowOutcomes' + totals: + type: object + properties: + issues_opened: + type: integer + format: int64 + pull_requests_opened: + type: integer + format: int64 + required: + - issues_opened + - pull_requests_opened + required: + - project_id + - window_start + - window_end + - days + - totals + LavaflowResourceReference: type: object + description: A function, durable function or frontend in the project, or the project of a user-reported problem. properties: - error: + type: type: string - error_description: + enum: + - function + - durable_function + - frontend + - project + id: + type: string + format: uuid + name: type: string required: - - error - PaginatedAuthUsers: + - type + - id + - name + LavaflowAnomaly: type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/AuthUser' - page: - type: integer - description: Current page number (1-indexed) - limit: - type: integer - description: Number of items per page - total: - type: integer - description: Total number of items across all pages - has_more: + flagged: type: boolean - description: Whether there are more pages available - next: + reason: type: string - description: URL path to next page (only present if has_more is true) + nullable: true + description: Why the resource is flagged, null when it is not. required: - - data - - page - - limit - - total - - has_more - PaginatedDatabases: + - flagged + - reason + LavaflowResource: type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/Database' - page: - type: integer - description: Current page number (1-indexed) - limit: - type: integer - description: Number of items per page - total: - type: integer - description: Total number of items across all pages - has_more: - type: boolean - description: Whether there are more pages available - next: - type: string - description: URL path to next page (only present if has_more is true) - next_cursor: + project_id: type: string - description: Opaque cursor for the next page (cursor pagination only; present if has_more is true) - prev_cursor: + format: uuid + description: The project the resource belongs to. + resource: + $ref: '#/components/schemas/LavaflowResourceReference' + last_analyzed_at: type: string - description: Opaque cursor for the previous page (cursor pagination only; present when a previous page exists). Send as `ending_before`. + format: date-time + nullable: true + description: When a LavaFlow run last started on the resource, null if never. + issues_opened: + type: integer + format: int64 + description: Issues LavaFlow took on in the window. + pull_requests_opened: + type: integer + format: int64 + description: Pull requests with a fix LavaFlow opened in the window. + anomaly: + $ref: '#/components/schemas/LavaflowAnomaly' required: - - data - - page - - limit - - total - - has_more - PaginatedFrontendDeployments: + - project_id + - resource + - last_analyzed_at + - issues_opened + - pull_requests_opened + - anomaly + LavaflowResourceList: type: object properties: data: type: array items: - $ref: '#/components/schemas/FrontendDeployment' - page: - type: integer - description: Current page number (1-indexed) - limit: - type: integer - description: Number of items per page - total: - type: integer - description: Total number of items across all pages - has_more: - type: boolean - description: Whether there are more pages available - next: - type: string - description: URL path to next page (only present if has_more is true) + $ref: '#/components/schemas/LavaflowResource' required: - data - - page - - limit - - total - - has_more - PaginatedFrontends: + LavaflowRunStatus: + type: string + enum: + - queued + - diagnosing + - fixing + - reviewing + - pr_open + - completed + - failed + - cancelled + description: Where a run is. `diagnosing`, `fixing` and `reviewing` are the stages of a running run. `pr_open` means its pull request is open; `completed` means it finished, with no pull request or one that was merged or closed. + LavaflowPullRequest: type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/Frontend' - page: - type: integer - description: Current page number (1-indexed) - limit: - type: integer - description: Number of items per page - total: + number: type: integer - description: Total number of items across all pages - has_more: - type: boolean - description: Whether there are more pages available - next: + format: int64 + url: type: string - description: URL path to next page (offset pagination only; present if has_more is true) - next_cursor: + format: uri + branch: type: string - description: Opaque cursor for the next page (cursor pagination only; present if has_more is true) - prev_cursor: + description: The recorded pull request branch. Omitted when it was not recorded, the run's fix is withheld because it may add a credential, or the branch name holds one of the project's secret values or a secret gitleaks detects. It is never shortened. + state: type: string - description: Opaque cursor for the previous page (cursor pagination only; present when a previous page exists). Send as `ending_before`. + enum: + - open + - merged + - closed + opened_at: + type: string + format: date-time + nullable: true + description: When the run opened the pull request, null for one opened before LavaFlow recorded the time. + merged_at: + type: string + format: date-time + nullable: true + description: When the pull request merged; null unless `state` is `merged`. + deployed_at: + type: string + format: date-time + nullable: true + description: 'When the merged fix went live: the first live deployment of the issue''s resource that includes it finished. When more than 20 deployments went live between the merge and the one LavaFlow found the fix in, LavaFlow can''t tell which first included it, and this is the merge time. Null until LavaFlow finds the fix live, and for a pull request that didn''t merge. A later live deployment can be verified even more than a week after the merge. Unverifiable or exhausted evidence remains unknown.' + draft: + type: boolean + nullable: true + description: Whether the pull request is a draft, as GitHub last reported it to LavaFlow. Null for one opened before LavaFlow recorded it. + draft_reason: + allOf: + - $ref: '#/components/schemas/LavaflowDraftReason' + nullable: true + description: Why the pull request is a draft, null unless `draft` is true. required: - - data - - page - - limit - - total - - has_more - PaginatedFunctionDeployments: + - number + - url + - state + - opened_at + - merged_at + - deployed_at + - draft + - draft_reason + LavaflowRunMode: + type: string + enum: + - live + - code_quality + description: 'What the run works on: `live` for an issue seen in the project''s logs, `code_quality` for a Code Quality finding.' + LavaflowRunCategory: + type: string + enum: + - bug + - performance + - security + - improvement + - configuration + - dependency + - external + description: 'What kind of problem the run works on. `bug`: the project''s code is wrong. `performance`: the code is too slow or uses too much. `security`: the code exposes data or access it shouldn''t. `improvement`: the code mishandles an edge case or an outside failure, or, for a reported problem''s run, its reporter asked for new content or functionality (`diagnosis.requested`). `configuration`: a setting, variable or manifest value is wrong or missing. `dependency`: a package or its version causes it. `external`: a service outside the project fails and no repository change is right. A Code Quality run''s is its finding''s, `bug` or `improvement`. Any other run''s is `dependency` or `configuration` for a fix that changes only such files, else the kind its diagnosis names. New values may appear; treat an unknown value as uncategorized.' + LavaflowDraftReason: + type: string + enum: + - open_pr + - review_unresolved + - converted_to_draft + x-enum-varnames: + - LavaflowDraftReasonOpenPr + - LavaflowDraftReasonReviewUnresolved + - LavaflowDraftReasonConvertedToDraft + description: 'Why a run''s pull request is a draft. `open_pr`: LavaFlow doesn''t merge the fix, because the project''s autonomy is `open_pr`, merging was unavailable when it opened, or the run may only open a pull request, and its review didn''t pass, LavaFlow''s CI start for fixes a person merges wasn''t available when it opened, or the repository may run CI or previews outside GitHub Actions (or LavaFlow couldn''t check whether it does) when it opened; or it was already a draft when the run took it on. It waits for a person to review it and mark it ready. `review_unresolved`: LavaFlow''s review didn''t pass the fix, so LavaFlow never merges it; a person decides whether to finish it. `converted_to_draft`: LavaFlow opened it ready for review, and someone made it a draft since.' + LavaflowSkipReason: + type: string + enum: + - diagnose_only + - not_fixable + - low_confidence + - no_patch + - possible_credential + - possible_personal_data + - ungated_workflows + - convention_unsatisfiable + - pull_request_open + - source_unavailable + - permission_missing + - repository_changed + - publish_failed + - lineage_cap + - lineage_held + - review_unresolved + - duplicate_in_repository + - security_finding + x-enum-varnames: + - LavaflowSkipReasonDiagnoseOnly + - LavaflowSkipReasonNotFixable + - LavaflowSkipReasonLowConfidence + - LavaflowSkipReasonNoPatch + - LavaflowSkipReasonPossibleCredential + - LavaflowSkipReasonPossiblePersonalData + - LavaflowSkipReasonUngatedWorkflows + - LavaflowSkipReasonConventionUnsatisfiable + - LavaflowSkipReasonPullRequestOpen + - LavaflowSkipReasonSourceUnavailable + - LavaflowSkipReasonPermissionMissing + - LavaflowSkipReasonRepositoryChanged + - LavaflowSkipReasonPublishFailed + - LavaflowSkipReasonLineageCap + - LavaflowSkipReasonLineageHeld + - LavaflowSkipReasonReviewUnresolved + - LavaflowSkipReasonDuplicateInRepository + - LavaflowSkipReasonSecurityFinding + description: 'Why a finished run opened no pull request, with what you can do next. `diagnose_only`: the project''s `autonomy` was `diagnose_only` when the run was queued, or became it before the pull request opened, so LavaFlow only diagnosed the issue; read the diagnosis. For later runs to open pull requests, send `"autonomy": "open_pr"` to `PATCH /lavaflow/settings`, or run `volcano cloud lavaflow settings set --autonomy open_pr`. `not_fixable`: the diagnosis found no change in the code that fixes the error, for example because the cause is outside it; read the diagnosis. `low_confidence`: the diagnosis is not confident enough to propose a fix; read the diagnosis. `no_patch`: LavaFlow proposed no change; read the diagnosis. `possible_credential`: the fix held what looks like a credential or a project secret, so LavaFlow pushed nothing; apply the fix yourself from the diagnosis. `possible_personal_data`: the fix adds an email address the repository lacks, and the repository isn''t private, so LavaFlow pushed nothing; apply the fix yourself. `ungated_workflows`: a workflow could run the fix with the repository''s secrets before a person approves it; gate the workflow on a label a person adds, or turn on `allow_ungated_workflows`. `convention_unsatisfiable`: LavaFlow would merge the fix, but no title can meet the repository''s commit convention, so it kept the fix on the run; apply the fix yourself, or relax the convention. `pull_request_open`: when the run checked, before opening a pull request, another LavaFlow pull request for the issue was open, or merged and not yet deployed, so this run opened none; a fix it wrote stays on the run. That pull request may have closed since; find it with `GET /lavaflow/runs?project_id=…&issue_id=…`, whose runs carry their `pull_request`. Review it, or close it if you don''t want it. `source_unavailable`: LavaFlow couldn''t read, or open a fix on, the code that served the error; the run''s `source_unavailable` says why and what to do. `permission_missing`: the Volcano GitHub App, or the project owner''s GitHub account, lacks a permission LavaFlow needs; grant the App''s requested permissions and make sure the owner can push to the repository. `repository_changed`: the project no longer deploys from the repository the run read; a new run uses the current one. `publish_failed`: opening the pull request failed; a new run tries again. `lineage_cap`: LavaFlow opened as many pull requests in this fix''s lineage as it may; review the lineage''s pull requests and fix the rest yourself. `lineage_held`: an earlier pull request in this fix''s lineage was held, stopped or closed (one a person merges holds it only when closed), so LavaFlow opens no more in it; apply the fix yourself from the diagnosis. `review_unresolved`: LavaFlow''s review didn''t pass a Code Quality fix; read the diagnosis. `duplicate_in_repository`: when the run checked, another project on the repository already had the Code Quality pull request for the same finding; review that pull request in the repository. `security_finding`: the finding has security impact and the repository isn''t private, so the fix would disclose it; fix it yourself. New reasons may appear.' + LavaflowRunSummary: type: object properties: - data: + id: + type: string + format: uuid + project_id: + type: string + format: uuid + description: The project the run belongs to. + status: + $ref: '#/components/schemas/LavaflowRunStatus' + resource: + $ref: '#/components/schemas/LavaflowResourceReference' + issue_id: + type: string + format: uuid + title: + type: string + nullable: true + description: 'Names the problem the run worked on, in at most 80 characters: its diagnosis'' title, else the title of the fix it proposed, else the first line or sentence of its diagnosis'' summary. A sentence too long for a title ends at its last clause that fits, or, with none, is cut at a word and ends with `…`. Null while none is known. Reads `Hidden: this field matched a secret.` when it or the text it comes from holds one of the project''s secret values or a secret gitleaks detects.' + fix_summary: + type: string + maxLength: 80 + description: 'The saved proposed fix''s title, on one line of at most 80 characters. This describes a proposal, not a verified fix, successful review, merge or deployment. It never falls back to the diagnosis. Omitted when no saved patch title is known. Reads `Hidden: this field matched a secret.` when the full title or the shortened one holds one of the project''s secret values or a secret gitleaks detects, and `Hidden: the fix may add a credential.` when the fix is held for one. A shortened value ends with `…`.' + created_at: + type: string + format: date-time + finished_at: + type: string + format: date-time + nullable: true + pull_request: + allOf: + - $ref: '#/components/schemas/LavaflowPullRequest' + nullable: true + merge: + allOf: + - $ref: '#/components/schemas/LavaflowMerge' + nullable: true + mode: + $ref: '#/components/schemas/LavaflowRunMode' + category: + allOf: + - $ref: '#/components/schemas/LavaflowRunCategory' + nullable: true + description: A Code Quality run carries its finding's from the start. Any other run's is null until LavaFlow records a diagnosis. Runs from before categories get one when their diagnosis names one or their saved fix's paths imply one, and stay null only when neither does. + resources: type: array + description: 'Every resource the run involves: the issue''s first, then by name. A run without a recorded diagnosis lists only the issue''s. For a run whose report came from what it saved rather than its source, such as one from before involved resources were recorded, the list may leave out frontends and the functions involved through shared code or the build root''s dependency files.' items: - $ref: '#/components/schemas/FunctionDeployment' - page: - type: integer - description: Current page number (1-indexed) - limit: - type: integer - description: Number of items per page - total: - type: integer - description: Total number of items across all pages - has_more: - type: boolean - description: Whether there are more pages available - next: - type: string - description: URL path to next page (only present if has_more is true) - required: - - data - - page - - limit - - total - - has_more - PaginatedFunctions: + $ref: '#/components/schemas/LavaflowInvolvedResource' + issue: + allOf: + - $ref: '#/components/schemas/LavaflowIssueSummary' + nullable: true + description: Null only for a run that works on no issue. + progress: + allOf: + - $ref: '#/components/schemas/LavaflowRunProgress' + nullable: true + description: Where a run LavaFlow is still working on stands; null once it has nothing left to do. + pull_request_skipped: + allOf: + - $ref: '#/components/schemas/LavaflowSkipReason' + nullable: true + description: Why a finished run opened no pull request. A `completed` run without `pull_request` always has one; it is `diagnose_only` when the project's `autonomy` stopped the run at its diagnosis. Null when the run opened a pull request, while it is queued or runs, and when it failed or was cancelled. + lineage: + allOf: + - $ref: '#/components/schemas/LavaflowLineage' + nullable: true + description: The fix lineage the run belongs to. Null for a run in no lineage. + fix_outcome: + allOf: + - $ref: '#/components/schemas/LavaflowFixOutcome' + nullable: true + description: How the run's merged fix fared once it went live. Null until a merged fix goes live with the `lavaflow.lineage` capability on. Also null, meaning unknown, when the fix is first found live only after its 14-day watch ended and its issue neither resolved as of go-live nor was last seen inside the watch. + required: + - id + - project_id + - status + - resource + - issue_id + - title + - created_at + - finished_at + - pull_request + - merge + - mode + - category + - resources + - issue + - progress + - pull_request_skipped + - lineage + - fix_outcome + LavaflowLogLine: type: object properties: - data: - type: array - items: - $ref: '#/components/schemas/Function' - page: - type: integer - description: Current page number (1-indexed) - limit: - type: integer - description: Number of items per page - total: - type: integer - description: Total number of items across all pages - has_more: - type: boolean - description: Whether there are more pages available - next: + timestamp: type: string - description: URL path to next page (only present if has_more is true) - next_cursor: + format: date-time + nullable: true + level: type: string - description: Opaque cursor for the next page (cursor pagination only; present if has_more is true) - prev_cursor: + message: type: string - description: Opaque cursor for the previous page (cursor pagination only; present when a previous page exists). Send as `ending_before`. required: - - data - - page - - limit - - total - - has_more - PaginatedDurableFunctions: + - timestamp + - level + - message + LavaflowDiagnosis: type: object + description: 'Each text reads `Hidden: this field matched a secret.` in place of all of it when it holds one of the project''s secret values or a secret gitleaks'' default rules detect; the other texts are served as written. A log line''s `level` reads `""` then.' properties: - data: + summary: + type: string + root_cause: + type: string + evidence: type: array items: - $ref: '#/components/schemas/DurableFunction' - page: - type: integer - description: Current page number (1-indexed) - limit: - type: integer - description: Number of items per page - total: - type: integer - description: Total number of items across all pages - has_more: + type: string + log_lines: + type: array + description: Empty for now. `evidence` cites the log lines the diagnosis relies on. + items: + $ref: '#/components/schemas/LavaflowLogLine' + requested: type: boolean - description: Whether there are more pages available + description: Whether the run makes a change its report's reporter asked for in their own words, such as new content or functionality, rather than fixing a defect. Only a reported problem's run can set it, and only from what the person who mentioned LavaFlow wrote. required: - - data - - page - - limit - - total - - has_more - PaginatedDurableExecutions: + - summary + - root_cause + - evidence + - log_lines + - requested + LavaflowReview: type: object properties: - data: + verdict: + type: string + enum: + - passed + - changes_requested + - blocked + - error + description: The last review round's verdict. `blocked` means a critical or major finding stops the fix; `changes_requested` means only minor findings do; `error` means a reviewer failed without a blocking finding, or no reviewer could run. + rounds: + type: integer + description: The review rounds that ran, 0 when no reviewer could run. + stopped: + allOf: + - $ref: '#/components/schemas/LavaflowReviewStop' + nullable: true + description: Why the review ended without passing the fix, null when it passed the fix or when the run saved no fix. + open_findings: type: array + x-go-type-skip-optional-pointer: true items: - $ref: '#/components/schemas/DurableExecution' - page: - type: integer - description: Current page number (1-indexed) - limit: - type: integer - description: Number of items per page - total: - type: integer - description: Total number of items across all pages - has_more: - type: boolean - description: Whether there are more pages available + $ref: '#/components/schemas/LavaflowReviewFinding' + description: 'The findings the review saved with the fix left open. When the review passed the fix, the notes its last round left: findings below `major` that a later round no longer sends back, which hold a fix under `autonomy: merge` with `review_notes`. Absent when the review left none open, or the run saved no fix.' + person_reasons: + type: array + x-go-type-skip-optional-pointer: true + items: + $ref: '#/components/schemas/LavaflowReviewPersonReason' + description: What the review saved with the fix asks a person to decide before the fix merges. Absent when it asks nothing or the run saved no fix. + observations: + type: array + x-go-type-skip-optional-pointer: true + items: + type: string + description: 'The reviewers'' observations on the fix saved with the run: follow-ups that don''t hold the fix, such as bad data stored before it or a related problem elsewhere. They aren''t findings, unlike a minor finding that blocks nothing. Each reads `Hidden: this field matched a secret.` when it holds one of the project''s secret values or a secret gitleaks detects, and `Hidden: the fix may add a credential.` when the run is held with `possible_credential`. Absent when there are none or the run saved no fix.' required: - - data - - page - - limit - - total - - has_more - DurableApproval: + - verdict + - rounds + - stopped + LavaflowReviewFinding: type: object - description: An approval a durable workflow requested. + description: 'A finding the review left open, in the reviewer''s words. `explanation` reads `Hidden: this field matched a secret.` when it holds one of the project''s secret values or a secret gitleaks detects, or when `file` reads `""`, and `Hidden: the fix may add a credential.` when the run is held with `possible_credential`.' properties: - id: + severity: type: string - format: uuid - status: - $ref: '#/components/schemas/DurableApprovalStatus' - name: - type: string - description: | - The name the workflow gave the approval in `ctx.waitForApproval`. - title: + enum: + - nit + - minor + - major + - critical + x-enum-varnames: + - LavaflowReviewFindingSeverityNit + - LavaflowReviewFindingSeverityMinor + - LavaflowReviewFindingSeverityMajor + - LavaflowReviewFindingSeverityCritical + file: type: string - description: + nullable: true + description: The file the finding is about, null when it is about no file. `""` when the path holds a control character, one of the project's secret values or a secret gitleaks detects. + line: + type: integer + nullable: true + description: The line of `file` the finding is about, null when it is about no one line. + explanation: type: string - details: - description: | - The JSON value the workflow attached for the person deciding, as - given. - function: - $ref: '#/components/schemas/DurableApprovalFunction' - execution: - $ref: '#/components/schemas/DurableApprovalExecution' - requested_at: + required: + - severity + - file + - line + - explanation + LavaflowReviewPersonReason: + type: object + description: 'One decision the review leaves to a person. `question` reads `Hidden: this field matched a secret.` when it holds one of the project''s secret values or a secret gitleaks detects, and `Hidden: the fix may add a credential.` when the run is held with `possible_credential`.' + properties: + kind: type: string - format: date-time - expires_at: + description: '`irreversible`: merging the fix itself does what a revert can''t undo, such as deleting or migrating stored data. `trust_boundary`: it changes authentication, authorization, secrets, who can reach what, or rate limits, quotas or other abuse controls, including whether they fail open. `breaks_contract`: it removes or renames an existing field, status, event, or accepted input that other code or users rely on, or changes what one means, or it newly rejects a request the code could serve before it, or input it served even when its documentation marks that input invalid, with a client error, validation error, or limit, or drops or skips records the code handled. `billing`: it touches payments, pricing, metering, or charges. `unexplained`: it changes behavior that neither the diagnosis nor the fix''s stated choices justify, and that the code doesn''t support. `not_reviewable`: it couldn''t be reviewed closely. New kinds may appear.' + question: type: string - format: date-time - nullable: true - description: | - When the approval expires if nobody decides. Null when the - workflow set no timeout; the approval then lasts as long as its - execution. - decision: - $ref: '#/components/schemas/DurableApprovalDecision' + description: What the person decides, written to show as given. required: - - id - - status - - name - - title - - description - - function - - execution - - requested_at - - expires_at - - decision - DurableApprovalStatus: + - kind + - question + LavaflowReviewStop: type: string enum: - - pending - - approved - - denied - - expired - - cancelled - description: | - `pending` means the workflow is waiting for a decision. `approved` and - `denied` are decisions a person made. `expired` means the workflow's - approval timeout passed first, and `cancelled` means the execution - ended while the approval was still pending. Every status but `pending` - is final. - DurableApprovalRegistration: + - rounds + - no_revision + - budget_exhausted + - context_limit + - timed_out + - reviewers_failed + - too_few_reviewers + - unreadable + x-enum-varnames: + - LavaflowReviewStopRounds + - LavaflowReviewStopNoRevision + - LavaflowReviewStopBudgetExhausted + - LavaflowReviewStopContextLimit + - LavaflowReviewStopTimedOut + - LavaflowReviewStopReviewersFailed + - LavaflowReviewStopTooFewReviewers + - LavaflowReviewStopUnreadable + description: 'Why a run''s review ended without passing its fix. `rounds`: the last review round still found problems. `no_revision`: LavaFlow gave no revised fix. `budget_exhausted`: the run used its token budget before LavaFlow could revise the fix; this is the run''s own budget, not the project''s daily spend limit. `context_limit`: the fix''s conversation grew too long for the model before LavaFlow could revise it. `timed_out`: the run''s time for review ran out. `reviewers_failed`: no reviewer of the last round finished. `too_few_reviewers`: fewer reviewers could run than a round needs to pass the fix. `unreadable`: a retried run could not read the review saved with its fix, so a person must review it. More values may be added: treat a value you don''t know as other.' + LavaflowFailure: type: object - description: The registered approval, as the requesting workflow sees it. properties: - id: + code: type: string - format: uuid + description: Stable code, such as `timed_out` or `feature_paused`. + message: + type: string + description: Text to show for the code. + required: + - code + - message + LavaflowRepositoryChecks: + type: object + description: Whether LavaFlow ran the repository's own checks, such as its tests, on a fix itself, before it opened a pull request or held the fix, and what they found. When LavaFlow ran them more than once, this is the last time the run's last attempt ran them; `not_run` when that attempt didn't, or while the run is queued or running. CI that runs on the pull request afterwards is the repository's own. + properties: status: - $ref: '#/components/schemas/DurableApprovalStatus' - expires_at: type: string - format: date-time - nullable: true + description: '`passed`: every command the checks ran passed. `failed`: a command failed or timed out; `commands` shows which. `no_checks_found`: LavaFlow found no checks in the repository to run. `not_run`: LavaFlow did not run the repository''s checks on the fix, for the reason `reason` names. Treat a status you don''t know as `not_run`.' + reason: + type: string + description: 'Stable code for why the checks did not run, present only when `status` is `not_run`. `dependencies_changed`: the fix changes the repository''s dependencies. `dependencies_not_installed`: LavaFlow couldn''t install the repository''s dependencies. `run_deadline`: the run reached its time limit. `sandbox_capacity`: no sandbox slot was free in time to run them. `sandbox_budget`: LavaFlow''s sandbox allowance for checks was used up. `sandbox_not_isolated`: LavaFlow couldn''t confirm the sandbox was isolated. `sandbox_plan_limit`: LavaFlow couldn''t start a sandbox large enough to run them. `sandbox_unavailable`: LavaFlow couldn''t run them itself. `source_too_large`: the repository is too large to copy into a sandbox. `source_unavailable`: LavaFlow couldn''t fetch the fix''s source to check it, as when the repository was disconnected or changed during the run. `tool_unavailable`: a tool the checks need isn''t available. New reasons may appear; treat one you don''t know like any other `not_run`.' + message: + type: string + description: 'Text to show for the status and reason. It names the pull request when one opened. For `not_run` on a fix whose pull request opened, a second sentence says what became of the repository''s CI there, as the run stands when read: whether LavaFlow started it, tried to, may still, or won''t.' + revised: + type: boolean + x-go-type-skip-optional-pointer: true + description: Present and `true` only when `status` is `failed` and LavaFlow then revised the fix once without running the checks again. `status` and `commands` describe that earlier version, not the fix as saved, which the checks never ran on. + commands: + type: array + x-go-type-skip-optional-pointer: true + items: + $ref: '#/components/schemas/LavaflowRepositoryCheckCommand' + description: The commands the checks ran, in order. Absent when LavaFlow recorded none, as for `no_checks_found` and `not_run`. required: - - id - status - - expires_at - DurableApprovalStats: + - message + LavaflowRepositoryCheckCommand: type: object + description: 'One command the repository''s checks ran. `command` and `output` are the repository''s own text, served as LavaFlow recorded it. Each reads `Hidden: this field matched a secret.` when it holds one of the project''s secret values or a secret gitleaks detects, and `Hidden: the fix may add a credential.` when the run is held with `possible_credential`.' properties: - from: + command: type: string - format: date-time - to: + description: The command as LavaFlow ran it. + status: type: string - format: date-time - counts: - $ref: '#/components/schemas/DurableApprovalCounts' - approval_rate: - type: number - format: double - nullable: true - description: | - `approved / (approved + denied)`, from 0 to 1. Null when nothing in - the window was decided. - median_seconds_to_decision: - type: number - format: double - nullable: true - description: Median time from request to decision. Null when nothing was decided. - p90_seconds_to_decision: - type: number - format: double + description: '`passed`: the command succeeded. `failed`: it exited with an error. `timed_out`: it ran past its time limit, and LavaFlow stopped it. Treat a status you don''t know as `failed`.' + exit_code: + type: integer nullable: true - description: 90th percentile time from request to decision. Null when nothing was decided. - functions: + description: The code the command exited with, null when it gave none, as a command that timed out may not. + output: + type: string + description: The end of what the command printed, present only when `status` is `failed` or `timed_out` and LavaFlow kept it; `""` when it printed nothing. + required: + - command + - status + - exit_code + LavaflowRun: + allOf: + - $ref: '#/components/schemas/LavaflowRunSummary' + - type: object + properties: + source_commit: + allOf: + - $ref: '#/components/schemas/LavaflowSourceCommit' + nullable: true + description: The commit the run read the code at. Null when it read none, as for a run that diagnosed from the logs alone. + diagnosis: + allOf: + - $ref: '#/components/schemas/LavaflowDiagnosis' + nullable: true + diff: + type: string + nullable: true + description: The fix LavaFlow saved, as the unified diff its reviewers read, cut short past 256 KiB as they read it, with a last line that starts with `[diff truncated`. When a file's changes hold one of the project's secret values or a secret gitleaks detects, every change to that file is left out, with one line in their place that starts with `# LavaFlow withheld` and names the file; an older fix also keeps the files it was saved with as withheld. A run held with `possible_credential` leaves out every file. Null for a run with no saved fix, or one saved before LavaFlow kept its diff. + diff_sha256: + type: string + nullable: true + pattern: ^[0-9a-f]{64}$ + description: The SHA-256, in hex, of `diff` exactly as served, its UTF-8 bytes. Null whenever `diff` is. + example: 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 + diff_truncated: + type: boolean + description: '`diff` was cut short, so it does not show the whole fix. False when `diff` is null.' + diff_withheld: + type: array + items: + type: string + description: The files whose changes `diff` leaves out, by path, as its `# LavaFlow withheld` lines name them; an empty string for a file whose path holds a secret. Empty when `diff` shows every file, or is null. + choices: + type: array + x-go-type-skip-optional-pointer: true + items: + type: string + description: 'The behavior the saved fix says it decides beyond stopping the error, one plain sentence each. Under `autonomy: merge`, a fix is held with `choices_to_confirm` for a person to confirm these only when LavaFlow''s reviewers didn''t all mark each one as needing no person; a fix they all cleared merges without a person. A person who merges the fix confirms them as they review it. Each reads `Hidden: this field matched a secret.` when it holds one of the project''s secret values or a secret gitleaks detects, and `Hidden: the fix may add a credential.` when the run is held with `possible_credential`. Absent when the fix states none or the run saved no fix.' + not_fixed: + type: string + nullable: true + description: Where the saved fix says the defect starts outside its changes, such as code that writes records in the wrong shape, and why the fix leaves it, in one plain sentence. Masked as `choices` is. Null when the fix says nothing is left or the run saved no fix. + review: + allOf: + - $ref: '#/components/schemas/LavaflowReview' + nullable: true + description: The review of the run's fix. When no reviewer could run, it still says why in `stopped`. Null when no review ran. + repository_checks: + allOf: + - $ref: '#/components/schemas/LavaflowRepositoryChecks' + nullable: true + description: Whether LavaFlow ran the repository's own checks on the fix itself. Null for a run with no fix. + failure: + allOf: + - $ref: '#/components/schemas/LavaflowFailure' + nullable: true + description: Why the run stopped or waits, null when nothing went wrong. + changed_files: + type: array + items: + type: string + description: Repository paths the fix changes, sorted; empty without a fix. A path that holds a secret is listed as "", as `diff_withheld` lists it, and so is every path when `diff` can't tell the fix's files apart. A file past a truncated `diff`'s cut is listed. + ungated_workflows: + type: array + nullable: true + items: + $ref: '#/components/schemas/LavaflowAllowedWorkflow' + description: The workflow jobs the run's pull request opened past because the project's owner allowed ungated workflows, the first one on each branch or commit checked. Empty when none or when the run opened no pull request. Null when there is no record of the workflows its pull request opened past, as for pull requests opened before LavaFlow recorded them. Under the merge stage, LavaFlow holds such a fix as unchecked, with `ungated_workflows`. + lineage_evidence: + allOf: + - $ref: '#/components/schemas/LavaflowLineageEvidence' + nullable: true + description: What tied the run's issue to a recent LavaFlow fix's deploy. Null when nothing did, and for a recurrence, whose issue came back after the fix. + held_workflows: + allOf: + - $ref: '#/components/schemas/LavaflowHeldWorkflows' + nullable: true + description: For a run whose `pull_request_skipped` is `ungated_workflows`, every workflow job that held its fix. Null for any other run, and for a held run whose workflows LavaFlow couldn't read to the end, such as one with a workflow it couldn't parse, or more than 256 such jobs. + source_unavailable: + allOf: + - $ref: '#/components/schemas/LavaflowSourceUnavailable' + nullable: true + description: For a run whose `pull_request_skipped` is `source_unavailable`, why LavaFlow couldn't read, or open a fix on, the code that served the error. Null for any other run, for a run recorded before LavaFlow kept the reason, and when LavaFlow couldn't tell why. + required: + - source_commit + - diagnosis + - diff + - diff_sha256 + - diff_truncated + - diff_withheld + - not_fixed + - review + - repository_checks + - failure + - changed_files + - ungated_workflows + - lineage_evidence + - held_workflows + - source_unavailable + LavaflowAllowedWorkflow: + type: object + description: A workflow job that could run a fix's pull request with the repository's secrets before a person approves it. + properties: + source: + type: string + description: The branch or commit whose workflows run it. + example: main + path: + type: string + example: .github/workflows/preview.yml + job: + type: string + description: The job, absent for a workflow that could not be read. + example: deploy-preview + trigger: + type: string + description: The event that runs it, absent for a workflow that could not be read. + example: pull_request_target + required: + - source + - path + LavaflowHeldWorkflows: + type: object + description: Every workflow job that could run a held fix's pull request with the repository's secrets before a person approves it, as LavaFlow found them when it held the fix, and the commits it read the workflows at. + properties: + read_at: type: array - description: | - The ten workflows that requested the most approvals, most first. - The rest are summed in `other_functions`. items: - $ref: '#/components/schemas/DurableApprovalFunctionCounts' - other_functions: - $ref: '#/components/schemas/DurableApprovalCounts' - daily: + $ref: '#/components/schemas/LavaflowWorkflowSource' + description: 'Each branch or commit whose workflows LavaFlow read: the project''s production branch, the repository''s default branch, and the commit the fix is cut from.' + jobs: type: array - description: | - One entry per UTC day in the window that has approvals, oldest - first. Days with none are omitted. items: - $ref: '#/components/schemas/DurableApprovalDailyCounts' + $ref: '#/components/schemas/LavaflowAllowedWorkflow' + description: Every such job, at most 256, sorted by source, path and job. Empty when LavaFlow read every workflow to the end and found none, such as when they changed between the hold and the read. + jobs_sha256: + type: string + pattern: ^[0-9a-f]{64}$ + description: 'Identifies `read_at` and `jobs` together. Treat it as opaque: it changes when a listed job, or a commit the workflows were read at, does.' + example: 2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae required: - - from - - to - - counts - - approval_rate - - median_seconds_to_decision - - p90_seconds_to_decision - - functions - - other_functions - - daily - DurableApprovalDecisionRequest: + - read_at + - jobs + - jobs_sha256 + LavaflowWorkflowSource: type: object + description: A branch or commit whose workflows LavaFlow read, and the commit it read them at. properties: - comment: + source: type: string - maxLength: 2000 - description: A note for the workflow and the approval's history. - additionalProperties: false - RequestDurableApprovalRequest: + description: The branch, or the commit SHA for a commit. + example: main + commit_sha: + type: string + description: The commit LavaFlow read the workflows at. + example: 3f786850e387550fdab836ed7e6dc881de23001b + required: + - source + - commit_sha + LavaflowSourceUnavailable: type: object + description: Why LavaFlow couldn't read, or open a fix on, the code that served a run's error, so the run opened no pull request. properties: - execution_ref: - type: string - minLength: 1 - maxLength: 2048 - description: Opaque reference to the running execution, supplied by the SDK. - callback_id: - type: string - minLength: 1 - maxLength: 1024 - description: Opaque approval reference, supplied by the SDK. - name: - type: string - minLength: 1 - maxLength: 255 - title: - type: string - minLength: 1 - maxLength: 200 - description: + reason: + $ref: '#/components/schemas/LavaflowSourceUnavailableReason' + deployment_id: type: string - maxLength: 4000 - details: - x-go-type: json.RawMessage - x-go-type-skip-optional-pointer: true - description: | - Any JSON value to show the person deciding. A number's exponent must - be between -324 and 324, and a number too large or too precise to - store is refused with `400`. Numbers are read back written out in - full, so the exponents' absolute values may total at most 65,536. - The whole request is limited to 64 KiB. + format: uuid + nullable: true + description: The deployment of the run's `resource` that served the error, for `no_commit`, `uncommitted_changes`, `unverified_commit` and `other_repository`. Null for any other reason, including `deployment_unattributed`, and when no deployment was serving. + example: 7c2e5a1f-3b8d-4e6a-9f0c-1d2e3f4a5b6c required: - - execution_ref - - callback_id - - name - - title - additionalProperties: false - PaginatedDurableApprovals: + - reason + - deployment_id + LavaflowSourceUnavailableReason: + type: string + enum: + - no_repository + - no_commit + - uncommitted_changes + - unverified_commit + - other_repository + - repository_unreadable + - commit_not_on_production_branch + - deployment_unattributed + x-enum-varnames: + - LavaflowSourceUnavailableReasonNoRepository + - LavaflowSourceUnavailableReasonNoCommit + - LavaflowSourceUnavailableReasonUncommittedChanges + - LavaflowSourceUnavailableReasonUnverifiedCommit + - LavaflowSourceUnavailableReasonOtherRepository + - LavaflowSourceUnavailableReasonRepositoryUnreadable + - LavaflowSourceUnavailableReasonCommitNotOnProductionBranch + - LavaflowSourceUnavailableReasonDeploymentUnattributed + description: 'Why LavaFlow couldn''t read, or open a fix on, the code that served the error, with what you can do. LavaFlow reads the deployment that served the error, so once you deploy code it can read, it starts a new run when the error happens again. `no_repository`: LavaFlow is on for no repository; link one. `no_commit`: the deployment recorded no commit, nor did the build a redeploy serves, or no deployment was serving; deploy by pushing to the linked repository''s production branch, or with the CLI from a clean checkout of a commit on that branch. `uncommitted_changes`: the deployment''s files differ from its commit (`dirty: true`), as when the checkout had uncommitted changes; commit and push them, then deploy from the clean checkout. `unverified_commit`: Volcano couldn''t verify the deployment''s commit against the linked repository (`verification: none`), for example because the commit isn''t on the production branch, or the deployment is a function redeploy, which doesn''t carry its upload''s `verification: repository` commit; push the commit to the production branch and deploy it again. `other_repository`: the commit LavaFlow would read is from a repository other than the one LavaFlow is on for, Volcano checked it under an earlier repository link, or the project no longer links that repository. For a deployment, deploy again from the linked repository; for a reported problem or a Code Quality finding, start a new run while the project links the repository LavaFlow is on for. `repository_unreadable`: LavaFlow couldn''t read the repository at the commit, for example because the Volcano GitHub App lost access to it; check the project''s repository link and the App''s access. `commit_not_on_production_branch`: the production branch no longer holds the commit the fix is on, so LavaFlow opened no pull request; deploy from the production branch. `deployment_unattributed`: a newer deployment that may have changed the code was going live when the error happened, so LavaFlow couldn''t tell which one threw it; if the error happens again, LavaFlow starts a new run once; if that run also ends `deployment_unattributed`, the next waits for a new deploy. A `deployment_unattributed` run right after another one, even one a deploy started, gets no such run. New reasons may appear.' + PaginatedLavaflowRuns: type: object properties: data: type: array items: - $ref: '#/components/schemas/DurableApproval' - page: - type: integer - description: Current page number (1-indexed) + $ref: '#/components/schemas/LavaflowRunSummary' limit: type: integer description: Number of items per page - total: - type: integer - description: Total number of items across all pages has_more: type: boolean - description: Whether there are more pages available + description: Whether a next page exists + next_cursor: + type: string + description: Opaque cursor for the next page, present if has_more is true. It works only for the same project_id, caller and order. + counts: + allOf: + - $ref: '#/components/schemas/LavaflowRunCounts' + description: Present with `include=counts`. required: - data - - page - limit - - total - has_more - DurableMessageName: - type: string - minLength: 1 - maxLength: 237 - pattern: ^[ -~]+$ - description: | - The name a workflow waits on or publishes under: up to 237 printable - ASCII characters. - DurableMessageDirection: - type: string - enum: - - in - - out - description: | - `in` is a message sent to the execution. `out` is one the execution - published. - DurableMessage: + LavaflowRunProgress: type: object - description: A message sent to, or published by, a durable execution. + description: 'How far an active run has come. The steps are `queued`, `diagnosing`, `fixing`, `reviewing`, `waiting_for_checks` and `merge_queued`, in that order, and a run takes as many as its autonomy when it was queued allows: 2 for `diagnose_only`, 4 for `open_pr` (opening the pull request ends it, unless LavaFlow starts the fix''s CI once, when it shows `waiting_for_checks` as step 5 until LavaFlow has), 6 for `merge` (the merge ends it).' properties: - id: - type: string - format: uuid - execution_id: + stage: type: string - format: uuid - direction: - $ref: '#/components/schemas/DurableMessageDirection' - seq: + enum: + - queued + - diagnosing + - fixing + - reviewing + - waiting_for_checks + - merge_queued + description: New stages may appear. + step: + type: integer + description: The stage's place among the run's steps, from 1. + steps: + type: integer + description: How many steps the run takes. + required: + - stage + - step + - steps + LavaflowRunCounts: + type: object + description: Runs that match the request. `total` applies every filter. Each breakdown applies every filter but its own, so it shows what picking another value would return. + properties: + total: type: integer format: int64 - description: | - Orders the execution's messages in both directions. It increases - with every message but can skip numbers. Pass the last one you read - as `after` to read what came next. - name: - type: string - data: - x-go-type: json.RawMessage - x-go-type-skip-optional-pointer: true - nullable: true - description: The JSON value sent or published, or null. - sender: - $ref: '#/components/schemas/DurableMessageSender' status: - $ref: '#/components/schemas/DurableMessageStatus' - delivered_at: - type: string - format: date-time - nullable: true - description: When the execution received the message. Null until then, and for `out` messages. - sent_at: - type: string - format: date-time + $ref: '#/components/schemas/LavaflowRunStatusCounts' + category: + $ref: '#/components/schemas/LavaflowCategoryCounts' + pull_request_state: + $ref: '#/components/schemas/LavaflowPullRequestStateCounts' + involved_resources: + type: array + maxItems: 50 + description: Resources involved in at least one matching run, most runs first, then by name; at most 50. A run counts once per resource it involves. A run whose report came from what it saved rather than its source, such as one from before involved resources were recorded, may leave out frontends and the functions involved through shared code or the build root's dependency files, so these counts can undercount them. + items: + $ref: '#/components/schemas/LavaflowInvolvedResourceCount' required: - - id - - execution_id - - direction - - seq - - name - - data - - sender + - total - status - - delivered_at - - sent_at - DurableMessageList: + - category + - pull_request_state + - involved_resources + LavaflowRunStatusCounts: type: object + description: Matching runs in each status, zeros included. properties: - data: - type: array - description: Messages after `after`, oldest first. - items: - $ref: '#/components/schemas/DurableMessage' - has_more: - type: boolean - description: | - Whether more messages follow. Read them with `after` set to the - last message's `seq`. + queued: + type: integer + format: int64 + diagnosing: + type: integer + format: int64 + fixing: + type: integer + format: int64 + reviewing: + type: integer + format: int64 + pr_open: + type: integer + format: int64 + completed: + type: integer + format: int64 + failed: + type: integer + format: int64 + cancelled: + type: integer + format: int64 required: - - data - - has_more - DurableMessageWait: + - queued + - diagnosing + - fixing + - reviewing + - pr_open + - completed + - failed + - cancelled + LavaflowCategoryCounts: type: object - description: A wait an execution has open for a message. + description: Matching runs in each category, zeros included. `uncategorized` counts runs whose `category` is null. properties: - id: - type: string - format: uuid - name: - type: string - status: - $ref: '#/components/schemas/DurableMessageWaitStatus' - expires_at: - type: string - format: date-time - nullable: true - description: When the wait times out. Null when the workflow set no timeout. - created_at: - type: string - format: date-time + bug: + type: integer + format: int64 + performance: + type: integer + format: int64 + security: + type: integer + format: int64 + improvement: + type: integer + format: int64 + configuration: + type: integer + format: int64 + dependency: + type: integer + format: int64 + external: + type: integer + format: int64 + uncategorized: + type: integer + format: int64 + required: + - bug + - performance + - security + - improvement + - configuration + - dependency + - external + - uncategorized + LavaflowPullRequestStateCounts: + type: object + description: Matching runs by the state of their pull request, zeros included. `none` counts runs without one. + properties: + open: + type: integer + format: int64 + merged: + type: integer + format: int64 + closed: + type: integer + format: int64 + none: + type: integer + format: int64 required: - - id - - name - - status - - expires_at - - created_at - DurableMessageWaitList: + - open + - merged + - closed + - none + LavaflowInvolvedResourceCount: type: object + description: A resource and how many matching runs involve it. properties: - data: - type: array - description: Open waits, oldest first. - items: - $ref: '#/components/schemas/DurableMessageWait' + resource: + $ref: '#/components/schemas/LavaflowResourceReference' + runs: + type: integer + format: int64 required: - - data - SendDurableMessageRequest: + - resource + - runs + LavaflowCodeQualitySettings: type: object + description: 'LavaFlow Code Quality: whether LavaFlow reviews the code each production deploy changes and opens pull requests that fix what it confirms.' properties: - name: - $ref: '#/components/schemas/DurableMessageName' - data: - x-go-type: json.RawMessage - x-go-type-skip-optional-pointer: true - nullable: true - description: Any JSON value, up to 64 KiB. Omitted means null. + enabled: + type: boolean + description: Whether Code Quality reviews the project's deploys. Off by default. It reads as off while the project points at another repository than the one it was turned on for, and works only while LavaFlow is on. required: - - name - additionalProperties: false - RegisterDurableMessageWaitRequest: + - enabled + LavaflowCodeQualityUpdate: type: object + additionalProperties: false + description: Turns Code Quality on or off. Only the project's owner, signed in, can turn it on; any credential that can save the settings can turn it off. properties: - execution_ref: - type: string - minLength: 1 - maxLength: 2048 - description: Opaque reference to the running execution, supplied by the SDK. - callback_id: - type: string - minLength: 1 - maxLength: 1024 - description: Opaque wait reference, supplied by the SDK. - name: - $ref: '#/components/schemas/DurableMessageName' + enabled: + type: boolean required: - - execution_ref - - callback_id - - name - additionalProperties: false - DurableMessageWaitRegistration: + - enabled + LavaflowScanStatus: + type: string + enum: + - waiting + - running + - completed + - failed + - cancelled + description: 'Where the scan stands. `waiting` is the project''s next scan: deploys that went live since the last one, waiting out a short settle window or a bound named by `waiting_reason`.' + LavaflowScanResource: type: object - description: The registered wait, as the waiting workflow sees it. + description: A resource whose production deploy the scan covers. Only frontend deploys ask for a scan for now. properties: - id: + resource_type: + type: string + enum: + - function + - frontend + resource_id: type: string format: uuid - status: - $ref: '#/components/schemas/DurableMessageWaitStatus' - expires_at: + deployment_id: type: string - format: date-time - nullable: true + format: uuid required: - - id - - status - - expires_at - OpenDurableMessageSessionRequest: + - resource_type + - resource_id + - deployment_id + LavaflowScanCounts: type: object + description: What the scan did with the problems it found. properties: - execution_ref: - type: string - minLength: 1 - maxLength: 2048 - description: Opaque reference to the running execution, supplied by the SDK. - callback_id: - type: string - minLength: 1 - maxLength: 1024 - description: Opaque session reference, supplied by the SDK. + found: + type: integer + format: int64 + description: Candidates the scan found in the changed lines. + created: + type: integer + format: int64 + description: New issues the scan opened. + duplicate: + type: integer + format: int64 + description: Candidates that matched an issue the project already has, or a finding the scan already kept. + suppressed: + type: integer + format: int64 + description: Candidates a person had already turned down, by closing their pull request or ignoring their issue. + capped: + type: integer + format: int64 + description: Confirmed findings past the plan's findings per scan, which no later scan reports again. + rejected: + type: integer + format: int64 + description: Candidates LavaFlow's second check didn't confirm, or that it couldn't report. required: - - execution_ref - - callback_id - additionalProperties: false - DurableMessageSessionRegistration: + - found + - created + - duplicate + - suppressed + - capped + - rejected + LavaflowScanBilledFinding: type: object - description: | - The registered session. Its token reaches the workflow through the - workflow itself, never in this response. + description: A finding of the scan whose Code Quality runs were billed. properties: - id: + issue_id: type: string format: uuid + description: The finding's issue. Its `finding` says where the problem is and why. + rule: + type: string + description: The rule the finding is about. + title: + type: string + billable_events: + type: object + additionalProperties: + type: integer + format: int64 + description: How many billable events of each kind the finding's runs recorded, keyed by kind, such as `issue_diagnosed` and `pull_request_opened`. required: - - id - PublishDurableMessageRequest: - type: object - properties: - name: - $ref: '#/components/schemas/DurableMessageName' - data: - x-go-type: json.RawMessage - x-go-type-skip-optional-pointer: true - nullable: true - description: Any JSON value, up to 64 KiB. Omitted means null. - required: - - name - additionalProperties: false - Issue: + - issue_id + - rule + - title + - billable_events + LavaflowScan: type: object - description: Runtime errors from one function or frontend, grouped by error type and stack. + description: One Code Quality scan of the code a project's deploys changed. properties: id: type: string format: uuid + nullable: true + description: The scan's ID, null while it is waiting. project_id: type: string format: uuid - resource: - $ref: '#/components/schemas/ResourceReference' - title: + source: type: string - description: | - The error type and message, with values such as IDs, numbers, and - URLs replaced by placeholders like `` and ``. - error_type: + enum: + - deployment + description: What asked for the scan. + status: + $ref: '#/components/schemas/LavaflowScanStatus' + outcome: type: string - description: The exception class, such as `TypeError`. Omitted when the error has none. - culprit: + nullable: true + description: 'How a finished scan ended: `scanned`; `no_changes` when the deploy changed nothing since the last scan, as after a redeploy or a rollback; `no_base` when there was no earlier commit to compare against, so the head became the starting point; `unreachable` when the head commit is on neither the project''s production branch nor the repository''s default branch; `repository_changed`; `failed`; or `cancelled`. Null until it ends.' + waiting_reason: type: string - description: The innermost frame of your code in the stack, as `function (file)`. Omitted without a stack. - status: - $ref: '#/components/schemas/IssueStatus' - event_count: + nullable: true + description: 'The bound a waiting scan waits at: `findings_limit`, `pull_request_limit`, `spend_limit`, `scan_limit` or `feature_unavailable`; `feature_paused` means a platform publication pause is holding the scan without spending its retry allowance. Null while it only waits out its settle window, and for a scan that started. A waiting scan skips no deploy: it covers every commit since the last scan when it starts.' + repository_id: type: integer format: int64 - description: Errors counted in this issue. A retried delivery can count an error twice. - first_seen_at: - type: string - format: date-time - last_seen_at: + description: The GitHub repository the scan reads. + base_sha: type: string - format: date-time - last_region: - type: string - description: The region that served the latest error, such as `us-east-1`. - sample_event_id: - type: string - description: The ID of the latest error's log event, while logs retain it. - sample_event_at: - type: string - format: date-time - description: When the latest error's log event was written. - resolved_at: + nullable: true + description: The commit the scan compares against, null while waiting or when there was none. + head_sha: type: string - format: date-time - description: When the issue was resolved. Present only while it is resolved. - regressed_at: + description: The newest deployed commit the scan covers. + resources: + type: array + items: + $ref: '#/components/schemas/LavaflowScanResource' + truncated: + type: boolean + description: Whether the scan reviewed only part of the change. A change too large to review whole keeps the files with the most changed lines, a review that stops early keeps what it found, and a repository too large to read whole skips the files past what it read. No later scan covers the rest. + counts: + $ref: '#/components/schemas/LavaflowScanCounts' + billed: + type: array + items: + $ref: '#/components/schemas/LavaflowScanBilledFinding' + description: The scan's findings whose runs were billed. + requested_at: type: string format: date-time - description: When a resolved issue was last seen again and reopened. - created_at: + description: When the first deploy the scan covers asked for it. + started_at: type: string format: date-time - updated_at: + nullable: true + completed_at: type: string format: date-time + nullable: true required: - id - project_id - - resource - - title + - source - status - - event_count - - first_seen_at - - last_seen_at - - created_at - - updated_at - IssueStatus: - type: string - enum: - - open - - resolved - - ignored - description: | - `open` until someone resolves or ignores the issue. A resolved issue - seen again reopens. - PaginatedIssues: + - outcome + - waiting_reason + - repository_id + - base_sha + - head_sha + - resources + - truncated + - counts + - billed + - requested_at + - started_at + - completed_at + PaginatedLavaflowScans: type: object properties: data: type: array items: - $ref: '#/components/schemas/Issue' + $ref: '#/components/schemas/LavaflowScan' limit: type: integer description: Number of items per page @@ -22879,125 +33867,68 @@ components: description: Whether a next page exists next_cursor: type: string - description: Opaque cursor for the next page (present if has_more is true) + description: Opaque cursor for the next page, present if has_more is true. It works only for the same project_id and caller. required: - data - limit - has_more - UpdateIssueRequest: - type: object - additionalProperties: false - properties: - status: - $ref: '#/components/schemas/IssueStatus' - required: - - status - AutofixSettings: + NotificationSettings: type: object additionalProperties: false properties: project_id: type: string format: uuid - enabled: - type: boolean - description: Whether Volcano diagnoses the project's issues with AI. - max_stage: - $ref: '#/components/schemas/AutofixStage' - auto_trigger: - type: boolean - description: Whether a new or reopened issue starts a run on its own. When false, runs start only on request. - provider: - $ref: '#/components/schemas/AutofixProvider' - model: - $ref: '#/components/schemas/AutofixModel' - api_key_configured: - type: boolean - description: Whether your own API key is stored. The key itself is never returned. - api_key_provider: - allOf: - - $ref: '#/components/schemas/AutofixProvider' - description: The provider the stored key belongs to, present when one is stored. - api_key_last4: - type: string - description: The stored key's last four characters, present when one is stored. - plan_includes_autofix: - type: boolean - description: Whether the owner's plan includes autofix. When false, saved settings stay stored and no run starts. Absent when a save that needed no plan succeeded but the plan could not be resolved. + email: + $ref: '#/components/schemas/NotificationEmailSettings' + webhook: + $ref: '#/components/schemas/NotificationWebhookSettings' + scheduler_failures: + $ref: '#/components/schemas/SchedulerFailureAlertPolicy' updated_at: type: string format: date-time description: When the settings were last saved. Absent until the first save. required: - project_id - - enabled - - max_stage - - auto_trigger - - provider - - model - - api_key_configured - AutofixStage: - type: string - enum: - - diagnose - - pull_request - x-enum-varnames: - - AutofixStageDiagnose - - AutofixStagePullRequest - description: How far a run may go. `diagnose` stops at a root-cause diagnosis. `pull_request` may also open a draft pull request with a fix in the project's connected repository. - AutofixProvider: - type: string - enum: - - volcano - - anthropic - x-enum-varnames: - - AutofixProviderVolcano - - AutofixProviderAnthropic - description: Who serves the model. `volcano` runs on Volcano's models. `anthropic` runs on your own Anthropic API key. - AutofixModel: - type: string - enum: - - claude-fable-5-1 - - claude-opus-5-5 - - claude-sonnet-5-5 - - claude-haiku-5-5 - - claude-opus-5 - - claude-sonnet-5 - - claude-haiku-4-5 - x-enum-varnames: - - AutofixModelClaudeFable51 - - AutofixModelClaudeOpus55 - - AutofixModelClaudeSonnet55 - - AutofixModelClaudeHaiku55 - - AutofixModelClaudeOpus5 - - AutofixModelClaudeSonnet5 - - AutofixModelClaudeHaiku45 - description: The Claude model a run uses. `claude-opus-5-5` is the default. - UpdateAutofixSettingsRequest: + - email + - webhook + - scheduler_failures + UpdateNotificationSettingsRequest: type: object additionalProperties: false + description: Omitted fields keep their current values. properties: - enabled: - type: boolean - max_stage: - $ref: '#/components/schemas/AutofixStage' - auto_trigger: - type: boolean - default: false - provider: - $ref: '#/components/schemas/AutofixProvider' - model: - $ref: '#/components/schemas/AutofixModel' - api_key: + email: + $ref: '#/components/schemas/UpdateNotificationEmail' + webhook: + $ref: '#/components/schemas/UpdateNotificationWebhook' + scheduler_failures: + $ref: '#/components/schemas/UpdateSchedulerFailureAlertPolicy' + NotificationTestResult: + type: object + additionalProperties: false + properties: + deliveries: + type: array + items: + $ref: '#/components/schemas/NotificationTestDelivery' + required: + - deliveries + GitRepositoryReference: + type: object + description: A GitHub repository, by its stable id and its name. + properties: + id: + type: integer + format: int64 + description: GitHub's repository id. It stays the same through a rename or a transfer. + full_name: type: string - format: password - writeOnly: true - minLength: 20 - maxLength: 512 - pattern: ^[!-~]+$ - description: Your own API key for `provider`, such as an Anthropic key for `anthropic`. Omit it to keep the stored key. Encrypted at rest and never returned. + description: The repository's owner and name, such as `acme/shop`. required: - - enabled + - id + - full_name PaginatedProjectCustomDomains: type: object properties: @@ -23345,8 +34276,10 @@ components: $ref: '#/components/schemas/ProjectConfigBucket' realtime: $ref: '#/components/schemas/ProjectConfigRealtime' - autofix: - $ref: '#/components/schemas/ProjectConfigAutofix' + lavaflow: + $ref: '#/components/schemas/ProjectConfigLavaFlow' + notifications: + $ref: '#/components/schemas/ProjectConfigNotifications' auth: $ref: '#/components/schemas/ProjectConfigAuth' functions: @@ -23417,6 +34350,13 @@ components: error: type: string description: Error detail when action is `error`. + code: + type: string + description: | + Machine-readable reason for a `notice`, when it has one. Clients must accept codes not listed + here. `function_served_by_candidate` - a promoted preview serves the function and keeps the + variables it was built with, so the apply did not synchronize the function's variables; the + entry's action is `unchanged`, and the rest of the apply succeeded. notice: type: string description: Optional operational note (e.g. disabling realtime drops active connections). @@ -23489,6 +34429,9 @@ components: type: boolean max_age: type: integer + allow_frontend_previews: + type: boolean + description: Allow the origins of the project's own live frontend previews. ProjectConfigAuthEmail: type: object additionalProperties: false @@ -23508,8 +34451,10 @@ components: properties: address: type: string + description: Sender email address. New or changed values containing carriage returns or newlines return 422. Unchanged exported values are preserved. name: type: string + description: Sender display name; supports punctuation and Unicode. New or changed values containing carriage returns or newlines return 422. Unchanged exported values are preserved. ProjectConfigAuthEmailPasswordProvider: type: object additionalProperties: false @@ -23576,610 +34521,1054 @@ components: type: object additionalProperties: false properties: - allow: - type: boolean - timeout: - type: integer - description: Password reset token expiry in seconds - max_history: - type: integer - description: Number of previous passwords to disallow (0=disabled) - ProjectConfigAuthProviders: + allow: + type: boolean + timeout: + type: integer + description: Password reset token expiry in seconds + max_history: + type: integer + description: Number of previous passwords to disallow (0=disabled) + ProjectConfigAuthProviders: + type: object + additionalProperties: false + properties: + email_password: + $ref: '#/components/schemas/ProjectConfigAuthEmailPasswordProvider' + oauth: + type: array + description: Fully synced when declared - providers absent from this list are deleted. + items: + $ref: '#/components/schemas/ProjectConfigOAuthProvider' + ProjectConfigAuthRateLimits: + type: object + additionalProperties: false + description: Rate limits per hour. + properties: + signup: + type: integer + signin: + type: integer + token_refresh: + type: integer + password_reset: + type: integer + ProjectConfigAuthRedirects: + type: object + additionalProperties: false + properties: + allowed: + type: array + items: + type: string + description: Redirect allowlist. Every entry must be a valid http/https URL. + post_auth: + type: string + description: Must be included in `allowed` when set. + post_logout: + type: string + description: Must be included in `allowed` when set. + device_verification: + type: string + description: Optional custom device-authorization verification page URL. + ProjectConfigAuthSessions: + type: object + additionalProperties: false + properties: + inactivity_timeout: + type: integer + description: Force re-login after inactivity (seconds, 0=never) + max_session_duration: + type: integer + description: Force re-login after duration (seconds, 0=never) + ProjectConfigAuthSignup: + type: object + additionalProperties: false + properties: + enable_signup: + type: boolean + description: Master switch for signups across ALL providers + enable_anonymous_signins: + type: boolean + allowed_email_domains: + type: array + maxItems: 100 + description: | + Email domains allowed to create users. Empty allows every domain. + Replaces the stored list; entries are normalized (lowercase, no `@` + prefix) and must be bare domains such as `domain1.com`. Matching is + exact, so subdomains need their own entry. At most 100 entries. + + Restricting signups is a SUPERAGENT feature to configure and to enforce: a + HOBBY project can only declare the list it already has or remove the + restriction, and the list it keeps is parked until it upgrades. + items: + type: string + example: + - domain1.com + - domain2.com + allowed_email_domains_mode: + type: string + description: | + How far `allowed_email_domains` reaches. `signup` gates account + creation only. `signup_and_signin` also blocks sign-in for accounts + outside the list and signs out the ones it locks out. `disabled` + keeps the list without enforcing it. + enum: + - disabled + - signup + - signup_and_signin + ProjectConfigAuthTokens: + type: object + additionalProperties: false + description: Token lifetimes in seconds. + properties: + access_token_lifetime: + type: integer + refresh_token_lifetime: + type: integer + refresh_token_reuse_interval: + type: integer + platform_token_ttl: + type: integer + ProjectConfigBucket: + type: object + additionalProperties: false + description: | + Settings for an existing storage bucket. Buckets are never created or + deleted through the manifest. When `policies` is declared it is fully + synced (policies absent from the list are deleted; an empty list + deletes all); omitting `policies` leaves the bucket's policies + untouched. + properties: + name: + type: string + pattern: ^[a-zA-Z0-9_-]+$ + minLength: 1 + maxLength: 64 + file_size_limit: + type: integer + format: int64 + description: Maximum file size in bytes + allowed_mime_types: + type: array + items: + type: string + policies: + type: array + items: + $ref: '#/components/schemas/ProjectConfigBucketPolicy' + required: + - name + ProjectConfigBucketPolicy: + type: object + additionalProperties: false + properties: + name: + type: string + minLength: 1 + operation: + type: string + enum: + - SELECT + - INSERT + - UPDATE + - DELETE + definition: + type: string + description: Policy expression + required: + - name + - operation + - definition + ProjectConfigCustomDomain: + type: object + additionalProperties: false + description: | + Custom domain with managed or BYOC TLS. `tls` is required + when the domain is first created and optional afterwards. For an existing + domain, omitting `tls` or sending only `tls.mode` keeps the stored + certificate; new BYOC material for the same domain rotates the + certificate in place (zero downtime). Changing `tls.mode` for the same + hostname switches an active domain in place (zero downtime); a domain + that is not yet active, or a managed domain changing hostname, must be + deleted first. BYOC TLS material is write-only; exports render only + `tls.mode`. + properties: + domain: + type: string + maxLength: 253 + description: 'Fully-qualified domain name (hostname only, no scheme/path). Managed TLS (`tls.mode: managed`) accepts at most 219 characters; BYOC accepts 253.' + tls: + $ref: '#/components/schemas/ProjectConfigFrontendCustomDomainTLSConfig' + required: + - domain + ProjectConfigFrontendCustomDomain: + type: object + additionalProperties: false + description: | + One of the frontend's custom domains. `domain` and `tls` behave as in + `custom_domain`. With `redirect`, the domain redirects every request to + another listed domain that serves the frontend. + properties: + domain: + type: string + maxLength: 253 + description: 'Fully-qualified domain name (hostname only, no scheme/path). Managed TLS (`tls.mode: managed`) accepts at most 219 characters; BYOC accepts 253.' + tls: + $ref: '#/components/schemas/ProjectConfigFrontendCustomDomainTLSConfig' + redirect: + $ref: '#/components/schemas/ProjectConfigCustomDomainRedirect' + required: + - domain + ProjectConfigCustomDomainRedirect: + type: object + additionalProperties: false + properties: + to: + type: string + minLength: 1 + maxLength: 253 + description: Another domain in the same `custom_domains` list, without `redirect`. + status: + type: integer + enum: + - 301 + - 302 + - 307 + - 308 + default: 308 + required: + - to + ProjectConfigDatabase: + type: object + additionalProperties: false + description: | + Assertion-only entry for an existing database. No database property is + mutable through the manifest; declared values are compared against the + deployed database and any mismatch fails validation. Databases are + never created or deleted here. + properties: + name: + type: string + minLength: 1 + region: + type: string + description: Deployed region ID (e.g. us-east-1). Asserted, never written; region IDs issued by earlier versions of the API match too. + pg_version: + type: string + enum: + - '15' + - '16' + - '17' + - '18' + description: | + PostgreSQL major version. Asserted, never written. Also accepts + versions new databases can no longer be created on, so an export + of an existing database re-applies. + database_type: + type: string + enum: + - volcano-db-xs + - volcano-db-s + - volcano-db-m + - volcano-db-l + - volcano-db-xl + - volcano-db-2xl + description: | + Compute tier. Asserted, never written - tier changes are not + supported via the manifest; use the databases API/CLI/GUI instead. + required: + - name + - region + - pg_version + ProjectConfigEmailTemplate: + type: object + additionalProperties: false + properties: + subject: + type: string + description: Subject template. For new or changed values, literal interior carriage returns or newlines after Go template whitespace trimming return 422. Outer whitespace and trailing block-scalar newlines are allowed. Unchanged stored subjects are preserved. + html_body: + type: string + maxLength: 262144 + description: HTML body. Max 256 KiB. SUPERAGENT plan required for custom bodies. + text_body: + type: string + maxLength: 262144 + description: Plain-text body. Max 256 KiB. SUPERAGENT plan required for custom bodies. + ProjectConfigEmailTemplates: type: object additionalProperties: false + description: | + Email templates keyed by type. Fully synced when declared - template + types absent from a declared map revert to server defaults (custom + bodies deleted, subject overrides cleared). Custom template bodies + require the SUPERAGENT plan; subject-only changes are available on HOBBY. properties: - email_password: - $ref: '#/components/schemas/ProjectConfigAuthEmailPasswordProvider' - oauth: - type: array - description: Fully synced when declared - providers absent from this list are deleted. - items: - $ref: '#/components/schemas/ProjectConfigOAuthProvider' - ProjectConfigAuthRateLimits: + confirmation: + $ref: '#/components/schemas/ProjectConfigEmailTemplate' + password_reset: + $ref: '#/components/schemas/ProjectConfigEmailTemplate' + password_changed: + $ref: '#/components/schemas/ProjectConfigEmailTemplate' + welcome: + $ref: '#/components/schemas/ProjectConfigEmailTemplate' + ProjectConfigFrontend: type: object additionalProperties: false - description: Rate limits per hour. + description: | + Configuration for an existing (deployed) frontend. Frontends are never + created or deleted through the manifest. properties: - signup: - type: integer - signin: - type: integer - token_refresh: - type: integer - password_reset: - type: integer - ProjectConfigAuthRedirects: + variable_scope: + type: string + enum: + - all + - shared + - scoped + description: All preserves access to all project variables. Shared includes the project frontend_shared_variables list. Scoped includes only explicitly declared variables in builds and runtime. Omission preserves the stored selection. + variables: + type: array + uniqueItems: true + items: + type: string + pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ + description: Names selected when variable_scope is scoped. Missing declared values reject deployment. Omission preserves the stored list; an empty list clears it. + name: + type: string + minLength: 1 + custom_domain: + allOf: + - $ref: '#/components/schemas/ProjectConfigCustomDomain' + nullable: true + x-go-type: nullable.Nullable[ProjectConfigCustomDomain] + x-go-type-skip-optional-pointer: true + description: | + The frontend's custom domain. Omission leaves an existing domain + untouched; null deletes it. For a frontend with more than one + domain, or a redirect, use `custom_domains`; an entry may not set + both. + custom_domains: + type: array + maxItems: 100 + description: | + Complete set of the frontend's custom domains when declared. + Domains not listed are deleted; an empty list deletes all of them. + Omission leaves existing domains untouched. More than one domain + needs a plan that allows it. + items: + $ref: '#/components/schemas/ProjectConfigFrontendCustomDomain' + function_routes: + type: array + maxItems: 64 + description: Complete set of same-origin Function path mappings when declared. Omission preserves existing mappings; an empty list deletes all mappings. + items: + $ref: '#/components/schemas/ProjectConfigFrontendFunctionRoute' + frontend_routes: + type: array + maxItems: 64 + description: | + Complete set of paths this frontend serves from another frontend in the project when + declared. Omission preserves existing routes; an empty list deletes all of them. + Function and Frontend routes share one path namespace and the 64-route limit. + items: + $ref: '#/components/schemas/ProjectConfigFrontendRoute' + required: + - name + ProjectConfigFunction: type: object additionalProperties: false + description: | + Configuration for an existing (deployed) function. Functions are never + created or deleted through the manifest. When `schedulers` is declared + it is fully synced (schedulers absent from the list are deleted); + omitting `schedulers` leaves the function's schedulers untouched. The + same applies to `variables`: declaring it replaces the function's + declared variable names, and omitting it leaves them untouched. properties: - allowed: + name: + type: string + minLength: 1 + kind: + $ref: '#/components/schemas/FunctionKind' + visibility: + $ref: '#/components/schemas/FunctionVisibility' + public: + type: boolean + deprecated: true + description: | + Deprecated alias for `visibility`: `true` means `public` and + `false` means `authenticated`, not `private`, so an entry left at + `false` applies `authenticated` on every apply; declare + `visibility: private` to keep a function private. Declaring both + with different meanings is an error. Exports write `visibility` + only. + variable_scope: + type: string + enum: + - all + - scoped + x-enum-varnames: + - ProjectConfigFunctionVariableScopeAll + - ProjectConfigFunctionVariableScopeScoped + description: | + Which project variables this function receives. `all` (the default) + gives it the project variables marked `shared: true`. `scoped` gives it only the variables + it selects: every name declared in `variables`, plus the names + Volcano detects in its source that the project defines. + variables: type: array items: type: string - description: Redirect allowlist. Every entry must be a valid http/https URL. - post_auth: - type: string - description: Must be included in `allowed` when set. - post_logout: + minLength: 1 + maxLength: 256 + description: | + Project variable names this function requires, on top of the ones + detected in its source. Declare a name here when the function reads + it through a computed key, which detection cannot see, or when the + function must not deploy without it: a declared name the project does + not define fails the apply, while a detected name it does not define + is ignored. Only used when `variable_scope` is `scoped`. + invocation_mode: + $ref: '#/components/schemas/FunctionInvocationMode' + http_auth_mode: + $ref: '#/components/schemas/FunctionHTTPAuthMode' + openapi_spec: + type: object + nullable: true + additionalProperties: true + x-go-type: nullable.Nullable[map[string]interface{}] + x-go-type-skip-optional-pointer: true + description: OpenAPI 3.0 or 3.1 metadata for an HTTP-mode function + schedulers: + type: array + items: + $ref: '#/components/schemas/ProjectConfigScheduler' + required: + - name + ProjectConfigHostedPage: + type: object + additionalProperties: false + properties: + html: type: string - description: Must be included in `allowed` when set. - device_verification: + maxLength: 262144 + description: Raw HTML markup for the page. Max 256 KiB. + css: type: string - description: Optional custom device-authorization verification page URL. - ProjectConfigAuthSessions: + maxLength: 262144 + description: Optional CSS injected at render time. Max 256 KiB. + required: + - html + ProjectConfigHostedPages: type: object additionalProperties: false + description: | + Hosted auth pages keyed by page type (SUPERAGENT plan). Upsert-only: omitted + pages are left untouched (there is no delete for hosted pages). properties: - inactivity_timeout: - type: integer - description: Force re-login after inactivity (seconds, 0=never) - max_session_duration: - type: integer - description: Force re-login after duration (seconds, 0=never) - ProjectConfigAuthSignup: + login: + $ref: '#/components/schemas/ProjectConfigHostedPage' + reset_password: + $ref: '#/components/schemas/ProjectConfigHostedPage' + signup: + $ref: '#/components/schemas/ProjectConfigHostedPage' + forgot_password: + $ref: '#/components/schemas/ProjectConfigHostedPage' + device: + $ref: '#/components/schemas/ProjectConfigHostedPage' + verify_email: + $ref: '#/components/schemas/ProjectConfigHostedPage' + PreviewAuthPageRequest: type: object additionalProperties: false + required: + - theme + - layout properties: - enable_signup: - type: boolean - description: Master switch for signups across ALL providers - enable_anonymous_signins: - type: boolean - allowed_email_domains: - type: array - maxItems: 100 - description: | - Email domains allowed to create users. Empty allows every domain. - Replaces the stored list; entries are normalized (lowercase, no `@` - prefix) and must be bare domains such as `domain1.com`. Matching is - exact, so subdomains need their own entry. At most 100 entries. - - Restricting signups is a SUPERAGENT feature to configure and to enforce: a - HOBBY project can only declare the list it already has or remove the - restriction, and the list it keeps is parked until it upgrades. - items: - type: string - example: - - domain1.com - - domain2.com - allowed_email_domains_mode: + theme: + $ref: '#/components/schemas/AuthPageTheme' + layout: + $ref: '#/components/schemas/AuthPageLayout' + action: + type: string + PreviewAuthPageResponse: + type: object + required: + - preview_url + - expires_at + properties: + preview_url: + type: string + format: uri + expires_at: type: string - description: | - How far `allowed_email_domains` reaches. `signup` gates account - creation only. `signup_and_signin` also blocks sign-in for accounts - outside the list and signs out the ones it locks out. `disabled` - keeps the list without enforcing it. - enum: - - disabled - - signup - - signup_and_signin - ProjectConfigAuthTokens: + format: date-time + ProjectConfigMissingResource: type: object - additionalProperties: false - description: Token lifetimes in seconds. properties: - access_token_lifetime: - type: integer - refresh_token_lifetime: - type: integer - refresh_token_reuse_interval: - type: integer - platform_token_ttl: - type: integer - ProjectConfigBucket: + type: + type: string + enum: + - function + - frontend + - database + - bucket + - sandbox + name: + type: string + required: + - type + - name + ProjectConfigOAuthProvider: type: object additionalProperties: false - description: | - Settings for an existing storage bucket. Buckets are never created or - deleted through the manifest. When `policies` is declared it is fully - synced (policies absent from the list are deleted; an empty list - deletes all); omitting `policies` leaves the bucket's policies - untouched. properties: - name: + provider: type: string - pattern: ^[a-zA-Z0-9_-]+$ - minLength: 1 - maxLength: 64 - file_size_limit: - type: integer - format: int64 - description: Maximum file size in bytes - allowed_mime_types: + enum: + - google + - github + - microsoft + - apple + - device + enabled: + type: boolean + client_id: + type: string + description: | + Required for non-device providers. Server-generated for + `provider=device` (exported read-only, ignored on apply). + client_secret: + type: string + format: password + writeOnly: true + description: Write-only; omitted from config export. Not used for `provider=device`. + redirect_url: + type: string + description: Not used for `provider=device`. + scopes: type: array items: type: string - policies: - type: array - items: - $ref: '#/components/schemas/ProjectConfigBucketPolicy' required: - - name - ProjectConfigBucketPolicy: + - provider + ProjectConfigProject: type: object additionalProperties: false + description: Project-level settings. `name` renames the project. properties: name: type: string + pattern: ^[A-Za-z0-9_-]+$ minLength: 1 - operation: - type: string - enum: - - SELECT - - INSERT - - UPDATE - - DELETE - definition: - type: string - description: Policy expression - required: - - name - - operation - - definition - ProjectConfigCustomDomain: + maxLength: 255 + all_regions: + type: boolean + description: Region policy. `false` requires `selected_regions` (SUPERAGENT plan). + selected_regions: + type: array + items: + type: string + description: Region subset (bare region names). Requires `all_regions=false`. + ProjectConfigRealtime: type: object additionalProperties: false - description: | - Custom domain with managed or BYOC TLS. `tls` is required - when the domain is first created and optional afterwards. For an existing - domain, omitting `tls` or sending only `tls.mode` keeps the stored - certificate; new BYOC material for the same domain rotates the - certificate in place (zero downtime). Changing `tls.mode` for the same - hostname switches an active domain in place (zero downtime); a domain - that is not yet active, or a managed domain changing hostname, must be - deleted first. BYOC TLS material is write-only; exports render only - `tls.mode`. properties: - domain: - type: string - maxLength: 253 - description: 'Fully-qualified domain name (hostname only, no scheme/path). Managed TLS (`tls.mode: managed`) accepts at most 219 characters; BYOC accepts 253.' - tls: - $ref: '#/components/schemas/ProjectConfigFrontendCustomDomainTLSConfig' - required: - - domain - ProjectConfigDatabase: + enabled: + type: boolean + broadcast_enabled: + type: boolean + presence_enabled: + type: boolean + postgres_changes_enabled: + type: boolean + ProjectConfigLavaFlow: + type: object + deprecated: true + description: Ignored. The manifest doesn't configure LavaFlow. A manifest that still declares this section applies as before, without it, and the result reports it as `unchanged` with a notice. Export never includes it. + ProjectConfigScheduler: type: object additionalProperties: false - description: | - Assertion-only entry for an existing database. No database property is - mutable through the manifest; declared values are compared against the - deployed database and any mismatch fails validation. Databases are - never created or deleted here. properties: name: type: string minLength: 1 - region: + maxLength: 200 + cron: type: string - description: Deployed region ID (e.g. us-east-1). Asserted, never written; region IDs issued by earlier versions of the API match too. - pg_version: + description: 5-field UTC cron expression + enabled: + type: boolean + payload: + type: object + additionalProperties: true + required: + - name + - cron + ProjectConfigSkippedResource: + type: object + properties: + type: type: string enum: - - '15' - - '16' - - '17' - - '18' - description: | - PostgreSQL major version. Asserted, never written. Also accepts - versions new databases can no longer be created on, so an export - of an existing database re-applies. - database_type: + - function + - frontend + - database + - bucket + - sandbox + name: + type: string + reason: type: string - enum: - - volcano-db-xs - - volcano-db-s - - volcano-db-m - - volcano-db-l - - volcano-db-xl - - volcano-db-2xl - description: | - Compute tier. Asserted, never written - tier changes are not - supported via the manifest; use the databases API/CLI/GUI instead. required: + - type - name - - region - - pg_version - ProjectConfigEmailTemplate: + - reason + ProjectConfigValidationError: type: object - additionalProperties: false properties: - subject: + section: type: string - html_body: + description: Manifest section the error refers to (e.g. databases, functions). + name: type: string - maxLength: 262144 - description: HTML body. Max 256 KiB. SUPERAGENT plan required for custom bodies. - text_body: + description: Resource name or key within the section, when applicable. + message: type: string - maxLength: 262144 - description: Plain-text body. Max 256 KiB. SUPERAGENT plan required for custom bodies. - ProjectConfigEmailTemplates: - type: object - additionalProperties: false - description: | - Email templates keyed by type. Fully synced when declared - template - types absent from a declared map revert to server defaults (custom - bodies deleted, subject overrides cleared). Custom template bodies - require the SUPERAGENT plan; subject-only changes are available on HOBBY. - properties: - confirmation: - $ref: '#/components/schemas/ProjectConfigEmailTemplate' - password_reset: - $ref: '#/components/schemas/ProjectConfigEmailTemplate' - password_changed: - $ref: '#/components/schemas/ProjectConfigEmailTemplate' - welcome: - $ref: '#/components/schemas/ProjectConfigEmailTemplate' - ProjectConfigFrontend: + required: + - section + - message + ProjectConfigValidationErrorResponse: type: object - additionalProperties: false - description: | - Configuration for an existing (deployed) frontend. Frontends are never - created or deleted through the manifest. A declared frontend entry - without `custom_domain` deletes an existing custom domain. + description: Returned when manifest validation fails. Nothing was applied. properties: - variable_scope: - type: string - enum: - - all - - shared - - scoped - description: All preserves access to all project variables. Shared includes the project frontend_shared_variables list. Scoped includes only explicitly declared variables in builds and runtime. Omission preserves the stored selection. - variables: - type: array - uniqueItems: true - items: - type: string - pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ - description: Names selected when variable_scope is scoped. Missing declared values reject deployment. Omission preserves the stored list; an empty list clears it. - name: + error: type: string - minLength: 1 - custom_domain: - $ref: '#/components/schemas/ProjectConfigCustomDomain' - function_routes: + errors: type: array - maxItems: 64 - description: Complete set of same-origin Function path mappings when declared. Omission preserves existing mappings; an empty list deletes all mappings. items: - $ref: '#/components/schemas/ProjectConfigFrontendFunctionRoute' + $ref: '#/components/schemas/ProjectConfigValidationError' required: - - name - ProjectConfigFunction: + - error + - errors + ProjectConfigVariable: type: object additionalProperties: false - description: | - Configuration for an existing (deployed) function. Functions are never - created or deleted through the manifest. When `schedulers` is declared - it is fully synced (schedulers absent from the list are deleted); - omitting `schedulers` leaves the function's schedulers untouched. The - same applies to `variables`: declaring it replaces the function's - declared variable names, and omitting it leaves them untouched. properties: + shared: + type: boolean + description: Include this name in the project's shared function variables. Omission preserves existing membership; new variables default to true for legacy clients. Send false explicitly to create a non-shared variable. name: type: string + description: Project variable name. Function runtime names such as AWS_REGION are reserved and fail validation; see the environment variables guide for the full list. minLength: 1 - kind: - $ref: '#/components/schemas/FunctionKind' - visibility: - $ref: '#/components/schemas/FunctionVisibility' - public: - type: boolean - deprecated: true - description: | - Deprecated alias for `visibility`: `true` means `public` and - `false` means `authenticated`, not `private`, so an entry left at - `false` applies `authenticated` on every apply; declare - `visibility: private` to keep a function private. Declaring both - with different meanings is an error. Exports write `visibility` - only. - variable_scope: + value: + type: string + required: + - name + - value + ProjectHealthResource: + type: object + properties: + type: type: string enum: - - all - - scoped - x-enum-varnames: - - ProjectConfigFunctionVariableScopeAll - - ProjectConfigFunctionVariableScopeScoped - description: | - Which project variables this function receives. `all` (the default) - gives it the project variables marked `shared: true`. `scoped` gives it only the variables - it selects: every name declared in `variables`, plus the names - Volcano detects in its source that the project defines. - variables: - type: array - items: - type: string - minLength: 1 - maxLength: 256 + - project + - function + - frontend + - database + - database_branch + id: + type: string + format: uuid + name: + type: string + kind: + allOf: + - $ref: '#/components/schemas/FunctionKind' description: | - Project variable names this function requires, on top of the ones - detected in its source. Declare a name here when the function reads - it through a computed key, which detection cannot see, or when the - function must not deploy without it: a declared name the project does - not define fails the apply, while a detected name it does not define - is ignored. Only used when `variable_scope` is `scoped`. - invocation_mode: - $ref: '#/components/schemas/FunctionInvocationMode' - http_auth_mode: - $ref: '#/components/schemas/FunctionHTTPAuthMode' - openapi_spec: - type: object - nullable: true - additionalProperties: true - x-go-type: nullable.Nullable[map[string]interface{}] - x-go-type-skip-optional-pointer: true - description: OpenAPI 3.0 or 3.1 metadata for an HTTP-mode function - schedulers: - type: array - items: - $ref: '#/components/schemas/ProjectConfigScheduler' + Which kind of function this check is about. Present only when `type` + is `function`, where both kinds share the name space and this is + what tells them apart. required: + - type + - id - name - ProjectConfigHostedPage: + ResourceReference: type: object - additionalProperties: false + description: Stable reference to a Volcano resource. properties: - html: + type: type: string - maxLength: 262144 - description: Raw HTML markup for the page. Max 256 KiB. - css: + enum: + - project + - function + - frontend + - database + id: + type: string + format: uuid + name: type: string - maxLength: 262144 - description: Optional CSS injected at render time. Max 256 KiB. required: - - html - ProjectConfigHostedPages: + - type + - id + - name + DeploymentReference: type: object - additionalProperties: false - description: | - Hosted auth pages keyed by page type (SUPERAGENT plan). Upsert-only: omitted - pages are left untouched (there is no delete for hosted pages). + description: Stable reference to a Volcano deployment run. properties: - login: - $ref: '#/components/schemas/ProjectConfigHostedPage' - reset_password: - $ref: '#/components/schemas/ProjectConfigHostedPage' - signup: - $ref: '#/components/schemas/ProjectConfigHostedPage' - forgot_password: - $ref: '#/components/schemas/ProjectConfigHostedPage' - device: - $ref: '#/components/schemas/ProjectConfigHostedPage' - verify_email: - $ref: '#/components/schemas/ProjectConfigHostedPage' - PreviewAuthPageRequest: + id: + type: string + format: uuid + required: + - id + ProjectHealthScope: type: object - additionalProperties: false + properties: + resource: + $ref: '#/components/schemas/ProjectHealthResource' required: - - theme - - layout + - resource + ProjectHealthResponse: + type: object properties: - theme: - $ref: '#/components/schemas/AuthPageTheme' - layout: - $ref: '#/components/schemas/AuthPageLayout' - action: + project_id: type: string - PreviewAuthPageResponse: + format: uuid + status: + $ref: '#/components/schemas/ProjectHealthStatus' + observed_at: + type: string + format: date-time + fresh_through: + type: string + format: date-time + data_status: + $ref: '#/components/schemas/ProjectHealthDataStatus' + checks: + type: array + items: + $ref: '#/components/schemas/ProjectHealthCheck' + findings: + description: Top findings ordered by severity, then stable check ID. + type: array + maxItems: 5 + items: + $ref: '#/components/schemas/ProjectHealthCheck' + required: + - project_id + - status + - observed_at + - fresh_through + - data_status + - checks + - findings + ProjectHealthStatus: + type: string + description: empty means no functions, frontends, databases, storage, Volcano Auth users, or Sandbox resources are listed. needs_attention means an operation needs review without confirmed service impairment, or a serving frontend whose edge recovery gave up needs a redeploy. degraded means a resource is only partly available or is unavailable for an expected, temporary reason, such as a frontend whose edge synchronization did not complete or a database being restored; critical means use is blocked. A failed workflow or deployment record alone does not establish an outage. Findings remain available for empty projects. + enum: + - empty + - healthy + - needs_attention + - degraded + - critical + - unknown + ProjectHealthDataStatus: + type: string + enum: + - complete + - partial + - no_data + - stale + ProjectHealthCategory: + type: string + enum: + - lifecycle + - storage + ProjectHealthEvidence: type: object + properties: + metric: + type: string + value: + type: number + format: double + unit: + type: string + sample_count: + type: integer + format: int64 + minimum: 0 required: - - preview_url - - expires_at + - metric + - value + - unit + - sample_count + ProjectHealthCheck: + type: object properties: - preview_url: + id: type: string - format: uri - expires_at: + category: + $ref: '#/components/schemas/ProjectHealthCategory' + status: + $ref: '#/components/schemas/ProjectHealthStatus' + reason_code: type: string - format: date-time - ProjectConfigMissingResource: + scope: + $ref: '#/components/schemas/ProjectHealthScope' + evidence: + $ref: '#/components/schemas/ProjectHealthEvidence' + required: + - id + - category + - status + - reason_code + - scope + - evidence + ProjectMetricsDataStatus: + type: string + enum: + - complete + - partial + - no_data + ProjectMetricsDimensions: type: object + additionalProperties: false properties: - type: + region: + type: string + resource_type: type: string enum: - function - frontend - - database - - bucket - - sandbox - name: + ProjectMetricsGroupBy: + type: string + enum: + - region + - resource_type + ProjectMetricsMetric: + type: string + enum: + - request_count + - server_error_count + - availability + - p95_latency + ProjectMetricsQuery: + type: object + additionalProperties: false + properties: + id: type: string + minLength: 1 + maxLength: 64 + pattern: ^[A-Za-z][A-Za-z0-9_-]*$ + metric: + $ref: '#/components/schemas/ProjectMetricsMetric' + group_by: + $ref: '#/components/schemas/ProjectMetricsGroupBy' required: - - type - - name - ProjectConfigOAuthProvider: + - id + - metric + ProjectMetricsQueryRequest: type: object additionalProperties: false properties: - provider: - type: string - enum: - - google - - github - - microsoft - - apple - - device - enabled: - type: boolean - client_id: - type: string - description: | - Required for non-device providers. Server-generated for - `provider=device` (exported read-only, ignored on apply). - client_secret: - type: string - format: password - writeOnly: true - description: Write-only; omitted from config export. Not used for `provider=device`. - redirect_url: - type: string - description: Not used for `provider=device`. - scopes: + time_range: + $ref: '#/components/schemas/ProjectMetricsQueryTimeRange' + queries: type: array + minItems: 1 + maxItems: 10 items: - type: string + $ref: '#/components/schemas/ProjectMetricsQuery' required: - - provider - ProjectConfigProject: + - time_range + - queries + ProjectMetricsQueryResponse: type: object additionalProperties: false - description: Project-level settings. `name` renames the project. properties: - name: + observed_at: type: string - pattern: ^[A-Za-z0-9_-]+$ - minLength: 1 - maxLength: 255 - all_regions: - type: boolean - description: Region policy. `false` requires `selected_regions` (SUPERAGENT plan). - selected_regions: + format: date-time + fresh_through: + type: string + format: date-time + window: + $ref: '#/components/schemas/ProjectMetricsWindow' + results: type: array items: - type: string - description: Region subset (bare region names). Requires `all_regions=false`. - ProjectConfigRealtime: + $ref: '#/components/schemas/ProjectMetricsResult' + required: + - observed_at + - window + - results + ProjectMetricsQueryTimeRange: type: object additionalProperties: false properties: - enabled: - type: boolean - broadcast_enabled: - type: boolean - presence_enabled: - type: boolean - postgres_changes_enabled: - type: boolean - ProjectConfigAutofix: + window: + type: string + enum: + - 30m + - 1h + - 24h + - 7d + required: + - window + ProjectMetricsResult: type: object additionalProperties: false - description: 'AI diagnosis and fix settings. Omitted fields keep their current value. Your API key is never part of the manifest, and an apply never sets or deletes it: set it with `PUT /projects/{id}/autofix` before turning on a provider that runs on your own key.' properties: - enabled: - type: boolean - max_stage: - $ref: '#/components/schemas/AutofixStage' - auto_trigger: - type: boolean - provider: - $ref: '#/components/schemas/AutofixProvider' - model: - $ref: '#/components/schemas/AutofixModel' - ProjectConfigScheduler: + id: + type: string + metric: + $ref: '#/components/schemas/ProjectMetricsMetric' + unit: + $ref: '#/components/schemas/ProjectMetricsUnit' + data_status: + $ref: '#/components/schemas/ProjectMetricsDataStatus' + values: + type: array + items: + $ref: '#/components/schemas/ProjectMetricsValue' + required: + - id + - metric + - unit + - data_status + - values + ProjectMetricsUnit: + type: string + enum: + - count + - ratio + - seconds + ProjectMetricsValue: type: object additionalProperties: false properties: - name: - type: string - minLength: 1 - maxLength: 200 - cron: - type: string - description: 5-field UTC cron expression - enabled: - type: boolean - payload: - type: object - additionalProperties: true + dimensions: + $ref: '#/components/schemas/ProjectMetricsDimensions' + value: + type: number + format: double + minimum: 0 required: - - name - - cron - ProjectConfigSkippedResource: + - dimensions + - value + ProjectMetricsWindow: type: object properties: - type: - type: string - enum: - - function - - frontend - - database - - bucket - - sandbox - name: + from: type: string - reason: + format: date-time + to: type: string + format: date-time required: - - type - - name - - reason - ProjectConfigValidationError: + - from + - to + ProjectFrontendCustomDomain: + allOf: + - $ref: '#/components/schemas/FrontendCustomDomainResponse' + - type: object + properties: + frontend: + type: object + description: | + The frontend this custom domain is attached to. Inlined to + avoid a second fetch from the project-scoped feed. + properties: + id: + type: string + format: uuid + name: + type: string + required: + - id + - name + required: + - frontend + ProjectDeployment: type: object + description: A Function or Frontend deployment attempt in a project-scoped feed. properties: - section: + id: type: string - description: Manifest section the error refers to (e.g. databases, functions). - name: + format: uuid + project_id: type: string - description: Resource name or key within the section, when applicable. - message: + format: uuid + resource: + $ref: '#/components/schemas/ProjectDeploymentResource' + operation: + type: string + enum: + - deploy + - redeploy + - update + - delete + status: + type: string + enum: + - queued + - provisioning + - active + - degraded + - failed + - superseded + - deleting + - deleted + deploy_source: + type: string + enum: + - git + - cli + - web + - api + - system + - unknown + description: What initiated this deployment. + error_message: type: string - required: - - section - - message - ProjectConfigValidationErrorResponse: - type: object - description: Returned when manifest validation fails. Nothing was applied. - properties: - error: + completed_at: type: string - errors: - type: array - items: - $ref: '#/components/schemas/ProjectConfigValidationError' - required: - - error - - errors - ProjectConfigVariable: - type: object - additionalProperties: false - properties: - shared: - type: boolean - description: Include this name in the project's shared function variables. Omission preserves existing membership; new variables default to true for legacy clients. Send false explicitly to create a non-shared variable. - name: + format: date-time + progress: + $ref: '#/components/schemas/DeploymentProgress' + commit: + $ref: '#/components/schemas/DeploymentCommit' + created_at: type: string - description: Project variable name. Function runtime names such as AWS_REGION are reserved and fail validation; see the environment variables guide for the full list. - minLength: 1 - value: + format: date-time + updated_at: type: string + format: date-time required: - - name - - value - ProjectHealthResource: + - id + - project_id + - resource + - operation + - status + - deploy_source + - created_at + - updated_at + ProjectDeploymentResource: type: object + description: The resource this deployment belongs to. properties: type: type: string enum: - - project - function - frontend - - database id: type: string format: uuid @@ -24189,357 +35578,453 @@ components: allOf: - $ref: '#/components/schemas/FunctionKind' description: | - Which kind of function this check is about. Present only when `type` - is `function`, where both kinds share the name space and this is - what tells them apart. + Which kind of function this deployment belongs to. Both kinds appear + in this feed under `type: function`, because a deployment means the + same thing for either, so this is what tells them apart. Absent when + `type` is `frontend`. required: - type - id - name - ResourceReference: + ProjectDeploymentSummary: type: object - description: Stable reference to a Volcano resource. + description: Aggregate deployment statistics for one resource pipeline. properties: - type: - type: string - enum: - - project - - function - - frontend - - database - id: - type: string - format: uuid - name: - type: string + deployment_count: + type: integer + description: All deployment attempts matching the filters. + successful_count: + type: integer + description: Attempts that reached active or deleted. + failed_count: + type: integer + description: Attempts that reached failed or degraded. + canceled_count: + type: integer + description: Superseded attempts, excluded from success rate and duration. + success_rate: + type: number + format: double + minimum: 0 + maximum: 1 + nullable: true + description: Successful attempts divided by successful plus failed attempts. + median_build_duration_seconds: + type: number + format: double + minimum: 0 + nullable: true + description: Median build duration across eligible completed attempts. required: - - type - - id - - name - DeploymentReference: + - deployment_count + - successful_count + - failed_count + - canceled_count + - success_rate + - median_build_duration_seconds + ProjectUsageResponse: type: object - description: Stable reference to a Volcano deployment run. + description: Aggregated usage metrics for a project. properties: - id: + project_id: type: string format: uuid + description: Project ID + month: + type: string + description: Usage month in YYYY-MM format + example: 2026-02 + metrics: + type: array + description: Usage metrics for the project + items: + $ref: '#/components/schemas/MetricUsageData' + frontends: + type: array + description: Per-frontend request totals for the current usage month + items: + $ref: '#/components/schemas/FrontendUsageData' required: - - id - ProjectHealthScope: - type: object - properties: - resource: - $ref: '#/components/schemas/ProjectHealthResource' - required: - - resource - ProjectHealthResponse: + - project_id + - month + - metrics + RealtimeConfig: type: object + description: | + Realtime configuration for a project. + Note: Message size and channels per connection are plan-based (not configurable). properties: project_id: type: string format: uuid - status: - $ref: '#/components/schemas/ProjectHealthStatus' - observed_at: + description: Project ID + enabled: + type: boolean + description: Whether realtime is enabled for this project + default: false + broadcast_enabled: + type: boolean + description: Whether broadcast channels are enabled + default: true + presence_enabled: + type: boolean + description: Whether presence tracking is enabled + default: true + postgres_changes_enabled: + type: boolean + description: Whether Postgres change notifications are enabled + default: true + created_at: type: string format: date-time - fresh_through: + description: When the configuration was created + updated_at: type: string format: date-time - data_status: - $ref: '#/components/schemas/ProjectHealthDataStatus' - checks: - type: array - items: - $ref: '#/components/schemas/ProjectHealthCheck' - findings: - description: Top findings ordered by severity, then stable check ID. - type: array - maxItems: 5 - items: - $ref: '#/components/schemas/ProjectHealthCheck' - required: - - project_id - - status - - observed_at - - fresh_through - - data_status - - checks - - findings - ProjectHealthStatus: - type: string - enum: - - healthy - - degraded - - critical - - unknown - ProjectHealthDataStatus: - type: string - enum: - - complete - - partial - - no_data - - stale - ProjectHealthCategory: - type: string - enum: - - lifecycle - - storage - ProjectHealthEvidence: + description: When the configuration was last updated + RealtimePlanLimits: type: object + description: Plan-based limits for realtime features properties: - metric: + plan: + type: string + description: Public plan name (HOBBY or SUPERAGENT). + example: HOBBY + max_connections: + type: integer + description: Maximum concurrent connections allowed + example: 100 + messages_per_month: + type: integer + description: Maximum messages per month + example: 1000000 + message_size_kb: + type: integer + description: Maximum message size in KB + example: 32 + channels_per_conn: + type: integer + description: Maximum channels per connection + example: 100 + RealtimeStats: + type: object + description: Realtime usage statistics for a project + properties: + num_connections: + type: integer + description: Current number of active connections + peak_connections: + type: integer + description: Peak concurrent connections this usage period + last_invoked_at: + type: string + format: date-time + description: Most recent realtime activity timestamp across channels + limits: + $ref: '#/components/schemas/RealtimePlanLimits' + ResolveFunctionResponse: + type: object + properties: + name: + type: string + maxLength: 63 + pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ + description: DNS-safe function name + function_id: type: string - value: - type: number - format: double - unit: + format: uuid + description: Canonical function ID used for invocation routing + invoke_url: type: string - sample_count: + description: 'Canonical HTTPS endpoint for invoking this function. Use it as-is: it does not share a domain with the API, so a host derived from the API URL will not reach the function. Omitted in local development and when the deployment serves no public invocation domain; invoke through POST /functions/{functionId}/invoke instead.' + cache_ttl_seconds: type: integer - format: int64 - minimum: 0 + minimum: 1 + description: Suggested SDK cache TTL for this name-to-ID mapping required: - - metric - - value - - unit - - sample_count - ProjectHealthCheck: + - name + - function_id + - cache_ttl_seconds + ScheduleRequest: type: object + required: + - cron_expression properties: - id: + kind: type: string - category: - $ref: '#/components/schemas/ProjectHealthCategory' - status: - $ref: '#/components/schemas/ProjectHealthStatus' - reason_code: + enum: + - cron + default: cron + cron_expression: type: string - scope: - $ref: '#/components/schemas/ProjectHealthScope' - evidence: - $ref: '#/components/schemas/ProjectHealthEvidence' - required: - - id - - category - - status - - reason_code - - scope - - evidence - ProjectMetricsDataStatus: - type: string - enum: - - complete - - partial - - no_data - ProjectMetricsDimensions: + description: Standard 5-field cron expression evaluated in UTC. Seconds fields, descriptors, and Quartz syntax are not supported. + example: '*/5 * * * *' + ServiceKey: type: object - additionalProperties: false + description: | + Service role key for admin operations. + **WARNING:** Bypasses all RLS - backend use only! properties: - region: + id: type: string - resource_type: + format: uuid + project_id: type: string - enum: - - function - - frontend - ProjectMetricsGroupBy: - type: string - enum: - - region - - resource_type - ProjectMetricsMetric: - type: string - enum: - - request_count - - server_error_count - - availability - - p95_latency - ProjectMetricsQuery: + format: uuid + name: + type: string + description: Descriptive name for the key + key_value: + type: string + description: | + Full JWT token for Authorization header. + Returned on create, get, and list (decrypted from storage). List + responses leave it out for a key that holds `ai.invoke` or `grants.mint`. + **Store securely - NEVER expose in frontend code!** + key_prefix: + type: string + description: First 12 characters of the key for display/identification + maxLength: 12 + permissions: + type: array + items: + type: string + description: | + Operations this key may perform. ["*"] grants full admin access + (default for keys created without an explicit scope). Scoped keys + list specific permissions, e.g. ["functions.invoke", "locks.manage"]. + example: + - '*' + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + required: + - id + - name + - key_prefix + - permissions + StorageBucket: type: object - additionalProperties: false + description: | + A named container for files within a project. + Public access is controlled at the file level via is_public on StorageObject. properties: id: type: string + format: uuid + project_id: + type: string + format: uuid + name: + type: string + description: Bucket name (unique within project) + pattern: ^[a-zA-Z0-9_-]+$ minLength: 1 maxLength: 64 - pattern: ^[A-Za-z][A-Za-z0-9_-]*$ - metric: - $ref: '#/components/schemas/ProjectMetricsMetric' - group_by: - $ref: '#/components/schemas/ProjectMetricsGroupBy' - required: - - id - - metric - ProjectMetricsQueryRequest: - type: object - additionalProperties: false - properties: - time_range: - $ref: '#/components/schemas/ProjectMetricsQueryTimeRange' - queries: + file_size_limit: + type: integer + format: int64 + nullable: true + description: Maximum file size in bytes (null for no limit) + allowed_mime_types: type: array - minItems: 1 - maxItems: 10 + nullable: true items: - $ref: '#/components/schemas/ProjectMetricsQuery' + type: string + description: Allowed MIME types (null for all types) + last_invoked_at: + type: string + format: date-time + description: Most recent bucket operation timestamp + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time required: - - time_range - - queries - ProjectMetricsQueryResponse: + - id + - name + StorageCopyRequest: type: object - additionalProperties: false properties: - observed_at: + from: type: string - format: date-time - fresh_through: + description: Source path + to: type: string - format: date-time - window: - $ref: '#/components/schemas/ProjectMetricsWindow' - results: + description: Destination path + required: + - from + - to + StorageListResponse: + type: object + properties: + objects: type: array items: - $ref: '#/components/schemas/ProjectMetricsResult' - required: - - observed_at - - window - - results - ProjectMetricsQueryTimeRange: + $ref: '#/components/schemas/StorageObject' + next_cursor: + type: string + description: Cursor for next page (empty if no more results) + StorageMoveRequest: type: object - additionalProperties: false properties: - window: + from: type: string - enum: - - 30m - - 1h - - 24h - - 7d + description: Source path + to: + type: string + description: Destination path required: - - window - ProjectMetricsResult: + - from + - to + StorageObject: type: object - additionalProperties: false properties: id: type: string - metric: - $ref: '#/components/schemas/ProjectMetricsMetric' - unit: - $ref: '#/components/schemas/ProjectMetricsUnit' - data_status: - $ref: '#/components/schemas/ProjectMetricsDataStatus' - values: - type: array - items: - $ref: '#/components/schemas/ProjectMetricsValue' + format: uuid + bucket_id: + type: string + format: uuid + name: + type: string + description: Full path within bucket (e.g., "users/abc123/avatar.png") + owner_id: + type: string + format: uuid + nullable: true + description: Auth user who uploaded (null for anonymous/service) + is_public: + type: boolean + default: false + description: | + If true, the file can be downloaded with just an anon key (no user authentication). + Files are private by default. Only the owner or a service key can change visibility. + size: + type: integer + format: int64 + description: File size in bytes + mime_type: + type: string + description: MIME type + etag: + type: string + description: Entity tag for cache validation + metadata: + type: object + additionalProperties: true + description: | + Custom user metadata (key-value pairs). + Limits: Maximum 50 keys, maximum 10KB total serialized size. + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + public_url: + type: string + format: uri + description: | + Shareable public URL for this file (only set for public files with is_public=true). + This URL requires NO authentication and can be embedded in HTML, shared via email, etc. + The URL is properly URL-encoded by the server - use it as-is without additional encoding. required: - id - - metric - - unit - - data_status - - values - ProjectMetricsUnit: - type: string - enum: - - count - - ratio - - seconds - ProjectMetricsValue: - type: object - additionalProperties: false - properties: - dimensions: - $ref: '#/components/schemas/ProjectMetricsDimensions' - value: - type: number - format: double - minimum: 0 - required: - - dimensions - - value - ProjectMetricsWindow: + - bucket_id + - name + - is_public + - size + - mime_type + StorageObjectWithBucket: type: object + description: Storage object with bucket name included (for admin listing across buckets) properties: - from: + id: + type: string + format: uuid + bucket_id: + type: string + format: uuid + bucket_name: + type: string + description: Name of the bucket containing this object + name: + type: string + description: Full path within bucket + owner_id: + type: string + format: uuid + nullable: true + description: Auth user who uploaded (null for anonymous/service) + is_public: + type: boolean + default: false + size: + type: integer + format: int64 + description: File size in bytes + mime_type: + type: string + etag: + type: string + metadata: + type: object + additionalProperties: true + created_at: type: string format: date-time - to: + updated_at: type: string format: date-time + public_url: + type: string + format: uri + description: | + Shareable public URL for this file (only set for public files with is_public=true). + This URL requires NO authentication and can be embedded in HTML, shared via email, etc. required: - - from - - to - ProjectFrontendCustomDomain: - allOf: - - $ref: '#/components/schemas/FrontendCustomDomainResponse' - - type: object - properties: - frontend: - type: object - description: | - The frontend this custom domain is attached to. Inlined to - avoid a second fetch from the project-scoped feed. - properties: - id: - type: string - format: uuid - name: - type: string - required: - - id - - name - required: - - frontend - ProjectDeployment: + - id + - bucket_id + - bucket_name + - name + - is_public + - size + - mime_type + StoragePolicy: type: object - description: A Function or Frontend deployment attempt in a project-scoped feed. properties: id: type: string format: uuid - project_id: + bucket_id: type: string format: uuid - resource: - $ref: '#/components/schemas/ProjectDeploymentResource' - operation: - type: string - enum: - - deploy - - redeploy - - update - - delete - status: + name: type: string - enum: - - queued - - provisioning - - active - - degraded - - failed - - superseded - - deleting - - deleted - deploy_source: + description: Policy name (unique within bucket) + operation: type: string enum: - - git - - cli - - web - - api - - system - - unknown - description: What initiated this deployment. - error_message: - type: string - completed_at: + - SELECT + - INSERT + - UPDATE + - DELETE + description: Operation this policy applies to + definition: type: string - format: date-time - progress: - $ref: '#/components/schemas/DeploymentProgress' + description: | + Policy expression evaluated at request time. + Examples: + - "true" - Allow all + - "auth.uid() = owner_id" - Owner only + - "auth.role() = 'authenticated'" - Authenticated users + - "(storage.foldername(name))[1] = auth.uid()::text" - User's folder created_at: type: string format: date-time @@ -24548,477 +36033,563 @@ components: format: date-time required: - id - - project_id - - resource + - bucket_id + - name - operation - - status - - deploy_source - - created_at - - updated_at - ProjectDeploymentResource: + - definition + StorageStats: type: object - description: The resource this deployment belongs to. + description: Aggregate storage statistics for a project properties: - type: + bucket_count: + type: integer + description: Number of storage buckets + object_count: + type: integer + description: Total number of stored files + total_size: + type: integer + format: int64 + description: Total storage used in bytes + required: + - bucket_count + - object_count + - total_size + StorageVisibilityRequest: + type: object + properties: + is_public: + type: boolean + description: Whether the file should be publicly accessible + required: + - is_public + UnbanUserResponse: + type: object + description: Response when unbanning a user + properties: + message: type: string - enum: - - function - - frontend - id: + example: User unbanned successfully + user_id: type: string format: uuid - name: + email: + type: string + format: email + status: + type: string + enum: + - active + required: + - message + - user_id + - email + - status + TestEmailRequest: + type: object + required: + - to_email + description: | + When `html_body` or `text_body` is provided the backend renders + those (plus optional `subject`) through html/text templates + against the standard `Data` (ProjectName, Name, SiteURL) + and sends the result — used by the template-editor "Send Test" + affordance to preview an unsaved template. When both bodies are + omitted a hardcoded diagnostic message is sent to verify SMTP + credentials and `subject` is ignored. Sending `subject` alone + (without a body) is rejected with 400. + properties: + to_email: + type: string + format: email + x-go-type: string + description: Recipient address for the diagnostic email. + subject: type: string - kind: - allOf: - - $ref: '#/components/schemas/FunctionKind' description: | - Which kind of function this deployment belongs to. Both kinds appear - in this feed under `type: function`, because a deployment means the - same thing for either, so this is what tells them apart. Absent when - `type` is `frontend`. + Optional subject override, rendered as a text/template. Only + applied on the override path — requires `html_body` or + `text_body` to also be set, otherwise the request is + rejected with 400. + html_body: + type: string + maxLength: 262144 + description: Optional HTML body override. Rendered as an html/template. Max 256 KiB. + text_body: + type: string + maxLength: 262144 + description: Optional plain-text body override. Rendered as a text/template. Max 256 KiB. + TestEmailResponse: + type: object required: - - type - - id - - name - ProjectDeploymentSummary: + - success + properties: + success: + type: boolean + UpdateAuthConfigRequest: type: object - description: Aggregate deployment statistics for one resource pipeline. + description: 'All fields optional - only include fields you want to update. Validation rule: require_email_confirmation=true requires email_enabled=true.' properties: - deployment_count: + access_token_lifetime: type: integer - description: All deployment attempts matching the filters. - successful_count: + refresh_token_lifetime: type: integer - description: Attempts that reached active or deleted. - failed_count: + refresh_token_reuse_interval: type: integer - description: Attempts that reached failed or degraded. - canceled_count: + inactivity_timeout: type: integer - description: Superseded attempts, excluded from success rate and duration. - success_rate: - type: number - format: double - minimum: 0 - maximum: 1 - nullable: true - description: Successful attempts divided by successful plus failed attempts. - median_build_duration_seconds: - type: number - format: double - minimum: 0 - nullable: true - description: Median build duration across eligible completed attempts. - required: - - deployment_count - - successful_count - - failed_count - - canceled_count - - success_rate - - median_build_duration_seconds - ProjectUsageResponse: - type: object - description: Aggregated usage metrics for a project. - properties: - project_id: - type: string - format: uuid - description: Project ID - month: - type: string - description: Usage month in YYYY-MM format - example: 2026-02 - metrics: + max_session_duration: + type: integer + platform_token_ttl: + type: integer + description: TTL in seconds for platform tokens minted via `/auth/platform/exchange`. From 3600 (1 hour) to 31536000 (365 days). + minimum: 3600 + maximum: 31536000 + min_password_length: + type: integer + minimum: 15 + maximum: 128 + require_uppercase: + type: boolean + require_lowercase: + type: boolean + require_numbers: + type: boolean + require_special_chars: + type: boolean + enable_signup: + type: boolean + description: Master switch for signups across ALL providers + enable_email_password: + type: boolean + description: Enable/disable email/password provider + rate_limit_signup: + type: integer + rate_limit_signin: + type: integer + rate_limit_token_refresh: + type: integer + rate_limit_password_reset: + type: integer + description: Password reset requests per hour per IP. Unlike the other limits, 0 applies the default of 10 instead of turning the limit off. + cors_enabled: + type: boolean + cors_allowed_origins: type: array - description: Usage metrics for the project + description: Replaces the allowed origins list. items: - $ref: '#/components/schemas/MetricUsageData' - frontends: + type: string + example: + - https://myapp.com + - http://localhost:3000 + cors_allow_credentials: + type: boolean + cors_max_age: + type: integer + cors_allow_frontend_previews: + type: boolean + description: Allow the origins of the project's own live frontend previews. + enable_anonymous_signins: + type: boolean + allowed_email_domains: type: array - description: Per-frontend request totals for the current usage month + maxItems: 100 + description: | + Replaces the email domain allowlist. Empty array removes the + restriction so any domain can sign up. Entries must be bare domains + such as `domain1.com` and are stored normalized (lowercase, no `@` + prefix); matching is exact, so subdomains need their own entry. At + most 100 entries. + + Restricting signups is a SUPERAGENT feature to configure and to enforce: a + HOBBY project can only remove the restriction and gets 403 for any + other change, and the list it keeps is parked until it upgrades. items: - $ref: '#/components/schemas/FrontendUsageData' - required: - - project_id - - month - - metrics - RealtimeConfig: - type: object - description: | - Realtime configuration for a project. - Note: Message size and channels per connection are plan-based (not configurable). - properties: - project_id: + type: string + example: + - domain1.com + - domain2.com + allowed_email_domains_mode: type: string - format: uuid - description: Project ID - enabled: + description: | + How far `allowed_email_domains` reaches. `signup` gates account + creation only. `signup_and_signin` also blocks sign-in for accounts + outside the list; switching to it, or narrowing the list while in + it, deletes the sessions of every account it locks out. `disabled` + keeps the list without enforcing it. + enum: + - disabled + - signup + - signup_and_signin + allow_password_reset: type: boolean - description: Whether realtime is enabled for this project - default: false - broadcast_enabled: + password_reset_timeout: + type: integer + max_password_history: + type: integer + require_email_confirmation: type: boolean - description: Whether broadcast channels are enabled - default: true - presence_enabled: + description: Require users to confirm email before sign-in. Can only be true when email_enabled is true. + email_confirmation_timeout: + type: integer + description: Email confirmation token expiry in seconds. + auto_link_verified_oauth: type: boolean - description: Whether presence tracking is enabled - default: true - postgres_changes_enabled: + description: Link a verified OAuth identity to an existing confirmed account with the same email instead of returning a conflict. Requires require_email_confirmation to be true. + email_enabled: type: boolean - description: Whether Postgres change notifications are enabled - default: true - created_at: + description: Enable transactional email sending. Cannot be false while require_email_confirmation is true. + email_from_address: type: string - format: date-time - description: When the configuration was created - updated_at: + description: Sender email address. New or changed values containing carriage returns or newlines return 400. Unchanged stored or exported values are preserved. Leading and trailing whitespace in previously saved settings is ignored when sending. + email_from_name: type: string - format: date-time - description: When the configuration was last updated - RealtimePlanLimits: - type: object - description: Plan-based limits for realtime features - properties: - plan: + description: Sender display name; supports punctuation and Unicode. New or changed values containing carriage returns or newlines return 400. Unchanged stored or exported values are preserved. Leading and trailing whitespace in previously saved settings is ignored when sending. + smtp_host: type: string - description: Public plan name (HOBBY or SUPERAGENT). - example: HOBBY - max_connections: - type: integer - description: Maximum concurrent connections allowed - example: 100 - messages_per_month: - type: integer - description: Maximum messages per month - example: 1000000 - message_size_kb: - type: integer - description: Maximum message size in KB - example: 32 - channels_per_conn: - type: integer - description: Maximum channels per connection - example: 100 - RealtimeStats: - type: object - description: Realtime usage statistics for a project - properties: - num_connections: - type: integer - description: Current number of active connections - peak_connections: + smtp_port: type: integer - description: Peak concurrent connections this usage period - last_invoked_at: + smtp_username: + type: string + smtp_password: + type: string + format: password + writeOnly: true + minLength: 1 + description: Replacement SMTP password. Omit this field to preserve the configured password. The value is encrypted at rest and never returned. + smtp_use_tls: + type: boolean + email_confirmation_subject: + type: string + description: Subject template. For new or changed values, literal interior carriage returns or newlines after Go template whitespace trimming return 400. Outer whitespace and trailing block-scalar newlines are allowed. Unchanged stored subjects are preserved. + email_password_reset_subject: type: string - format: date-time - description: Most recent realtime activity timestamp across channels - limits: - $ref: '#/components/schemas/RealtimePlanLimits' - ResolveFunctionResponse: + description: Subject template. For new or changed values, literal interior carriage returns or newlines after Go template whitespace trimming return 400. Outer whitespace and trailing block-scalar newlines are allowed. Unchanged stored subjects are preserved. + email_password_changed_subject: + type: string + description: Subject template. For new or changed values, literal interior carriage returns or newlines after Go template whitespace trimming return 400. Outer whitespace and trailing block-scalar newlines are allowed. Unchanged stored subjects are preserved. + managed_auth_enabled: + type: boolean + description: Enable or disable managed auth hosted pages for the project. + post_auth_redirect_url: + type: string + description: Must be included in allowed_redirect_urls when set. + allowed_redirect_urls: + type: array + items: + type: string + description: Redirect allowlist. Every entry must be a valid http/https URL. + post_logout_redirect_url: + type: string + description: Must be included in allowed_redirect_urls when set. + device_verification_url: + type: string + description: | + Optional custom device-authorization verification page. Must be a + valid http/https URL (not tied to allowed_redirect_urls). When set, + device-code logins return this URL (with user_code) instead of the + managed device page. Send an empty string to clear the override. + UpdateAuthHostedPageRequest: type: object + required: + - html properties: - name: - type: string - maxLength: 63 - pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$ - description: DNS-safe function name - function_id: + html: type: string - format: uuid - description: Canonical function ID used for invocation routing - invoke_url: + description: Raw HTML markup for the page. Max 256 KiB. + css: type: string - description: 'Canonical HTTPS endpoint for invoking this function. Use it as-is: it does not share a domain with the API, so a host derived from the API URL will not reach the function. Omitted when the deployment serves no public invocation domain, as in local development; invoke through POST /functions/{functionId}/invoke instead.' - cache_ttl_seconds: - type: integer - minimum: 1 - description: Suggested SDK cache TTL for this name-to-ID mapping + description: Optional CSS injected at render time. Max 256 KiB. + UpdateAuthPageLayoutRequest: + type: object + additionalProperties: false required: - - name - - function_id - - cache_ttl_seconds - ScheduleRequest: + - layout + properties: + layout: + $ref: '#/components/schemas/AuthPageLayout' + UpdateAuthPageThemeRequest: type: object + additionalProperties: false required: - - cron_expression + - theme properties: - kind: + theme: + $ref: '#/components/schemas/AuthPageTheme' + UpdateDatabaseTypeRequest: + type: object + description: Update database compute size tier + properties: + database_type: type: string + description: New compute size tier enum: - - cron - default: cron - cron_expression: - type: string - description: Standard 5-field cron expression evaluated in UTC. Seconds fields, descriptors, and Quartz syntax are not supported. - example: '*/5 * * * *' - ServiceKey: + - volcano-db-xs + - volcano-db-s + - volcano-db-m + - volcano-db-l + - volcano-db-xl + - volcano-db-2xl + example: volcano-db-m + required: + - database_type + UpdateEmailTemplateRequest: type: object - description: | - Service role key for admin operations. - **WARNING:** Bypasses all RLS - backend use only! properties: - id: - type: string - format: uuid - project_id: + subject: type: string - format: uuid - name: + description: Subject template. For new or changed values, literal interior carriage returns or newlines after Go template whitespace trimming return 400. Outer whitespace and trailing block-scalar newlines are allowed. Unchanged stored subjects are preserved. + html_body: type: string - description: Descriptive name for the key - key_value: + text_body: type: string + UpdateFunctionRequest: + type: object + additionalProperties: false + minProperties: 1 + properties: + visibility: + $ref: '#/components/schemas/FunctionVisibility' + is_public: + type: boolean + deprecated: true description: | - Full JWT token for Authorization header. - Returned on create, get, and list (decrypted from storage). - **Store securely - NEVER expose in frontend code!** - key_prefix: + Deprecated alias for `visibility`: `true` means `public` and + `false` means `authenticated`. Sending both with different meanings + returns 400. + invocation_mode: + $ref: '#/components/schemas/FunctionInvocationMode' + http_auth_mode: + $ref: '#/components/schemas/FunctionHTTPAuthMode' + openapi_spec: + type: object + nullable: true + additionalProperties: true + description: OpenAPI 3.0 or 3.1 metadata for HTTP mode. Send null to clear it. + UpdateFunctionSchedulerRequest: + type: object + properties: + name: type: string - description: First 12 characters of the key for display/identification - maxLength: 12 - permissions: + maxLength: 200 + enabled: + type: boolean + schedule: + $ref: '#/components/schemas/ScheduleRequest' + payload: + type: object + additionalProperties: true + regions: type: array + maxItems: 1 items: type: string - description: | - Operations this key may perform. ["*"] grants full admin access - (default for keys created without an explicit scope). Scoped keys - list specific permissions, e.g. ["functions.invoke", "locks.manage"]. - example: - - '*' - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - required: - - id - - name - - key_prefix - - permissions - StorageBucket: + UpdateOAuthConfigRequest: type: object - description: | - A named container for files within a project. - Public access is controlled at the file level via is_public on StorageObject. properties: - id: + client_id: type: string - format: uuid - project_id: + description: Supported for non-device providers. Not supported for `provider=device`. + client_secret: type: string - format: uuid + description: Supported for non-device providers. Not supported for `provider=device`. + redirect_url: + type: string + format: uri + scopes: + type: array + items: + type: string + enabled: + type: boolean + UpdateProjectRequest: + type: object + description: Update mutable project fields (name and/or region policy) + properties: name: type: string - description: Bucket name (unique within project) - pattern: ^[a-zA-Z0-9_-]+$ minLength: 1 - maxLength: 64 - file_size_limit: - type: integer - format: int64 - nullable: true - description: Maximum file size in bytes (null for no limit) - allowed_mime_types: + maxLength: 255 + example: my-awesome-app-renamed + all_regions: + type: boolean + description: | + If omitted and `selected_regions` is also omitted, existing region policy is preserved. + If `selected_regions` is provided without `all_regions`, it is treated as subset mode. + selected_regions: type: array - nullable: true items: type: string - description: Allowed MIME types (null for all types) - last_invoked_at: - type: string - format: date-time - description: Most recent bucket operation timestamp - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - required: - - id - - name - StorageCopyRequest: + description: | + Region subset for project deployments. + Provide with `all_regions=false`. + example: + - us-east-1 + UpdateRealtimeConfigRequest: type: object + description: | + Request to update realtime configuration. + Limits (message size, channels per connection) are plan-based and cannot be configured. properties: - from: - type: string - description: Source path - to: - type: string - description: Destination path - required: - - from - - to - StorageListResponse: + enabled: + type: boolean + description: Whether realtime is enabled for this project + broadcast_enabled: + type: boolean + description: Whether broadcast channels are enabled + presence_enabled: + type: boolean + description: Whether presence tracking is enabled + postgres_changes_enabled: + type: boolean + description: Whether Postgres change notifications are enabled + UpdateStorageBucketRequest: type: object properties: - objects: + file_size_limit: + type: integer + format: int64 + allowed_mime_types: type: array items: - $ref: '#/components/schemas/StorageObject' - next_cursor: - type: string - description: Cursor for next page (empty if no more results) - StorageMoveRequest: + type: string + UpdateVariableRequest: type: object properties: - from: - type: string - description: Source path - to: + shared: + type: boolean + description: Include this name in the project's shared function variables. Omission preserves existing membership; new variables default to true for legacy clients. Send false explicitly to create a non-shared variable. + value: type: string - description: Destination path required: - - from - - to - StorageObject: + - value + UploadSessionPart: type: object + description: Information about an uploaded part properties: - id: - type: string - format: uuid - bucket_id: - type: string - format: uuid - name: - type: string - description: Full path within bucket (e.g., "users/abc123/avatar.png") - owner_id: + part_number: + type: integer + description: Part number (1-10000) + etag: type: string - format: uuid - nullable: true - description: Auth user who uploaded (null for anonymous/service) - is_public: - type: boolean - default: false - description: | - If true, the file can be downloaded with just an anon key (no user authentication). - Files are private by default. Only the owner or a service key can change visibility. + description: ETag of the uploaded part size: type: integer format: int64 - description: File size in bytes - mime_type: - type: string - description: MIME type - etag: - type: string - description: Entity tag for cache validation - metadata: - type: object - additionalProperties: true - description: | - Custom user metadata (key-value pairs). - Limits: Maximum 50 keys, maximum 10KB total serialized size. - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - public_url: - type: string - format: uri - description: | - Shareable public URL for this file (only set for public files with is_public=true). - This URL requires NO authentication and can be embedded in HTML, shared via email, etc. - The URL is properly URL-encoded by the server - use it as-is without additional encoding. - required: - - id - - bucket_id - - name - - is_public - - size - - mime_type - StorageObjectWithBucket: + description: Size of the part in bytes + UploadSessionStatusResponse: type: object - description: Storage object with bucket name included (for admin listing across buckets) + description: Status of an upload session properties: - id: - type: string - format: uuid - bucket_id: + session_id: type: string - format: uuid - bucket_name: + description: Upload session ID + status: type: string - description: Name of the bucket containing this object - name: + enum: + - pending + - uploading + - completing + - completed + - aborted + description: Current status of the upload + path: type: string - description: Full path within bucket - owner_id: + description: Target file path + content_type: type: string - format: uuid - nullable: true - description: Auth user who uploaded (null for anonymous/service) - is_public: - type: boolean - default: false - size: + description: MIME type + total_size: type: integer format: int64 - description: File size in bytes - mime_type: - type: string - etag: + description: Total file size in bytes + part_size: + type: integer + format: int64 + description: Size of each part (except last) + total_parts: + type: integer + description: Total number of parts + parts_uploaded: + type: integer + description: Number of parts uploaded + bytes_uploaded: + type: integer + format: int64 + description: Total bytes uploaded so far + parts: + type: array + description: List of uploaded parts (for resume) + items: + $ref: '#/components/schemas/UploadSessionPart' + expires_at: type: string - metadata: - type: object - additionalProperties: true + format: date-time + description: Session expiry time created_at: type: string format: date-time - updated_at: + description: Session creation time + UsageDataPoint: + type: object + description: A single timestamped usage value. + properties: + timestamp: type: string format: date-time - public_url: - type: string - format: uri - description: | - Shareable public URL for this file (only set for public files with is_public=true). - This URL requires NO authentication and can be embedded in HTML, shared via email, etc. + description: UTC timestamp for the data point + value: + type: integer + format: int64 + description: Usage value at the timestamp required: - - id - - bucket_id - - bucket_name - - name - - is_public - - size - - mime_type - StoragePolicy: + - timestamp + - value + Variable: type: object properties: + shared: + type: boolean + description: Include this name in the project's shared function variables. Omission preserves existing membership; new variables default to true for legacy clients. Send false explicitly to create a non-shared variable. + frontend_shared: + type: boolean + description: Whether this name is in the project's shared frontend-variable list. id: type: string format: uuid - bucket_id: + project_id: type: string format: uuid name: type: string - description: Policy name (unique within bucket) - operation: + maxLength: 256 + value: + type: string + status: type: string enum: - - SELECT - - INSERT - - UPDATE - - DELETE - description: Operation this policy applies to - definition: + - provisioning + - active + - failed + description: Latest project variable propagation status, when a sync has run. + current_sync_id: type: string - description: | - Policy expression evaluated at request time. - Examples: - - "true" - Allow all - - "auth.uid() = owner_id" - Owner only - - "auth.role() = 'authenticated'" - Authenticated users - - "(storage.foldername(name))[1] = auth.uid()::text" - User's folder + format: uuid + description: Identifier of the latest variable propagation sync. + provisioning_started_at: + type: string + format: date-time + description: Timestamp when the current variable propagation phase started. + deploy_source: + type: string + enum: + - git + - cli + - web + - api + - system + - unknown + description: What initiated the latest variable propagation sync, when one has run. created_at: type: string format: date-time @@ -25027,1105 +36598,1279 @@ components: format: date-time required: - id - - bucket_id + - project_id - name - - operation - - definition - StorageStats: + - value + - created_at + - updated_at + OpenAPISpecDocument: type: object - description: Aggregate storage statistics for a project - properties: - bucket_count: - type: integer - description: Number of storage buckets - object_count: - type: integer - description: Total number of stored files - total_size: - type: integer - format: int64 - description: Total storage used in bytes - required: - - bucket_count - - object_count - - total_size - StorageVisibilityRequest: + additionalProperties: true + description: | + This OpenAPI document, with every reference resolved. Shared by the JSON + and YAML operations, which differ only in serialization. + SandboxSessionExecutions: type: object + additionalProperties: false + description: How the session's command executions are kept. Fixed when the session is created. properties: - is_public: + keep_output: type: boolean - description: Whether the file should be publicly accessible + description: When false, every command in the session keeps no output. stdout and stderr are returned once in the command's response, and Volcano's control plane never stores them in the execution journal, database, logs or traces. This does not cover the Sandbox's memory or a suspended session's snapshot. A retry with the same Idempotency-Key returns the exit code with empty streams. A command in such a session that sets `keep_output` to true is refused with 400 and code `sandbox_session_keeps_no_output`. False is refused with 400 and code `feature_unavailable` while the `sandboxes.output_not_kept` capability is unavailable. required: - - is_public - UnbanUserResponse: + - keep_output + ProjectTemplateInstallationSource: type: object - description: Response when unbanning a user + description: The share release a fork was installed from. + required: + - kind + - share_id + - release_id properties: - message: - type: string - example: User unbanned successfully - user_id: + kind: type: string - format: uuid - email: + enum: + - share_release + share_id: type: string - format: email - status: + description: The share the release belongs to. + release_id: type: string - enum: - - active - required: - - message - - user_id - - email - - status - TestEmailRequest: + format: uuid + description: The release the project was installed from. + ProjectTemplateInstallation: type: object - required: - - to_email description: | - When `html_body` or `text_body` is provided the backend renders - those (plus optional `subject`) through html/text templates - against the standard `Data` (ProjectName, Name, SiteURL) - and sends the result — used by the template-editor "Send Test" - affordance to preview an unsaved template. When both bodies are - omitted a hardcoded diagnostic message is sent to verify SMTP - credentials and `subject` is ignored. Sending `subject` alone - (without a body) is rejected with 400. + Template initialization progress, returned by project creation and the + individual project endpoint. Omitted for projects without a template. + Project creation accepts the installation; wait for `ready` before use. + A failed installation retains the project for inspection or deletion. + required: + - status + - phase properties: - to_email: - type: string - format: email - description: Recipient address for the diagnostic email. - subject: - type: string - description: | - Optional subject override, rendered as a text/template. Only - applied on the override path — requires `html_body` or - `text_body` to also be set, otherwise the request is - rejected with 400. - html_body: + status: type: string - maxLength: 262144 - description: Optional HTML body override. Rendered as an html/template. Max 256 KiB. - text_body: + enum: + - pending + - running + - ready + - failed + phase: type: string - maxLength: 262144 - description: Optional plain-text body override. Rendered as a text/template. Max 256 KiB. - TestEmailResponse: - type: object - required: - - success - properties: - success: - type: boolean - UpdateAuthConfigRequest: + enum: + - database + - restore + - configure + - deploy + - verify + - ready + source: + $ref: '#/components/schemas/ProjectTemplateInstallationSource' + failure_code: + type: string + example: source_withdrawn + description: | + Why the installation failed. Present only when `status` is `failed`, and + absent for installations that failed before Volcano recorded a reason. + New codes can be added, so treat an unknown one as a generic failure. + `source_withdrawn`: the deploy link was switched off or deleted, or its + project is being deleted. `source_invalid`: the source failed Volcano's checks, + such as a release archive whose digest, size or contents are wrong. + `source_access_lost`: Volcano can no longer read the source repository. + `invalid_source_configuration`: the source's `volcano-config.yaml` is + invalid, or it declares a variable the new project does not have. + `nothing_to_deploy`: the source has no function or frontend. + `database_not_supported`: the source ships database SQL. + `function_deploy_refused`: a function in the source cannot be deployed + as defined. `function_quota_exceeded`, + `durable_function_quota_exceeded`, `frontend_quota_exceeded`, + `frontend_deploy_limit` and `build_minutes_exceeded`: the project + reached a plan limit. `build_failed`: a function or frontend from the + source failed to build or deploy; its deployment's build logs say why. + `retry_budget_exhausted`: the installation kept failing and Volcano + stopped retrying. `internal_error`: Volcano failed for a reason of its + own. + ProjectGitConnectionSummary: type: object - description: 'All fields optional - only include fields you want to update. Validation rule: require_email_confirmation=true requires email_enabled=true.' properties: - access_token_lifetime: - type: integer - refresh_token_lifetime: - type: integer - refresh_token_reuse_interval: - type: integer - inactivity_timeout: - type: integer - max_session_duration: - type: integer - platform_token_ttl: - type: integer - description: TTL in seconds for platform tokens minted via `/auth/platform/exchange`. From 3600 (1 hour) to 31536000 (365 days). - minimum: 3600 - maximum: 31536000 - min_password_length: - type: integer - minimum: 15 - maximum: 128 - require_uppercase: - type: boolean - require_lowercase: - type: boolean - require_numbers: - type: boolean - require_special_chars: - type: boolean - enable_signup: - type: boolean - description: Master switch for signups across ALL providers - enable_email_password: - type: boolean - description: Enable/disable email/password provider - rate_limit_signup: - type: integer - rate_limit_signin: - type: integer - rate_limit_token_refresh: - type: integer - rate_limit_password_reset: - type: integer - description: Password reset requests per hour per IP. Unlike the other limits, 0 applies the default of 10 instead of turning the limit off. - cors_enabled: - type: boolean - cors_allowed_origins: - type: array - description: Replaces the allowed origins list. - items: - type: string - example: - - https://myapp.com - - http://localhost:3000 - cors_allow_credentials: - type: boolean - cors_max_age: - type: integer - enable_anonymous_signins: - type: boolean - allowed_email_domains: - type: array - maxItems: 100 - description: | - Replaces the email domain allowlist. Empty array removes the - restriction so any domain can sign up. Entries must be bare domains - such as `domain1.com` and are stored normalized (lowercase, no `@` - prefix); matching is exact, so subdomains need their own entry. At - most 100 entries. - - Restricting signups is a SUPERAGENT feature to configure and to enforce: a - HOBBY project can only remove the restriction and gets 403 for any - other change, and the list it keeps is parked until it upgrades. - items: - type: string - example: - - domain1.com - - domain2.com - allowed_email_domains_mode: - type: string - description: | - How far `allowed_email_domains` reaches. `signup` gates account - creation only. `signup_and_signin` also blocks sign-in for accounts - outside the list; switching to it, or narrowing the list while in - it, deletes the sessions of every account it locks out. `disabled` - keeps the list without enforcing it. - enum: - - disabled - - signup - - signup_and_signin - allow_password_reset: - type: boolean - password_reset_timeout: - type: integer - max_password_history: - type: integer - require_email_confirmation: - type: boolean - description: Require users to confirm email before sign-in. Can only be true when email_enabled is true. - email_confirmation_timeout: + repo_installation_id: type: integer - description: Email confirmation token expiry in seconds. - auto_link_verified_oauth: - type: boolean - description: Link a verified OAuth identity to an existing confirmed account with the same email instead of returning a conflict. Requires require_email_confirmation to be true. - email_enabled: - type: boolean - description: Enable transactional email sending. Cannot be false while require_email_confirmation is true. - email_from_address: - type: string - email_from_name: - type: string - smtp_host: - type: string - smtp_port: + format: int64 + repo_id: type: integer - smtp_username: - type: string - smtp_password: - type: string - format: password - writeOnly: true - minLength: 1 - description: Replacement SMTP password. Omit this field to preserve the configured password. The value is encrypted at rest and never returned. - smtp_use_tls: - type: boolean - email_confirmation_subject: + format: int64 + repo_full_name: type: string - email_password_reset_subject: + root_directory: type: string - email_password_changed_subject: + production_branch: type: string - managed_auth_enabled: - type: boolean - description: Enable or disable managed auth hosted pages for the project. - post_auth_redirect_url: + updated_at: type: string - description: Must be included in allowed_redirect_urls when set. - allowed_redirect_urls: + format: date-time + description: 'When the connection last changed: its repository, root directory or production branch. Naming the branch it already uses, and other changes to the project, leave it alone. A connection that has not changed since Volcano began tracking this reports the project''s last change before then.' + required: + - repo_installation_id + - repo_id + - repo_full_name + - root_directory + - production_branch + - updated_at + ProjectHealthSummary: + type: object + properties: + status: + $ref: '#/components/schemas/ProjectHealthStatus' + required: + - status + FunctionKind: + type: string + enum: + - standard + - durable + default: standard + description: | + Which kind of function this is. `standard` runs once per invocation. + `durable` checkpoints its progress and resumes from the last completed + step, and is invoked asynchronously through its own executions + collection. A function's kind is fixed when it is created and cannot be + changed afterwards. Omitting this field means `standard`. + UpdateNotificationEmail: + type: object + additionalProperties: false + properties: + enabled: + type: boolean + recipients: type: array + maxItems: 10 items: type: string - description: Redirect allowlist. Every entry must be a valid http/https URL. - post_logout_redirect_url: - type: string - description: Must be included in allowed_redirect_urls when set. - device_verification_url: + format: email + maxLength: 254 + description: Only the project owner's verified account email address is supported. An empty list, or one naming only that address, emails the owner and is saved as an empty list. Any other list is refused as invalid. + UpdateNotificationWebhook: + type: object + additionalProperties: false + properties: + url: type: string - description: | - Optional custom device-authorization verification page. Must be a - valid http/https URL (not tied to allowed_redirect_urls). When set, - device-code logins return this URL (with user_code) instead of the - managed device page. Send an empty string to clear the override. - UpdateAuthHostedPageRequest: + maxLength: 2048 + pattern: ^\s*(|[hH][tT][tT][pP][sS]?://.+)\s*$ + description: An `http` or `https` URL. Surrounding whitespace is trimmed. An empty string removes the webhook and its secret. + SchedulerFailureNotifyOn: + type: string + enum: + - first_failure + - consecutive_failures + x-enum-varnames: + - SchedulerFailureNotifyOnFirstFailure + - SchedulerFailureNotifyOnConsecutiveFailures + description: 'When a failing scheduler is announced: on its first failed run, or once `threshold` runs in a row have failed. Either way a streak is announced once, and a scheduler is announced failing at most once an hour.' + UpdateSchedulerFailureAlertPolicy: + type: object + additionalProperties: false + properties: + notify_on: + $ref: '#/components/schemas/SchedulerFailureNotifyOn' + threshold: + type: integer + minimum: 1 + maximum: 100 + notify_on_recovery: + type: boolean + ProjectConfigNotifications: + type: object + additionalProperties: false + description: 'Where the project''s alerts go and when a failing scheduler is announced. Omitted fields keep their current value. The webhook signing secret is never part of the manifest: setting `webhook.url` on a project without a webhook generates one that is never shown. Rotate it with `POST /projects/{id}/notifications/webhook-secret` to get a secret you can use.' + properties: + email: + $ref: '#/components/schemas/UpdateNotificationEmail' + webhook: + $ref: '#/components/schemas/UpdateNotificationWebhook' + scheduler_failures: + $ref: '#/components/schemas/UpdateSchedulerFailureAlertPolicy' + AuthPageThemeColors: type: object + additionalProperties: false required: - - html + - background + - surface + - text + - accent + - accent_text properties: - html: + background: type: string - description: Raw HTML markup for the page. Max 256 KiB. - css: + pattern: ^#[0-9a-fA-F]{6}$ + surface: type: string - description: Optional CSS injected at render time. Max 256 KiB. - UpdateAuthPageLayoutRequest: + pattern: ^#[0-9a-fA-F]{6}$ + text: + type: string + pattern: ^#[0-9a-fA-F]{6}$ + accent: + type: string + pattern: ^#[0-9a-fA-F]{6}$ + accent_text: + type: string + pattern: ^#[0-9a-fA-F]{6}$ + ProjectConfigAuthPageLayouts: type: object additionalProperties: false - required: - - layout properties: - layout: + login: $ref: '#/components/schemas/AuthPageLayout' - UpdateAuthPageThemeRequest: + signup: + $ref: '#/components/schemas/AuthPageLayout' + forgot_password: + $ref: '#/components/schemas/AuthPageLayout' + device: + $ref: '#/components/schemas/AuthPageLayout' + verify_email: + $ref: '#/components/schemas/AuthPageLayout' + reset_password: + $ref: '#/components/schemas/AuthPageLayout' + ProjectConfigAuthPageAppearance: type: object additionalProperties: false - required: - - theme properties: theme: $ref: '#/components/schemas/AuthPageTheme' - UpdateDatabaseTypeRequest: + layouts: + $ref: '#/components/schemas/ProjectConfigAuthPageLayouts' + ManagedProjectConfigFrontendCustomDomainTLSConfig: type: object - description: Update database compute size tier + description: Volcano issues and renews the certificate. Certificate fields are not allowed. + additionalProperties: false properties: - database_type: + mode: type: string - description: New compute size tier enum: - - volcano-db-xs - - volcano-db-s - - volcano-db-m - - volcano-db-l - - volcano-db-xl - - volcano-db-2xl - example: volcano-db-m + - managed required: - - database_type - UpdateEmailTemplateRequest: + - mode + BYOCProjectConfigFrontendCustomDomainTLSConfig: type: object + description: 'Your own certificate. Send `certificate_pem` and `private_key_pem` together, with an optional `certificate_chain_pem`, to create the domain or rotate its certificate. For an existing BYOC domain, `mode: byoc` without certificate fields keeps the stored certificate; exports render only the mode.' + additionalProperties: false + not: + anyOf: + - required: + - certificate_pem + not: + required: + - private_key_pem + - required: + - private_key_pem + not: + required: + - certificate_pem + - required: + - certificate_chain_pem + not: + required: + - certificate_pem + - private_key_pem properties: - subject: + mode: type: string - html_body: + enum: + - byoc + description: Optional; a TLS block without `mode` is BYOC. + certificate_pem: type: string - text_body: + maxLength: 65536 + description: PEM-encoded certificate for create or rotation. Requires private_key_pem. Omitted from exports. + private_key_pem: type: string - UpdateFunctionRequest: - type: object - additionalProperties: false - minProperties: 1 - properties: - visibility: - $ref: '#/components/schemas/FunctionVisibility' - is_public: - type: boolean - deprecated: true - description: | - Deprecated alias for `visibility`: `true` means `public` and - `false` means `authenticated`. Sending both with different meanings - returns 400. - invocation_mode: - $ref: '#/components/schemas/FunctionInvocationMode' - http_auth_mode: - $ref: '#/components/schemas/FunctionHTTPAuthMode' - openapi_spec: - type: object - nullable: true - additionalProperties: true - description: OpenAPI 3.0 or 3.1 metadata for HTTP mode. Send null to clear it. - UpdateFunctionSchedulerRequest: - type: object - properties: - name: + maxLength: 65536 + description: PEM-encoded private key for create or rotation. Requires certificate_pem. Omitted from exports. + certificate_chain_pem: type: string - maxLength: 200 - enabled: - type: boolean - schedule: - $ref: '#/components/schemas/ScheduleRequest' - payload: - type: object - additionalProperties: true - regions: - type: array - maxItems: 1 - items: - type: string - UpdateOAuthConfigRequest: + maxLength: 65536 + description: Optional PEM-encoded certificate chain. Requires certificate_pem and private_key_pem. Omitted from exports. + ProjectConfigFrontendCustomDomainTLSConfig: + description: TLS for the custom domain. `mode` defaults to `byoc` when omitted. + oneOf: + - $ref: '#/components/schemas/ManagedProjectConfigFrontendCustomDomainTLSConfig' + - $ref: '#/components/schemas/BYOCProjectConfigFrontendCustomDomainTLSConfig' + ProjectConfigFrontendFunctionRoute: type: object + additionalProperties: false properties: - client_id: - type: string - description: Supported for non-device providers. Not supported for `provider=device`. - client_secret: + function: type: string - description: Supported for non-device providers. Not supported for `provider=device`. - redirect_url: + minLength: 1 + description: Name of an existing public standard Function configured for HTTP invocation. + path_prefix: type: string - format: uri - scopes: - type: array - items: - type: string - enabled: + minLength: 2 + maxLength: 512 + pattern: ^/[^?#\\]*[^/?#\\]$ + strip_prefix: type: boolean - UpdateProjectRequest: + default: false + required: + - function + - path_prefix + ProjectConfigFrontendRoute: type: object - description: Update mutable project fields (name and/or region policy) + additionalProperties: false properties: - name: + frontend: type: string minLength: 1 - maxLength: 255 - example: my-awesome-app-renamed - all_regions: - type: boolean - description: | - If omitted and `selected_regions` is also omitted, existing region policy is preserved. - If `selected_regions` is provided without `all_regions`, it is treated as subset mode. - selected_regions: - type: array - items: - type: string - description: | - Region subset for project deployments. - Provide with `all_regions=false`. - example: - - us-east-1 - UpdateRealtimeConfigRequest: - type: object - description: | - Request to update realtime configuration. - Limits (message size, channels per connection) are plan-based and cannot be configured. - properties: - enabled: - type: boolean - description: Whether realtime is enabled for this project - broadcast_enabled: - type: boolean - description: Whether broadcast channels are enabled - presence_enabled: - type: boolean - description: Whether presence tracking is enabled - postgres_changes_enabled: - type: boolean - description: Whether Postgres change notifications are enabled - UpdateStorageBucketRequest: + description: Name of another existing frontend in the project to mount. Paths are forwarded unchanged. + path_prefix: + type: string + minLength: 2 + maxLength: 512 + pattern: ^/[^?#\\]*[^/?#\\]$ + required: + - frontend + - path_prefix + ProjectConfigSandbox: type: object + additionalProperties: false + required: + - name properties: - file_size_limit: + name: + type: string + pattern: ^[a-z][a-z0-9-]{0,62}$ + description: Name of an existing sandbox template or matching Git source directory. + memory_mb: type: integer - format: int64 - allowed_mime_types: + enum: + - 1024 + - 2048 + description: Immutable deployed memory profile; config apply asserts it and Git deploy builds it. + ports: type: array + uniqueItems: true + maxItems: 16 + description: Service readiness ports; config apply asserts them and Git deploy builds them. items: - type: string - UpdateVariableRequest: + type: integer + minimum: 1 + maximum: 65532 + ttl_seconds: + type: integer + minimum: 0 + maximum: 2147483647 + description: Default absolute lifetime for new sessions when the caller omits it. Cloud templates accept 30–28800 seconds; inherited lifetimes are clamped to the session plan limit (3600 for HOBBY, 28800 for SUPERAGENT). Local accepts 0 for unlimited or a positive lifetime. + DatabaseQueryPerformanceDatabase: type: object properties: - shared: - type: boolean - description: Include this name in the project's shared function variables. Omission preserves existing membership; new variables default to true for legacy clients. Send false explicitly to create a non-shared variable. - value: + id: + type: string + format: uuid + name: type: string required: - - value - UploadSessionPart: + - id + - name + DatabaseQueryPerformanceItem: type: object - description: Information about an uploaded part properties: - part_number: - type: integer - description: Part number (1-10000) - etag: + query_id: type: string - description: ETag of the uploaded part - size: + description: pg_stat_statements query identifier. + query: + type: string + maxLength: 8192 + description: Normalized representative query text with literal values replaced by `?`. + database: + $ref: '#/components/schemas/DatabaseQueryPerformanceDatabase' + role: + type: string + description: Postgres role that ran the query, such as `anon` or `authenticated` for RLS-enforced connections, `service_role`, the database owner role for full-access connections, or a role you created. `unknown` when the role no longer exists. + calls: type: integer format: int64 - description: Size of the part in bytes - UploadSessionStatusResponse: + total_exec_time_seconds: + type: number + format: double + description: Cumulative total execution time from pg_stat_statements in seconds. + max_exec_time_seconds: + type: number + format: double + mean_exec_time_seconds: + type: number + format: double + min_exec_time_seconds: + type: number + format: double + rows_processed: + type: integer + format: int64 + required: + - query_id + - query + - database + - role + - calls + - total_exec_time_seconds + - max_exec_time_seconds + - mean_exec_time_seconds + - min_exec_time_seconds + - rows_processed + DeploymentPhase: type: object - description: Status of an upload session + description: Timing and outcome for one normalized deployment pipeline phase. properties: - session_id: + name: type: string - description: Upload session ID + enum: + - queue + - checkout + - build + - image + - provisioning + - rollout + - verification status: type: string enum: - pending - - uploading - - completing - - completed - - aborted - description: Current status of the upload - path: + - in_progress + - succeeded + - failed + - skipped + started_at: type: string - description: Target file path - content_type: + format: date-time + completed_at: type: string - description: MIME type - total_size: - type: integer - format: int64 - description: Total file size in bytes - part_size: + format: date-time + duration_seconds: type: integer format: int64 - description: Size of each part (except last) - total_parts: - type: integer - description: Total number of parts - parts_uploaded: - type: integer - description: Number of parts uploaded - bytes_uploaded: + minimum: 0 + required: + - name + - status + DeploymentProgress: + type: object + description: Normalized live progress derived from the deployment workflow and build phases. + properties: + current_phase: + type: string + enum: + - queue + - checkout + - build + - image + - provisioning + - rollout + - verification + started_at: + type: string + format: date-time + completed_at: + type: string + format: date-time + elapsed_seconds: type: integer format: int64 - description: Total bytes uploaded so far - parts: + minimum: 0 + phases: type: array - description: List of uploaded parts (for resume) + minItems: 7 + maxItems: 7 items: - $ref: '#/components/schemas/UploadSessionPart' - expires_at: + $ref: '#/components/schemas/DeploymentPhase' + updated_at: type: string format: date-time - description: Session expiry time - created_at: + required: + - started_at + - elapsed_seconds + - phases + - updated_at + DeploymentCommit: + type: object + description: The commit a deploy client reported for the deployment's source. Absent when the client reported none. A frontend deployment that publishes another deployment's build carries that deployment's commit. + properties: + repository: type: string - format: date-time - description: Session creation time - UsageDataPoint: + description: GitHub repository as `owner/name`, normalized from what the client sent. + example: acme/app + sha: + type: string + pattern: ^[0-9a-f]{40}$ + description: Full commit ID. + dirty: + type: boolean + description: '`true` when the client reported that the uploaded files differ from the commit, or Volcano found an uploaded file in the project''s root directory that the commit does not hold, so the deployed code may differ from the commit.' + verified: + type: boolean + description: '`true` only when `verification` is `files`: Volcano confirmed that the deployed files are the commit''s. A commit verified at the `repository` level is not `verified`.' + verification: + type: string + enum: + - none + - repository + - files + x-enum-varnames: + - DeploymentCommitVerificationNone + - DeploymentCommitVerificationRepository + - DeploymentCommitVerificationFiles + description: 'What Volcano confirmed about the commit, through the project''s GitHub connection, when it recorded the deployment. `files`: `repository` is the project''s connected repository, `sha` is on its production branch, every uploaded file is the commit''s file at its path, and the upload holds the commit''s files under its root but those deploy clients leave out. Only a frontend upload is checked this far. `repository`: `repository` is the project''s connected repository and `sha` is on its production branch, but the uploaded files were not compared with the commit, since a function upload holds build output rather than the repository''s layout. Only a function upload the client reports clean is checked at this level. `none`: Volcano confirmed nothing, as for a commit the client reports dirty, one from another branch or repository, one from a project without a connection, or one it couldn''t check in time.' + required: + - repository + - sha + - dirty + - verified + - verification + DurableMessageSender: + type: object + description: Who sent the message. + properties: + type: + type: string + enum: + - service_key + - user + - anon + - project + - execution + description: | + The credential the message was sent with. `project` is the + project's owner or one of its access tokens, and `execution` is the + execution itself publishing. + user_id: + type: string + nullable: true + description: The auth user who sent it. Null unless `type` is `user`. + required: + - type + - user_id + DurableMessageStatus: + type: string + enum: + - queued + - delivering + - delivered + - dropped + - published + description: | + An `in` message is `queued` until a wait for its name takes it, + `delivering` while it is handed over, and `delivered` once the + execution has it. It is `dropped` if the execution ended before any + wait took it. Every `out` message is `published`. + LogDeploymentRequestSelector: + type: object + description: Deployment log selector for deployable resources. + additionalProperties: false + properties: + ids: + type: array + maxItems: 25 + description: Optional deployment identifiers. Omit or send an empty array to include every deployment for the selected resources. + items: + type: string + format: uuid + LogFunctionRequestResource: + type: object + description: Edge Function log resource selector. + additionalProperties: false + properties: + type: + type: string + enum: + - function + description: Resource type to read logs for. + ids: + type: array + maxItems: 25 + description: Optional function identifiers. Omit or send an empty array to include every function in the project. + items: + type: string + format: uuid + kind: + allOf: + - $ref: '#/components/schemas/FunctionKindFilter' + description: | + Read only functions of this kind. Omit to include standard and + durable functions. With `ids`, the listed functions of other kinds + are left out, so an ID of the other kind returns no logs. Search, + stream, and activity cursors are bound to the kind. + deployments: + $ref: '#/components/schemas/LogDeploymentRequestSelector' + required: + - type + LogFrontendRequestResource: type: object - description: A single timestamped usage value. + description: Frontend log resource selector. + additionalProperties: false properties: - timestamp: + type: type: string - format: date-time - description: UTC timestamp for the data point - value: - type: integer - format: int64 - description: Usage value at the timestamp + enum: + - frontend + description: Resource type to read logs for. + ids: + type: array + maxItems: 25 + description: Optional frontend identifiers. Omit or send an empty array to include every frontend in the project. + items: + type: string + format: uuid + deployments: + $ref: '#/components/schemas/LogDeploymentRequestSelector' required: - - timestamp - - value - Variable: + - type + LogDatabaseRequestResource: type: object + description: Database runtime log resource selector. Deployment logs are not supported for databases. + additionalProperties: false properties: - shared: - type: boolean - description: Include this name in the project's shared function variables. Omission preserves existing membership; new variables default to true for legacy clients. Send false explicitly to create a non-shared variable. - frontend_shared: - type: boolean - description: Whether this name is in the project's shared frontend-variable list. - id: - type: string - format: uuid - project_id: - type: string - format: uuid - name: - type: string - maxLength: 256 - value: - type: string - status: - type: string - enum: - - provisioning - - active - - failed - description: Latest project variable propagation status, when a sync has run. - current_sync_id: - type: string - format: uuid - description: Identifier of the latest variable propagation sync. - provisioning_started_at: - type: string - format: date-time - description: Timestamp when the current variable propagation phase started. - deploy_source: + type: type: string enum: - - git - - cli - - web - - api - - system - - unknown - description: What initiated the latest variable propagation sync, when one has run. - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time + - database + description: Resource type to read logs for. + ids: + type: array + maxItems: 25 + description: Optional database identifiers. Omit or send an empty array to include every database in the project. + items: + type: string + format: uuid required: - - id - - project_id - - name - - value - - created_at - - updated_at - OpenAPISpecDocument: - type: object - additionalProperties: true - description: | - This OpenAPI document, with every reference resolved. Shared by the JSON - and YAML operations, which differ only in serialization. - ProjectTemplateInstallation: + - type + LogAppRequestResource: type: object description: | - Template initialization progress, returned by project creation and the - individual project endpoint. Omitted for projects without a template. - Project creation accepts the installation; wait for `ready` before use. - A failed installation retains the project for inspection or deletion. - required: - - status - - phase + Selector for the entries a first-party app writes into this project's + logs, such as the Builder's run lifecycle. Each app is one resource. + Its ID is UUIDv5(`7374f5e9-35ff-4e46-ac13-a4717bae00e1`, slug), with + the app's slug as UTF-8 bytes, and its name is the slug. The Builder + (`builder`) is `b52fc8fa-8656-5141-adef-99d698ce6f3c`. Deployment logs + are not supported for apps. + additionalProperties: false properties: - status: - type: string - enum: - - pending - - running - - ready - - failed - phase: + type: type: string enum: - - database - - restore - - configure - - deploy - - verify - - ready - ProjectGitConnectionSummary: + - app + description: Resource type to read logs for. + ids: + type: array + maxItems: 25 + description: Optional app resource IDs, each UUIDv5 of an app's slug. Omit or send an empty array to include every app. + items: + type: string + format: uuid + required: + - type + LogRequestResource: + description: Resource selectors for project log reads. + oneOf: + - $ref: '#/components/schemas/LogFunctionRequestResource' + - $ref: '#/components/schemas/LogFrontendRequestResource' + - $ref: '#/components/schemas/LogDatabaseRequestResource' + - $ref: '#/components/schemas/LogAppRequestResource' + discriminator: + propertyName: type + mapping: + function: '#/components/schemas/LogFunctionRequestResource' + frontend: '#/components/schemas/LogFrontendRequestResource' + database: '#/components/schemas/LogDatabaseRequestResource' + app: '#/components/schemas/LogAppRequestResource' + LogResource: type: object + description: Resource that owns a historical log event. properties: - repo_installation_id: - type: integer - format: int64 - repo_id: - type: integer - format: int64 - repo_full_name: - type: string - root_directory: + type: type: string - production_branch: + enum: + - function + - frontend + - database + - app + description: Resource type that owns the log event. + id: type: string - updated_at: + format: uuid + description: | + Resource ID that owns the log event. For type `app`, the ID is + UUIDv5(`7374f5e9-35ff-4e46-ac13-a4717bae00e1`, slug), with the app's + slug as UTF-8 bytes; the Builder (`builder`) is + `b52fc8fa-8656-5141-adef-99d698ce6f3c`. + name: type: string - format: date-time + description: Resource name associated with the log event, when available. For type `app`, the app's slug, such as `builder`. required: - - repo_installation_id - - repo_id - - repo_full_name - - root_directory - - production_branch - - updated_at - ProjectHealthSummary: + - type + - id + LogDeployment: type: object + description: Deployment context associated with a historical deployment log event. properties: - status: - $ref: '#/components/schemas/ProjectHealthStatus' + id: + type: string + format: uuid + description: Deployment ID associated with the log event. + stage: + type: string + enum: + - compile + - publish + description: Deployment stage that produced the log event, when available. required: - - status - FunctionKind: + - id + NotificationEmailStatus: type: string enum: - - standard - - durable - default: standard - description: | - Which kind of function this is. `standard` runs once per invocation. - `durable` checkpoints its progress and resumes from the last completed - step, and is invoked asynchronously through its own executions - collection. A function's kind is fixed when it is created and cannot be - changed afterwards. Omitting this field means `standard`. - AuthPageThemeColors: - type: object - additionalProperties: false - required: - - background - - surface - - text - - accent - - accent_text - properties: - background: - type: string - pattern: ^#[0-9a-fA-F]{6}$ - surface: - type: string - pattern: ^#[0-9a-fA-F]{6}$ - text: - type: string - pattern: ^#[0-9a-fA-F]{6}$ - accent: - type: string - pattern: ^#[0-9a-fA-F]{6}$ - accent_text: - type: string - pattern: ^#[0-9a-fA-F]{6}$ - ProjectConfigAuthPageLayouts: + - delivering + - disabled + - owner_email_unverified + description: Whether alerts are being emailed. `owner_email_unverified` means email is enabled but the project owner has no active account with a verified email address, so no alert is emailed, and email does not count as a channel when deciding whether to announce a failing scheduler, until the owner verifies it. Changing the account email address needs a new verification. + NotificationEmailSettings: type: object additionalProperties: false properties: - login: - $ref: '#/components/schemas/AuthPageLayout' - signup: - $ref: '#/components/schemas/AuthPageLayout' - forgot_password: - $ref: '#/components/schemas/AuthPageLayout' - device: - $ref: '#/components/schemas/AuthPageLayout' - verify_email: - $ref: '#/components/schemas/AuthPageLayout' - reset_password: - $ref: '#/components/schemas/AuthPageLayout' - ProjectConfigAuthPageAppearance: + enabled: + type: boolean + description: Whether alerts are emailed. + recipients: + type: array + maxItems: 10 + items: + type: string + format: email + description: Empty. Alerts are emailed to the project owner's verified account email address, the only recipient supported. + status: + $ref: '#/components/schemas/NotificationEmailStatus' + required: + - enabled + - recipients + - status + NotificationWebhookSettings: type: object additionalProperties: false properties: - theme: - $ref: '#/components/schemas/AuthPageTheme' - layouts: - $ref: '#/components/schemas/ProjectConfigAuthPageLayouts' - ManagedProjectConfigFrontendCustomDomainTLSConfig: + url: + type: string + description: Where alerts are posted. Absent when no webhook is configured. + secret_configured: + type: boolean + description: Whether a signing secret is set. The secret itself is returned only once. + secret: + type: string + description: 'The signing secret, starting with `whsec_`. Present only in the response that generated it: the update that first set `url`, or a rotation. Store it then; it cannot be read again.' + required: + - secret_configured + SchedulerFailureAlertPolicy: type: object - description: Volcano issues and renews the certificate. Certificate fields are not allowed. additionalProperties: false properties: - mode: - type: string - enum: - - managed + notify_on: + $ref: '#/components/schemas/SchedulerFailureNotifyOn' + threshold: + type: integer + minimum: 1 + maximum: 100 + description: How many runs in a row have to fail before a `consecutive_failures` alert. Ignored for `first_failure`. + notify_on_recovery: + type: boolean + description: Whether a successful run after an alerted failure streak sends a `scheduler.recovered` alert. required: - - mode - BYOCProjectConfigFrontendCustomDomainTLSConfig: + - notify_on + - threshold + - notify_on_recovery + NotificationTestDelivery: type: object - description: 'Your own certificate. Send `certificate_pem` and `private_key_pem` together, with an optional `certificate_chain_pem`, to create the domain or rotate its certificate. For an existing BYOC domain, `mode: byoc` without certificate fields keeps the stored certificate; exports render only the mode.' additionalProperties: false - not: - anyOf: - - required: - - certificate_pem - not: - required: - - private_key_pem - - required: - - private_key_pem - not: - required: - - certificate_pem - - required: - - certificate_chain_pem - not: - required: - - certificate_pem - - private_key_pem properties: - mode: + channel: type: string enum: - - byoc - description: Optional; a TLS block without `mode` is BYOC. - certificate_pem: - type: string - maxLength: 65536 - description: PEM-encoded certificate for create or rotation. Requires private_key_pem. Omitted from exports. - private_key_pem: - type: string - maxLength: 65536 - description: PEM-encoded private key for create or rotation. Requires certificate_pem. Omitted from exports. - certificate_chain_pem: + - email + - webhook + x-enum-varnames: + - NotificationChannelEmail + - NotificationChannelWebhook + delivered: + type: boolean + status_code: + type: integer + description: The webhook's response status. Absent for email, and when no response arrived. + error: type: string - maxLength: 65536 - description: Optional PEM-encoded certificate chain. Requires certificate_pem and private_key_pem. Omitted from exports. - ProjectConfigFrontendCustomDomainTLSConfig: - description: TLS for the custom domain. `mode` defaults to `byoc` when omitted. - oneOf: - - $ref: '#/components/schemas/ManagedProjectConfigFrontendCustomDomainTLSConfig' - - $ref: '#/components/schemas/BYOCProjectConfigFrontendCustomDomainTLSConfig' - ProjectConfigFrontendFunctionRoute: + description: Why the delivery failed. Absent when it arrived. + required: + - channel + - delivered + DurableMessageWaitStatus: + type: string + enum: + - waiting + - matched + - delivered + - expired + - cancelled + description: | + `waiting` until a message for its name arrives, `matched` while that + message is handed over, then `delivered`. `expired` means the wait's + timeout passed first, and `cancelled` that the execution stopped + waiting. + DurableCallbackToken: + type: string + minLength: 5 + maxLength: 128 + pattern: ^vcb_[A-Za-z0-9_-]+$ + description: | + The `vcb_` token the workflow handed out. It is the only credential + the callback operations take, so treat it as a secret. + DurableCallbackStatus: + type: string + enum: + - waiting + - delivering + - succeeded + - failed + description: | + `waiting` until the token is succeeded or failed. `delivering` while + the outcome is on its way to the workflow; Volcano finishes the + delivery on its own. `succeeded` or `failed` once the workflow has the + outcome. + DurableCallbackError: type: object - additionalProperties: false + description: The error the waiting step raises. properties: - function: + type: type: string minLength: 1 - description: Name of an existing public standard Function configured for HTTP invocation. - path_prefix: + maxLength: 256 + pattern: ^[^\x00-\x1F\x7F]+$ + description: | + A name workflows can branch on, such as `PaymentDeclined`. Up to + 256 characters, without control characters. + message: type: string - minLength: 2 - maxLength: 512 - pattern: ^/[^?#\\]*[^/?#\\]$ - strip_prefix: - type: boolean - default: false + maxLength: 32768 + pattern: ^[^\x00-\x08\x0B-\x1F\x7F]*$ + description: | + A human-readable explanation of up to 32,768 bytes of UTF-8, with + tab and newline as its only control characters. A character + outside ASCII takes more than one byte, so such text reaches the + limit before `maxLength`. required: - - function - - path_prefix - ProjectConfigSandbox: - type: object + - type additionalProperties: false + LavaflowOutcomeValues: + type: object + description: Exact counts only when collection coverage is complete. Null means unknown, including days with no retained observations. + properties: + pull_requests_merged: + type: integer + format: int64 + minimum: 0 + nullable: true + improvements_observed_live: + type: integer + format: int64 + minimum: 0 + nullable: true + issue_resolutions: + type: integer + format: int64 + minimum: 0 + nullable: true required: - - name + - pull_requests_merged + - improvements_observed_live + - issue_resolutions + LavaflowOutcomeCounts: + type: object + description: Retained confirmations in the requested interval. These are lower bounds when collection coverage is incomplete. properties: - name: - type: string - pattern: ^[a-z][a-z0-9-]{0,62}$ - description: Name of an existing sandbox template or matching Git source directory. - memory_mb: + pull_requests_merged: type: integer - enum: - - 1024 - - 2048 - description: Immutable deployed memory profile; config apply asserts it and Git deploy builds it. - ports: - type: array - uniqueItems: true - maxItems: 16 - description: Service readiness ports; config apply asserts them and Git deploy builds them. - items: - type: integer - minimum: 1 - maximum: 65532 - ttl_seconds: + format: int64 + minimum: 0 + improvements_observed_live: type: integer + format: int64 minimum: 0 - maximum: 2147483647 - description: Default absolute lifetime for new sessions when the caller omits it. Cloud templates accept 30–28800 seconds; inherited lifetimes are clamped to the session plan limit (3600 for HOBBY, 28800 for SUPERAGENT). Local accepts 0 for unlimited or a positive lifetime. - DatabaseQueryPerformanceDatabase: + issue_resolutions: + type: integer + format: int64 + minimum: 0 + required: + - pull_requests_merged + - improvements_observed_live + - issue_resolutions + LavaflowOutcomeDay: type: object properties: - id: - type: string - format: uuid - name: + date: type: string + format: date + counts: + $ref: '#/components/schemas/LavaflowOutcomeValues' + confirmed_counts: + $ref: '#/components/schemas/LavaflowOutcomeCounts' required: - - id - - name - DatabaseQueryPerformanceItem: + - date + - counts + - confirmed_counts + LavaflowOutcomeCoverage: type: object + description: Collection coverage for one metric. A migration or the earliest retained event establishes no complete interval. Undated observations are not assigned to the requested dates or totals. properties: - query_id: + status: type: string - description: pg_stat_statements query identifier. - query: + enum: + - complete + - partial + - unavailable + x-enum-varnames: + - LavaflowOutcomeCoverageStatusComplete + - LavaflowOutcomeCoverageStatusPartial + - LavaflowOutcomeCoverageStatusUnavailable + complete_from: type: string - maxLength: 8192 - description: Normalized representative query text with literal values replaced by `?`. - database: - $ref: '#/components/schemas/DatabaseQueryPerformanceDatabase' - role: + format: date-time + nullable: true + complete_through: type: string - description: Postgres role that ran the query, such as `anon` or `authenticated` for RLS-enforced connections, `service_role`, the database owner role for full-access connections, or a role you created. `unknown` when the role no longer exists. - calls: + format: date-time + nullable: true + reason: + type: string + event_time_basis: + type: string + enum: + - confirmed_merge_time + - first_recorded_live_confirmation + - recorded_automatic_resolution + supported_sources: + type: array + items: + type: string + undated_confirmed_events: type: integer format: int64 - total_exec_time_seconds: - type: number - format: double - description: Cumulative total execution time from pg_stat_statements in seconds. - max_exec_time_seconds: - type: number - format: double - mean_exec_time_seconds: - type: number - format: double - min_exec_time_seconds: - type: number - format: double - rows_processed: + minimum: 0 + required: + - status + - complete_from + - complete_through + - reason + - event_time_basis + - supported_sources + - undated_confirmed_events + LavaflowOutcomeCurrent: + type: object + description: Current known open critical Code Quality findings, including findings without a fix run. The historical window and run-category filter do not narrow this inventory. Zero is not an exhaustive security assessment. + properties: + known_open_critical_count: type: integer format: int64 + minimum: 0 + scope: + type: string + enum: + - confirmed_code_quality + inventory_not_exhaustive: + type: boolean + category_filter_applied: + type: boolean required: - - query_id - - query - - database - - role - - calls - - total_exec_time_seconds - - max_exec_time_seconds - - mean_exec_time_seconds - - min_exec_time_seconds - - rows_processed - DeploymentPhase: + - known_open_critical_count + - scope + - inventory_not_exhaustive + - category_filter_applied + LavaflowOutcomes: + type: object + description: Separate confirmed merges, live improvements and actual automatic issue-resolution episodes. A live improvement is counted once per project, repository and pull request when inclusion is first durably confirmed on a tracked function or frontend. Resolution includes automatic open or ignored to resolved transitions, preserves the reason and category, and excludes manual actions. The primary issue resolution count includes every category, even when a category filter narrows merge and live counts. Only the first qualifying automatic resolution of a metric episode contributes a count. Recurrence and manual reopen start new metric episodes without erasing previous resolutions; moving resolved to ignored does not start an episode. Existing activity counts remain separate. Older servers omit this object; absence is unavailable, never zero. + properties: + as_of: + type: string + format: date-time + description: The UTC timestamp of the consistent database snapshot. + days: + type: array + description: The same ordered UTC date domain as the activity series, with unknown counts distinct from zero retained confirmations. + items: + $ref: '#/components/schemas/LavaflowOutcomeDay' + totals: + $ref: '#/components/schemas/LavaflowOutcomeValues' + confirmed_totals: + $ref: '#/components/schemas/LavaflowOutcomeCounts' + coverage: + type: object + properties: + pull_requests_merged: + $ref: '#/components/schemas/LavaflowOutcomeCoverage' + improvements_observed_live: + $ref: '#/components/schemas/LavaflowOutcomeCoverage' + issue_resolutions: + $ref: '#/components/schemas/LavaflowOutcomeCoverage' + required: + - pull_requests_merged + - improvements_observed_live + - issue_resolutions + current: + $ref: '#/components/schemas/LavaflowOutcomeCurrent' + required: + - as_of + - days + - totals + - confirmed_totals + - coverage + - current + LavaflowRunReference: + type: object + description: Another LavaFlow run of the same project. + properties: + id: + type: string + format: uuid + title: + type: string + nullable: true + description: The run's title, as `LavaflowRunSummary.title` gives it. + required: + - id + - title + LavaflowLineage: type: object - description: Timing and outcome for one normalized deployment pipeline phase. + description: 'A chain of LavaFlow fixes: a merged fix, and the runs that followed up an issue traced to it or to a fix after it.' properties: - name: + id: + type: string + format: uuid + description: The lineage's root run. + depth: + type: integer + format: int64 + description: 0 for the root fix. + relation: type: string enum: - - queue - - checkout - - build - - image - - provisioning - - rollout - - verification - status: + - regression + - recurrence + nullable: true + description: '`regression` for an issue traced to the parent''s deploy, `recurrence` for an issue that came back after the parent went live. Null for the root.' + confidence: type: string enum: - - pending - - in_progress - - succeeded - - failed - - skipped - started_at: + - strong + - weak + nullable: true + description: 'Null for the root, and otherwise `strong`. `weak` is reserved: nothing writes it.' + parent: + allOf: + - $ref: '#/components/schemas/LavaflowRunReference' + nullable: true + description: The fix this run follows up. Null for the root. + covered_by: + allOf: + - $ref: '#/components/schemas/LavaflowRunReference' + nullable: true + description: The run whose fix also covers this issue, so this run opened nothing. + remedy: type: string - format: date-time - completed_at: + enum: + - fix + - revert + - none + x-enum-varnames: + - LavaflowLineageRemedyFix + - LavaflowLineageRemedyRevert + - LavaflowLineageRemedyNone + description: 'How the run follows up its parent. Currently always `fix`: a regression gets a follow-up fix. `revert` and `none` are reserved.' + state: type: string - format: date-time - duration_seconds: + enum: + - active + - settled + - held + hold_reason: + type: string + nullable: true + description: 'Why the lineage holds: `lineage_cap`, `lineage_held` or `repository_changed`. New values may appear. Null unless `state` is `held`.' + pull_requests_opened: type: integer format: int64 - minimum: 0 + description: Pull requests the lineage opened, counting the root's. + pull_request_cap: + type: integer + format: int64 + description: The most pull requests a lineage opens before it holds. required: - - name - - status - DeploymentProgress: + - id + - depth + - relation + - confidence + - parent + - covered_by + - remedy + - state + - hold_reason + - pull_requests_opened + - pull_request_cap + LavaflowFixOutcome: type: object - description: Normalized live progress derived from the deployment workflow and build phases. + description: How a merged LavaFlow fix fared once it went live. properties: - current_phase: + state: type: string enum: - - queue - - checkout - - build - - image - - provisioning - - rollout - - verification - started_at: + - awaiting_deploy + - watching + - effective + - ineffective + - regressed + - reverted + description: '`watching` for 14 days after the fix goes live, then `effective` unless its issue came back (`ineffective`) or a new issue was traced to its deploy (`regressed`). An outcome never moves back. `reverted` is reserved and not produced yet.' + live_at: type: string format: date-time - completed_at: + nullable: true + watch_until: type: string format: date-time - elapsed_seconds: + nullable: true + follow_ups: type: integer format: int64 - minimum: 0 - phases: - type: array - minItems: 7 - maxItems: 7 - items: - $ref: '#/components/schemas/DeploymentPhase' - updated_at: - type: string - format: date-time - required: - - started_at - - elapsed_seconds - - phases - - updated_at - DurableMessageSender: - type: object - description: Who sent the message. - properties: - type: - type: string - enum: - - service_key - - user - - anon - - project - - execution - description: | - The credential the message was sent with. `project` is the - project's owner or one of its access tokens, and `execution` is the - execution itself publishing. - user_id: - type: string - nullable: true - description: The auth user who sent it. Null unless `type` is `user`. + description: Runs linked to this fix. required: - - type - - user_id - DurableMessageStatus: + - state + - live_at + - watch_until + - follow_ups + LavaflowCommitOrigin: type: string enum: - - queued - - delivering - - delivered - - dropped - - published - description: | - An `in` message is `queued` until a wait for its name takes it, - `delivering` while it is handed over, and `delivered` once the - execution has it. It is `dropped` if the execution ended before any - wait took it. Every `out` message is `published`. - LogDeploymentRequestSelector: - type: object - description: Deployment log selector for deployable resources. - additionalProperties: false - properties: - ids: - type: array - maxItems: 25 - description: Optional deployment identifiers. Omit or send an empty array to include every deployment for the selected resources. - items: - type: string - format: uuid - LogFunctionRequestResource: + - push + - client_reported + - client_reported_repository + - repository + x-enum-varnames: + - LavaflowCommitOriginPush + - LavaflowCommitOriginClientReported + - LavaflowCommitOriginClientReportedRepository + - LavaflowCommitOriginRepository + description: 'Where the commit a run read came from. `push`: a push to the project''s connected repository deployed it. `client_reported`: the deploy client reported it, and Volcano matched the deployed files against it. `client_reported_repository`: the deploy client reported it, and Volcano confirmed only that the connected repository''s production branch holds it, without matching the deployed files, which for a function are build output. A fix on such a commit opens only while the production branch still holds it. `repository`: a reported problem''s run read the production branch at a commit it pinned, which need not be deployed.' + LavaflowSourceCommit: type: object - description: Edge Function log resource selector. - additionalProperties: false + description: The commit a run read its source at. properties: - type: + sha: type: string - enum: - - function - description: Resource type to read logs for. - ids: - type: array - maxItems: 25 - description: Optional function identifiers. Omit or send an empty array to include every function in the project. - items: - type: string - format: uuid - kind: + description: The commit's full SHA. + origin: allOf: - - $ref: '#/components/schemas/FunctionKindFilter' - description: | - Read only functions of this kind. Omit to include standard and - durable functions. With `ids`, the listed functions of other kinds - are left out, so an ID of the other kind returns no logs. Search, - stream, and activity cursors are bound to the kind. - deployments: - $ref: '#/components/schemas/LogDeploymentRequestSelector' + - $ref: '#/components/schemas/LavaflowCommitOrigin' + nullable: true + description: Where the commit came from. Null for a run recorded before Volcano kept it. required: - - type - LogFrontendRequestResource: + - sha + - origin + LavaflowLineageEvidence: type: object - description: Frontend log resource selector. - additionalProperties: false + description: What tied the run's issue to a recent LavaFlow fix. A `display` link rests on less than a strong one and joins no lineage. properties: - type: + confidence: type: string enum: - - frontend - description: Resource type to read logs for. - ids: + - strong + - weak + - display + description: '`strong` or `display`. `weak` is reserved: nothing writes it.' + parent: + allOf: + - $ref: '#/components/schemas/LavaflowRunReference' + description: The fix the issue was traced to. + deployment: + type: object + properties: + commit_sha: + type: string + description: The commit of the deployment that served the occurrence attribution judged (`opened_at`). + commit_origin: + type: string + description: '`push` for a commit Volcano built from a push, `client_reported` for one the deploy client reported. New values may appear.' + required: + - commit_sha + - commit_origin + previous_commit_sha: + type: string + nullable: true + description: The commit of the deployment before it. + fix_live_at: + type: string + format: date-time + opened_at: + type: string + format: date-time + description: The occurrence attribution judged. + overlapping_functions: type: array - maxItems: 25 - description: Optional frontend identifiers. Omit or send an empty array to include every frontend in the project. items: type: string - format: uuid - deployments: - $ref: '#/components/schemas/LogDeploymentRequestSelector' - required: - - type - LogDatabaseRequestResource: - type: object - description: Database runtime log resource selector. Deployment logs are not supported for databases. - additionalProperties: false - properties: - type: - type: string - enum: - - database - description: Resource type to read logs for. - ids: + overlapping_files: type: array - maxItems: 25 - description: Optional database identifiers. Omit or send an empty array to include every database in the project. items: type: string - format: uuid required: - - type - LogRequestResource: - description: Resource selectors for project log reads. - oneOf: - - $ref: '#/components/schemas/LogFunctionRequestResource' - - $ref: '#/components/schemas/LogFrontendRequestResource' - - $ref: '#/components/schemas/LogDatabaseRequestResource' - discriminator: - propertyName: type - mapping: - function: '#/components/schemas/LogFunctionRequestResource' - frontend: '#/components/schemas/LogFrontendRequestResource' - database: '#/components/schemas/LogDatabaseRequestResource' - LogResource: + - confidence + - parent + - deployment + - previous_commit_sha + - fix_live_at + - opened_at + - overlapping_functions + - overlapping_files + IssueFinding: type: object - description: Resource that owns a historical log event. + description: The LavaFlow Code Quality finding behind a `code_quality` issue. properties: - type: + rule: type: string - enum: - - function - - frontend - - database - description: Resource type that owns the log event. - id: + description: The rule the finding names, such as `null-dereference`. + severity: type: string - format: uuid - description: Resource ID that owns the log event. - name: + enum: + - nit + - minor + - major + - critical + description: How much the problem matters, as the finding was confirmed. + commit_sha: type: string - description: Resource name associated with the log event, when available. - required: - - type - - id - LogDeployment: - type: object - description: Deployment context associated with a historical deployment log event. - properties: - id: + description: The deployed commit the scan found the problem in. + path: type: string - format: uuid - description: Deployment ID associated with the log event. - stage: + description: The file, from the repository root. + start_line: + type: integer + format: int64 + description: The first line of the problem in that commit, from 1. + end_line: + type: integer + format: int64 + description: The last line of the problem in that commit. + explanation: type: string - enum: - - compile - - publish - description: Deployment stage that produced the log event, when available. + description: 'What fails and on which input, as plain text. When it holds one of the project''s secret values or a secret gitleaks'' default rules detect, it reads `Hidden: this field matched a secret.` in place of all of it.' required: - - id - DurableMessageWaitStatus: - type: string - enum: - - waiting - - matched - - delivered - - expired - - cancelled - description: | - `waiting` until a message for its name arrives, `matched` while that - message is handed over, then `delivered`. `expired` means the wait's - timeout passed first, and `cancelled` that the execution stopped - waiting. + - rule + - severity + - commit_sha + - path + - start_line + - end_line + - explanation DurableApprovalFunction: type: object description: |