From c07a19cf48bcb14ac49eb74b06854872b86a1b3b Mon Sep 17 00:00:00 2001 From: "kong[bot]" <123129154+kong[bot]@users.noreply.github.com> Date: Fri, 16 Oct 2026 18:55:28 +0000 Subject: [PATCH] chore(api): sync OpenAPI contract --- .../generated/.openapi-generator/FILES | 26 + lib/volcano/generated/README.md | 37 + .../generated/lib/volcano-generated.rb | 26 + .../api/authentication_api.rb | 50 + .../lib/volcano-generated/api/autofix_api.rb | 221 ++ .../api/durable_functions_api.rb | 740 +++++++ .../volcano-generated/api/frontends_api.rb | 4 +- .../volcano-generated/api/functions_api.rb | 4 +- .../api/o_auth_authentication_api.rb | 6 + .../lib/volcano-generated/api/projects_api.rb | 4 +- .../api/storage_policies_api.rb | 2 + .../models/autofix_diagnosis.rb | 351 ++++ .../volcano-generated/models/autofix_edit.rb | 217 ++ .../models/autofix_evidence.rb | 224 ++ .../volcano-generated/models/autofix_patch.rb | 193 ++ .../models/autofix_pull_request.rb | 286 +++ .../models/autofix_pull_request_skipped.rb | 46 + .../models/autofix_pull_request_state.rb | 41 + .../volcano-generated/models/autofix_run.rb | 512 +++++ .../models/autofix_run_status.rb | 43 + .../models/autofix_run_trigger.rb | 41 + .../models/autofix_run_usage.rb | 243 +++ .../models/create_service_key_request.rb | 2 +- .../models/durable_execution.rb | 18 +- .../models/durable_message.rb | 396 ++++ .../models/durable_message_direction.rb | 40 + .../models/durable_message_list.rb | 194 ++ .../models/durable_message_sender.rb | 203 ++ .../durable_message_session_registration.rb | 165 ++ .../models/durable_message_status.rb | 43 + .../models/durable_message_wait.rb | 278 +++ .../models/durable_message_wait_list.rb | 167 ++ .../durable_message_wait_registration.rb | 225 ++ .../models/durable_message_wait_status.rb | 43 + .../models/function_invocation_request.rb | 2 +- .../open_durable_message_session_request.rb | 228 +++ .../models/paginated_autofix_runs.rb | 230 +++ .../models/project_health_resource.rb | 4 +- .../models/project_health_status.rb | 4 +- .../models/publish_durable_message_request.rb | 205 ++ .../register_durable_message_wait_request.rb | 284 +++ .../models/send_durable_message_request.rb | 205 ++ openapi/openapi.yaml | 1812 +++++++++++++++-- 43 files changed, 7880 insertions(+), 185 deletions(-) create mode 100644 lib/volcano/generated/lib/volcano-generated/models/autofix_diagnosis.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/autofix_edit.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/autofix_evidence.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/autofix_patch.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/autofix_pull_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/autofix_pull_request_skipped.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/autofix_pull_request_state.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/autofix_run.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/autofix_run_status.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/autofix_run_trigger.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/autofix_run_usage.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/durable_message.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/durable_message_direction.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/durable_message_list.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/durable_message_sender.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/durable_message_session_registration.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/durable_message_status.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/durable_message_wait.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_list.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_registration.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_status.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/open_durable_message_session_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/paginated_autofix_runs.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/publish_durable_message_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/register_durable_message_wait_request.rb create mode 100644 lib/volcano/generated/lib/volcano-generated/models/send_durable_message_request.rb diff --git a/lib/volcano/generated/.openapi-generator/FILES b/lib/volcano/generated/.openapi-generator/FILES index 6acaceb5..f4853f04 100644 --- a/lib/volcano/generated/.openapi-generator/FILES +++ b/lib/volcano/generated/.openapi-generator/FILES @@ -101,8 +101,19 @@ 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_diagnosis.rb +lib/volcano-generated/models/autofix_edit.rb +lib/volcano-generated/models/autofix_evidence.rb lib/volcano-generated/models/autofix_model.rb +lib/volcano-generated/models/autofix_patch.rb lib/volcano-generated/models/autofix_provider.rb +lib/volcano-generated/models/autofix_pull_request.rb +lib/volcano-generated/models/autofix_pull_request_skipped.rb +lib/volcano-generated/models/autofix_pull_request_state.rb +lib/volcano-generated/models/autofix_run.rb +lib/volcano-generated/models/autofix_run_status.rb +lib/volcano-generated/models/autofix_run_trigger.rb +lib/volcano-generated/models/autofix_run_usage.rb lib/volcano-generated/models/autofix_settings.rb lib/volcano-generated/models/autofix_stage.rb lib/volcano-generated/models/ban_auth_user_request.rb @@ -199,6 +210,16 @@ lib/volcano-generated/models/durable_execution_operation_list.rb lib/volcano-generated/models/durable_execution_status.rb lib/volcano-generated/models/durable_function.rb lib/volcano-generated/models/durable_function_config.rb +lib/volcano-generated/models/durable_message.rb +lib/volcano-generated/models/durable_message_direction.rb +lib/volcano-generated/models/durable_message_list.rb +lib/volcano-generated/models/durable_message_sender.rb +lib/volcano-generated/models/durable_message_session_registration.rb +lib/volcano-generated/models/durable_message_status.rb +lib/volcano-generated/models/durable_message_wait.rb +lib/volcano-generated/models/durable_message_wait_list.rb +lib/volcano-generated/models/durable_message_wait_registration.rb +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 @@ -285,7 +306,9 @@ lib/volcano-generated/models/managed_project_config_frontend_custom_domain_tls_c lib/volcano-generated/models/metric_usage_data.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 lib/volcano-generated/models/paginated_auth_users.rb +lib/volcano-generated/models/paginated_autofix_runs.rb lib/volcano-generated/models/paginated_databases.rb lib/volcano-generated/models/paginated_durable_approvals.rb lib/volcano-generated/models/paginated_durable_executions.rb @@ -410,11 +433,13 @@ 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_usage_response.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_stats.rb lib/volcano-generated/models/refresh_o_auth_provider_token200_response.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 lib/volcano-generated/models/replace_shared_variables_request.rb @@ -446,6 +471,7 @@ 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/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/storage_bucket.rb diff --git a/lib/volcano/generated/README.md b/lib/volcano/generated/README.md index 5e533522..ce180391 100644 --- a/lib/volcano/generated/README.md +++ b/lib/volcano/generated/README.md @@ -156,7 +156,10 @@ Class | Method | HTTP request | Description *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_run**](docs/AutofixApi.md#get_autofix_run) | **GET** /projects/{id}/autofix-runs/{runId} | Get an autofix run *Volcano::Generated::AutofixApi* | [**get_autofix_settings**](docs/AutofixApi.md#get_autofix_settings) | **GET** /projects/{id}/autofix | Get autofix settings +*Volcano::Generated::AutofixApi* | [**list_autofix_runs**](docs/AutofixApi.md#list_autofix_runs) | **GET** /projects/{id}/autofix-runs | List autofix runs +*Volcano::Generated::AutofixApi* | [**start_autofix_run**](docs/AutofixApi.md#start_autofix_run) | **POST** /projects/{id}/issues/{issueId}/autofix-runs | Diagnose an issue *Volcano::Generated::AutofixApi* | [**update_autofix_settings**](docs/AutofixApi.md#update_autofix_settings) | **PUT** /projects/{id}/autofix | Replace autofix settings *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 @@ -211,7 +214,15 @@ Class | Method | HTTP request | Description *Volcano::Generated::DurableFunctionsApi* | [**list_durable_function_deployments**](docs/DurableFunctionsApi.md#list_durable_function_deployments) | **GET** /projects/{id}/durable-functions/{functionId}/deployments | List durable function deployments *Volcano::Generated::DurableFunctionsApi* | [**list_durable_function_schedulers**](docs/DurableFunctionsApi.md#list_durable_function_schedulers) | **GET** /projects/{id}/durable-functions/{functionId}/schedulers | List schedulers for a durable function *Volcano::Generated::DurableFunctionsApi* | [**list_durable_functions**](docs/DurableFunctionsApi.md#list_durable_functions) | **GET** /projects/{id}/durable-functions | List all durable functions in a project +*Volcano::Generated::DurableFunctionsApi* | [**list_durable_message_waits**](docs/DurableFunctionsApi.md#list_durable_message_waits) | **GET** /projects/{id}/durable-functions/{functionId}/executions/{executionId}/message-waits | List a durable execution's open message waits +*Volcano::Generated::DurableFunctionsApi* | [**list_durable_messages**](docs/DurableFunctionsApi.md#list_durable_messages) | **GET** /projects/{id}/durable-functions/{functionId}/executions/{executionId}/messages | List a durable execution's messages +*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_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 +*Volcano::Generated::DurableFunctionsApi* | [**send_durable_message_from_application**](docs/DurableFunctionsApi.md#send_durable_message_from_application) | **POST** /durable-functions/{functionId}/executions/{executionId}/messages | Send a message to a durable execution from an application *Volcano::Generated::DurableFunctionsApi* | [**start_durable_execution**](docs/DurableFunctionsApi.md#start_durable_execution) | **POST** /projects/{id}/durable-functions/{functionId}/executions | Start a durable execution *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 @@ -465,8 +476,19 @@ 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::AutofixDiagnosis](docs/AutofixDiagnosis.md) + - [Volcano::Generated::AutofixEdit](docs/AutofixEdit.md) + - [Volcano::Generated::AutofixEvidence](docs/AutofixEvidence.md) - [Volcano::Generated::AutofixModel](docs/AutofixModel.md) + - [Volcano::Generated::AutofixPatch](docs/AutofixPatch.md) - [Volcano::Generated::AutofixProvider](docs/AutofixProvider.md) + - [Volcano::Generated::AutofixPullRequest](docs/AutofixPullRequest.md) + - [Volcano::Generated::AutofixPullRequestSkipped](docs/AutofixPullRequestSkipped.md) + - [Volcano::Generated::AutofixPullRequestState](docs/AutofixPullRequestState.md) + - [Volcano::Generated::AutofixRun](docs/AutofixRun.md) + - [Volcano::Generated::AutofixRunStatus](docs/AutofixRunStatus.md) + - [Volcano::Generated::AutofixRunTrigger](docs/AutofixRunTrigger.md) + - [Volcano::Generated::AutofixRunUsage](docs/AutofixRunUsage.md) - [Volcano::Generated::AutofixSettings](docs/AutofixSettings.md) - [Volcano::Generated::AutofixStage](docs/AutofixStage.md) - [Volcano::Generated::BYOCProjectConfigFrontendCustomDomainTLSConfig](docs/BYOCProjectConfigFrontendCustomDomainTLSConfig.md) @@ -563,6 +585,16 @@ Class | Method | HTTP request | Description - [Volcano::Generated::DurableExecutionStatus](docs/DurableExecutionStatus.md) - [Volcano::Generated::DurableFunction](docs/DurableFunction.md) - [Volcano::Generated::DurableFunctionConfig](docs/DurableFunctionConfig.md) + - [Volcano::Generated::DurableMessage](docs/DurableMessage.md) + - [Volcano::Generated::DurableMessageDirection](docs/DurableMessageDirection.md) + - [Volcano::Generated::DurableMessageList](docs/DurableMessageList.md) + - [Volcano::Generated::DurableMessageSender](docs/DurableMessageSender.md) + - [Volcano::Generated::DurableMessageSessionRegistration](docs/DurableMessageSessionRegistration.md) + - [Volcano::Generated::DurableMessageStatus](docs/DurableMessageStatus.md) + - [Volcano::Generated::DurableMessageWait](docs/DurableMessageWait.md) + - [Volcano::Generated::DurableMessageWaitList](docs/DurableMessageWaitList.md) + - [Volcano::Generated::DurableMessageWaitRegistration](docs/DurableMessageWaitRegistration.md) + - [Volcano::Generated::DurableMessageWaitStatus](docs/DurableMessageWaitStatus.md) - [Volcano::Generated::EmailTemplate](docs/EmailTemplate.md) - [Volcano::Generated::Error](docs/Error.md) - [Volcano::Generated::ExportProjectSourceRequest](docs/ExportProjectSourceRequest.md) @@ -649,7 +681,9 @@ Class | Method | HTTP request | Description - [Volcano::Generated::MetricUsageData](docs/MetricUsageData.md) - [Volcano::Generated::OAuthConfig](docs/OAuthConfig.md) - [Volcano::Generated::OAuthErrorResponse](docs/OAuthErrorResponse.md) + - [Volcano::Generated::OpenDurableMessageSessionRequest](docs/OpenDurableMessageSessionRequest.md) - [Volcano::Generated::PaginatedAuthUsers](docs/PaginatedAuthUsers.md) + - [Volcano::Generated::PaginatedAutofixRuns](docs/PaginatedAutofixRuns.md) - [Volcano::Generated::PaginatedDatabases](docs/PaginatedDatabases.md) - [Volcano::Generated::PaginatedDurableApprovals](docs/PaginatedDurableApprovals.md) - [Volcano::Generated::PaginatedDurableExecutions](docs/PaginatedDurableExecutions.md) @@ -774,11 +808,13 @@ Class | Method | HTTP request | Description - [Volcano::Generated::ProjectSourceExportState](docs/ProjectSourceExportState.md) - [Volcano::Generated::ProjectTemplateInstallation](docs/ProjectTemplateInstallation.md) - [Volcano::Generated::ProjectUsageResponse](docs/ProjectUsageResponse.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::RealtimeStats](docs/RealtimeStats.md) - [Volcano::Generated::RefreshOAuthProviderToken200Response](docs/RefreshOAuthProviderToken200Response.md) + - [Volcano::Generated::RegisterDurableMessageWaitRequest](docs/RegisterDurableMessageWaitRequest.md) - [Volcano::Generated::RenameVariableEnvironmentRequest](docs/RenameVariableEnvironmentRequest.md) - [Volcano::Generated::ReplaceFrontendSharedVariablesRequest](docs/ReplaceFrontendSharedVariablesRequest.md) - [Volcano::Generated::ReplaceSharedVariablesRequest](docs/ReplaceSharedVariablesRequest.md) @@ -810,6 +846,7 @@ Class | Method | HTTP request | Description - [Volcano::Generated::SandboxTemplate](docs/SandboxTemplate.md) - [Volcano::Generated::SandboxTemplatePage](docs/SandboxTemplatePage.md) - [Volcano::Generated::ScheduleRequest](docs/ScheduleRequest.md) + - [Volcano::Generated::SendDurableMessageRequest](docs/SendDurableMessageRequest.md) - [Volcano::Generated::ServiceKey](docs/ServiceKey.md) - [Volcano::Generated::SetProjectGitProductionBranchRequest](docs/SetProjectGitProductionBranchRequest.md) - [Volcano::Generated::StorageBucket](docs/StorageBucket.md) diff --git a/lib/volcano/generated/lib/volcano-generated.rb b/lib/volcano/generated/lib/volcano-generated.rb index 1f72dadf..3eeb916d 100644 --- a/lib/volcano/generated/lib/volcano-generated.rb +++ b/lib/volcano/generated/lib/volcano-generated.rb @@ -74,8 +74,19 @@ 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 :AutofixDiagnosis, 'volcano-generated/models/autofix_diagnosis' +Volcano::Generated.autoload :AutofixEdit, 'volcano-generated/models/autofix_edit' +Volcano::Generated.autoload :AutofixEvidence, 'volcano-generated/models/autofix_evidence' Volcano::Generated.autoload :AutofixModel, 'volcano-generated/models/autofix_model' +Volcano::Generated.autoload :AutofixPatch, 'volcano-generated/models/autofix_patch' Volcano::Generated.autoload :AutofixProvider, 'volcano-generated/models/autofix_provider' +Volcano::Generated.autoload :AutofixPullRequest, 'volcano-generated/models/autofix_pull_request' +Volcano::Generated.autoload :AutofixPullRequestSkipped, 'volcano-generated/models/autofix_pull_request_skipped' +Volcano::Generated.autoload :AutofixPullRequestState, 'volcano-generated/models/autofix_pull_request_state' +Volcano::Generated.autoload :AutofixRun, 'volcano-generated/models/autofix_run' +Volcano::Generated.autoload :AutofixRunStatus, 'volcano-generated/models/autofix_run_status' +Volcano::Generated.autoload :AutofixRunTrigger, 'volcano-generated/models/autofix_run_trigger' +Volcano::Generated.autoload :AutofixRunUsage, 'volcano-generated/models/autofix_run_usage' 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' @@ -172,6 +183,16 @@ Volcano::Generated.autoload :DurableExecutionStatus, 'volcano-generated/models/durable_execution_status' Volcano::Generated.autoload :DurableFunction, 'volcano-generated/models/durable_function' Volcano::Generated.autoload :DurableFunctionConfig, 'volcano-generated/models/durable_function_config' +Volcano::Generated.autoload :DurableMessage, 'volcano-generated/models/durable_message' +Volcano::Generated.autoload :DurableMessageDirection, 'volcano-generated/models/durable_message_direction' +Volcano::Generated.autoload :DurableMessageList, 'volcano-generated/models/durable_message_list' +Volcano::Generated.autoload :DurableMessageSender, 'volcano-generated/models/durable_message_sender' +Volcano::Generated.autoload :DurableMessageSessionRegistration, 'volcano-generated/models/durable_message_session_registration' +Volcano::Generated.autoload :DurableMessageStatus, 'volcano-generated/models/durable_message_status' +Volcano::Generated.autoload :DurableMessageWait, 'volcano-generated/models/durable_message_wait' +Volcano::Generated.autoload :DurableMessageWaitList, 'volcano-generated/models/durable_message_wait_list' +Volcano::Generated.autoload :DurableMessageWaitRegistration, 'volcano-generated/models/durable_message_wait_registration' +Volcano::Generated.autoload :DurableMessageWaitStatus, 'volcano-generated/models/durable_message_wait_status' 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' @@ -258,7 +279,9 @@ Volcano::Generated.autoload :MetricUsageData, 'volcano-generated/models/metric_usage_data' 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' Volcano::Generated.autoload :PaginatedAuthUsers, 'volcano-generated/models/paginated_auth_users' +Volcano::Generated.autoload :PaginatedAutofixRuns, 'volcano-generated/models/paginated_autofix_runs' Volcano::Generated.autoload :PaginatedDatabases, 'volcano-generated/models/paginated_databases' Volcano::Generated.autoload :PaginatedDurableApprovals, 'volcano-generated/models/paginated_durable_approvals' Volcano::Generated.autoload :PaginatedDurableExecutions, 'volcano-generated/models/paginated_durable_executions' @@ -383,11 +406,13 @@ Volcano::Generated.autoload :ProjectSourceExportState, 'volcano-generated/models/project_source_export_state' Volcano::Generated.autoload :ProjectTemplateInstallation, 'volcano-generated/models/project_template_installation' Volcano::Generated.autoload :ProjectUsageResponse, 'volcano-generated/models/project_usage_response' +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 :RealtimeStats, 'volcano-generated/models/realtime_stats' Volcano::Generated.autoload :RefreshOAuthProviderToken200Response, 'volcano-generated/models/refresh_o_auth_provider_token200_response' +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' Volcano::Generated.autoload :ReplaceSharedVariablesRequest, 'volcano-generated/models/replace_shared_variables_request' @@ -419,6 +444,7 @@ 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 :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 :StorageBucket, 'volcano-generated/models/storage_bucket' 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..87868aba 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/authentication_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/authentication_api.rb @@ -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 index 8cd1c88e..0441d887 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/autofix_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/autofix_api.rb @@ -82,6 +82,75 @@ def delete_autofix_api_key_with_http_info(id, opts = {}) return data, status_code, headers end + # Get an autofix run + # Returns one run: its status, the diagnosis once it succeeds, why it failed or was canceled, and the model tokens it used. Runs stay readable where autofix is not available. Project access tokens can read runs, including read-only ones. + # @param id [String] Project ID + # @param run_id [String] Autofix run ID + # @param [Hash] opts the optional parameters + # @return [AutofixRun] + def get_autofix_run(id, run_id, opts = {}) + data, _status_code, _headers = get_autofix_run_with_http_info(id, run_id, opts) + data + end + + # Get an autofix run + # Returns one run: its status, the diagnosis once it succeeds, why it failed or was canceled, and the model tokens it used. Runs stay readable where autofix is not available. Project access tokens can read runs, including read-only ones. + # @param id [String] Project ID + # @param run_id [String] Autofix run ID + # @param [Hash] opts the optional parameters + # @return [Array<(AutofixRun, Integer, Hash)>] AutofixRun data, response status code and response headers + def get_autofix_run_with_http_info(id, run_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AutofixApi.get_autofix_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 AutofixApi.get_autofix_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 AutofixApi.get_autofix_run" + end + # resource path + local_var_path = '/projects/{id}/autofix-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] || 'AutofixRun' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"AutofixApi.get_autofix_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: AutofixApi#get_autofix_run\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 @@ -145,6 +214,158 @@ def get_autofix_settings_with_http_info(id, opts = {}) return data, status_code, headers end + # List autofix runs + # Lists the project's autofix runs, newest first. Runs stay readable after autofix is turned off, and where autofix is not available. 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 [String] :issue_id Return only runs for this issue. + # @option opts [AutofixRunStatus] :status Return only runs in this status. + # @return [PaginatedAutofixRuns] + def list_autofix_runs(id, opts = {}) + data, _status_code, _headers = list_autofix_runs_with_http_info(id, opts) + data + end + + # List autofix runs + # Lists the project's autofix runs, newest first. Runs stay readable after autofix is turned off, and where autofix is not available. 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 [String] :issue_id Return only runs for this issue. + # @option opts [AutofixRunStatus] :status Return only runs in this status. + # @return [Array<(PaginatedAutofixRuns, Integer, Hash)>] PaginatedAutofixRuns data, response status code and response headers + def list_autofix_runs_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AutofixApi.list_autofix_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 AutofixApi.list_autofix_runs" + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AutofixApi.list_autofix_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 AutofixApi.list_autofix_runs, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/projects/{id}/autofix-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[:'issue_id'] = opts[:'issue_id'] if !opts[:'issue_id'].nil? + query_params[:'status'] = opts[:'status'] if !opts[:'status'].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] || 'PaginatedAutofixRuns' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"AutofixApi.list_autofix_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: AutofixApi#list_autofix_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Diagnose an issue + # Queues a run that diagnoses the issue with AI. The run reads the issue's runtime logs and, when a push to the project's connected repository built the deployment that was live when the issue was last seen, its source at that commit. Poll the run until its status is `succeeded`, `failed`, or `canceled`. Autofix must be on for the project. An issue has at most one queued or running run, a project runs one at a time, and a project starts at most 25 runs, manual and automatic, in any 24 hours. Project access tokens are refused. A run spends model tokens on the project's provider, so a person starts it with a platform token or in the dashboard. + # @param id [String] Project ID + # @param issue_id [String] Issue ID + # @param [Hash] opts the optional parameters + # @return [AutofixRun] + def start_autofix_run(id, issue_id, opts = {}) + data, _status_code, _headers = start_autofix_run_with_http_info(id, issue_id, opts) + data + end + + # Diagnose an issue + # Queues a run that diagnoses the issue with AI. The run reads the issue's runtime logs and, when a push to the project's connected repository built the deployment that was live when the issue was last seen, its source at that commit. Poll the run until its status is `succeeded`, `failed`, or `canceled`. Autofix must be on for the project. An issue has at most one queued or running run, a project runs one at a time, and a project starts at most 25 runs, manual and automatic, in any 24 hours. Project access tokens are refused. A run spends model tokens on the project's provider, so a person starts it with a platform token or in the dashboard. + # @param id [String] Project ID + # @param issue_id [String] Issue ID + # @param [Hash] opts the optional parameters + # @return [Array<(AutofixRun, Integer, Hash)>] AutofixRun data, response status code and response headers + def start_autofix_run_with_http_info(id, issue_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AutofixApi.start_autofix_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 AutofixApi.start_autofix_run" + end + # verify the required parameter 'issue_id' is set + if @api_client.config.client_side_validation && issue_id.nil? + fail ArgumentError, "Missing the required parameter 'issue_id' when calling AutofixApi.start_autofix_run" + end + # resource path + local_var_path = '/projects/{id}/issues/{issueId}/autofix-runs'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'issueId' + '}', CGI.escape(issue_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] || 'AutofixRun' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken'] + + new_options = opts.merge( + :operation => :"AutofixApi.start_autofix_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: AutofixApi#start_autofix_run\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 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 b1ad4856..f9f02afe 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 @@ -1390,6 +1390,541 @@ def list_durable_functions_with_http_info(id, opts = {}) return data, status_code, headers end + # List a durable execution's open message waits + # 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. + # @param id [String] Project ID + # @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 + # @return [DurableMessageWaitList] + def list_durable_message_waits(id, function_id, execution_id, opts = {}) + data, _status_code, _headers = list_durable_message_waits_with_http_info(id, function_id, execution_id, opts) + data + end + + # List a durable execution's open message waits + # 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. + # @param id [String] Project ID + # @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 + # @return [Array<(DurableMessageWaitList, Integer, Hash)>] DurableMessageWaitList data, response status code and response headers + def list_durable_message_waits_with_http_info(id, function_id, execution_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DurableFunctionsApi.list_durable_message_waits ...' + 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 DurableFunctionsApi.list_durable_message_waits" + 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 DurableFunctionsApi.list_durable_message_waits" + end + # verify the required parameter 'execution_id' is set + if @api_client.config.client_side_validation && execution_id.nil? + fail ArgumentError, "Missing the required parameter 'execution_id' when calling DurableFunctionsApi.list_durable_message_waits" + end + # resource path + local_var_path = '/projects/{id}/durable-functions/{functionId}/executions/{executionId}/message-waits'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)).sub('{' + 'executionId' + '}', CGI.escape(execution_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] || 'DurableMessageWaitList' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"DurableFunctionsApi.list_durable_message_waits", + :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: DurableFunctionsApi#list_durable_message_waits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List a durable execution's messages + # 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. + # @param id [String] Project ID + # @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 [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) + # @option opts [Integer] :limit Most messages to return. (default to 100) + # @return [DurableMessageList] + def list_durable_messages(id, function_id, execution_id, opts = {}) + data, _status_code, _headers = list_durable_messages_with_http_info(id, function_id, execution_id, opts) + data + end + + # List a durable execution's messages + # 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. + # @param id [String] Project ID + # @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 [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) + # @option opts [Integer] :limit Most messages to return. (default to 100) + # @return [Array<(DurableMessageList, Integer, Hash)>] DurableMessageList data, response status code and response headers + def list_durable_messages_with_http_info(id, function_id, execution_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DurableFunctionsApi.list_durable_messages ...' + 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 DurableFunctionsApi.list_durable_messages" + 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 DurableFunctionsApi.list_durable_messages" + end + # verify the required parameter 'execution_id' is set + if @api_client.config.client_side_validation && execution_id.nil? + fail ArgumentError, "Missing the required parameter 'execution_id' when calling DurableFunctionsApi.list_durable_messages" + end + if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length > 237 + fail ArgumentError, 'invalid value for "opts[:"name"]" when calling DurableFunctionsApi.list_durable_messages, the character length must be smaller than or equal to 237.' + end + + if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"name"]" when calling DurableFunctionsApi.list_durable_messages, the character length must be greater than or equal to 1.' + end + + pattern = Regexp.new(/^[ -~]+$/) + if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'] !~ pattern + fail ArgumentError, "invalid value for 'opts[:\"name\"]' when calling DurableFunctionsApi.list_durable_messages, must conform to the pattern #{pattern}." + end + + if @api_client.config.client_side_validation && !opts[:'after'].nil? && opts[:'after'] < 0 + fail ArgumentError, 'invalid value for "opts[:"after"]" when calling DurableFunctionsApi.list_durable_messages, must be greater than or equal to 0.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DurableFunctionsApi.list_durable_messages, must be smaller than or equal to 500.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DurableFunctionsApi.list_durable_messages, must be greater than or equal to 1.' + 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)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil? + query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? + query_params[:'after'] = opts[:'after'] if !opts[:'after'].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] || 'DurableMessageList' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"DurableFunctionsApi.list_durable_messages", + :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: DurableFunctionsApi#list_durable_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List a durable execution's messages from an application + # 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. + # @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. + # @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) + # @option opts [Integer] :limit Most messages to return. (default to 100) + # @return [DurableMessageList] + def list_durable_messages_from_application(function_id, execution_id, opts = {}) + data, _status_code, _headers = list_durable_messages_from_application_with_http_info(function_id, execution_id, opts) + data + end + + # List a durable execution's messages from an application + # 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. + # @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. + # @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) + # @option opts [Integer] :limit Most messages to return. (default to 100) + # @return [Array<(DurableMessageList, Integer, Hash)>] DurableMessageList data, response status code and response headers + def list_durable_messages_from_application_with_http_info(function_id, execution_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DurableFunctionsApi.list_durable_messages_from_application ...' + 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 DurableFunctionsApi.list_durable_messages_from_application" + end + # verify the required parameter 'execution_id' is set + if @api_client.config.client_side_validation && execution_id.nil? + fail ArgumentError, "Missing the required parameter 'execution_id' when calling DurableFunctionsApi.list_durable_messages_from_application" + 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.list_durable_messages_from_application, the character length must be smaller than or equal to 128.' + end + + if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length > 237 + fail ArgumentError, 'invalid value for "opts[:"name"]" when calling DurableFunctionsApi.list_durable_messages_from_application, the character length must be smaller than or equal to 237.' + end + + if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"name"]" when calling DurableFunctionsApi.list_durable_messages_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[:'name'].nil? && opts[:'name'] !~ pattern + fail ArgumentError, "invalid value for 'opts[:\"name\"]' when calling DurableFunctionsApi.list_durable_messages_from_application, must conform to the pattern #{pattern}." + end + + if @api_client.config.client_side_validation && !opts[:'after'].nil? && opts[:'after'] < 0 + fail ArgumentError, 'invalid value for "opts[:"after"]" when calling DurableFunctionsApi.list_durable_messages_from_application, must be greater than or equal to 0.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DurableFunctionsApi.list_durable_messages_from_application, must be smaller than or equal to 500.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DurableFunctionsApi.list_durable_messages_from_application, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/durable-functions/{functionId}/executions/{executionId}/messages'.sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)).sub('{' + 'executionId' + '}', CGI.escape(execution_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil? + query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? + query_params[:'after'] = opts[:'after'] if !opts[:'after'].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'] + header_params[:'X-Volcano-Client-Token'] = opts[:'x_volcano_client_token'] if !opts[:'x_volcano_client_token'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DurableMessageList' + + # auth_names + auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'AuthUserAccessToken', 'AnonKey'] + + new_options = opts.merge( + :operation => :"DurableFunctionsApi.list_durable_messages_from_application", + :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: DurableFunctionsApi#list_durable_messages_from_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Open a messages session from inside a workflow + # 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. 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. Retrying is safe: a request for a session that is already registered returns it with `200`. + # @param open_durable_message_session_request [OpenDurableMessageSessionRequest] + # @param [Hash] opts the optional parameters + # @return [DurableMessageSessionRegistration] + def open_durable_message_session(open_durable_message_session_request, opts = {}) + data, _status_code, _headers = open_durable_message_session_with_http_info(open_durable_message_session_request, opts) + data + end + + # Open a messages session from inside a workflow + # 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. 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. Retrying is safe: a request for a session that is already registered returns it with `200`. + # @param open_durable_message_session_request [OpenDurableMessageSessionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(DurableMessageSessionRegistration, Integer, Hash)>] DurableMessageSessionRegistration data, response status code and response headers + def open_durable_message_session_with_http_info(open_durable_message_session_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DurableFunctionsApi.open_durable_message_session ...' + end + # verify the required parameter 'open_durable_message_session_request' is set + if @api_client.config.client_side_validation && open_durable_message_session_request.nil? + fail ArgumentError, "Missing the required parameter 'open_durable_message_session_request' when calling DurableFunctionsApi.open_durable_message_session" + end + # resource path + local_var_path = '/durable-messages/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'] + # 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(open_durable_message_session_request) + + # return_type + return_type = opts[:debug_return_type] || 'DurableMessageSessionRegistration' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DurableFunctionsApi.open_durable_message_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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DurableFunctionsApi#open_durable_message_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + 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 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 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) + data + 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 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 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 + @api_client.config.logger.debug 'Calling API: DurableFunctionsApi.publish_durable_message ...' + end + # verify the required parameter 'x_volcano_durable_session' is set + if @api_client.config.client_side_validation && x_volcano_durable_session.nil? + fail ArgumentError, "Missing the required parameter 'x_volcano_durable_session' when calling DurableFunctionsApi.publish_durable_message" + end + if @api_client.config.client_side_validation && x_volcano_durable_session.to_s.length > 128 + fail ArgumentError, 'invalid value for "x_volcano_durable_session" when calling DurableFunctionsApi.publish_durable_message, the character length must be smaller than or equal to 128.' + end + + if @api_client.config.client_side_validation && x_volcano_durable_session.to_s.length < 1 + fail ArgumentError, 'invalid value for "x_volcano_durable_session" when calling DurableFunctionsApi.publish_durable_message, the character length must be greater than or equal to 1.' + end + + # verify the required parameter 'publish_durable_message_request' is set + if @api_client.config.client_side_validation && publish_durable_message_request.nil? + fail ArgumentError, "Missing the required parameter 'publish_durable_message_request' when calling DurableFunctionsApi.publish_durable_message" + 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 DurableFunctionsApi.publish_durable_message, 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 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' + + # 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[:'X-Volcano-Durable-Session'] = x_volcano_durable_session + 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(publish_durable_message_request) + + # return_type + return_type = opts[:debug_return_type] || 'DurableMessage' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DurableFunctionsApi.publish_durable_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: DurableFunctionsApi#publish_durable_message\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] + # @param [Hash] opts the optional parameters + # @return [DurableMessageWaitRegistration] + def register_durable_message_wait(register_durable_message_wait_request, opts = {}) + data, _status_code, _headers = register_durable_message_wait_with_http_info(register_durable_message_wait_request, opts) + data + 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] + # @param [Hash] opts the optional parameters + # @return [Array<(DurableMessageWaitRegistration, Integer, Hash)>] DurableMessageWaitRegistration data, response status code and response headers + def register_durable_message_wait_with_http_info(register_durable_message_wait_request, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DurableFunctionsApi.register_durable_message_wait ...' + end + # verify the required parameter 'register_durable_message_wait_request' is set + if @api_client.config.client_side_validation && register_durable_message_wait_request.nil? + fail ArgumentError, "Missing the required parameter 'register_durable_message_wait_request' when calling DurableFunctionsApi.register_durable_message_wait" + end + # resource path + local_var_path = '/durable-messages/waits' + + # 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_message_wait_request) + + # return_type + return_type = opts[:debug_return_type] || 'DurableMessageWaitRegistration' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DurableFunctionsApi.register_durable_message_wait", + :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_message_wait\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Request an approval from inside a workflow # Registers an approval request for a running durable execution. The Volcano SDK calls this from `ctx.waitForApproval`; 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 approval belongs to the project that owns the execution, and expires when the workflow's own approval timeout does. Retrying is safe: a request for an approval that is already registered returns it with `200`. # @param request_durable_approval_request [RequestDurableApprovalRequest] @@ -1458,6 +1993,211 @@ def request_durable_approval_with_http_info(request_durable_approval_request, op return data, status_code, headers end + # Send a message to a durable execution + # 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. + # @param id [String] Project ID + # @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 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) + data + end + + # Send a message to a durable execution + # 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. + # @param id [String] Project ID + # @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 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 + @api_client.config.logger.debug 'Calling API: DurableFunctionsApi.send_durable_message ...' + 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 DurableFunctionsApi.send_durable_message" + 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 DurableFunctionsApi.send_durable_message" + end + # verify the required parameter 'execution_id' is set + if @api_client.config.client_side_validation && execution_id.nil? + fail ArgumentError, "Missing the required parameter 'execution_id' when calling DurableFunctionsApi.send_durable_message" + end + # verify the required parameter 'send_durable_message_request' is set + if @api_client.config.client_side_validation && send_durable_message_request.nil? + fail ArgumentError, "Missing the required parameter 'send_durable_message_request' when calling DurableFunctionsApi.send_durable_message" + 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 DurableFunctionsApi.send_durable_message, 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 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)) + + # 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(send_durable_message_request) + + # return_type + return_type = opts[:debug_return_type] || 'DurableMessage' + + # auth_names + auth_names = opts[:debug_auth_names] || ['UserToken', 'ProjectAccessToken'] + + new_options = opts.merge( + :operation => :"DurableFunctionsApi.send_durable_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: DurableFunctionsApi#send_durable_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + 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. + # @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 printable ASCII 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. + # @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) + data + 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. + # @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 printable ASCII 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. + # @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 + @api_client.config.logger.debug 'Calling API: DurableFunctionsApi.send_durable_message_from_application ...' + 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 DurableFunctionsApi.send_durable_message_from_application" + end + # verify the required parameter 'execution_id' is set + if @api_client.config.client_side_validation && execution_id.nil? + fail ArgumentError, "Missing the required parameter 'execution_id' when calling DurableFunctionsApi.send_durable_message_from_application" + end + # verify the required parameter 'send_durable_message_request' is set + if @api_client.config.client_side_validation && send_durable_message_request.nil? + fail ArgumentError, "Missing the required parameter 'send_durable_message_request' when calling DurableFunctionsApi.send_durable_message_from_application" + 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 DurableFunctionsApi.send_durable_message_from_application, 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 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 + + # resource path + local_var_path = '/durable-functions/{functionId}/executions/{executionId}/messages'.sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)).sub('{' + 'executionId' + '}', CGI.escape(execution_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 + header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? + header_params[:'X-Volcano-Client-Token'] = opts[:'x_volcano_client_token'] if !opts[:'x_volcano_client_token'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(send_durable_message_request) + + # return_type + return_type = opts[:debug_return_type] || 'DurableMessage' + + # auth_names + auth_names = opts[:debug_auth_names] || ['ServiceRoleKey', 'AuthUserAccessToken', 'AnonKey'] + + new_options = opts.merge( + :operation => :"DurableFunctionsApi.send_durable_message_from_application", + :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#send_durable_message_from_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Start a durable execution # 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}`. The request body is the execution's input and must be valid JSON if present. An empty body starts the execution with no input. 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. # @param id [String] Project ID 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..44c21128 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb @@ -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.28 (`^18.18.0 || ^19.8.0 || >=20.0.0`) and Next 16.4.2 (`>=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. # @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. @@ -36,7 +36,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.28 (`^18.18.0 || ^19.8.0 || >=20.0.0`) and Next 16.4.2 (`>=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. # @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. 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..026b574f 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/functions_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/functions_api.rb @@ -591,7 +591,7 @@ def get_function_scheduler_with_http_info(id, function_id, scheduler_id, opts = 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`. + # 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` and `__volcano_http` keys are reserved. Volcano removes caller-supplied values for both before the function runs; only an auth user token adds a server-built `__volcano_auth`, and only HTTP-mode ingress sets `__volcano_http: true`. **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 @@ -602,7 +602,7 @@ def invoke_function(function_id, function_invocation_request, opts = {}) 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`. + # 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` and `__volcano_http` keys are reserved. Volcano removes caller-supplied values for both before the function runs; only an auth user token adds a server-built `__volcano_auth`, and only HTTP-mode ingress sets `__volcano_http: true`. **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 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..3f51d925 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 @@ -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] || {} 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..4b5384d4 100644 --- a/lib/volcano/generated/lib/volcano-generated/api/projects_api.rb +++ b/lib/volcano/generated/lib/volcano-generated/api/projects_api.rb @@ -816,7 +816,7 @@ def get_project_git_deploy_settings_with_http_info(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 [ProjectHealthResponse] @@ -826,7 +826,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 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..f19b7f91 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 @@ -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/models/autofix_diagnosis.rb b/lib/volcano/generated/lib/volcano-generated/models/autofix_diagnosis.rb new file mode 100644 index 00000000..08bf0220 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/autofix_diagnosis.rb @@ -0,0 +1,351 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and 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 AutofixDiagnosis < ApiModelBase + # One or two sentences on what goes wrong. + attr_accessor :summary + + attr_accessor :root_cause + + attr_accessor :evidence + + attr_accessor :suggested_fix + + attr_accessor :confidence + + # Whether a change to the project's code would fix the issue. + attr_accessor :fixable + + # Repository paths a fix would change. + attr_accessor :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 + { + :'summary' => :'summary', + :'root_cause' => :'root_cause', + :'evidence' => :'evidence', + :'suggested_fix' => :'suggested_fix', + :'confidence' => :'confidence', + :'fixable' => :'fixable', + :'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 + { + :'summary' => :'String', + :'root_cause' => :'String', + :'evidence' => :'Array', + :'suggested_fix' => :'String', + :'confidence' => :'String', + :'fixable' => :'Boolean', + :'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::AutofixDiagnosis` 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::AutofixDiagnosis`. 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?(:'suggested_fix') + self.suggested_fix = attributes[:'suggested_fix'] + else + self.suggested_fix = nil + end + + if attributes.key?(:'confidence') + self.confidence = attributes[:'confidence'] + else + self.confidence = nil + end + + if attributes.key?(:'fixable') + self.fixable = attributes[:'fixable'] + else + self.fixable = nil + end + + 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 @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 @suggested_fix.nil? + invalid_properties.push('invalid value for "suggested_fix", suggested_fix cannot be nil.') + end + + if @confidence.nil? + invalid_properties.push('invalid value for "confidence", confidence cannot be nil.') + end + + if @fixable.nil? + invalid_properties.push('invalid value for "fixable", fixable cannot be nil.') + end + + if @files.nil? + invalid_properties.push('invalid value for "files", 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 @summary.nil? + return false if @root_cause.nil? + return false if @evidence.nil? + return false if @suggested_fix.nil? + return false if @confidence.nil? + confidence_validator = EnumAttributeValidator.new('String', ["low", "medium", "high"]) + return false unless confidence_validator.valid?(@confidence) + return false if @fixable.nil? + return false if @files.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] suggested_fix Value to be assigned + def suggested_fix=(suggested_fix) + if suggested_fix.nil? + fail ArgumentError, 'suggested_fix cannot be nil' + end + + @suggested_fix = suggested_fix + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] confidence Object to be assigned + def confidence=(confidence) + validator = EnumAttributeValidator.new('String', ["low", "medium", "high"]) + 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] fixable Value to be assigned + def fixable=(fixable) + if fixable.nil? + fail ArgumentError, 'fixable cannot be nil' + end + + @fixable = fixable + 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 + + @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 && + summary == o.summary && + root_cause == o.root_cause && + evidence == o.evidence && + suggested_fix == o.suggested_fix && + confidence == o.confidence && + fixable == o.fixable && + 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 + [summary, root_cause, evidence, suggested_fix, confidence, fixable, 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/autofix_edit.rb b/lib/volcano/generated/lib/volcano-generated/models/autofix_edit.rb new file mode 100644 index 00000000..714d1a9f --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/autofix_edit.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 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 + # One exact text replacement. An empty `old_text` creates the file. + class AutofixEdit < ApiModelBase + attr_accessor :path + + attr_accessor :old_text + + attr_accessor :new_text + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'path' => :'path', + :'old_text' => :'old_text', + :'new_text' => :'new_text' + } + 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', + :'old_text' => :'String', + :'new_text' => :'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::AutofixEdit` 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::AutofixEdit`. 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?(:'old_text') + self.old_text = attributes[:'old_text'] + else + self.old_text = nil + end + + if attributes.key?(:'new_text') + self.new_text = attributes[:'new_text'] + else + self.new_text = 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 @path.nil? + invalid_properties.push('invalid value for "path", path cannot be nil.') + end + + if @old_text.nil? + invalid_properties.push('invalid value for "old_text", old_text cannot be nil.') + end + + if @new_text.nil? + invalid_properties.push('invalid value for "new_text", new_text 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 @path.nil? + return false if @old_text.nil? + return false if @new_text.nil? + 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 with validation + # @param [Object] old_text Value to be assigned + def old_text=(old_text) + if old_text.nil? + fail ArgumentError, 'old_text cannot be nil' + end + + @old_text = old_text + end + + # Custom attribute writer method with validation + # @param [Object] new_text Value to be assigned + def new_text=(new_text) + if new_text.nil? + fail ArgumentError, 'new_text cannot be nil' + end + + @new_text = new_text + 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 && + old_text == o.old_text && + new_text == o.new_text + 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, old_text, new_text].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_evidence.rb b/lib/volcano/generated/lib/volcano-generated/models/autofix_evidence.rb new file mode 100644 index 00000000..05f84b48 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/autofix_evidence.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 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 AutofixEvidence < ApiModelBase + attr_accessor :kind + + attr_accessor :detail + + # A file and line, or a log timestamp. Absent when the evidence has none. + attr_accessor :location + + 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', + :'detail' => :'detail', + :'location' => :'location' + } + 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', + :'detail' => :'String', + :'location' => :'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::AutofixEvidence` 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::AutofixEvidence`. 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?(:'detail') + self.detail = attributes[:'detail'] + else + self.detail = nil + end + + if attributes.key?(:'location') + self.location = attributes[:'location'] + 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 @detail.nil? + invalid_properties.push('invalid value for "detail", detail 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', ["log", "code", "other"]) + return false unless kind_validator.valid?(@kind) + return false if @detail.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', ["log", "code", "other"]) + 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] detail Value to be assigned + def detail=(detail) + if detail.nil? + fail ArgumentError, 'detail cannot be nil' + end + + @detail = detail + 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 && + detail == o.detail && + location == o.location + 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, detail, location].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_patch.rb b/lib/volcano/generated/lib/volcano-generated/models/autofix_patch.rb new file mode 100644 index 00000000..5b49d99b --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/autofix_patch.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 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 + # The fix the model proposed, applied to the deployed commit. Present whenever the run opened a pull request, and when a valid fix could not be published. + class AutofixPatch < ApiModelBase + attr_accessor :title + + attr_accessor :edits + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'title' => :'title', + :'edits' => :'edits' + } + 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 + { + :'title' => :'String', + :'edits' => :'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::AutofixPatch` 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::AutofixPatch`. 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?(:'title') + self.title = attributes[:'title'] + else + self.title = nil + end + + if attributes.key?(:'edits') + if (value = attributes[:'edits']).is_a?(Array) + self.edits = value + end + else + self.edits = 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 @title.nil? + invalid_properties.push('invalid value for "title", title cannot be nil.') + end + + if @edits.nil? + invalid_properties.push('invalid value for "edits", edits 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 @title.nil? + return false if @edits.nil? + true + 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] edits Value to be assigned + def edits=(edits) + if edits.nil? + fail ArgumentError, 'edits cannot be nil' + end + + @edits = edits + 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 && + title == o.title && + edits == o.edits + 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 + [title, edits].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_pull_request.rb b/lib/volcano/generated/lib/volcano-generated/models/autofix_pull_request.rb new file mode 100644 index 00000000..3e6dd55c --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/autofix_pull_request.rb @@ -0,0 +1,286 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and 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 + # The draft pull request the run opened on the connected repository. + class AutofixPullRequest < ApiModelBase + attr_accessor :number + + attr_accessor :url + + # The branch the fix is on, `volcano/autofix/`. + attr_accessor :branch + + attr_accessor :state + + # When the pull request was merged or closed. + attr_accessor :closed_at + + # When a deployment that includes the merged fix went live. The issue resolves then, unless it occurred again since. When more than 20 deployments went live after the merge before Volcano checked, it is the merge time instead. + attr_accessor :deployed_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 + { + :'number' => :'number', + :'url' => :'url', + :'branch' => :'branch', + :'state' => :'state', + :'closed_at' => :'closed_at', + :'deployed_at' => :'deployed_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 + { + :'number' => :'Integer', + :'url' => :'String', + :'branch' => :'String', + :'state' => :'AutofixPullRequestState', + :'closed_at' => :'Time', + :'deployed_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::AutofixPullRequest` 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::AutofixPullRequest`. 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'] + else + self.branch = nil + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + else + self.state = nil + end + + if attributes.key?(:'closed_at') + self.closed_at = attributes[:'closed_at'] + end + + if attributes.key?(:'deployed_at') + self.deployed_at = attributes[:'deployed_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 @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 @branch.nil? + invalid_properties.push('invalid value for "branch", branch 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 @branch.nil? + return false if @state.nil? + 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 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] state Value to be assigned + def state=(state) + if state.nil? + fail ArgumentError, 'state cannot be nil' + 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 && + closed_at == o.closed_at && + deployed_at == o.deployed_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 + [number, url, branch, state, closed_at, deployed_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/autofix_pull_request_skipped.rb b/lib/volcano/generated/lib/volcano-generated/models/autofix_pull_request_skipped.rb new file mode 100644 index 00000000..f933d27f --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/autofix_pull_request_skipped.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 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 AutofixPullRequestSkipped + AutofixPullRequestSkippedSourceUnavailable = "source_unavailable".freeze + AutofixPullRequestSkippedPullRequestOpen = "pull_request_open".freeze + AutofixPullRequestSkippedNotFixable = "not_fixable".freeze + AutofixPullRequestSkippedLowConfidence = "low_confidence".freeze + AutofixPullRequestSkippedNoPatch = "no_patch".freeze + AutofixPullRequestSkippedPermissionMissing = "permission_missing".freeze + AutofixPullRequestSkippedRepositoryChanged = "repository_changed".freeze + AutofixPullRequestSkippedPublishFailed = "publish_failed".freeze + + def self.all_vars + @all_vars ||= [AutofixPullRequestSkippedSourceUnavailable, AutofixPullRequestSkippedPullRequestOpen, AutofixPullRequestSkippedNotFixable, AutofixPullRequestSkippedLowConfidence, AutofixPullRequestSkippedNoPatch, AutofixPullRequestSkippedPermissionMissing, AutofixPullRequestSkippedRepositoryChanged, AutofixPullRequestSkippedPublishFailed].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 AutofixPullRequestSkipped.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #AutofixPullRequestSkipped" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/autofix_pull_request_state.rb b/lib/volcano/generated/lib/volcano-generated/models/autofix_pull_request_state.rb new file mode 100644 index 00000000..7aa34b70 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/autofix_pull_request_state.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 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 AutofixPullRequestState + AutofixPullRequestStateOpen = "open".freeze + AutofixPullRequestStateMerged = "merged".freeze + AutofixPullRequestStateClosed = "closed".freeze + + def self.all_vars + @all_vars ||= [AutofixPullRequestStateOpen, AutofixPullRequestStateMerged, AutofixPullRequestStateClosed].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 AutofixPullRequestState.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #AutofixPullRequestState" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/autofix_run.rb b/lib/volcano/generated/lib/volcano-generated/models/autofix_run.rb new file mode 100644 index 00000000..750085c6 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/autofix_run.rb @@ -0,0 +1,512 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and 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 AutofixRun < ApiModelBase + attr_accessor :id + + attr_accessor :project_id + + attr_accessor :issue_id + + attr_accessor :trigger + + attr_accessor :status + + attr_accessor :max_stage + + attr_accessor :stage_reached + + attr_accessor :provider + + attr_accessor :model + + attr_accessor :diagnosis + + attr_accessor :patch + + attr_accessor :pull_request + + attr_accessor :pull_request_skipped + + # The commit the diagnosis read, when a push to the connected repository deployed the resource. Absent when the run read logs only. + attr_accessor :commit_sha + + # Why the run failed or was canceled, or why its last attempt will be retried. One of `api_key_rejected`, `model_request_rejected`, `model_unavailable`, `model_refused`, `no_diagnosis`, `budget_exhausted`, `timed_out`, `attempts_exhausted`, `autofix_disabled`, `plan_required`, `managed_models_unavailable`, `settings_changed`, `issue_not_found`, or `internal_error`. + attr_accessor :failure_code + + attr_accessor :failure_message + + attr_accessor :usage + + attr_accessor :created_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', + :'issue_id' => :'issue_id', + :'trigger' => :'trigger', + :'status' => :'status', + :'max_stage' => :'max_stage', + :'stage_reached' => :'stage_reached', + :'provider' => :'provider', + :'model' => :'model', + :'diagnosis' => :'diagnosis', + :'patch' => :'patch', + :'pull_request' => :'pull_request', + :'pull_request_skipped' => :'pull_request_skipped', + :'commit_sha' => :'commit_sha', + :'failure_code' => :'failure_code', + :'failure_message' => :'failure_message', + :'usage' => :'usage', + :'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', + :'project_id' => :'String', + :'issue_id' => :'String', + :'trigger' => :'AutofixRunTrigger', + :'status' => :'AutofixRunStatus', + :'max_stage' => :'AutofixStage', + :'stage_reached' => :'AutofixStage', + :'provider' => :'AutofixProvider', + :'model' => :'AutofixModel', + :'diagnosis' => :'AutofixDiagnosis', + :'patch' => :'AutofixPatch', + :'pull_request' => :'AutofixPullRequest', + :'pull_request_skipped' => :'AutofixPullRequestSkipped', + :'commit_sha' => :'String', + :'failure_code' => :'String', + :'failure_message' => :'String', + :'usage' => :'AutofixRunUsage', + :'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::AutofixRun` 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::AutofixRun`. 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?(:'issue_id') + self.issue_id = attributes[:'issue_id'] + else + self.issue_id = nil + end + + if attributes.key?(:'trigger') + self.trigger = attributes[:'trigger'] + else + self.trigger = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'max_stage') + self.max_stage = attributes[:'max_stage'] + else + self.max_stage = nil + end + + if attributes.key?(:'stage_reached') + self.stage_reached = attributes[:'stage_reached'] + 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?(:'diagnosis') + self.diagnosis = attributes[:'diagnosis'] + end + + if attributes.key?(:'patch') + self.patch = attributes[:'patch'] + end + + if attributes.key?(:'pull_request') + self.pull_request = attributes[:'pull_request'] + end + + if attributes.key?(:'pull_request_skipped') + self.pull_request_skipped = attributes[:'pull_request_skipped'] + end + + if attributes.key?(:'commit_sha') + self.commit_sha = attributes[:'commit_sha'] + end + + if attributes.key?(:'failure_code') + self.failure_code = attributes[:'failure_code'] + end + + if attributes.key?(:'failure_message') + self.failure_message = attributes[:'failure_message'] + end + + if attributes.key?(:'usage') + self.usage = attributes[:'usage'] + else + self.usage = nil + 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 @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 + + if @trigger.nil? + invalid_properties.push('invalid value for "trigger", trigger cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @max_stage.nil? + invalid_properties.push('invalid value for "max_stage", max_stage 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 @usage.nil? + invalid_properties.push('invalid value for "usage", usage 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 @issue_id.nil? + return false if @trigger.nil? + return false if @status.nil? + return false if @max_stage.nil? + return false if @provider.nil? + return false if @model.nil? + return false if @usage.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] 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] trigger Value to be assigned + def trigger=(trigger) + if trigger.nil? + fail ArgumentError, 'trigger cannot be nil' + end + + @trigger = trigger + 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] 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] 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] usage Value to be assigned + def usage=(usage) + if usage.nil? + fail ArgumentError, 'usage cannot be nil' + end + + @usage = usage + 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 && + issue_id == o.issue_id && + trigger == o.trigger && + status == o.status && + max_stage == o.max_stage && + stage_reached == o.stage_reached && + provider == o.provider && + model == o.model && + diagnosis == o.diagnosis && + patch == o.patch && + pull_request == o.pull_request && + pull_request_skipped == o.pull_request_skipped && + commit_sha == o.commit_sha && + failure_code == o.failure_code && + failure_message == o.failure_message && + usage == o.usage && + 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, project_id, issue_id, trigger, status, max_stage, stage_reached, provider, model, diagnosis, patch, pull_request, pull_request_skipped, commit_sha, failure_code, failure_message, usage, 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/autofix_run_status.rb b/lib/volcano/generated/lib/volcano-generated/models/autofix_run_status.rb new file mode 100644 index 00000000..f8a85d27 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/autofix_run_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 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 AutofixRunStatus + AutofixRunStatusQueued = "queued".freeze + AutofixRunStatusRunning = "running".freeze + AutofixRunStatusSucceeded = "succeeded".freeze + AutofixRunStatusFailed = "failed".freeze + AutofixRunStatusCanceled = "canceled".freeze + + def self.all_vars + @all_vars ||= [AutofixRunStatusQueued, AutofixRunStatusRunning, AutofixRunStatusSucceeded, AutofixRunStatusFailed, AutofixRunStatusCanceled].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 AutofixRunStatus.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #AutofixRunStatus" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/autofix_run_trigger.rb b/lib/volcano/generated/lib/volcano-generated/models/autofix_run_trigger.rb new file mode 100644 index 00000000..cebf040a --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/autofix_run_trigger.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 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 AutofixRunTrigger + AutofixRunTriggerManual = "manual".freeze + AutofixRunTriggerNewIssue = "new_issue".freeze + AutofixRunTriggerRegression = "regression".freeze + + def self.all_vars + @all_vars ||= [AutofixRunTriggerManual, AutofixRunTriggerNewIssue, AutofixRunTriggerRegression].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 AutofixRunTrigger.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #AutofixRunTrigger" + end + end +end diff --git a/lib/volcano/generated/lib/volcano-generated/models/autofix_run_usage.rb b/lib/volcano/generated/lib/volcano-generated/models/autofix_run_usage.rb new file mode 100644 index 00000000..c0bff127 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/autofix_run_usage.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 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 + # Model tokens the run used across every attempt. + class AutofixRunUsage < ApiModelBase + attr_accessor :input_tokens + + attr_accessor :output_tokens + + attr_accessor :cache_read_input_tokens + + attr_accessor :cache_creation_input_tokens + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'input_tokens' => :'input_tokens', + :'output_tokens' => :'output_tokens', + :'cache_read_input_tokens' => :'cache_read_input_tokens', + :'cache_creation_input_tokens' => :'cache_creation_input_tokens' + } + 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 + { + :'input_tokens' => :'Integer', + :'output_tokens' => :'Integer', + :'cache_read_input_tokens' => :'Integer', + :'cache_creation_input_tokens' => :'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::AutofixRunUsage` 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::AutofixRunUsage`. 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?(:'input_tokens') + self.input_tokens = attributes[:'input_tokens'] + else + self.input_tokens = nil + end + + if attributes.key?(:'output_tokens') + self.output_tokens = attributes[:'output_tokens'] + else + self.output_tokens = nil + end + + if attributes.key?(:'cache_read_input_tokens') + self.cache_read_input_tokens = attributes[:'cache_read_input_tokens'] + else + self.cache_read_input_tokens = nil + end + + if attributes.key?(:'cache_creation_input_tokens') + self.cache_creation_input_tokens = attributes[:'cache_creation_input_tokens'] + else + self.cache_creation_input_tokens = 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 @input_tokens.nil? + invalid_properties.push('invalid value for "input_tokens", input_tokens cannot be nil.') + end + + if @output_tokens.nil? + invalid_properties.push('invalid value for "output_tokens", output_tokens cannot be nil.') + end + + if @cache_read_input_tokens.nil? + invalid_properties.push('invalid value for "cache_read_input_tokens", cache_read_input_tokens cannot be nil.') + end + + if @cache_creation_input_tokens.nil? + invalid_properties.push('invalid value for "cache_creation_input_tokens", cache_creation_input_tokens 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 @input_tokens.nil? + return false if @output_tokens.nil? + return false if @cache_read_input_tokens.nil? + return false if @cache_creation_input_tokens.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] input_tokens Value to be assigned + def input_tokens=(input_tokens) + if input_tokens.nil? + fail ArgumentError, 'input_tokens cannot be nil' + end + + @input_tokens = input_tokens + end + + # Custom attribute writer method with validation + # @param [Object] output_tokens Value to be assigned + def output_tokens=(output_tokens) + if output_tokens.nil? + fail ArgumentError, 'output_tokens cannot be nil' + end + + @output_tokens = output_tokens + end + + # Custom attribute writer method with validation + # @param [Object] cache_read_input_tokens Value to be assigned + def cache_read_input_tokens=(cache_read_input_tokens) + if cache_read_input_tokens.nil? + fail ArgumentError, 'cache_read_input_tokens cannot be nil' + end + + @cache_read_input_tokens = cache_read_input_tokens + end + + # Custom attribute writer method with validation + # @param [Object] cache_creation_input_tokens Value to be assigned + def cache_creation_input_tokens=(cache_creation_input_tokens) + if cache_creation_input_tokens.nil? + fail ArgumentError, 'cache_creation_input_tokens cannot be nil' + end + + @cache_creation_input_tokens = cache_creation_input_tokens + 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 && + input_tokens == o.input_tokens && + output_tokens == o.output_tokens && + cache_read_input_tokens == o.cache_read_input_tokens && + cache_creation_input_tokens == o.cache_creation_input_tokens + 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 + [input_tokens, output_tokens, cache_read_input_tokens, cache_creation_input_tokens].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_service_key_request.rb b/lib/volcano/generated/lib/volcano-generated/models/create_service_key_request.rb index 5d832d62..f2db4782 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 @@ -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, and server-side auth proxy metadata (auth.signin, auth.signup, auth.refresh, auth.logout, auth.password_reset). attr_accessor :permissions # Attribute mapping from ruby-style variable name to JSON key. 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 bc76c597..0efa48dc 100644 --- a/lib/volcano/generated/lib/volcano-generated/models/durable_execution.rb +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_execution.rb @@ -40,6 +40,9 @@ class DurableExecution < ApiModelBase # Present once the execution has reached a terminal status. attr_accessor :completed_at + # Lets a browser read and send the execution's messages. 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 attr_reader :datatype attr_reader :allowable_values @@ -74,7 +77,8 @@ def self.attribute_map :'result_expired' => :'result_expired', :'error' => :'error', :'created_at' => :'created_at', - :'completed_at' => :'completed_at' + :'completed_at' => :'completed_at', + :'client_token' => :'client_token' } end @@ -100,7 +104,8 @@ def self.openapi_types :'result_expired' => :'Boolean', :'error' => :'DurableExecutionError', :'created_at' => :'Time', - :'completed_at' => :'Time' + :'completed_at' => :'Time', + :'client_token' => :'String' } end @@ -178,6 +183,10 @@ def initialize(attributes = {}) if attributes.key?(:'completed_at') self.completed_at = attributes[:'completed_at'] end + + if attributes.key?(:'client_token') + self.client_token = attributes[:'client_token'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -299,7 +308,8 @@ def ==(o) result_expired == o.result_expired && error == o.error && created_at == o.created_at && - completed_at == o.completed_at + completed_at == o.completed_at && + client_token == o.client_token end # @see the `==` method @@ -311,7 +321,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, function_id, name, status, region, result, result_expired, error, created_at, completed_at].hash + [id, function_id, name, status, region, result, result_expired, error, created_at, completed_at, client_token].hash end # Builds the object from hash diff --git a/lib/volcano/generated/lib/volcano-generated/models/durable_message.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message.rb new file mode 100644 index 00000000..032dc9a6 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message.rb @@ -0,0 +1,396 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and 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 + # A message sent to, or published by, a durable execution. + class DurableMessage < ApiModelBase + attr_accessor :id + + attr_accessor :execution_id + + attr_accessor :direction + + # 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. + attr_accessor :seq + + attr_accessor :name + + # The JSON value sent or published, or null. + attr_accessor :data + + attr_accessor :sender + + attr_accessor :status + + # When the execution received the message. Null until then, and for `out` messages. + attr_accessor :delivered_at + + attr_accessor :sent_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', + :'execution_id' => :'execution_id', + :'direction' => :'direction', + :'seq' => :'seq', + :'name' => :'name', + :'data' => :'data', + :'sender' => :'sender', + :'status' => :'status', + :'delivered_at' => :'delivered_at', + :'sent_at' => :'sent_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', + :'execution_id' => :'String', + :'direction' => :'DurableMessageDirection', + :'seq' => :'Integer', + :'name' => :'String', + :'data' => :'Object', + :'sender' => :'DurableMessageSender', + :'status' => :'DurableMessageStatus', + :'delivered_at' => :'Time', + :'sent_at' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'data', + :'delivered_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::DurableMessage` 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::DurableMessage`. 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?(:'execution_id') + self.execution_id = attributes[:'execution_id'] + else + self.execution_id = nil + end + + if attributes.key?(:'direction') + self.direction = attributes[:'direction'] + else + self.direction = nil + end + + if attributes.key?(:'seq') + self.seq = attributes[:'seq'] + else + self.seq = nil + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + else + self.name = nil + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + else + self.data = nil + end + + if attributes.key?(:'sender') + self.sender = attributes[:'sender'] + else + self.sender = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'delivered_at') + self.delivered_at = attributes[:'delivered_at'] + else + self.delivered_at = nil + end + + if attributes.key?(:'sent_at') + self.sent_at = attributes[:'sent_at'] + else + self.sent_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 @execution_id.nil? + invalid_properties.push('invalid value for "execution_id", execution_id cannot be nil.') + end + + if @direction.nil? + invalid_properties.push('invalid value for "direction", direction cannot be nil.') + end + + if @seq.nil? + invalid_properties.push('invalid value for "seq", seq cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @sender.nil? + invalid_properties.push('invalid value for "sender", sender cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @sent_at.nil? + invalid_properties.push('invalid value for "sent_at", sent_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 @execution_id.nil? + return false if @direction.nil? + return false if @seq.nil? + return false if @name.nil? + return false if @sender.nil? + return false if @status.nil? + return false if @sent_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] execution_id Value to be assigned + def execution_id=(execution_id) + if execution_id.nil? + fail ArgumentError, 'execution_id cannot be nil' + end + + @execution_id = execution_id + end + + # Custom attribute writer method with validation + # @param [Object] direction Value to be assigned + def direction=(direction) + if direction.nil? + fail ArgumentError, 'direction cannot be nil' + end + + @direction = direction + end + + # Custom attribute writer method with validation + # @param [Object] seq Value to be assigned + def seq=(seq) + if seq.nil? + fail ArgumentError, 'seq cannot be nil' + end + + @seq = seq + 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] sender Value to be assigned + def sender=(sender) + if sender.nil? + fail ArgumentError, 'sender cannot be nil' + end + + @sender = sender + 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] sent_at Value to be assigned + def sent_at=(sent_at) + if sent_at.nil? + fail ArgumentError, 'sent_at cannot be nil' + end + + @sent_at = sent_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 && + execution_id == o.execution_id && + direction == o.direction && + seq == o.seq && + name == o.name && + data == o.data && + sender == o.sender && + status == o.status && + delivered_at == o.delivered_at && + sent_at == o.sent_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, execution_id, direction, seq, name, data, sender, status, delivered_at, sent_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_message_direction.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_direction.rb new file mode 100644 index 00000000..659d10eb --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_direction.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 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 DurableMessageDirection + DurableMessageDirectionIn = "in".freeze + DurableMessageDirectionOut = "out".freeze + + def self.all_vars + @all_vars ||= [DurableMessageDirectionIn, DurableMessageDirectionOut].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 DurableMessageDirection.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #DurableMessageDirection" + end + end +end 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 new file mode 100644 index 00000000..27772279 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_list.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 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 DurableMessageList < ApiModelBase + # Messages after `after`, oldest first. + attr_accessor :data + + # Whether more messages follow. Read them with `after` set to the last message's `seq`. + attr_accessor :has_more + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data', + :'has_more' => :'has_more' + } + 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', + :'has_more' => :'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::DurableMessageList` 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::DurableMessageList`. 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?(:'has_more') + self.has_more = attributes[:'has_more'] + else + self.has_more = 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 + + 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 @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] 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 && + has_more == o.has_more + 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, has_more].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_message_sender.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_sender.rb new file mode 100644 index 00000000..4b0eef54 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_sender.rb @@ -0,0 +1,203 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and 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 + # Who sent the message. + class DurableMessageSender < ApiModelBase + # 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. + attr_accessor :type + + # The auth user who sent it. Null unless `type` is `user`. + attr_accessor :user_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 + { + :'type' => :'type', + :'user_id' => :'user_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 + { + :'type' => :'String', + :'user_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'user_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::DurableMessageSender` 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::DurableMessageSender`. 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?(:'user_id') + self.user_id = attributes[:'user_id'] + else + self.user_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 @type.nil? + invalid_properties.push('invalid value for "type", type 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', ["service_key", "user", "anon", "project", "execution"]) + return false unless type_validator.valid?(@type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["service_key", "user", "anon", "project", "execution"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + 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 && + user_id == o.user_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 + [type, user_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/durable_message_session_registration.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_session_registration.rb new file mode 100644 index 00000000..0781b4c8 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_session_registration.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 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 + # The registered session. Its token reaches the workflow through the workflow itself, never in this response. + class DurableMessageSessionRegistration < ApiModelBase + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'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 + { + :'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::DurableMessageSessionRegistration` 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::DurableMessageSessionRegistration`. 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 + 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 + 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].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_message_status.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_status.rb new file mode 100644 index 00000000..d8471cae --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_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 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 DurableMessageStatus + QUEUED = "queued".freeze + DELIVERING = "delivering".freeze + DELIVERED = "delivered".freeze + DROPPED = "dropped".freeze + PUBLISHED = "published".freeze + + def self.all_vars + @all_vars ||= [QUEUED, DELIVERING, DELIVERED, DROPPED, PUBLISHED].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 DurableMessageStatus.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #DurableMessageStatus" + end + end +end 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 new file mode 100644 index 00000000..3cee4183 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait.rb @@ -0,0 +1,278 @@ +=begin +#Volcano API + +#Public API for Volcano clients, SDKs, and 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 + # A wait an execution has open for a message. + class DurableMessageWait < ApiModelBase + attr_accessor :id + + attr_accessor :name + + attr_accessor :status + + # When the wait times out. Null when the workflow set no timeout. + attr_accessor :expires_at + + 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', + :'name' => :'name', + :'status' => :'status', + :'expires_at' => :'expires_at', + :'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', + :'name' => :'String', + :'status' => :'DurableMessageWaitStatus', + :'expires_at' => :'Time', + :'created_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::DurableMessageWait` 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::DurableMessageWait`. 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?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'expires_at') + self.expires_at = attributes[:'expires_at'] + else + self.expires_at = 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 @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + 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 + + 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 @status.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] 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] 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] 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 && + name == o.name && + status == o.status && + expires_at == o.expires_at && + 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, name, status, expires_at, 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/durable_message_wait_list.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_list.rb new file mode 100644 index 00000000..a76a4178 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_list.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 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 DurableMessageWaitList < ApiModelBase + # Open waits, oldest first. + 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::DurableMessageWaitList` 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::DurableMessageWaitList`. 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/durable_message_wait_registration.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_registration.rb new file mode 100644 index 00000000..2230d369 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_registration.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 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 + # The registered wait, as the waiting workflow sees it. + class DurableMessageWaitRegistration < ApiModelBase + attr_accessor :id + + attr_accessor :status + + attr_accessor :expires_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', + :'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 + { + :'id' => :'String', + :'status' => :'DurableMessageWaitStatus', + :'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::DurableMessageWaitRegistration` 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::DurableMessageWaitRegistration`. 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?(:'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 @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 + + 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? + 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 + + # 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 && + 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 + [id, status, 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_message_wait_status.rb b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_status.rb new file mode 100644 index 00000000..b80f2547 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_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 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 DurableMessageWaitStatus + WAITING = "waiting".freeze + MATCHED = "matched".freeze + DELIVERED = "delivered".freeze + EXPIRED = "expired".freeze + CANCELLED = "cancelled".freeze + + def self.all_vars + @all_vars ||= [WAITING, MATCHED, DELIVERED, EXPIRED, 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 DurableMessageWaitStatus.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #DurableMessageWaitStatus" + end + end +end 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..80d9bd46 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 @@ -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` and `__volcano_http` keys are reserved; Volcano removes caller-supplied values for both. attr_accessor :payload # Attribute mapping from ruby-style variable name to JSON key. 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 new file mode 100644 index 00000000..f7f5eb83 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/open_durable_message_session_request.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 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 OpenDurableMessageSessionRequest < ApiModelBase + # Opaque reference to the running execution, supplied by the SDK. + attr_accessor :execution_ref + + # Opaque session reference, supplied by the SDK. + attr_accessor :callback_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'execution_ref' => :'execution_ref', + :'callback_id' => :'callback_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' + } + 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::OpenDurableMessageSessionRequest` 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::OpenDurableMessageSessionRequest`. 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 + 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 + + 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 + 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 + + # 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 + 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].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_autofix_runs.rb b/lib/volcano/generated/lib/volcano-generated/models/paginated_autofix_runs.rb new file mode 100644 index 00000000..45a6ebd9 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/paginated_autofix_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 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 PaginatedAutofixRuns < 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::PaginatedAutofixRuns` 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::PaginatedAutofixRuns`. 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/project_health_resource.rb b/lib/volcano/generated/lib/volcano-generated/models/project_health_resource.rb index 82099652..96379268 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 @@ -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_status.rb b/lib/volcano/generated/lib/volcano-generated/models/project_health_status.rb index 4d7dbddf..64863694 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 @@ -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/publish_durable_message_request.rb b/lib/volcano/generated/lib/volcano-generated/models/publish_durable_message_request.rb new file mode 100644 index 00000000..4d0da9e2 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/publish_durable_message_request.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 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 PublishDurableMessageRequest < ApiModelBase + # The name a workflow waits on or publishes under: up to 237 printable ASCII characters. + attr_accessor :name + + # Any JSON value, up to 64 KiB. Omitted means null. + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'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 + { + :'name' => :'String', + :'data' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'data' + ]) + 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::PublishDurableMessageRequest` 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::PublishDurableMessageRequest`. 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?(:'data') + self.data = attributes[:'data'] + 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 > 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 + + 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 > 237 + return false if @name.to_s.length < 1 + return false if @name !~ Regexp.new(/^[ -~]+$/) + 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 > 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 + + # 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 && + 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 + [name, 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/register_durable_message_wait_request.rb b/lib/volcano/generated/lib/volcano-generated/models/register_durable_message_wait_request.rb new file mode 100644 index 00000000..b3e16773 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/register_durable_message_wait_request.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 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 RegisterDurableMessageWaitRequest < ApiModelBase + # Opaque reference to the running execution, supplied by the SDK. + attr_accessor :execution_ref + + # Opaque wait reference, supplied by the SDK. + attr_accessor :callback_id + + # The name a workflow waits on or publishes under: up to 237 printable ASCII characters. + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'execution_ref' => :'execution_ref', + :'callback_id' => :'callback_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 + { + :'execution_ref' => :'String', + :'callback_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::RegisterDurableMessageWaitRequest` 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::RegisterDurableMessageWaitRequest`. 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 + 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 + + 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(/^[ -~]+$/) + 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 + + # 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 + 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].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/send_durable_message_request.rb b/lib/volcano/generated/lib/volcano-generated/models/send_durable_message_request.rb new file mode 100644 index 00000000..93602cf1 --- /dev/null +++ b/lib/volcano/generated/lib/volcano-generated/models/send_durable_message_request.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 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 SendDurableMessageRequest < ApiModelBase + # The name a workflow waits on or publishes under: up to 237 printable ASCII characters. + attr_accessor :name + + # Any JSON value, up to 64 KiB. Omitted means null. + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'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 + { + :'name' => :'String', + :'data' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'data' + ]) + 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::SendDurableMessageRequest` 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::SendDurableMessageRequest`. 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?(:'data') + self.data = attributes[:'data'] + 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 > 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 + + 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 > 237 + return false if @name.to_s.length < 1 + return false if @name !~ Regexp.new(/^[ -~]+$/) + 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 > 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 + + # 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 && + 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 + [name, 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/openapi/openapi.yaml b/openapi/openapi.yaml index 31feffa2..85c5c25f 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -2252,7 +2252,8 @@ paths: 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. + `degraded` or `critical`; transport and authorization failures use HTTP + errors. operationId: getProjectHealth security: - UserToken: [] @@ -4188,6 +4189,12 @@ paths: - Function must have `visibility: public` - Function receives payload only (no `__volcano_auth`) + **Reserved payload keys:** the top-level `__volcano_auth` and + `__volcano_http` keys are reserved. Volcano removes caller-supplied + values for both before the function runs; only an auth user token adds + a server-built `__volcano_auth`, and only HTTP-mode ingress sets + `__volcano_http: true`. + **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 @@ -4462,7 +4469,9 @@ paths: 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. + 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: @@ -4496,6 +4505,205 @@ paths: 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 + 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. + + 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: + - AnonKey: [] + - ServiceRoleKey: [] + - AuthUserAccessToken: [] + parameters: + - $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/SendDurableMessageRequest' + 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. + 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' + '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. A `private` function answers every credential + but a service key this way. + 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. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '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, 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' + '503': + description: The plan terms for the request could not be read. Retry with backoff. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + get: + tags: + - Durable Functions + summary: List a durable execution's messages from an application + 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 + security: + - AnonKey: [] + - ServiceRoleKey: [] + - AuthUserAccessToken: [] + 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' + 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' + '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: @@ -5827,202 +6035,597 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /durable-approvals: + /projects/{id}/durable-functions/{functionId}/executions/{executionId}/messages: post: tags: - Durable Functions - summary: Request an approval from inside a workflow + summary: Send a message to a durable execution description: | - Registers an approval request for a running durable execution. The - Volcano SDK calls this from `ctx.waitForApproval`; 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 approval belongs to - the project that owns the execution, and expires when the workflow's - own approval timeout does. + 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. - Retrying is safe: a request for an approval that is already registered - returns it with `200`. - operationId: requestDurableApproval - security: [] + 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/DurableFunctionId' + - $ref: '#/components/parameters/DurableExecutionId' + - $ref: '#/components/parameters/DurableMessageIdempotencyKey' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/RequestDurableApprovalRequest' + $ref: '#/components/schemas/SendDurableMessageRequest' responses: '200': - description: The approval was already registered + description: A message with this `Idempotency-Key` was already sent; it is returned content: application/json: schema: - $ref: '#/components/schemas/DurableApprovalRegistration' + $ref: '#/components/schemas/DurableMessage' '201': - description: Approval registered + description: | + Message sent. `status` is `delivered`, `delivering`, or `queued`, + as on the application route. content: application/json: schema: - $ref: '#/components/schemas/DurableApprovalRegistration' + $ref: '#/components/schemas/DurableMessage' '400': - description: The request body is invalid + description: The name, data or idempotency key is invalid + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: The request used a `read_only` project access token content: application/json: schema: $ref: '#/components/schemas/Error' '404': - description: No running durable execution matches `execution_ref` + description: Durable function or execution not found 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. - - `execution_ended`: the execution has finished. - - `too_many_pending_approvals`: the execution already has the - maximum number of pending approvals. + The message cannot be sent. `code` is `execution_not_running` or + `too_many_queued_messages`. content: application/json: schema: $ref: '#/components/schemas/Error' '413': - description: The request body is larger than 64 KiB + description: The request body is larger than 72 KiB content: application/json: schema: $ref: '#/components/schemas/Error' '429': - description: Too many approval requests from this execution or address + description: Too many messages sent to this execution 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}/issues: get: tags: - - Issues - summary: List issues + - Durable Functions + summary: List a durable execution's messages 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. + 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 issues, including read-only ones. - operationId: listIssues + Project access tokens can list messages, including read-only ones. + operationId: listDurableMessages security: - 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 + - $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/PaginatedIssues' + $ref: '#/components/schemas/DurableMessageList' '400': - description: A filter or the cursor is invalid + description: A filter 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. + description: Durable function or execution not found content: application/json: schema: $ref: '#/components/schemas/Error' - /projects/{id}/issues/{issueId}: + /projects/{id}/durable-functions/{functionId}/executions/{executionId}/message-waits: get: tags: - - Issues - summary: Get an issue + - Durable Functions + summary: List a durable execution's open message waits description: | - Returns one issue: the resource that raised it, how often and when it - was seen, and its status. + 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 read issues, including read-only ones. - operationId: getIssue + Project access tokens can list waits, including read-only ones. + operationId: listDurableMessageWaits security: - UserToken: [] - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/IssueId' + - $ref: '#/components/parameters/DurableFunctionId' + - $ref: '#/components/parameters/DurableExecutionId' responses: '200': description: Successful response content: application/json: schema: - $ref: '#/components/schemas/Issue' + $ref: '#/components/schemas/DurableMessageWaitList' '404': - description: Issue not found. Code `feature_unavailable` means issues are not available in this environment. + description: Durable function or execution not found content: application/json: schema: $ref: '#/components/schemas/Error' - patch: + /durable-messages/waits: + post: tags: - - Issues - summary: Update an issue + - Durable Functions + summary: Wait for a message from inside a workflow 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. + Registers a wait for a named message. The Volcano SDK calls this from + `ctx.waitForMessage`; applications do not call it directly. - Setting the status an issue already has is safe to repeat. - operationId: updateIssue - security: - - UserToken: [] - - ProjectAccessToken: [] - parameters: - - $ref: '#/components/parameters/ProjectId' - - $ref: '#/components/parameters/IssueId' + `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/UpdateIssueRequest' + $ref: '#/components/schemas/RegisterDurableMessageWaitRequest' responses: '200': - description: Updated + description: The wait was already registered content: application/json: schema: - $ref: '#/components/schemas/Issue' + $ref: '#/components/schemas/DurableMessageWaitRegistration' + '201': + description: Wait registered + content: + application/json: + schema: + $ref: '#/components/schemas/DurableMessageWaitRegistration' + '400': + description: The request body is invalid + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: No running durable execution matches `execution_ref` + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + 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: + - Durable Functions + summary: Open a messages session from inside a workflow + 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. + + 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. + + 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/OpenDurableMessageSessionRequest' + responses: + '200': + description: The session was already registered + content: + application/json: + schema: + $ref: '#/components/schemas/DurableMessageSessionRegistration' + '201': + description: Session opened + content: + application/json: + schema: + $ref: '#/components/schemas/DurableMessageSessionRegistration' + '400': + description: The request body is invalid + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: No running durable execution matches `execution_ref` + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + 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`. + 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: | + The session could not be confirmed with the workflow right now. + Retry with backoff. + 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 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: + - 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: + schema: + $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' + '401': + description: The session token is not valid + content: + application/json: + 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: + schema: + $ref: '#/components/schemas/Error' + '413': + description: The request body is larger than 72 KiB + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /durable-approvals: + post: + tags: + - 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. + + `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. + + 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/RequestDurableApprovalRequest' + responses: + '200': + description: The approval was already registered + content: + application/json: + schema: + $ref: '#/components/schemas/DurableApprovalRegistration' + '201': + description: Approval registered + content: + application/json: + schema: + $ref: '#/components/schemas/DurableApprovalRegistration' + '400': + description: The request body is invalid + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: No running durable execution matches `execution_ref` + 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. + 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' + '429': + 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}/issues: + get: + tags: + - Issues + summary: List issues + 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. + + Project access tokens can list issues, including read-only ones. + operationId: listIssues + security: + - 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 + responses: + '200': + description: Successful response + content: + application/json: + schema: + $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: + - 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 + content: + application/json: + schema: + $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' + patch: + tags: + - Issues + summary: Update an issue + 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. + + Setting the status an issue already has is safe to repeat. + operationId: updateIssue + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/IssueId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateIssueRequest' + responses: + '200': + description: Updated + content: + application/json: + schema: + $ref: '#/components/schemas/Issue' '400': description: The request body is invalid content: @@ -6154,47 +6757,214 @@ paths: 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. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /projects/{id}/autofix/api-key: - delete: + '503': + description: Turning autofix on needs the owner's plan, which could not be resolved. Nothing was saved. Retry later. + 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. + + Project access tokens are refused. + operationId: deleteAutofixAPIKey + security: + - UserToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + responses: + '200': + description: Deleted + content: + application/json: + schema: + $ref: '#/components/schemas/AutofixSettings' + '403': + description: The request used a project access token. Only a person deletes the key. + 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. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '501': + description: Autofix is not available in local mode. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/issues/{issueId}/autofix-runs: + post: + tags: + - Autofix + summary: Diagnose an issue + description: | + Queues a run that diagnoses the issue with AI. The run reads the + issue's runtime logs and, when a push to the project's connected + repository built the deployment that was live when the issue was + last seen, its source at that commit. Poll the run until its status is + `succeeded`, `failed`, or `canceled`. + + Autofix must be on for the project. An issue has at most one queued or + running run, a project runs one at a time, and a project starts at most + 25 runs, manual and automatic, in any 24 hours. + + Project access tokens are refused. A run spends model tokens on the + project's provider, so a person starts it with a platform token or in + the dashboard. + operationId: startAutofixRun + security: + - UserToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/IssueId' + responses: + '202': + description: Queued + content: + application/json: + schema: + $ref: '#/components/schemas/AutofixRun' + '400': + description: Code `feature_unavailable` means the project's provider is `volcano` and Volcano-managed models are not available in this environment. + 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. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project or issue not found. Code `feature_unavailable` means autofix is not available in this environment. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '409': + description: Autofix is off for the project, or the issue already has a queued or running run. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '429': + description: The project started its limit of runs in the last 24 hours. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '501': + description: Autofix is not available in local mode. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: The owner's plan could not be resolved. Retry later. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/autofix-runs: + get: + tags: + - Autofix + summary: List autofix runs + description: | + Lists the project's autofix runs, newest first. Runs stay readable after + autofix is turned off, and where autofix is not available. + + Project access tokens can list runs, including read-only ones. + operationId: listAutofixRuns + security: + - UserToken: [] + - ProjectAccessToken: [] + parameters: + - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/IssueCursor' + - name: issue_id + in: query + required: false + description: Return only runs for this issue. + schema: + type: string + format: uuid + - name: status + in: query + required: false + description: Return only runs in this status. + schema: + $ref: '#/components/schemas/AutofixRunStatus' + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAutofixRuns' + '400': + description: A filter or the cursor is invalid + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Project not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '501': + description: Autofix is not available in local mode. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /projects/{id}/autofix-runs/{runId}: + get: tags: - Autofix - summary: Delete the API key + summary: Get an autofix run 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. + Returns one run: its status, the diagnosis once it succeeds, why it + failed or was canceled, and the model tokens it used. Runs stay readable + where autofix is not available. - Project access tokens are refused. - operationId: deleteAutofixAPIKey + Project access tokens can read runs, including read-only ones. + operationId: getAutofixRun security: - UserToken: [] + - ProjectAccessToken: [] parameters: - $ref: '#/components/parameters/ProjectId' + - $ref: '#/components/parameters/AutofixRunId' responses: '200': - description: Deleted - content: - application/json: - schema: - $ref: '#/components/schemas/AutofixSettings' - '403': - description: The request used a project access token. Only a person deletes the key. + description: Successful response content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/AutofixRun' '404': - description: Project not found. Code `feature_unavailable` means autofix is not available in this environment and the project never saved settings. + description: Project or run not found. content: application/json: schema: @@ -6560,7 +7330,7 @@ paths: 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`). + `engines.node` constraint. Volcano tests Next 15.5.28 (`^18.18.0 || ^19.8.0 || >=20.0.0`) and Next 16.4.2 (`>=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. @@ -9814,6 +10584,9 @@ paths: operationId: authGetPasswordPolicy security: - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' responses: '200': description: Effective password policy @@ -9822,7 +10595,7 @@ paths: schema: $ref: '#/components/schemas/AuthPasswordPolicy' '401': - description: Invalid, missing, or revoked anon key + description: Invalid, missing, or revoked anon key; or invalid auth proxy metadata content: application/json: schema: @@ -9854,6 +10627,9 @@ paths: operationId: authSignup security: - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' requestBody: required: true content: @@ -9888,7 +10664,9 @@ paths: description: Invalid input (bad email/password format) '401': description: | - Unauthorized - Invalid, tampered, revoked, or wrong-project anon key + 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 @@ -9920,6 +10698,9 @@ paths: operationId: authSignin security: - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' requestBody: required: true content: @@ -9950,7 +10731,7 @@ paths: '401': description: | Unauthorized - Invalid credentials, invalid/tampered/revoked anon key, - or account banned/deleted + or account banned/deleted; or invalid auth proxy metadata '403': description: | Forbidden - Anon key lacks signin permission, or the email domain is @@ -9976,6 +10757,9 @@ paths: operationId: authRefresh security: - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' requestBody: required: false content: @@ -9997,7 +10781,7 @@ paths: schema: $ref: '#/components/schemas/AuthTokenResponse' '401': - description: Invalid or expired refresh token + description: Invalid or expired refresh token; or invalid auth proxy metadata content: application/json: schema: @@ -10031,6 +10815,9 @@ paths: operationId: authLogout security: - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' requestBody: required: false content: @@ -10047,6 +10834,12 @@ paths: 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: @@ -10059,6 +10852,9 @@ paths: operationId: authForgotPassword security: - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' requestBody: required: true content: @@ -10082,6 +10878,12 @@ paths: 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 is disabled for this project content: @@ -10105,6 +10907,9 @@ paths: operationId: authResetPassword security: - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' requestBody: required: true content: @@ -10136,7 +10941,7 @@ paths: '400': description: Password doesn't meet requirements '401': - description: Invalid or expired token + description: Invalid or expired token; or invalid auth proxy metadata '503': description: Compromised-password screening is temporarily unavailable content: @@ -10247,6 +11052,9 @@ paths: operationId: authSignupAnonymous security: - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' requestBody: description: Optional user metadata content: @@ -10268,6 +11076,12 @@ paths: 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: @@ -12702,6 +13516,9 @@ paths: operationId: authOAuthExchange security: - AnonKey: [] + parameters: + - $ref: '#/components/parameters/AuthProxyAuthorization' + - $ref: '#/components/parameters/AuthProxyClientIP' requestBody: required: true content: @@ -12727,7 +13544,7 @@ paths: '400': description: Invalid, expired, consumed, or redirect-mismatched code '401': - description: Missing or invalid project anon key + description: Missing or invalid project anon key; or invalid auth proxy metadata '403': description: | Email confirmation is now required, or the account's email domain is not @@ -13982,7 +14799,9 @@ paths: 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. + storage object operations, project locks, and server-side auth proxy + metadata (auth.signin, auth.signup, auth.refresh, auth.logout, + auth.password_reset). example: - functions.invoke - locks.manage @@ -14256,6 +15075,12 @@ paths: 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: @@ -15577,6 +16402,32 @@ components: 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 @@ -15723,6 +16574,14 @@ components: description: | Opaque cursor from a previous response's `next_cursor`. Pages forward; keep the same filters while paging. + AutofixRunId: + name: runId + in: path + required: true + schema: + type: string + format: uuid + description: Autofix run ID DurableApprovalFunctionFilter: name: function in: query @@ -15735,6 +16594,64 @@ components: 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, + 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 @@ -20382,6 +21299,12 @@ components: type: string format: date-time description: Present once the execution has reached a terminal status. + client_token: + type: string + description: | + Lets a browser read and send the execution's messages. 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: - id - function_id @@ -20742,6 +21665,9 @@ components: } } ``` + + The top-level `__volcano_auth` and `__volcano_http` keys are reserved; + Volcano removes caller-supplied values for both. FunctionInvocationResponse: type: object description: Raw function response body returned by the invoked function. @@ -21659,7 +22585,203 @@ components: maxLength: 2000 description: A note for the workflow and the approval's history. additionalProperties: false - RequestDurableApprovalRequest: + RequestDurableApprovalRequest: + type: object + 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: + 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: + - execution_ref + - callback_id + - name + - title + additionalProperties: false + PaginatedDurableApprovals: + type: object + properties: + 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: + - 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 + x-enum-varnames: + - DurableMessageDirectionIn + - DurableMessageDirectionOut + description: | + `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 + execution_id: + type: string + format: uuid + 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 + 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 + 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 + 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 + 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: @@ -21671,58 +22793,72 @@ components: type: string minLength: 1 maxLength: 1024 - description: Opaque approval reference, supplied by the SDK. + 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 - minLength: 1 - maxLength: 255 - title: + format: uuid + status: + $ref: '#/components/schemas/DurableMessageWaitStatus' + expires_at: + type: string + format: date-time + nullable: true + required: + - id + - status + - expires_at + OpenDurableMessageSessionRequest: + type: object + properties: + execution_ref: type: string minLength: 1 - maxLength: 200 - description: + maxLength: 2048 + description: Opaque reference to the running execution, supplied by the SDK. + callback_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. + minLength: 1 + maxLength: 1024 + description: Opaque session reference, supplied by the SDK. required: - execution_ref - callback_id - - name - - title additionalProperties: false - PaginatedDurableApprovals: + DurableMessageSessionRegistration: + type: object + description: | + The registered session. Its token reaches the workflow through the + workflow itself, never in this response. + properties: + id: + type: string + format: uuid + required: + - id + PublishDurableMessageRequest: type: object properties: + name: + $ref: '#/components/schemas/DurableMessageName' 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 + 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: - - data - - page - - limit - - total - - has_more + - name + additionalProperties: false Issue: type: object description: Runtime errors from one function or frontend, grouped by error type and stack. @@ -21936,6 +23072,289 @@ components: 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. required: - enabled + AutofixRunStatus: + type: string + enum: + - queued + - running + - succeeded + - failed + - canceled + x-enum-varnames: + - AutofixRunStatusQueued + - AutofixRunStatusRunning + - AutofixRunStatusSucceeded + - AutofixRunStatusFailed + - AutofixRunStatusCanceled + description: Where a run is. `canceled` means the project's settings or plan stopped allowing the run before it finished; `failure_code` says which. + AutofixRunTrigger: + type: string + enum: + - manual + - new_issue + - regression + x-enum-varnames: + - AutofixRunTriggerManual + - AutofixRunTriggerNewIssue + - AutofixRunTriggerRegression + description: What started the run. `manual` is a request; `new_issue` and `regression` are automatic runs for an issue that appeared or reopened. + AutofixEvidence: + type: object + additionalProperties: false + properties: + kind: + type: string + enum: + - log + - code + - other + x-enum-varnames: + - AutofixEvidenceKindLog + - AutofixEvidenceKindCode + - AutofixEvidenceKindOther + detail: + type: string + location: + type: string + description: A file and line, or a log timestamp. Absent when the evidence has none. + required: + - kind + - detail + AutofixDiagnosis: + type: object + additionalProperties: false + properties: + summary: + type: string + description: One or two sentences on what goes wrong. + root_cause: + type: string + evidence: + type: array + items: + $ref: '#/components/schemas/AutofixEvidence' + suggested_fix: + type: string + confidence: + type: string + enum: + - low + - medium + - high + x-enum-varnames: + - AutofixConfidenceLow + - AutofixConfidenceMedium + - AutofixConfidenceHigh + fixable: + type: boolean + description: Whether a change to the project's code would fix the issue. + files: + type: array + description: Repository paths a fix would change. + items: + type: string + required: + - summary + - root_cause + - evidence + - suggested_fix + - confidence + - fixable + - files + AutofixRunUsage: + type: object + additionalProperties: false + description: Model tokens the run used across every attempt. + properties: + input_tokens: + type: integer + format: int64 + output_tokens: + type: integer + format: int64 + cache_read_input_tokens: + type: integer + format: int64 + cache_creation_input_tokens: + type: integer + format: int64 + required: + - input_tokens + - output_tokens + - cache_read_input_tokens + - cache_creation_input_tokens + AutofixEdit: + type: object + additionalProperties: false + description: One exact text replacement. An empty `old_text` creates the file. + properties: + path: + type: string + old_text: + type: string + new_text: + type: string + required: + - path + - old_text + - new_text + AutofixPatch: + type: object + additionalProperties: false + description: The fix the model proposed, applied to the deployed commit. Present whenever the run opened a pull request, and when a valid fix could not be published. + properties: + title: + type: string + edits: + type: array + items: + $ref: '#/components/schemas/AutofixEdit' + required: + - title + - edits + AutofixPullRequestState: + type: string + enum: + - open + - merged + - closed + x-enum-varnames: + - AutofixPullRequestStateOpen + - AutofixPullRequestStateMerged + - AutofixPullRequestStateClosed + AutofixPullRequest: + type: object + additionalProperties: false + description: The draft pull request the run opened on the connected repository. + properties: + number: + type: integer + format: int64 + url: + type: string + format: uri + branch: + type: string + description: The branch the fix is on, `volcano/autofix/`. + state: + $ref: '#/components/schemas/AutofixPullRequestState' + closed_at: + type: string + format: date-time + description: When the pull request was merged or closed. + deployed_at: + type: string + format: date-time + description: When a deployment that includes the merged fix went live. The issue resolves then, unless it occurred again since. When more than 20 deployments went live after the merge before Volcano checked, it is the merge time instead. + required: + - number + - url + - branch + - state + AutofixPullRequestSkipped: + type: string + enum: + - source_unavailable + - pull_request_open + - not_fixable + - low_confidence + - no_patch + - permission_missing + - repository_changed + - publish_failed + x-enum-varnames: + - AutofixPullRequestSkippedSourceUnavailable + - AutofixPullRequestSkippedPullRequestOpen + - AutofixPullRequestSkippedNotFixable + - AutofixPullRequestSkippedLowConfidence + - AutofixPullRequestSkippedNoPatch + - AutofixPullRequestSkippedPermissionMissing + - AutofixPullRequestSkippedRepositoryChanged + - AutofixPullRequestSkippedPublishFailed + description: Why a run whose `max_stage` is `pull_request` opened no pull request. The diagnosis stands either way. + AutofixRun: + type: object + additionalProperties: false + properties: + id: + type: string + format: uuid + project_id: + type: string + format: uuid + issue_id: + type: string + format: uuid + trigger: + $ref: '#/components/schemas/AutofixRunTrigger' + status: + $ref: '#/components/schemas/AutofixRunStatus' + max_stage: + $ref: '#/components/schemas/AutofixStage' + stage_reached: + $ref: '#/components/schemas/AutofixStage' + provider: + $ref: '#/components/schemas/AutofixProvider' + model: + $ref: '#/components/schemas/AutofixModel' + diagnosis: + $ref: '#/components/schemas/AutofixDiagnosis' + patch: + $ref: '#/components/schemas/AutofixPatch' + pull_request: + $ref: '#/components/schemas/AutofixPullRequest' + pull_request_skipped: + $ref: '#/components/schemas/AutofixPullRequestSkipped' + commit_sha: + type: string + description: The commit the diagnosis read, when a push to the connected repository deployed the resource. Absent when the run read logs only. + failure_code: + type: string + description: Why the run failed or was canceled, or why its last attempt will be retried. One of `api_key_rejected`, `model_request_rejected`, `model_unavailable`, `model_refused`, `no_diagnosis`, `budget_exhausted`, `timed_out`, `attempts_exhausted`, `autofix_disabled`, `plan_required`, `managed_models_unavailable`, `settings_changed`, `issue_not_found`, or `internal_error`. + failure_message: + type: string + usage: + $ref: '#/components/schemas/AutofixRunUsage' + created_at: + type: string + format: date-time + started_at: + type: string + format: date-time + completed_at: + type: string + format: date-time + required: + - id + - project_id + - issue_id + - trigger + - status + - max_stage + - provider + - model + - usage + - created_at + PaginatedAutofixRuns: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/AutofixRun' + 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 PaginatedProjectCustomDomains: type: object properties: @@ -23118,6 +24537,7 @@ components: - function - frontend - database + - database_branch id: type: string format: uuid @@ -23206,8 +24626,11 @@ components: - 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 @@ -24885,6 +26308,42 @@ components: - 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`. + 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. @@ -25015,6 +26474,19 @@ components: description: Deployment stage that produced the log event, when available. 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. DurableApprovalFunction: type: object description: |