volcano-sdk 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +203 -0
- data/README.md +758 -0
- data/lib/volcano/auth.rb +113 -0
- data/lib/volcano/auth_anonymous.rb +51 -0
- data/lib/volcano/auth_confirm_email.rb +19 -0
- data/lib/volcano/auth_email_change.rb +75 -0
- data/lib/volcano/auth_get_user.rb +110 -0
- data/lib/volcano/auth_hosted.rb +43 -0
- data/lib/volcano/auth_oauth.rb +102 -0
- data/lib/volcano/auth_oauth_api.rb +51 -0
- data/lib/volcano/auth_oauth_sign_in.rb +61 -0
- data/lib/volcano/auth_oauth_token.rb +51 -0
- data/lib/volcano/auth_refresh.rb +117 -0
- data/lib/volcano/auth_resend_confirmation.rb +19 -0
- data/lib/volcano/auth_reset_password.rb +23 -0
- data/lib/volcano/auth_reset_password_for_email.rb +19 -0
- data/lib/volcano/auth_sessions.rb +139 -0
- data/lib/volcano/auth_sign_up.rb +40 -0
- data/lib/volcano/auth_state.rb +148 -0
- data/lib/volcano/auth_update_user.rb +32 -0
- data/lib/volcano/client.rb +121 -0
- data/lib/volcano/connection_string.rb +85 -0
- data/lib/volcano/database.rb +243 -0
- data/lib/volcano/errors.rb +38 -0
- data/lib/volcano/function_resolution.rb +120 -0
- data/lib/volcano/function_response.rb +26 -0
- data/lib/volcano/functions.rb +136 -0
- data/lib/volcano/generated/lib/volcano-generated/api/anon_keys_api.rb +471 -0
- data/lib/volcano/generated/lib/volcano-generated/api/auth_admin_api.rb +739 -0
- data/lib/volcano/generated/lib/volcano-generated/api/auth_configuration_api.rb +1798 -0
- data/lib/volcano/generated/lib/volcano-generated/api/authentication_api.rb +1523 -0
- data/lib/volcano/generated/lib/volcano-generated/api/database_backups_api.rb +791 -0
- data/lib/volcano/generated/lib/volcano-generated/api/database_branches_api.rb +665 -0
- data/lib/volcano/generated/lib/volcano-generated/api/database_queries_api.rb +905 -0
- data/lib/volcano/generated/lib/volcano-generated/api/databases_api.rb +819 -0
- data/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb +913 -0
- data/lib/volcano/generated/lib/volcano-generated/api/functions_api.rb +1355 -0
- data/lib/volcano/generated/lib/volcano-generated/api/git_connections_api.rb +1012 -0
- data/lib/volcano/generated/lib/volcano-generated/api/locks_api.rb +480 -0
- data/lib/volcano/generated/lib/volcano-generated/api/logs_api.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/api/o_auth_authentication_api.rb +962 -0
- data/lib/volcano/generated/lib/volcano-generated/api/o_auth_configuration_api.rb +452 -0
- data/lib/volcano/generated/lib/volcano-generated/api/project_imports_api.rb +599 -0
- data/lib/volcano/generated/lib/volcano-generated/api/projects_api.rb +1862 -0
- data/lib/volcano/generated/lib/volcano-generated/api/realtime_api.rb +222 -0
- data/lib/volcano/generated/lib/volcano-generated/api/service_keys_api.rb +402 -0
- data/lib/volcano/generated/lib/volcano-generated/api/storage_admin_api.rb +189 -0
- data/lib/volcano/generated/lib/volcano-generated/api/storage_buckets_api.rb +437 -0
- data/lib/volcano/generated/lib/volcano-generated/api/storage_objects_api.rb +857 -0
- data/lib/volcano/generated/lib/volcano-generated/api/storage_policies_api.rb +277 -0
- data/lib/volcano/generated/lib/volcano-generated/api/system_api.rb +79 -0
- data/lib/volcano/generated/lib/volcano-generated/api/variables_api.rb +454 -0
- data/lib/volcano/generated/lib/volcano-generated/api_client.rb +393 -0
- data/lib/volcano/generated/lib/volcano-generated/api_error.rb +58 -0
- data/lib/volcano/generated/lib/volcano-generated/api_model_base.rb +88 -0
- data/lib/volcano/generated/lib/volcano-generated/configuration.rb +337 -0
- data/lib/volcano/generated/lib/volcano-generated/models/anon_key.rb +257 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_config.rb +728 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email200_response.rb +181 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_change200_response.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_change_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_request.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_convert_anonymous200_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_device_authorize_request.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_device_token_request.rb +240 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_device_verify200_response.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_device_verify_request.rb +209 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_forgot_password200_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_forgot_password_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_get_my_sessions200_response.rb +231 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page.rb +225 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_defaults.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_response.rb +203 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_runtime.rb +220 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_identities_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_identity.rb +273 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_interval.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_response.rb +270 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_series_point.rb +263 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_summary.rb +210 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_window.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_link_o_auth_provider200_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_list_o_auth_providers200_response.rb +149 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_list_o_auth_providers200_response_providers_inner.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_method_summary.rb +370 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_methods_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_o_auth_exchange_request.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_defaults.rb +212 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_options.rb +306 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_response.rb +299 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_density.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_font.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_layout.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_radius.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_scale.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_theme.rb +318 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_theme_colors.rb +323 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_password_policy.rb +409 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_platform_exchange_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_refresh_request.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_request_email_change200_response.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_request_email_change_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_reset_password200_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_reset_password_request.rb +192 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_session.rb +393 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_signin_request.rb +233 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_signup_anonymous_request.rb +150 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_signup_request.rb +202 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_signup_response.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_token_response.rb +254 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_update_user_request.rb +160 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_user.rb +330 -0
- data/lib/volcano/generated/lib/volcano-generated/models/ban_auth_user_request.rb +148 -0
- data/lib/volcano/generated/lib/volcano-generated/models/ban_user_response.rb +278 -0
- data/lib/volcano/generated/lib/volcano-generated/models/batch_function_deploy_failure.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/batch_function_deploy_response.rb +205 -0
- data/lib/volcano/generated/lib/volcano-generated/models/call_o_auth_provider_api200_response.rb +272 -0
- data/lib/volcano/generated/lib/volcano-generated/models/call_o_auth_provider_api_request.rb +223 -0
- data/lib/volcano/generated/lib/volcano-generated/models/complete_upload_session_response.rb +148 -0
- data/lib/volcano/generated/lib/volcano-generated/models/configure_auth_methods_request.rb +167 -0
- data/lib/volcano/generated/lib/volcano-generated/models/configure_auth_methods_request_oauth_providers_inner.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/connect_project_git_request.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_anon_key_request.rb +228 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_database_backup_request.rb +185 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_database_branch_request.rb +223 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_database_request.rb +290 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_database_restore_request.rb +187 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_email_template_request.rb +270 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_frontend_custom_domain_request.rb +191 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_function_scheduler_request.rb +252 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_o_auth_config_request.rb +230 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_project_request.rb +219 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_service_key_request.rb +206 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_storage_bucket_request.rb +216 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_storage_policy_request.rb +243 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_upload_session_request.rb +276 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_upload_session_response.rb +179 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_variable_request.rb +219 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database.rb +442 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_backup.rb +283 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_backup_list.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_backup_schedule.rb +167 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_backup_schedule_entry.rb +301 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_branch.rb +480 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_branch_list.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_branch_storage.rb +228 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_delete_request.rb +203 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_insert_request.rb +194 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_filter.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_filter_value.rb +106 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_filter_value_one_of_inner.rb +105 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_order.rb +187 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_database.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_item.rb +411 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_result.rb +161 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_restore.rb +388 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_restore_list.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_restore_window.rb +159 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_select_request.rb +268 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_stats.rb +447 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_update_request.rb +232 -0
- data/lib/volcano/generated/lib/volcano-generated/models/delete_database202_response.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/delete_database_backup200_response.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/delete_database_branch202_response.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/deployment_phase.rb +263 -0
- data/lib/volcano/generated/lib/volcano-generated/models/deployment_progress.rb +324 -0
- data/lib/volcano/generated/lib/volcano-generated/models/deployment_reference.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/device_authorization_response.rb +296 -0
- data/lib/volcano/generated/lib/volcano-generated/models/email_template.rb +305 -0
- data/lib/volcano/generated/lib/volcano-generated/models/error.rb +174 -0
- data/lib/volcano/generated/lib/volcano-generated/models/export_project_source_request.rb +174 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend.rb +504 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_response.rb +370 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config.rb +253 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_deployment.rb +487 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_domain_routing_record.rb +240 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_domain_verification_record.rb +216 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_daily_entry.rb +247 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_data.rb +204 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_history_response.rb +298 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function.rb +565 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_deployment.rb +477 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_http_auth_mode.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_invocation_mode.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_invocation_request.rb +150 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_region.rb +219 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_runtime_deployment.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_runtime_option.rb +245 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_runtimes_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_scheduler.rb +330 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_scheduler_list_response.rb +290 -0
- data/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response.rb +178 -0
- data/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response_email_password.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response_oauth_providers_inner.rb +194 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_connect_start_response.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_connection.rb +346 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_connections_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_installation.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_installations_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_repositories_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_repository.rb +270 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_auth_page_type.rb +44 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_login_email_check_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_login_email_check_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_login_options_response.rb +185 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_renderable_page_type.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_connect_start_response.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_connection.rb +432 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_connections_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_provider.rb +39 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_source.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_sources_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_anon_keys200_response.rb +189 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_available_o_auth_providers200_response.rb +149 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_available_o_auth_providers200_response_providers_inner.rb +167 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_database_regions200_response_inner.rb +158 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_email_templates200_response.rb +149 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_o_auth_configs200_response.rb +149 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_postgres_versions200_response_inner.rb +178 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_storage_buckets200_response.rb +104 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_storage_objects_admin200_response.rb +205 -0
- data/lib/volcano/generated/lib/volcano-generated/models/live_log_level.rb +44 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_activity_bucket.rb +246 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_activity_bucket_counts.rb +226 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_activity_request.rb +252 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_activity_response.rb +194 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_database_request_resource.rb +221 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_deployment.rb +210 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_deployment_request_selector.rb +170 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_event.rb +257 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_event_body.rb +108 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_frontend_request_resource.rb +230 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_function_request_resource.rb +230 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_request_resource.rb +58 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_resource.rb +227 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_search_event.rb +297 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_search_request.rb +264 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_search_response.rb +232 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_stream_request.rb +244 -0
- data/lib/volcano/generated/lib/volcano-generated/models/metric_usage_data.rb +278 -0
- data/lib/volcano/generated/lib/volcano-generated/models/o_auth_config.rb +256 -0
- data/lib/volcano/generated/lib/volcano-generated/models/o_auth_error_response.rb +173 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_auth_users.rb +284 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_databases.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_frontend_deployments.rb +284 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_frontends.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_function_deployments.rb +284 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_functions.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_project_custom_domains.rb +284 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_project_deployments.rb +306 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_projects.rb +368 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_service_keys.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_storage_buckets.rb +251 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_variables.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/platform_exchange_response.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/preview_auth_page_request.rb +221 -0
- data/lib/volcano/generated/lib/volcano-generated/models/preview_auth_page_response.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project.rb +419 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config.rb +273 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_result.rb +261 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_result_entry.rb +245 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_summary.rb +320 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_cors.rb +176 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_from.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_password_provider.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_smtp.rb +184 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_verification.rb +158 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_managed_pages.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_page_appearance.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_page_layouts.rb +214 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_password.rb +211 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_password_reset.rb +167 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_providers.rb +159 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_rate_limits.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_redirects.rb +180 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_sessions.rb +158 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_signup.rb +232 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_tokens.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_bucket.rb +226 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_bucket_policy.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_database.rb +274 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_email_template.rb +205 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_email_templates.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend.rb +183 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_function.rb +248 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_page.rb +203 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_pages.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_missing_resource.rb +214 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_o_auth_provider.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_project.rb +209 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_realtime.rb +174 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_scheduler.rb +229 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_skipped_resource.rb +240 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_validation_error.rb +201 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_validation_error_response.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_variable.rb +199 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_deployment.rb +412 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_deployment_resource.rb +241 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_deployment_summary.rb +312 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain.rb +403 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain_all_of_frontend.rb +191 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_git_connection.rb +296 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_git_connection_summary.rb +294 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_git_deploy_settings.rb +239 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_category.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_check.rb +316 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_data_status.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_evidence.rb +251 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_resource.rb +240 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_response.rb +356 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_scope.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_status.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_summary.rb +186 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_action.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_action_code.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_destination.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_destination_mode.rb +39 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_disposition.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_finding.rb +327 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_impact.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_preflight_request.rb +305 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_readiness.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_report.rb +476 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_resource.rb +270 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_resource_kind.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_run.rb +412 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_run_status.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_start_request.rb +365 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_summary.rb +348 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_target.rb +39 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_lock_lease.rb +192 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_lock_lease_request.rb +183 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_lock_state.rb +185 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_data_status.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_dimensions.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_group_by.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_metric.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_request.rb +210 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_response.rb +227 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_time_range.rb +188 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_result.rb +292 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_unit.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_value.rb +199 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_window.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_source_export.rb +302 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_source_export_omission.rb +218 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_source_export_skip.rb +217 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_source_export_state.rb +228 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_usage_response.rb +234 -0
- data/lib/volcano/generated/lib/volcano-generated/models/realtime_config.rb +217 -0
- data/lib/volcano/generated/lib/volcano-generated/models/realtime_plan_limits.rb +189 -0
- data/lib/volcano/generated/lib/volcano-generated/models/realtime_stats.rb +178 -0
- data/lib/volcano/generated/lib/volcano-generated/models/refresh_o_auth_provider_token200_response.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/reset_database_password200_response.rb +177 -0
- data/lib/volcano/generated/lib/volcano-generated/models/resolve_function_response.rb +248 -0
- data/lib/volcano/generated/lib/volcano-generated/models/resource_reference.rb +241 -0
- data/lib/volcano/generated/lib/volcano-generated/models/schedule_request.rb +210 -0
- data/lib/volcano/generated/lib/volcano-generated/models/service_key.rb +294 -0
- data/lib/volcano/generated/lib/volcano-generated/models/set_project_git_production_branch_request.rb +183 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_bucket.rb +282 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_copy_request.rb +192 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_list_response.rb +159 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_move_request.rb +192 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_object.rb +359 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_object_with_bucket.rb +383 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_policy.rb +313 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_stats.rb +220 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_visibility_request.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/test_email_request.rb +234 -0
- data/lib/volcano/generated/lib/volcano-generated/models/test_email_response.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/unban_user_response.rb +267 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_config_request.rb +626 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_hosted_page_request.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_page_layout_request.rb +186 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_page_theme_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_database_branch_request.rb +184 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_database_type_request.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_email_template_request.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_function_request.rb +201 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_function_scheduler_request.rb +225 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_o_auth_config_request.rb +187 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_project_git_deploy_settings_request.rb +211 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_project_request.rb +198 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_realtime_config_request.rb +179 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_storage_bucket_request.rb +158 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_variable_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/upload_session_part.rb +169 -0
- data/lib/volcano/generated/lib/volcano-generated/models/upload_session_status_response.rb +295 -0
- data/lib/volcano/generated/lib/volcano-generated/models/upload_storage_object201_response.rb +104 -0
- data/lib/volcano/generated/lib/volcano-generated/models/usage_data_point.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/variable.rb +389 -0
- data/lib/volcano/generated/lib/volcano-generated/version.rb +15 -0
- data/lib/volcano/generated/lib/volcano-generated.rb +405 -0
- data/lib/volcano/generated_transport.rb +131 -0
- data/lib/volcano/generated_transport_anonymous.rb +34 -0
- data/lib/volcano/generated_transport_auth.rb +108 -0
- data/lib/volcano/generated_transport_confirmation.rb +30 -0
- data/lib/volcano/generated_transport_database.rb +54 -0
- data/lib/volcano/generated_transport_email_change.rb +44 -0
- data/lib/volcano/generated_transport_functions.rb +108 -0
- data/lib/volcano/generated_transport_logs.rb +31 -0
- data/lib/volcano/generated_transport_oauth.rb +64 -0
- data/lib/volcano/generated_transport_sessions.rb +27 -0
- data/lib/volcano/generated_transport_storage.rb +86 -0
- data/lib/volcano/generated_transport_support.rb +221 -0
- data/lib/volcano/generated_transport_upload_session_api.rb +69 -0
- data/lib/volcano/generated_transport_upload_sessions.rb +67 -0
- data/lib/volcano/lock_auto_renewal.rb +51 -0
- data/lib/volcano/lock_guard.rb +135 -0
- data/lib/volcano/lock_lease_clock.rb +39 -0
- data/lib/volcano/lock_renewer.rb +73 -0
- data/lib/volcano/lock_session.rb +70 -0
- data/lib/volcano/locks.rb +109 -0
- data/lib/volcano/log_responses.rb +39 -0
- data/lib/volcano/logs.rb +82 -0
- data/lib/volcano/models.rb +115 -0
- data/lib/volcano/realtime/blocking_call.rb +32 -0
- data/lib/volcano/realtime/broadcast_delivery.rb +63 -0
- data/lib/volcano/realtime/channel_callbacks.rb +127 -0
- data/lib/volcano/realtime/channel_lifecycle.rb +133 -0
- data/lib/volcano/realtime/connection.rb +114 -0
- data/lib/volcano/realtime/connection_callbacks.rb +126 -0
- data/lib/volcano/realtime/lifecycle.rb +46 -0
- data/lib/volcano/realtime/postgres_batch.rb +89 -0
- data/lib/volcano/realtime/postgres_changes.rb +107 -0
- data/lib/volcano/realtime/postgres_database.rb +63 -0
- data/lib/volcano/realtime/postgres_delivery.rb +113 -0
- data/lib/volcano/realtime/postgres_expansion.rb +66 -0
- data/lib/volcano/realtime/presence.rb +122 -0
- data/lib/volcano/realtime/presence_state.rb +61 -0
- data/lib/volcano/realtime/protocol.rb +150 -0
- data/lib/volcano/realtime/protocol_dispatch.rb +114 -0
- data/lib/volcano/realtime/protocol_io.rb +96 -0
- data/lib/volcano/realtime/protocol_lifecycle.rb +122 -0
- data/lib/volcano/realtime/protocol_publication_dispatch.rb +121 -0
- data/lib/volcano/realtime/protocol_recovery.rb +117 -0
- data/lib/volcano/realtime/protocol_recovery_dispatch.rb +106 -0
- data/lib/volcano/realtime/protocol_recovery_position.rb +95 -0
- data/lib/volcano/realtime/reconnect.rb +88 -0
- data/lib/volcano/realtime.rb +260 -0
- data/lib/volcano/redaction.rb +60 -0
- data/lib/volcano/sign_up_result.rb +9 -0
- data/lib/volcano/storage.rb +120 -0
- data/lib/volcano/storage_models.rb +121 -0
- data/lib/volcano/storage_mutations.rb +81 -0
- data/lib/volcano/storage_public_url.rb +64 -0
- data/lib/volcano/storage_resumable_upload.rb +90 -0
- data/lib/volcano/storage_upload_sessions.rb +116 -0
- data/lib/volcano/transport.rb +60 -0
- data/lib/volcano/version.rb +5 -0
- data/lib/volcano.rb +58 -0
- metadata +580 -0
|
@@ -0,0 +1,1523 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Volcano Hosting API
|
|
3
|
+
|
|
4
|
+
#Public API for Volcano Hosting clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 3.0.0
|
|
7
|
+
Contact: support@volcano.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Volcano::Generated
|
|
16
|
+
class AuthenticationApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Cancel pending email change
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @return [AuthResetPassword200Response]
|
|
25
|
+
def auth_cancel_email_change(opts = {})
|
|
26
|
+
data, _status_code, _headers = auth_cancel_email_change_with_http_info(opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Cancel pending email change
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @return [Array<(AuthResetPassword200Response, Integer, Hash)>] AuthResetPassword200Response data, response status code and response headers
|
|
33
|
+
def auth_cancel_email_change_with_http_info(opts = {})
|
|
34
|
+
if @api_client.config.debugging
|
|
35
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_cancel_email_change ...'
|
|
36
|
+
end
|
|
37
|
+
# resource path
|
|
38
|
+
local_var_path = '/auth/user/cancel-email-change'
|
|
39
|
+
|
|
40
|
+
# query parameters
|
|
41
|
+
query_params = opts[:query_params] || {}
|
|
42
|
+
|
|
43
|
+
# header parameters
|
|
44
|
+
header_params = opts[:header_params] || {}
|
|
45
|
+
# HTTP header 'Accept' (if needed)
|
|
46
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
47
|
+
|
|
48
|
+
# form parameters
|
|
49
|
+
form_params = opts[:form_params] || {}
|
|
50
|
+
|
|
51
|
+
# http body (model)
|
|
52
|
+
post_body = opts[:debug_body]
|
|
53
|
+
|
|
54
|
+
# return_type
|
|
55
|
+
return_type = opts[:debug_return_type] || 'AuthResetPassword200Response'
|
|
56
|
+
|
|
57
|
+
# auth_names
|
|
58
|
+
auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken']
|
|
59
|
+
|
|
60
|
+
new_options = opts.merge(
|
|
61
|
+
:operation => :"AuthenticationApi.auth_cancel_email_change",
|
|
62
|
+
:header_params => header_params,
|
|
63
|
+
:query_params => query_params,
|
|
64
|
+
:form_params => form_params,
|
|
65
|
+
:body => post_body,
|
|
66
|
+
:auth_names => auth_names,
|
|
67
|
+
:return_type => return_type
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_cancel_email_change\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Confirm email address
|
|
78
|
+
# Confirm email address using token sent via email. Required if require_email_confirmation is enabled.
|
|
79
|
+
# @param auth_confirm_email_request [AuthConfirmEmailRequest]
|
|
80
|
+
# @param [Hash] opts the optional parameters
|
|
81
|
+
# @return [AuthConfirmEmail200Response]
|
|
82
|
+
def auth_confirm_email(auth_confirm_email_request, opts = {})
|
|
83
|
+
data, _status_code, _headers = auth_confirm_email_with_http_info(auth_confirm_email_request, opts)
|
|
84
|
+
data
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Confirm email address
|
|
88
|
+
# Confirm email address using token sent via email. Required if require_email_confirmation is enabled.
|
|
89
|
+
# @param auth_confirm_email_request [AuthConfirmEmailRequest]
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @return [Array<(AuthConfirmEmail200Response, Integer, Hash)>] AuthConfirmEmail200Response data, response status code and response headers
|
|
92
|
+
def auth_confirm_email_with_http_info(auth_confirm_email_request, opts = {})
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_confirm_email ...'
|
|
95
|
+
end
|
|
96
|
+
# verify the required parameter 'auth_confirm_email_request' is set
|
|
97
|
+
if @api_client.config.client_side_validation && auth_confirm_email_request.nil?
|
|
98
|
+
fail ArgumentError, "Missing the required parameter 'auth_confirm_email_request' when calling AuthenticationApi.auth_confirm_email"
|
|
99
|
+
end
|
|
100
|
+
# resource path
|
|
101
|
+
local_var_path = '/auth/confirm'
|
|
102
|
+
|
|
103
|
+
# query parameters
|
|
104
|
+
query_params = opts[:query_params] || {}
|
|
105
|
+
|
|
106
|
+
# header parameters
|
|
107
|
+
header_params = opts[:header_params] || {}
|
|
108
|
+
# HTTP header 'Accept' (if needed)
|
|
109
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
110
|
+
# HTTP header 'Content-Type'
|
|
111
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
112
|
+
if !content_type.nil?
|
|
113
|
+
header_params['Content-Type'] = content_type
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# form parameters
|
|
117
|
+
form_params = opts[:form_params] || {}
|
|
118
|
+
|
|
119
|
+
# http body (model)
|
|
120
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(auth_confirm_email_request)
|
|
121
|
+
|
|
122
|
+
# return_type
|
|
123
|
+
return_type = opts[:debug_return_type] || 'AuthConfirmEmail200Response'
|
|
124
|
+
|
|
125
|
+
# auth_names
|
|
126
|
+
auth_names = opts[:debug_auth_names] || ['AnonKey']
|
|
127
|
+
|
|
128
|
+
new_options = opts.merge(
|
|
129
|
+
:operation => :"AuthenticationApi.auth_confirm_email",
|
|
130
|
+
:header_params => header_params,
|
|
131
|
+
:query_params => query_params,
|
|
132
|
+
:form_params => form_params,
|
|
133
|
+
:body => post_body,
|
|
134
|
+
:auth_names => auth_names,
|
|
135
|
+
:return_type => return_type
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
139
|
+
if @api_client.config.debugging
|
|
140
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_confirm_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
141
|
+
end
|
|
142
|
+
return data, status_code, headers
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Confirm email change
|
|
146
|
+
# Confirm email change with token sent to new address
|
|
147
|
+
# @param auth_confirm_email_change_request [AuthConfirmEmailChangeRequest]
|
|
148
|
+
# @param [Hash] opts the optional parameters
|
|
149
|
+
# @return [AuthConfirmEmailChange200Response]
|
|
150
|
+
def auth_confirm_email_change(auth_confirm_email_change_request, opts = {})
|
|
151
|
+
data, _status_code, _headers = auth_confirm_email_change_with_http_info(auth_confirm_email_change_request, opts)
|
|
152
|
+
data
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Confirm email change
|
|
156
|
+
# Confirm email change with token sent to new address
|
|
157
|
+
# @param auth_confirm_email_change_request [AuthConfirmEmailChangeRequest]
|
|
158
|
+
# @param [Hash] opts the optional parameters
|
|
159
|
+
# @return [Array<(AuthConfirmEmailChange200Response, Integer, Hash)>] AuthConfirmEmailChange200Response data, response status code and response headers
|
|
160
|
+
def auth_confirm_email_change_with_http_info(auth_confirm_email_change_request, opts = {})
|
|
161
|
+
if @api_client.config.debugging
|
|
162
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_confirm_email_change ...'
|
|
163
|
+
end
|
|
164
|
+
# verify the required parameter 'auth_confirm_email_change_request' is set
|
|
165
|
+
if @api_client.config.client_side_validation && auth_confirm_email_change_request.nil?
|
|
166
|
+
fail ArgumentError, "Missing the required parameter 'auth_confirm_email_change_request' when calling AuthenticationApi.auth_confirm_email_change"
|
|
167
|
+
end
|
|
168
|
+
# resource path
|
|
169
|
+
local_var_path = '/auth/user/confirm-email-change'
|
|
170
|
+
|
|
171
|
+
# query parameters
|
|
172
|
+
query_params = opts[:query_params] || {}
|
|
173
|
+
|
|
174
|
+
# header parameters
|
|
175
|
+
header_params = opts[:header_params] || {}
|
|
176
|
+
# HTTP header 'Accept' (if needed)
|
|
177
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
178
|
+
# HTTP header 'Content-Type'
|
|
179
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
180
|
+
if !content_type.nil?
|
|
181
|
+
header_params['Content-Type'] = content_type
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# form parameters
|
|
185
|
+
form_params = opts[:form_params] || {}
|
|
186
|
+
|
|
187
|
+
# http body (model)
|
|
188
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(auth_confirm_email_change_request)
|
|
189
|
+
|
|
190
|
+
# return_type
|
|
191
|
+
return_type = opts[:debug_return_type] || 'AuthConfirmEmailChange200Response'
|
|
192
|
+
|
|
193
|
+
# auth_names
|
|
194
|
+
auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken']
|
|
195
|
+
|
|
196
|
+
new_options = opts.merge(
|
|
197
|
+
:operation => :"AuthenticationApi.auth_confirm_email_change",
|
|
198
|
+
:header_params => header_params,
|
|
199
|
+
:query_params => query_params,
|
|
200
|
+
:form_params => form_params,
|
|
201
|
+
:body => post_body,
|
|
202
|
+
:auth_names => auth_names,
|
|
203
|
+
:return_type => return_type
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
207
|
+
if @api_client.config.debugging
|
|
208
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_confirm_email_change\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
209
|
+
end
|
|
210
|
+
return data, status_code, headers
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Convert anonymous user to authenticated
|
|
214
|
+
# Add email and password to anonymous user. Requires auth user access token. If require_email_confirmation is enabled for the project, the converted user remains unconfirmed until /auth/confirm succeeds. When email sending is enabled, a confirmation email is sent during conversion.
|
|
215
|
+
# @param auth_signup_request [AuthSignupRequest]
|
|
216
|
+
# @param [Hash] opts the optional parameters
|
|
217
|
+
# @return [AuthConvertAnonymous200Response]
|
|
218
|
+
def auth_convert_anonymous(auth_signup_request, opts = {})
|
|
219
|
+
data, _status_code, _headers = auth_convert_anonymous_with_http_info(auth_signup_request, opts)
|
|
220
|
+
data
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Convert anonymous user to authenticated
|
|
224
|
+
# Add email and password to anonymous user. Requires auth user access token. If require_email_confirmation is enabled for the project, the converted user remains unconfirmed until /auth/confirm succeeds. When email sending is enabled, a confirmation email is sent during conversion.
|
|
225
|
+
# @param auth_signup_request [AuthSignupRequest]
|
|
226
|
+
# @param [Hash] opts the optional parameters
|
|
227
|
+
# @return [Array<(AuthConvertAnonymous200Response, Integer, Hash)>] AuthConvertAnonymous200Response data, response status code and response headers
|
|
228
|
+
def auth_convert_anonymous_with_http_info(auth_signup_request, opts = {})
|
|
229
|
+
if @api_client.config.debugging
|
|
230
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_convert_anonymous ...'
|
|
231
|
+
end
|
|
232
|
+
# verify the required parameter 'auth_signup_request' is set
|
|
233
|
+
if @api_client.config.client_side_validation && auth_signup_request.nil?
|
|
234
|
+
fail ArgumentError, "Missing the required parameter 'auth_signup_request' when calling AuthenticationApi.auth_convert_anonymous"
|
|
235
|
+
end
|
|
236
|
+
# resource path
|
|
237
|
+
local_var_path = '/auth/user/convert-anonymous'
|
|
238
|
+
|
|
239
|
+
# query parameters
|
|
240
|
+
query_params = opts[:query_params] || {}
|
|
241
|
+
|
|
242
|
+
# header parameters
|
|
243
|
+
header_params = opts[:header_params] || {}
|
|
244
|
+
# HTTP header 'Accept' (if needed)
|
|
245
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
246
|
+
# HTTP header 'Content-Type'
|
|
247
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
248
|
+
if !content_type.nil?
|
|
249
|
+
header_params['Content-Type'] = content_type
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# form parameters
|
|
253
|
+
form_params = opts[:form_params] || {}
|
|
254
|
+
|
|
255
|
+
# http body (model)
|
|
256
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(auth_signup_request)
|
|
257
|
+
|
|
258
|
+
# return_type
|
|
259
|
+
return_type = opts[:debug_return_type] || 'AuthConvertAnonymous200Response'
|
|
260
|
+
|
|
261
|
+
# auth_names
|
|
262
|
+
auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken']
|
|
263
|
+
|
|
264
|
+
new_options = opts.merge(
|
|
265
|
+
:operation => :"AuthenticationApi.auth_convert_anonymous",
|
|
266
|
+
:header_params => header_params,
|
|
267
|
+
:query_params => query_params,
|
|
268
|
+
:form_params => form_params,
|
|
269
|
+
:body => post_body,
|
|
270
|
+
:auth_names => auth_names,
|
|
271
|
+
:return_type => return_type
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
275
|
+
if @api_client.config.debugging
|
|
276
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_convert_anonymous\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
277
|
+
end
|
|
278
|
+
return data, status_code, headers
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Sign out from all other devices
|
|
282
|
+
# Deletes all sessions except the current one. Use this to log out from all other devices while keeping the current session active.
|
|
283
|
+
# @param [Hash] opts the optional parameters
|
|
284
|
+
# @return [nil]
|
|
285
|
+
def auth_delete_all_my_sessions(opts = {})
|
|
286
|
+
auth_delete_all_my_sessions_with_http_info(opts)
|
|
287
|
+
nil
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Sign out from all other devices
|
|
291
|
+
# Deletes all sessions except the current one. Use this to log out from all other devices while keeping the current session active.
|
|
292
|
+
# @param [Hash] opts the optional parameters
|
|
293
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
294
|
+
def auth_delete_all_my_sessions_with_http_info(opts = {})
|
|
295
|
+
if @api_client.config.debugging
|
|
296
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_delete_all_my_sessions ...'
|
|
297
|
+
end
|
|
298
|
+
# resource path
|
|
299
|
+
local_var_path = '/auth/user/sessions'
|
|
300
|
+
|
|
301
|
+
# query parameters
|
|
302
|
+
query_params = opts[:query_params] || {}
|
|
303
|
+
|
|
304
|
+
# header parameters
|
|
305
|
+
header_params = opts[:header_params] || {}
|
|
306
|
+
# HTTP header 'Accept' (if needed)
|
|
307
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
308
|
+
|
|
309
|
+
# form parameters
|
|
310
|
+
form_params = opts[:form_params] || {}
|
|
311
|
+
|
|
312
|
+
# http body (model)
|
|
313
|
+
post_body = opts[:debug_body]
|
|
314
|
+
|
|
315
|
+
# return_type
|
|
316
|
+
return_type = opts[:debug_return_type]
|
|
317
|
+
|
|
318
|
+
# auth_names
|
|
319
|
+
auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken']
|
|
320
|
+
|
|
321
|
+
new_options = opts.merge(
|
|
322
|
+
:operation => :"AuthenticationApi.auth_delete_all_my_sessions",
|
|
323
|
+
:header_params => header_params,
|
|
324
|
+
:query_params => query_params,
|
|
325
|
+
:form_params => form_params,
|
|
326
|
+
:body => post_body,
|
|
327
|
+
:auth_names => auth_names,
|
|
328
|
+
:return_type => return_type
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
332
|
+
if @api_client.config.debugging
|
|
333
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_delete_all_my_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
334
|
+
end
|
|
335
|
+
return data, status_code, headers
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
# Sign out from specific device
|
|
339
|
+
# Deletes a specific session, logging out that device. You can get session IDs from the list sessions endpoint.
|
|
340
|
+
# @param session_id [String] The session ID to delete
|
|
341
|
+
# @param [Hash] opts the optional parameters
|
|
342
|
+
# @return [nil]
|
|
343
|
+
def auth_delete_my_session(session_id, opts = {})
|
|
344
|
+
auth_delete_my_session_with_http_info(session_id, opts)
|
|
345
|
+
nil
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# Sign out from specific device
|
|
349
|
+
# Deletes a specific session, logging out that device. You can get session IDs from the list sessions endpoint.
|
|
350
|
+
# @param session_id [String] The session ID to delete
|
|
351
|
+
# @param [Hash] opts the optional parameters
|
|
352
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
353
|
+
def auth_delete_my_session_with_http_info(session_id, opts = {})
|
|
354
|
+
if @api_client.config.debugging
|
|
355
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_delete_my_session ...'
|
|
356
|
+
end
|
|
357
|
+
# verify the required parameter 'session_id' is set
|
|
358
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
359
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling AuthenticationApi.auth_delete_my_session"
|
|
360
|
+
end
|
|
361
|
+
# resource path
|
|
362
|
+
local_var_path = '/auth/user/sessions/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
363
|
+
|
|
364
|
+
# query parameters
|
|
365
|
+
query_params = opts[:query_params] || {}
|
|
366
|
+
|
|
367
|
+
# header parameters
|
|
368
|
+
header_params = opts[:header_params] || {}
|
|
369
|
+
# HTTP header 'Accept' (if needed)
|
|
370
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
371
|
+
|
|
372
|
+
# form parameters
|
|
373
|
+
form_params = opts[:form_params] || {}
|
|
374
|
+
|
|
375
|
+
# http body (model)
|
|
376
|
+
post_body = opts[:debug_body]
|
|
377
|
+
|
|
378
|
+
# return_type
|
|
379
|
+
return_type = opts[:debug_return_type]
|
|
380
|
+
|
|
381
|
+
# auth_names
|
|
382
|
+
auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken']
|
|
383
|
+
|
|
384
|
+
new_options = opts.merge(
|
|
385
|
+
:operation => :"AuthenticationApi.auth_delete_my_session",
|
|
386
|
+
:header_params => header_params,
|
|
387
|
+
:query_params => query_params,
|
|
388
|
+
:form_params => form_params,
|
|
389
|
+
:body => post_body,
|
|
390
|
+
:auth_names => auth_names,
|
|
391
|
+
:return_type => return_type
|
|
392
|
+
)
|
|
393
|
+
|
|
394
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
395
|
+
if @api_client.config.debugging
|
|
396
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_delete_my_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
397
|
+
end
|
|
398
|
+
return data, status_code, headers
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# Request password reset
|
|
402
|
+
# Generates recovery token and stores it (email sending pending). Returns generic message to prevent email enumeration. Project is identified via the anon key.
|
|
403
|
+
# @param auth_forgot_password_request [AuthForgotPasswordRequest]
|
|
404
|
+
# @param [Hash] opts the optional parameters
|
|
405
|
+
# @return [AuthForgotPassword200Response]
|
|
406
|
+
def auth_forgot_password(auth_forgot_password_request, opts = {})
|
|
407
|
+
data, _status_code, _headers = auth_forgot_password_with_http_info(auth_forgot_password_request, opts)
|
|
408
|
+
data
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# Request password reset
|
|
412
|
+
# Generates recovery token and stores it (email sending pending). Returns generic message to prevent email enumeration. Project is identified via the anon key.
|
|
413
|
+
# @param auth_forgot_password_request [AuthForgotPasswordRequest]
|
|
414
|
+
# @param [Hash] opts the optional parameters
|
|
415
|
+
# @return [Array<(AuthForgotPassword200Response, Integer, Hash)>] AuthForgotPassword200Response data, response status code and response headers
|
|
416
|
+
def auth_forgot_password_with_http_info(auth_forgot_password_request, opts = {})
|
|
417
|
+
if @api_client.config.debugging
|
|
418
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_forgot_password ...'
|
|
419
|
+
end
|
|
420
|
+
# verify the required parameter 'auth_forgot_password_request' is set
|
|
421
|
+
if @api_client.config.client_side_validation && auth_forgot_password_request.nil?
|
|
422
|
+
fail ArgumentError, "Missing the required parameter 'auth_forgot_password_request' when calling AuthenticationApi.auth_forgot_password"
|
|
423
|
+
end
|
|
424
|
+
# resource path
|
|
425
|
+
local_var_path = '/auth/forgot-password'
|
|
426
|
+
|
|
427
|
+
# query parameters
|
|
428
|
+
query_params = opts[:query_params] || {}
|
|
429
|
+
|
|
430
|
+
# header parameters
|
|
431
|
+
header_params = opts[:header_params] || {}
|
|
432
|
+
# HTTP header 'Accept' (if needed)
|
|
433
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
434
|
+
# HTTP header 'Content-Type'
|
|
435
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
436
|
+
if !content_type.nil?
|
|
437
|
+
header_params['Content-Type'] = content_type
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# form parameters
|
|
441
|
+
form_params = opts[:form_params] || {}
|
|
442
|
+
|
|
443
|
+
# http body (model)
|
|
444
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(auth_forgot_password_request)
|
|
445
|
+
|
|
446
|
+
# return_type
|
|
447
|
+
return_type = opts[:debug_return_type] || 'AuthForgotPassword200Response'
|
|
448
|
+
|
|
449
|
+
# auth_names
|
|
450
|
+
auth_names = opts[:debug_auth_names] || ['AnonKey']
|
|
451
|
+
|
|
452
|
+
new_options = opts.merge(
|
|
453
|
+
:operation => :"AuthenticationApi.auth_forgot_password",
|
|
454
|
+
:header_params => header_params,
|
|
455
|
+
:query_params => query_params,
|
|
456
|
+
:form_params => form_params,
|
|
457
|
+
:body => post_body,
|
|
458
|
+
:auth_names => auth_names,
|
|
459
|
+
:return_type => return_type
|
|
460
|
+
)
|
|
461
|
+
|
|
462
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
463
|
+
if @api_client.config.debugging
|
|
464
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_forgot_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
465
|
+
end
|
|
466
|
+
return data, status_code, headers
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
# Get current user's sessions
|
|
470
|
+
# Returns paginated sessions for the currently authenticated user. Each session includes device info, IP addresses, and activity timestamps. The current session is marked with `is_current: true`. **Ordering and pagination.** Without `sort`, results are ordered by most recent activity and paged with `page`/`limit`, returning the `sessions`/`total`/`page`/`limit`/`total_pages` body below. This is the legacy default and is preserved for existing clients. Send `sort=created_at` to opt into the standard list contract: results are ordered by session start (newest first) and may be paged either with `page`/`limit` or by cursor with `cursor`/`ending_before` plus a bounded `offset` past the cursor anchor. Cursor responses use the shared `data` envelope with `next_cursor`/`prev_cursor`. Unlike other list endpoints, sending `limit` without `page` does **not** select cursor mode here; `sort=created_at` is the only opt-in. Cursor pagination is rejected with 400 for the activity order, because `last_activity_at` changes whenever a session refreshes its token: a row that crosses the cursor anchor between two requests would be skipped and never shown. The `status=expired` filter is also offset-only because a session can expire above the cursor anchor during a walk. Sending that filter in cursor mode, `page` with `cursor` or `ending_before`, or both cursor directions returns 400.
|
|
471
|
+
# @param [Hash] opts the optional parameters
|
|
472
|
+
# @option opts [Integer] :page Page number (1-indexed) (default to 1)
|
|
473
|
+
# @option opts [Integer] :limit Number of sessions per page (max 100) (default to 20)
|
|
474
|
+
# @option opts [String] :sort Sort key. `last_activity` (default) orders by most recent activity and supports offset pagination only. `created_at` orders by session start and supports both offset and cursor pagination. (default to 'last_activity')
|
|
475
|
+
# @option opts [String] :status Filter by whether the session can still be refreshed. Omit for every stored session, including expired ones. `expired` is not supported with cursor pagination.
|
|
476
|
+
# @option opts [String] :cursor Opaque keyset cursor from a previous response's `next_cursor`. Requires `sort=created_at`; mutually exclusive with `page` and `ending_before`.
|
|
477
|
+
# @option opts [String] :ending_before Opaque keyset cursor from a previous response's `prev_cursor`, paging backward. Requires `sort=created_at`; mutually exclusive with `page` and `cursor`.
|
|
478
|
+
# @option opts [Integer] :offset Bounded number of rows to skip past the cursor anchor (the hybrid jump, maximum 100000). Ignored unless `cursor` or `ending_before` is supplied.
|
|
479
|
+
# @return [AuthGetMySessions200Response]
|
|
480
|
+
def auth_get_my_sessions(opts = {})
|
|
481
|
+
data, _status_code, _headers = auth_get_my_sessions_with_http_info(opts)
|
|
482
|
+
data
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
# Get current user's sessions
|
|
486
|
+
# Returns paginated sessions for the currently authenticated user. Each session includes device info, IP addresses, and activity timestamps. The current session is marked with `is_current: true`. **Ordering and pagination.** Without `sort`, results are ordered by most recent activity and paged with `page`/`limit`, returning the `sessions`/`total`/`page`/`limit`/`total_pages` body below. This is the legacy default and is preserved for existing clients. Send `sort=created_at` to opt into the standard list contract: results are ordered by session start (newest first) and may be paged either with `page`/`limit` or by cursor with `cursor`/`ending_before` plus a bounded `offset` past the cursor anchor. Cursor responses use the shared `data` envelope with `next_cursor`/`prev_cursor`. Unlike other list endpoints, sending `limit` without `page` does **not** select cursor mode here; `sort=created_at` is the only opt-in. Cursor pagination is rejected with 400 for the activity order, because `last_activity_at` changes whenever a session refreshes its token: a row that crosses the cursor anchor between two requests would be skipped and never shown. The `status=expired` filter is also offset-only because a session can expire above the cursor anchor during a walk. Sending that filter in cursor mode, `page` with `cursor` or `ending_before`, or both cursor directions returns 400.
|
|
487
|
+
# @param [Hash] opts the optional parameters
|
|
488
|
+
# @option opts [Integer] :page Page number (1-indexed) (default to 1)
|
|
489
|
+
# @option opts [Integer] :limit Number of sessions per page (max 100) (default to 20)
|
|
490
|
+
# @option opts [String] :sort Sort key. `last_activity` (default) orders by most recent activity and supports offset pagination only. `created_at` orders by session start and supports both offset and cursor pagination. (default to 'last_activity')
|
|
491
|
+
# @option opts [String] :status Filter by whether the session can still be refreshed. Omit for every stored session, including expired ones. `expired` is not supported with cursor pagination.
|
|
492
|
+
# @option opts [String] :cursor Opaque keyset cursor from a previous response's `next_cursor`. Requires `sort=created_at`; mutually exclusive with `page` and `ending_before`.
|
|
493
|
+
# @option opts [String] :ending_before Opaque keyset cursor from a previous response's `prev_cursor`, paging backward. Requires `sort=created_at`; mutually exclusive with `page` and `cursor`.
|
|
494
|
+
# @option opts [Integer] :offset Bounded number of rows to skip past the cursor anchor (the hybrid jump, maximum 100000). Ignored unless `cursor` or `ending_before` is supplied.
|
|
495
|
+
# @return [Array<(AuthGetMySessions200Response, Integer, Hash)>] AuthGetMySessions200Response data, response status code and response headers
|
|
496
|
+
def auth_get_my_sessions_with_http_info(opts = {})
|
|
497
|
+
if @api_client.config.debugging
|
|
498
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_get_my_sessions ...'
|
|
499
|
+
end
|
|
500
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
501
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AuthenticationApi.auth_get_my_sessions, must be greater than or equal to 1.'
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
505
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AuthenticationApi.auth_get_my_sessions, must be smaller than or equal to 100.'
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
509
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AuthenticationApi.auth_get_my_sessions, must be greater than or equal to 1.'
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
allowable_values = ["last_activity", "created_at"]
|
|
513
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
514
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
515
|
+
end
|
|
516
|
+
allowable_values = ["active", "expired"]
|
|
517
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
518
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
519
|
+
end
|
|
520
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 100000
|
|
521
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling AuthenticationApi.auth_get_my_sessions, must be smaller than or equal to 100000.'
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
525
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling AuthenticationApi.auth_get_my_sessions, must be greater than or equal to 0.'
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
# resource path
|
|
529
|
+
local_var_path = '/auth/user/sessions'
|
|
530
|
+
|
|
531
|
+
# query parameters
|
|
532
|
+
query_params = opts[:query_params] || {}
|
|
533
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
534
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
535
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
536
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
537
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
538
|
+
query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil?
|
|
539
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
540
|
+
|
|
541
|
+
# header parameters
|
|
542
|
+
header_params = opts[:header_params] || {}
|
|
543
|
+
# HTTP header 'Accept' (if needed)
|
|
544
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
545
|
+
|
|
546
|
+
# form parameters
|
|
547
|
+
form_params = opts[:form_params] || {}
|
|
548
|
+
|
|
549
|
+
# http body (model)
|
|
550
|
+
post_body = opts[:debug_body]
|
|
551
|
+
|
|
552
|
+
# return_type
|
|
553
|
+
return_type = opts[:debug_return_type] || 'AuthGetMySessions200Response'
|
|
554
|
+
|
|
555
|
+
# auth_names
|
|
556
|
+
auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken']
|
|
557
|
+
|
|
558
|
+
new_options = opts.merge(
|
|
559
|
+
:operation => :"AuthenticationApi.auth_get_my_sessions",
|
|
560
|
+
:header_params => header_params,
|
|
561
|
+
:query_params => query_params,
|
|
562
|
+
:form_params => form_params,
|
|
563
|
+
:body => post_body,
|
|
564
|
+
:auth_names => auth_names,
|
|
565
|
+
:return_type => return_type
|
|
566
|
+
)
|
|
567
|
+
|
|
568
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
569
|
+
if @api_client.config.debugging
|
|
570
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_get_my_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
571
|
+
end
|
|
572
|
+
return data, status_code, headers
|
|
573
|
+
end
|
|
574
|
+
|
|
575
|
+
# Get the effective password policy
|
|
576
|
+
# 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.
|
|
577
|
+
# @param [Hash] opts the optional parameters
|
|
578
|
+
# @return [AuthPasswordPolicy]
|
|
579
|
+
def auth_get_password_policy(opts = {})
|
|
580
|
+
data, _status_code, _headers = auth_get_password_policy_with_http_info(opts)
|
|
581
|
+
data
|
|
582
|
+
end
|
|
583
|
+
|
|
584
|
+
# Get the effective password policy
|
|
585
|
+
# 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.
|
|
586
|
+
# @param [Hash] opts the optional parameters
|
|
587
|
+
# @return [Array<(AuthPasswordPolicy, Integer, Hash)>] AuthPasswordPolicy data, response status code and response headers
|
|
588
|
+
def auth_get_password_policy_with_http_info(opts = {})
|
|
589
|
+
if @api_client.config.debugging
|
|
590
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_get_password_policy ...'
|
|
591
|
+
end
|
|
592
|
+
# resource path
|
|
593
|
+
local_var_path = '/auth/password-policy'
|
|
594
|
+
|
|
595
|
+
# query parameters
|
|
596
|
+
query_params = opts[:query_params] || {}
|
|
597
|
+
|
|
598
|
+
# header parameters
|
|
599
|
+
header_params = opts[:header_params] || {}
|
|
600
|
+
# HTTP header 'Accept' (if needed)
|
|
601
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
602
|
+
|
|
603
|
+
# form parameters
|
|
604
|
+
form_params = opts[:form_params] || {}
|
|
605
|
+
|
|
606
|
+
# http body (model)
|
|
607
|
+
post_body = opts[:debug_body]
|
|
608
|
+
|
|
609
|
+
# return_type
|
|
610
|
+
return_type = opts[:debug_return_type] || 'AuthPasswordPolicy'
|
|
611
|
+
|
|
612
|
+
# auth_names
|
|
613
|
+
auth_names = opts[:debug_auth_names] || ['AnonKey']
|
|
614
|
+
|
|
615
|
+
new_options = opts.merge(
|
|
616
|
+
:operation => :"AuthenticationApi.auth_get_password_policy",
|
|
617
|
+
:header_params => header_params,
|
|
618
|
+
:query_params => query_params,
|
|
619
|
+
:form_params => form_params,
|
|
620
|
+
:body => post_body,
|
|
621
|
+
:auth_names => auth_names,
|
|
622
|
+
:return_type => return_type
|
|
623
|
+
)
|
|
624
|
+
|
|
625
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
626
|
+
if @api_client.config.debugging
|
|
627
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_get_password_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
628
|
+
end
|
|
629
|
+
return data, status_code, headers
|
|
630
|
+
end
|
|
631
|
+
|
|
632
|
+
# Get current user profile
|
|
633
|
+
# Returns authenticated user's profile. Requires access token.
|
|
634
|
+
# @param [Hash] opts the optional parameters
|
|
635
|
+
# @return [AuthConvertAnonymous200Response]
|
|
636
|
+
def auth_get_user(opts = {})
|
|
637
|
+
data, _status_code, _headers = auth_get_user_with_http_info(opts)
|
|
638
|
+
data
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
# Get current user profile
|
|
642
|
+
# Returns authenticated user's profile. Requires access token.
|
|
643
|
+
# @param [Hash] opts the optional parameters
|
|
644
|
+
# @return [Array<(AuthConvertAnonymous200Response, Integer, Hash)>] AuthConvertAnonymous200Response data, response status code and response headers
|
|
645
|
+
def auth_get_user_with_http_info(opts = {})
|
|
646
|
+
if @api_client.config.debugging
|
|
647
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_get_user ...'
|
|
648
|
+
end
|
|
649
|
+
# resource path
|
|
650
|
+
local_var_path = '/auth/user'
|
|
651
|
+
|
|
652
|
+
# query parameters
|
|
653
|
+
query_params = opts[:query_params] || {}
|
|
654
|
+
|
|
655
|
+
# header parameters
|
|
656
|
+
header_params = opts[:header_params] || {}
|
|
657
|
+
# HTTP header 'Accept' (if needed)
|
|
658
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
659
|
+
|
|
660
|
+
# form parameters
|
|
661
|
+
form_params = opts[:form_params] || {}
|
|
662
|
+
|
|
663
|
+
# http body (model)
|
|
664
|
+
post_body = opts[:debug_body]
|
|
665
|
+
|
|
666
|
+
# return_type
|
|
667
|
+
return_type = opts[:debug_return_type] || 'AuthConvertAnonymous200Response'
|
|
668
|
+
|
|
669
|
+
# auth_names
|
|
670
|
+
auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken']
|
|
671
|
+
|
|
672
|
+
new_options = opts.merge(
|
|
673
|
+
:operation => :"AuthenticationApi.auth_get_user",
|
|
674
|
+
:header_params => header_params,
|
|
675
|
+
:query_params => query_params,
|
|
676
|
+
:form_params => form_params,
|
|
677
|
+
:body => post_body,
|
|
678
|
+
:auth_names => auth_names,
|
|
679
|
+
:return_type => return_type
|
|
680
|
+
)
|
|
681
|
+
|
|
682
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
683
|
+
if @api_client.config.debugging
|
|
684
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
685
|
+
end
|
|
686
|
+
return data, status_code, headers
|
|
687
|
+
end
|
|
688
|
+
|
|
689
|
+
# List the current user's identities
|
|
690
|
+
# Returns every real email identity the account owns. An account can own multiple identities (for example a password identity plus one or more OAuth identities on different emails). Anonymous accounts have no real identity and return an empty list.
|
|
691
|
+
# @param [Hash] opts the optional parameters
|
|
692
|
+
# @return [AuthIdentitiesResponse]
|
|
693
|
+
def auth_list_identities(opts = {})
|
|
694
|
+
data, _status_code, _headers = auth_list_identities_with_http_info(opts)
|
|
695
|
+
data
|
|
696
|
+
end
|
|
697
|
+
|
|
698
|
+
# List the current user's identities
|
|
699
|
+
# Returns every real email identity the account owns. An account can own multiple identities (for example a password identity plus one or more OAuth identities on different emails). Anonymous accounts have no real identity and return an empty list.
|
|
700
|
+
# @param [Hash] opts the optional parameters
|
|
701
|
+
# @return [Array<(AuthIdentitiesResponse, Integer, Hash)>] AuthIdentitiesResponse data, response status code and response headers
|
|
702
|
+
def auth_list_identities_with_http_info(opts = {})
|
|
703
|
+
if @api_client.config.debugging
|
|
704
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_list_identities ...'
|
|
705
|
+
end
|
|
706
|
+
# resource path
|
|
707
|
+
local_var_path = '/auth/user/identities'
|
|
708
|
+
|
|
709
|
+
# query parameters
|
|
710
|
+
query_params = opts[:query_params] || {}
|
|
711
|
+
|
|
712
|
+
# header parameters
|
|
713
|
+
header_params = opts[:header_params] || {}
|
|
714
|
+
# HTTP header 'Accept' (if needed)
|
|
715
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
716
|
+
|
|
717
|
+
# form parameters
|
|
718
|
+
form_params = opts[:form_params] || {}
|
|
719
|
+
|
|
720
|
+
# http body (model)
|
|
721
|
+
post_body = opts[:debug_body]
|
|
722
|
+
|
|
723
|
+
# return_type
|
|
724
|
+
return_type = opts[:debug_return_type] || 'AuthIdentitiesResponse'
|
|
725
|
+
|
|
726
|
+
# auth_names
|
|
727
|
+
auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken']
|
|
728
|
+
|
|
729
|
+
new_options = opts.merge(
|
|
730
|
+
:operation => :"AuthenticationApi.auth_list_identities",
|
|
731
|
+
:header_params => header_params,
|
|
732
|
+
:query_params => query_params,
|
|
733
|
+
:form_params => form_params,
|
|
734
|
+
:body => post_body,
|
|
735
|
+
:auth_names => auth_names,
|
|
736
|
+
:return_type => return_type
|
|
737
|
+
)
|
|
738
|
+
|
|
739
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
740
|
+
if @api_client.config.debugging
|
|
741
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_list_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
742
|
+
end
|
|
743
|
+
return data, status_code, headers
|
|
744
|
+
end
|
|
745
|
+
|
|
746
|
+
# List the current user's sign-in methods
|
|
747
|
+
# Returns a flat list of every sign-in method the account owns (password, each OAuth provider, and any active anonymous method), with the primary method flagged. Password stubs and converted anonymous methods are excluded.
|
|
748
|
+
# @param [Hash] opts the optional parameters
|
|
749
|
+
# @return [AuthMethodsResponse]
|
|
750
|
+
def auth_list_methods(opts = {})
|
|
751
|
+
data, _status_code, _headers = auth_list_methods_with_http_info(opts)
|
|
752
|
+
data
|
|
753
|
+
end
|
|
754
|
+
|
|
755
|
+
# List the current user's sign-in methods
|
|
756
|
+
# Returns a flat list of every sign-in method the account owns (password, each OAuth provider, and any active anonymous method), with the primary method flagged. Password stubs and converted anonymous methods are excluded.
|
|
757
|
+
# @param [Hash] opts the optional parameters
|
|
758
|
+
# @return [Array<(AuthMethodsResponse, Integer, Hash)>] AuthMethodsResponse data, response status code and response headers
|
|
759
|
+
def auth_list_methods_with_http_info(opts = {})
|
|
760
|
+
if @api_client.config.debugging
|
|
761
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_list_methods ...'
|
|
762
|
+
end
|
|
763
|
+
# resource path
|
|
764
|
+
local_var_path = '/auth/user/methods'
|
|
765
|
+
|
|
766
|
+
# query parameters
|
|
767
|
+
query_params = opts[:query_params] || {}
|
|
768
|
+
|
|
769
|
+
# header parameters
|
|
770
|
+
header_params = opts[:header_params] || {}
|
|
771
|
+
# HTTP header 'Accept' (if needed)
|
|
772
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
773
|
+
|
|
774
|
+
# form parameters
|
|
775
|
+
form_params = opts[:form_params] || {}
|
|
776
|
+
|
|
777
|
+
# http body (model)
|
|
778
|
+
post_body = opts[:debug_body]
|
|
779
|
+
|
|
780
|
+
# return_type
|
|
781
|
+
return_type = opts[:debug_return_type] || 'AuthMethodsResponse'
|
|
782
|
+
|
|
783
|
+
# auth_names
|
|
784
|
+
auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken']
|
|
785
|
+
|
|
786
|
+
new_options = opts.merge(
|
|
787
|
+
:operation => :"AuthenticationApi.auth_list_methods",
|
|
788
|
+
:header_params => header_params,
|
|
789
|
+
:query_params => query_params,
|
|
790
|
+
:form_params => form_params,
|
|
791
|
+
:body => post_body,
|
|
792
|
+
:auth_names => auth_names,
|
|
793
|
+
:return_type => return_type
|
|
794
|
+
)
|
|
795
|
+
|
|
796
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
797
|
+
if @api_client.config.debugging
|
|
798
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_list_methods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
799
|
+
end
|
|
800
|
+
return data, status_code, headers
|
|
801
|
+
end
|
|
802
|
+
|
|
803
|
+
# Logout (revoke refresh token)
|
|
804
|
+
# 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.
|
|
805
|
+
# @param [Hash] opts the optional parameters
|
|
806
|
+
# @option opts [AuthRefreshRequest] :auth_refresh_request
|
|
807
|
+
# @return [nil]
|
|
808
|
+
def auth_logout(opts = {})
|
|
809
|
+
auth_logout_with_http_info(opts)
|
|
810
|
+
nil
|
|
811
|
+
end
|
|
812
|
+
|
|
813
|
+
# Logout (revoke refresh token)
|
|
814
|
+
# 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.
|
|
815
|
+
# @param [Hash] opts the optional parameters
|
|
816
|
+
# @option opts [AuthRefreshRequest] :auth_refresh_request
|
|
817
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
818
|
+
def auth_logout_with_http_info(opts = {})
|
|
819
|
+
if @api_client.config.debugging
|
|
820
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_logout ...'
|
|
821
|
+
end
|
|
822
|
+
# resource path
|
|
823
|
+
local_var_path = '/auth/logout'
|
|
824
|
+
|
|
825
|
+
# query parameters
|
|
826
|
+
query_params = opts[:query_params] || {}
|
|
827
|
+
|
|
828
|
+
# header parameters
|
|
829
|
+
header_params = opts[:header_params] || {}
|
|
830
|
+
# HTTP header 'Content-Type'
|
|
831
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
832
|
+
if !content_type.nil?
|
|
833
|
+
header_params['Content-Type'] = content_type
|
|
834
|
+
end
|
|
835
|
+
|
|
836
|
+
# form parameters
|
|
837
|
+
form_params = opts[:form_params] || {}
|
|
838
|
+
|
|
839
|
+
# http body (model)
|
|
840
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'auth_refresh_request'])
|
|
841
|
+
|
|
842
|
+
# return_type
|
|
843
|
+
return_type = opts[:debug_return_type]
|
|
844
|
+
|
|
845
|
+
# auth_names
|
|
846
|
+
auth_names = opts[:debug_auth_names] || ['AnonKey']
|
|
847
|
+
|
|
848
|
+
new_options = opts.merge(
|
|
849
|
+
:operation => :"AuthenticationApi.auth_logout",
|
|
850
|
+
:header_params => header_params,
|
|
851
|
+
:query_params => query_params,
|
|
852
|
+
:form_params => form_params,
|
|
853
|
+
:body => post_body,
|
|
854
|
+
:auth_names => auth_names,
|
|
855
|
+
:return_type => return_type
|
|
856
|
+
)
|
|
857
|
+
|
|
858
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
859
|
+
if @api_client.config.debugging
|
|
860
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_logout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
861
|
+
end
|
|
862
|
+
return data, status_code, headers
|
|
863
|
+
end
|
|
864
|
+
|
|
865
|
+
# Set a method as the account's primary
|
|
866
|
+
# Promotes the given method to the account's primary sign-in method. The account's canonical email is re-derived from the promoted method's identity. Refused for password stubs and converted anonymous methods, and for an identity whose domain is outside the project's `allowed_email_domains`.
|
|
867
|
+
# @param method_id [String] The method ID to promote
|
|
868
|
+
# @param [Hash] opts the optional parameters
|
|
869
|
+
# @return [AuthMethodSummary]
|
|
870
|
+
def auth_promote_method(method_id, opts = {})
|
|
871
|
+
data, _status_code, _headers = auth_promote_method_with_http_info(method_id, opts)
|
|
872
|
+
data
|
|
873
|
+
end
|
|
874
|
+
|
|
875
|
+
# Set a method as the account's primary
|
|
876
|
+
# Promotes the given method to the account's primary sign-in method. The account's canonical email is re-derived from the promoted method's identity. Refused for password stubs and converted anonymous methods, and for an identity whose domain is outside the project's `allowed_email_domains`.
|
|
877
|
+
# @param method_id [String] The method ID to promote
|
|
878
|
+
# @param [Hash] opts the optional parameters
|
|
879
|
+
# @return [Array<(AuthMethodSummary, Integer, Hash)>] AuthMethodSummary data, response status code and response headers
|
|
880
|
+
def auth_promote_method_with_http_info(method_id, opts = {})
|
|
881
|
+
if @api_client.config.debugging
|
|
882
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_promote_method ...'
|
|
883
|
+
end
|
|
884
|
+
# verify the required parameter 'method_id' is set
|
|
885
|
+
if @api_client.config.client_side_validation && method_id.nil?
|
|
886
|
+
fail ArgumentError, "Missing the required parameter 'method_id' when calling AuthenticationApi.auth_promote_method"
|
|
887
|
+
end
|
|
888
|
+
# resource path
|
|
889
|
+
local_var_path = '/auth/user/methods/{methodId}/promote'.sub('{' + 'methodId' + '}', CGI.escape(method_id.to_s))
|
|
890
|
+
|
|
891
|
+
# query parameters
|
|
892
|
+
query_params = opts[:query_params] || {}
|
|
893
|
+
|
|
894
|
+
# header parameters
|
|
895
|
+
header_params = opts[:header_params] || {}
|
|
896
|
+
# HTTP header 'Accept' (if needed)
|
|
897
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
898
|
+
|
|
899
|
+
# form parameters
|
|
900
|
+
form_params = opts[:form_params] || {}
|
|
901
|
+
|
|
902
|
+
# http body (model)
|
|
903
|
+
post_body = opts[:debug_body]
|
|
904
|
+
|
|
905
|
+
# return_type
|
|
906
|
+
return_type = opts[:debug_return_type] || 'AuthMethodSummary'
|
|
907
|
+
|
|
908
|
+
# auth_names
|
|
909
|
+
auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken']
|
|
910
|
+
|
|
911
|
+
new_options = opts.merge(
|
|
912
|
+
:operation => :"AuthenticationApi.auth_promote_method",
|
|
913
|
+
:header_params => header_params,
|
|
914
|
+
:query_params => query_params,
|
|
915
|
+
:form_params => form_params,
|
|
916
|
+
:body => post_body,
|
|
917
|
+
:auth_names => auth_names,
|
|
918
|
+
:return_type => return_type
|
|
919
|
+
)
|
|
920
|
+
|
|
921
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
922
|
+
if @api_client.config.debugging
|
|
923
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_promote_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
924
|
+
end
|
|
925
|
+
return data, status_code, headers
|
|
926
|
+
end
|
|
927
|
+
|
|
928
|
+
# Refresh access token
|
|
929
|
+
# 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.
|
|
930
|
+
# @param [Hash] opts the optional parameters
|
|
931
|
+
# @option opts [AuthRefreshRequest] :auth_refresh_request
|
|
932
|
+
# @return [AuthTokenResponse]
|
|
933
|
+
def auth_refresh(opts = {})
|
|
934
|
+
data, _status_code, _headers = auth_refresh_with_http_info(opts)
|
|
935
|
+
data
|
|
936
|
+
end
|
|
937
|
+
|
|
938
|
+
# Refresh access token
|
|
939
|
+
# 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.
|
|
940
|
+
# @param [Hash] opts the optional parameters
|
|
941
|
+
# @option opts [AuthRefreshRequest] :auth_refresh_request
|
|
942
|
+
# @return [Array<(AuthTokenResponse, Integer, Hash)>] AuthTokenResponse data, response status code and response headers
|
|
943
|
+
def auth_refresh_with_http_info(opts = {})
|
|
944
|
+
if @api_client.config.debugging
|
|
945
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_refresh ...'
|
|
946
|
+
end
|
|
947
|
+
# resource path
|
|
948
|
+
local_var_path = '/auth/refresh'
|
|
949
|
+
|
|
950
|
+
# query parameters
|
|
951
|
+
query_params = opts[:query_params] || {}
|
|
952
|
+
|
|
953
|
+
# header parameters
|
|
954
|
+
header_params = opts[:header_params] || {}
|
|
955
|
+
# HTTP header 'Accept' (if needed)
|
|
956
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
957
|
+
# HTTP header 'Content-Type'
|
|
958
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
959
|
+
if !content_type.nil?
|
|
960
|
+
header_params['Content-Type'] = content_type
|
|
961
|
+
end
|
|
962
|
+
|
|
963
|
+
# form parameters
|
|
964
|
+
form_params = opts[:form_params] || {}
|
|
965
|
+
|
|
966
|
+
# http body (model)
|
|
967
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'auth_refresh_request'])
|
|
968
|
+
|
|
969
|
+
# return_type
|
|
970
|
+
return_type = opts[:debug_return_type] || 'AuthTokenResponse'
|
|
971
|
+
|
|
972
|
+
# auth_names
|
|
973
|
+
auth_names = opts[:debug_auth_names] || ['AnonKey']
|
|
974
|
+
|
|
975
|
+
new_options = opts.merge(
|
|
976
|
+
:operation => :"AuthenticationApi.auth_refresh",
|
|
977
|
+
:header_params => header_params,
|
|
978
|
+
:query_params => query_params,
|
|
979
|
+
:form_params => form_params,
|
|
980
|
+
:body => post_body,
|
|
981
|
+
:auth_names => auth_names,
|
|
982
|
+
:return_type => return_type
|
|
983
|
+
)
|
|
984
|
+
|
|
985
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
986
|
+
if @api_client.config.debugging
|
|
987
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_refresh\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
988
|
+
end
|
|
989
|
+
return data, status_code, headers
|
|
990
|
+
end
|
|
991
|
+
|
|
992
|
+
# Request email change
|
|
993
|
+
# Request to change user's email address. Sends confirmation token to new email address.
|
|
994
|
+
# @param auth_request_email_change_request [AuthRequestEmailChangeRequest]
|
|
995
|
+
# @param [Hash] opts the optional parameters
|
|
996
|
+
# @return [AuthRequestEmailChange200Response]
|
|
997
|
+
def auth_request_email_change(auth_request_email_change_request, opts = {})
|
|
998
|
+
data, _status_code, _headers = auth_request_email_change_with_http_info(auth_request_email_change_request, opts)
|
|
999
|
+
data
|
|
1000
|
+
end
|
|
1001
|
+
|
|
1002
|
+
# Request email change
|
|
1003
|
+
# Request to change user's email address. Sends confirmation token to new email address.
|
|
1004
|
+
# @param auth_request_email_change_request [AuthRequestEmailChangeRequest]
|
|
1005
|
+
# @param [Hash] opts the optional parameters
|
|
1006
|
+
# @return [Array<(AuthRequestEmailChange200Response, Integer, Hash)>] AuthRequestEmailChange200Response data, response status code and response headers
|
|
1007
|
+
def auth_request_email_change_with_http_info(auth_request_email_change_request, opts = {})
|
|
1008
|
+
if @api_client.config.debugging
|
|
1009
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_request_email_change ...'
|
|
1010
|
+
end
|
|
1011
|
+
# verify the required parameter 'auth_request_email_change_request' is set
|
|
1012
|
+
if @api_client.config.client_side_validation && auth_request_email_change_request.nil?
|
|
1013
|
+
fail ArgumentError, "Missing the required parameter 'auth_request_email_change_request' when calling AuthenticationApi.auth_request_email_change"
|
|
1014
|
+
end
|
|
1015
|
+
# resource path
|
|
1016
|
+
local_var_path = '/auth/user/change-email'
|
|
1017
|
+
|
|
1018
|
+
# query parameters
|
|
1019
|
+
query_params = opts[:query_params] || {}
|
|
1020
|
+
|
|
1021
|
+
# header parameters
|
|
1022
|
+
header_params = opts[:header_params] || {}
|
|
1023
|
+
# HTTP header 'Accept' (if needed)
|
|
1024
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1025
|
+
# HTTP header 'Content-Type'
|
|
1026
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1027
|
+
if !content_type.nil?
|
|
1028
|
+
header_params['Content-Type'] = content_type
|
|
1029
|
+
end
|
|
1030
|
+
|
|
1031
|
+
# form parameters
|
|
1032
|
+
form_params = opts[:form_params] || {}
|
|
1033
|
+
|
|
1034
|
+
# http body (model)
|
|
1035
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(auth_request_email_change_request)
|
|
1036
|
+
|
|
1037
|
+
# return_type
|
|
1038
|
+
return_type = opts[:debug_return_type] || 'AuthRequestEmailChange200Response'
|
|
1039
|
+
|
|
1040
|
+
# auth_names
|
|
1041
|
+
auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken']
|
|
1042
|
+
|
|
1043
|
+
new_options = opts.merge(
|
|
1044
|
+
:operation => :"AuthenticationApi.auth_request_email_change",
|
|
1045
|
+
:header_params => header_params,
|
|
1046
|
+
:query_params => query_params,
|
|
1047
|
+
:form_params => form_params,
|
|
1048
|
+
:body => post_body,
|
|
1049
|
+
:auth_names => auth_names,
|
|
1050
|
+
:return_type => return_type
|
|
1051
|
+
)
|
|
1052
|
+
|
|
1053
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1054
|
+
if @api_client.config.debugging
|
|
1055
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_request_email_change\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1056
|
+
end
|
|
1057
|
+
return data, status_code, headers
|
|
1058
|
+
end
|
|
1059
|
+
|
|
1060
|
+
# Resend confirmation email
|
|
1061
|
+
# Resend email confirmation link. Returns generic message to prevent email enumeration. No email is sent when the account does not exist or is already confirmed. If the account exists and is unconfirmed, a new token is generated and any previous confirmation token is invalidated.
|
|
1062
|
+
# @param auth_forgot_password_request [AuthForgotPasswordRequest]
|
|
1063
|
+
# @param [Hash] opts the optional parameters
|
|
1064
|
+
# @return [AuthResetPassword200Response]
|
|
1065
|
+
def auth_resend_confirmation(auth_forgot_password_request, opts = {})
|
|
1066
|
+
data, _status_code, _headers = auth_resend_confirmation_with_http_info(auth_forgot_password_request, opts)
|
|
1067
|
+
data
|
|
1068
|
+
end
|
|
1069
|
+
|
|
1070
|
+
# Resend confirmation email
|
|
1071
|
+
# Resend email confirmation link. Returns generic message to prevent email enumeration. No email is sent when the account does not exist or is already confirmed. If the account exists and is unconfirmed, a new token is generated and any previous confirmation token is invalidated.
|
|
1072
|
+
# @param auth_forgot_password_request [AuthForgotPasswordRequest]
|
|
1073
|
+
# @param [Hash] opts the optional parameters
|
|
1074
|
+
# @return [Array<(AuthResetPassword200Response, Integer, Hash)>] AuthResetPassword200Response data, response status code and response headers
|
|
1075
|
+
def auth_resend_confirmation_with_http_info(auth_forgot_password_request, opts = {})
|
|
1076
|
+
if @api_client.config.debugging
|
|
1077
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_resend_confirmation ...'
|
|
1078
|
+
end
|
|
1079
|
+
# verify the required parameter 'auth_forgot_password_request' is set
|
|
1080
|
+
if @api_client.config.client_side_validation && auth_forgot_password_request.nil?
|
|
1081
|
+
fail ArgumentError, "Missing the required parameter 'auth_forgot_password_request' when calling AuthenticationApi.auth_resend_confirmation"
|
|
1082
|
+
end
|
|
1083
|
+
# resource path
|
|
1084
|
+
local_var_path = '/auth/resend-confirmation'
|
|
1085
|
+
|
|
1086
|
+
# query parameters
|
|
1087
|
+
query_params = opts[:query_params] || {}
|
|
1088
|
+
|
|
1089
|
+
# header parameters
|
|
1090
|
+
header_params = opts[:header_params] || {}
|
|
1091
|
+
# HTTP header 'Accept' (if needed)
|
|
1092
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1093
|
+
# HTTP header 'Content-Type'
|
|
1094
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1095
|
+
if !content_type.nil?
|
|
1096
|
+
header_params['Content-Type'] = content_type
|
|
1097
|
+
end
|
|
1098
|
+
|
|
1099
|
+
# form parameters
|
|
1100
|
+
form_params = opts[:form_params] || {}
|
|
1101
|
+
|
|
1102
|
+
# http body (model)
|
|
1103
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(auth_forgot_password_request)
|
|
1104
|
+
|
|
1105
|
+
# return_type
|
|
1106
|
+
return_type = opts[:debug_return_type] || 'AuthResetPassword200Response'
|
|
1107
|
+
|
|
1108
|
+
# auth_names
|
|
1109
|
+
auth_names = opts[:debug_auth_names] || ['AnonKey']
|
|
1110
|
+
|
|
1111
|
+
new_options = opts.merge(
|
|
1112
|
+
:operation => :"AuthenticationApi.auth_resend_confirmation",
|
|
1113
|
+
:header_params => header_params,
|
|
1114
|
+
:query_params => query_params,
|
|
1115
|
+
:form_params => form_params,
|
|
1116
|
+
:body => post_body,
|
|
1117
|
+
:auth_names => auth_names,
|
|
1118
|
+
:return_type => return_type
|
|
1119
|
+
)
|
|
1120
|
+
|
|
1121
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1122
|
+
if @api_client.config.debugging
|
|
1123
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_resend_confirmation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1124
|
+
end
|
|
1125
|
+
return data, status_code, headers
|
|
1126
|
+
end
|
|
1127
|
+
|
|
1128
|
+
# Reset password with recovery token
|
|
1129
|
+
# Reset password using recovery token from forgot-password. Revokes all existing sessions for security.
|
|
1130
|
+
# @param auth_reset_password_request [AuthResetPasswordRequest]
|
|
1131
|
+
# @param [Hash] opts the optional parameters
|
|
1132
|
+
# @return [AuthResetPassword200Response]
|
|
1133
|
+
def auth_reset_password(auth_reset_password_request, opts = {})
|
|
1134
|
+
data, _status_code, _headers = auth_reset_password_with_http_info(auth_reset_password_request, opts)
|
|
1135
|
+
data
|
|
1136
|
+
end
|
|
1137
|
+
|
|
1138
|
+
# Reset password with recovery token
|
|
1139
|
+
# Reset password using recovery token from forgot-password. Revokes all existing sessions for security.
|
|
1140
|
+
# @param auth_reset_password_request [AuthResetPasswordRequest]
|
|
1141
|
+
# @param [Hash] opts the optional parameters
|
|
1142
|
+
# @return [Array<(AuthResetPassword200Response, Integer, Hash)>] AuthResetPassword200Response data, response status code and response headers
|
|
1143
|
+
def auth_reset_password_with_http_info(auth_reset_password_request, opts = {})
|
|
1144
|
+
if @api_client.config.debugging
|
|
1145
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_reset_password ...'
|
|
1146
|
+
end
|
|
1147
|
+
# verify the required parameter 'auth_reset_password_request' is set
|
|
1148
|
+
if @api_client.config.client_side_validation && auth_reset_password_request.nil?
|
|
1149
|
+
fail ArgumentError, "Missing the required parameter 'auth_reset_password_request' when calling AuthenticationApi.auth_reset_password"
|
|
1150
|
+
end
|
|
1151
|
+
# resource path
|
|
1152
|
+
local_var_path = '/auth/reset-password'
|
|
1153
|
+
|
|
1154
|
+
# query parameters
|
|
1155
|
+
query_params = opts[:query_params] || {}
|
|
1156
|
+
|
|
1157
|
+
# header parameters
|
|
1158
|
+
header_params = opts[:header_params] || {}
|
|
1159
|
+
# HTTP header 'Accept' (if needed)
|
|
1160
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1161
|
+
# HTTP header 'Content-Type'
|
|
1162
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1163
|
+
if !content_type.nil?
|
|
1164
|
+
header_params['Content-Type'] = content_type
|
|
1165
|
+
end
|
|
1166
|
+
|
|
1167
|
+
# form parameters
|
|
1168
|
+
form_params = opts[:form_params] || {}
|
|
1169
|
+
|
|
1170
|
+
# http body (model)
|
|
1171
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(auth_reset_password_request)
|
|
1172
|
+
|
|
1173
|
+
# return_type
|
|
1174
|
+
return_type = opts[:debug_return_type] || 'AuthResetPassword200Response'
|
|
1175
|
+
|
|
1176
|
+
# auth_names
|
|
1177
|
+
auth_names = opts[:debug_auth_names] || ['AnonKey']
|
|
1178
|
+
|
|
1179
|
+
new_options = opts.merge(
|
|
1180
|
+
:operation => :"AuthenticationApi.auth_reset_password",
|
|
1181
|
+
:header_params => header_params,
|
|
1182
|
+
:query_params => query_params,
|
|
1183
|
+
:form_params => form_params,
|
|
1184
|
+
:body => post_body,
|
|
1185
|
+
:auth_names => auth_names,
|
|
1186
|
+
:return_type => return_type
|
|
1187
|
+
)
|
|
1188
|
+
|
|
1189
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1190
|
+
if @api_client.config.debugging
|
|
1191
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_reset_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1192
|
+
end
|
|
1193
|
+
return data, status_code, headers
|
|
1194
|
+
end
|
|
1195
|
+
|
|
1196
|
+
# Sign in an auth user
|
|
1197
|
+
# 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.
|
|
1198
|
+
# @param auth_signin_request [AuthSigninRequest]
|
|
1199
|
+
# @param [Hash] opts the optional parameters
|
|
1200
|
+
# @return [AuthTokenResponse]
|
|
1201
|
+
def auth_signin(auth_signin_request, opts = {})
|
|
1202
|
+
data, _status_code, _headers = auth_signin_with_http_info(auth_signin_request, opts)
|
|
1203
|
+
data
|
|
1204
|
+
end
|
|
1205
|
+
|
|
1206
|
+
# Sign in an auth user
|
|
1207
|
+
# 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.
|
|
1208
|
+
# @param auth_signin_request [AuthSigninRequest]
|
|
1209
|
+
# @param [Hash] opts the optional parameters
|
|
1210
|
+
# @return [Array<(AuthTokenResponse, Integer, Hash)>] AuthTokenResponse data, response status code and response headers
|
|
1211
|
+
def auth_signin_with_http_info(auth_signin_request, opts = {})
|
|
1212
|
+
if @api_client.config.debugging
|
|
1213
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_signin ...'
|
|
1214
|
+
end
|
|
1215
|
+
# verify the required parameter 'auth_signin_request' is set
|
|
1216
|
+
if @api_client.config.client_side_validation && auth_signin_request.nil?
|
|
1217
|
+
fail ArgumentError, "Missing the required parameter 'auth_signin_request' when calling AuthenticationApi.auth_signin"
|
|
1218
|
+
end
|
|
1219
|
+
# resource path
|
|
1220
|
+
local_var_path = '/auth/signin'
|
|
1221
|
+
|
|
1222
|
+
# query parameters
|
|
1223
|
+
query_params = opts[:query_params] || {}
|
|
1224
|
+
|
|
1225
|
+
# header parameters
|
|
1226
|
+
header_params = opts[:header_params] || {}
|
|
1227
|
+
# HTTP header 'Accept' (if needed)
|
|
1228
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1229
|
+
# HTTP header 'Content-Type'
|
|
1230
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1231
|
+
if !content_type.nil?
|
|
1232
|
+
header_params['Content-Type'] = content_type
|
|
1233
|
+
end
|
|
1234
|
+
|
|
1235
|
+
# form parameters
|
|
1236
|
+
form_params = opts[:form_params] || {}
|
|
1237
|
+
|
|
1238
|
+
# http body (model)
|
|
1239
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(auth_signin_request)
|
|
1240
|
+
|
|
1241
|
+
# return_type
|
|
1242
|
+
return_type = opts[:debug_return_type] || 'AuthTokenResponse'
|
|
1243
|
+
|
|
1244
|
+
# auth_names
|
|
1245
|
+
auth_names = opts[:debug_auth_names] || ['AnonKey']
|
|
1246
|
+
|
|
1247
|
+
new_options = opts.merge(
|
|
1248
|
+
:operation => :"AuthenticationApi.auth_signin",
|
|
1249
|
+
:header_params => header_params,
|
|
1250
|
+
:query_params => query_params,
|
|
1251
|
+
:form_params => form_params,
|
|
1252
|
+
:body => post_body,
|
|
1253
|
+
:auth_names => auth_names,
|
|
1254
|
+
:return_type => return_type
|
|
1255
|
+
)
|
|
1256
|
+
|
|
1257
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1258
|
+
if @api_client.config.debugging
|
|
1259
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_signin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1260
|
+
end
|
|
1261
|
+
return data, status_code, headers
|
|
1262
|
+
end
|
|
1263
|
+
|
|
1264
|
+
# Sign up a new auth user
|
|
1265
|
+
# 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.
|
|
1266
|
+
# @param auth_signup_request [AuthSignupRequest]
|
|
1267
|
+
# @param [Hash] opts the optional parameters
|
|
1268
|
+
# @return [AuthSignupResponse]
|
|
1269
|
+
def auth_signup(auth_signup_request, opts = {})
|
|
1270
|
+
data, _status_code, _headers = auth_signup_with_http_info(auth_signup_request, opts)
|
|
1271
|
+
data
|
|
1272
|
+
end
|
|
1273
|
+
|
|
1274
|
+
# Sign up a new auth user
|
|
1275
|
+
# 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.
|
|
1276
|
+
# @param auth_signup_request [AuthSignupRequest]
|
|
1277
|
+
# @param [Hash] opts the optional parameters
|
|
1278
|
+
# @return [Array<(AuthSignupResponse, Integer, Hash)>] AuthSignupResponse data, response status code and response headers
|
|
1279
|
+
def auth_signup_with_http_info(auth_signup_request, opts = {})
|
|
1280
|
+
if @api_client.config.debugging
|
|
1281
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_signup ...'
|
|
1282
|
+
end
|
|
1283
|
+
# verify the required parameter 'auth_signup_request' is set
|
|
1284
|
+
if @api_client.config.client_side_validation && auth_signup_request.nil?
|
|
1285
|
+
fail ArgumentError, "Missing the required parameter 'auth_signup_request' when calling AuthenticationApi.auth_signup"
|
|
1286
|
+
end
|
|
1287
|
+
# resource path
|
|
1288
|
+
local_var_path = '/auth/signup'
|
|
1289
|
+
|
|
1290
|
+
# query parameters
|
|
1291
|
+
query_params = opts[:query_params] || {}
|
|
1292
|
+
|
|
1293
|
+
# header parameters
|
|
1294
|
+
header_params = opts[:header_params] || {}
|
|
1295
|
+
# HTTP header 'Accept' (if needed)
|
|
1296
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1297
|
+
# HTTP header 'Content-Type'
|
|
1298
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1299
|
+
if !content_type.nil?
|
|
1300
|
+
header_params['Content-Type'] = content_type
|
|
1301
|
+
end
|
|
1302
|
+
|
|
1303
|
+
# form parameters
|
|
1304
|
+
form_params = opts[:form_params] || {}
|
|
1305
|
+
|
|
1306
|
+
# http body (model)
|
|
1307
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(auth_signup_request)
|
|
1308
|
+
|
|
1309
|
+
# return_type
|
|
1310
|
+
return_type = opts[:debug_return_type] || 'AuthSignupResponse'
|
|
1311
|
+
|
|
1312
|
+
# auth_names
|
|
1313
|
+
auth_names = opts[:debug_auth_names] || ['AnonKey']
|
|
1314
|
+
|
|
1315
|
+
new_options = opts.merge(
|
|
1316
|
+
:operation => :"AuthenticationApi.auth_signup",
|
|
1317
|
+
:header_params => header_params,
|
|
1318
|
+
:query_params => query_params,
|
|
1319
|
+
:form_params => form_params,
|
|
1320
|
+
:body => post_body,
|
|
1321
|
+
:auth_names => auth_names,
|
|
1322
|
+
:return_type => return_type
|
|
1323
|
+
)
|
|
1324
|
+
|
|
1325
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1326
|
+
if @api_client.config.debugging
|
|
1327
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_signup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1328
|
+
end
|
|
1329
|
+
return data, status_code, headers
|
|
1330
|
+
end
|
|
1331
|
+
|
|
1332
|
+
# Create anonymous user
|
|
1333
|
+
# 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.
|
|
1334
|
+
# @param [Hash] opts the optional parameters
|
|
1335
|
+
# @option opts [AuthSignupAnonymousRequest] :auth_signup_anonymous_request Optional user metadata
|
|
1336
|
+
# @return [AuthTokenResponse]
|
|
1337
|
+
def auth_signup_anonymous(opts = {})
|
|
1338
|
+
data, _status_code, _headers = auth_signup_anonymous_with_http_info(opts)
|
|
1339
|
+
data
|
|
1340
|
+
end
|
|
1341
|
+
|
|
1342
|
+
# Create anonymous user
|
|
1343
|
+
# 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.
|
|
1344
|
+
# @param [Hash] opts the optional parameters
|
|
1345
|
+
# @option opts [AuthSignupAnonymousRequest] :auth_signup_anonymous_request Optional user metadata
|
|
1346
|
+
# @return [Array<(AuthTokenResponse, Integer, Hash)>] AuthTokenResponse data, response status code and response headers
|
|
1347
|
+
def auth_signup_anonymous_with_http_info(opts = {})
|
|
1348
|
+
if @api_client.config.debugging
|
|
1349
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_signup_anonymous ...'
|
|
1350
|
+
end
|
|
1351
|
+
# resource path
|
|
1352
|
+
local_var_path = '/auth/signup-anonymous'
|
|
1353
|
+
|
|
1354
|
+
# query parameters
|
|
1355
|
+
query_params = opts[:query_params] || {}
|
|
1356
|
+
|
|
1357
|
+
# header parameters
|
|
1358
|
+
header_params = opts[:header_params] || {}
|
|
1359
|
+
# HTTP header 'Accept' (if needed)
|
|
1360
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1361
|
+
# HTTP header 'Content-Type'
|
|
1362
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1363
|
+
if !content_type.nil?
|
|
1364
|
+
header_params['Content-Type'] = content_type
|
|
1365
|
+
end
|
|
1366
|
+
|
|
1367
|
+
# form parameters
|
|
1368
|
+
form_params = opts[:form_params] || {}
|
|
1369
|
+
|
|
1370
|
+
# http body (model)
|
|
1371
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'auth_signup_anonymous_request'])
|
|
1372
|
+
|
|
1373
|
+
# return_type
|
|
1374
|
+
return_type = opts[:debug_return_type] || 'AuthTokenResponse'
|
|
1375
|
+
|
|
1376
|
+
# auth_names
|
|
1377
|
+
auth_names = opts[:debug_auth_names] || ['AnonKey']
|
|
1378
|
+
|
|
1379
|
+
new_options = opts.merge(
|
|
1380
|
+
:operation => :"AuthenticationApi.auth_signup_anonymous",
|
|
1381
|
+
:header_params => header_params,
|
|
1382
|
+
:query_params => query_params,
|
|
1383
|
+
:form_params => form_params,
|
|
1384
|
+
:body => post_body,
|
|
1385
|
+
:auth_names => auth_names,
|
|
1386
|
+
:return_type => return_type
|
|
1387
|
+
)
|
|
1388
|
+
|
|
1389
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1390
|
+
if @api_client.config.debugging
|
|
1391
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_signup_anonymous\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1392
|
+
end
|
|
1393
|
+
return data, status_code, headers
|
|
1394
|
+
end
|
|
1395
|
+
|
|
1396
|
+
# Unlink an identity from the current user
|
|
1397
|
+
# Removes a non-primary identity and its attached sign-in methods. Refused when the identity is the account's primary, its only identity, or when removing it would leave the account with no way to sign in.
|
|
1398
|
+
# @param identity_id [String] The identity ID to unlink
|
|
1399
|
+
# @param [Hash] opts the optional parameters
|
|
1400
|
+
# @return [nil]
|
|
1401
|
+
def auth_unlink_identity(identity_id, opts = {})
|
|
1402
|
+
auth_unlink_identity_with_http_info(identity_id, opts)
|
|
1403
|
+
nil
|
|
1404
|
+
end
|
|
1405
|
+
|
|
1406
|
+
# Unlink an identity from the current user
|
|
1407
|
+
# Removes a non-primary identity and its attached sign-in methods. Refused when the identity is the account's primary, its only identity, or when removing it would leave the account with no way to sign in.
|
|
1408
|
+
# @param identity_id [String] The identity ID to unlink
|
|
1409
|
+
# @param [Hash] opts the optional parameters
|
|
1410
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1411
|
+
def auth_unlink_identity_with_http_info(identity_id, opts = {})
|
|
1412
|
+
if @api_client.config.debugging
|
|
1413
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_unlink_identity ...'
|
|
1414
|
+
end
|
|
1415
|
+
# verify the required parameter 'identity_id' is set
|
|
1416
|
+
if @api_client.config.client_side_validation && identity_id.nil?
|
|
1417
|
+
fail ArgumentError, "Missing the required parameter 'identity_id' when calling AuthenticationApi.auth_unlink_identity"
|
|
1418
|
+
end
|
|
1419
|
+
# resource path
|
|
1420
|
+
local_var_path = '/auth/user/identities/{identityId}'.sub('{' + 'identityId' + '}', CGI.escape(identity_id.to_s))
|
|
1421
|
+
|
|
1422
|
+
# query parameters
|
|
1423
|
+
query_params = opts[:query_params] || {}
|
|
1424
|
+
|
|
1425
|
+
# header parameters
|
|
1426
|
+
header_params = opts[:header_params] || {}
|
|
1427
|
+
# HTTP header 'Accept' (if needed)
|
|
1428
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1429
|
+
|
|
1430
|
+
# form parameters
|
|
1431
|
+
form_params = opts[:form_params] || {}
|
|
1432
|
+
|
|
1433
|
+
# http body (model)
|
|
1434
|
+
post_body = opts[:debug_body]
|
|
1435
|
+
|
|
1436
|
+
# return_type
|
|
1437
|
+
return_type = opts[:debug_return_type]
|
|
1438
|
+
|
|
1439
|
+
# auth_names
|
|
1440
|
+
auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken']
|
|
1441
|
+
|
|
1442
|
+
new_options = opts.merge(
|
|
1443
|
+
:operation => :"AuthenticationApi.auth_unlink_identity",
|
|
1444
|
+
:header_params => header_params,
|
|
1445
|
+
:query_params => query_params,
|
|
1446
|
+
:form_params => form_params,
|
|
1447
|
+
:body => post_body,
|
|
1448
|
+
:auth_names => auth_names,
|
|
1449
|
+
:return_type => return_type
|
|
1450
|
+
)
|
|
1451
|
+
|
|
1452
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1453
|
+
if @api_client.config.debugging
|
|
1454
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_unlink_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1455
|
+
end
|
|
1456
|
+
return data, status_code, headers
|
|
1457
|
+
end
|
|
1458
|
+
|
|
1459
|
+
# Update user profile
|
|
1460
|
+
# Update password or metadata. Requires access token.
|
|
1461
|
+
# @param [Hash] opts the optional parameters
|
|
1462
|
+
# @option opts [AuthUpdateUserRequest] :auth_update_user_request
|
|
1463
|
+
# @return [AuthConvertAnonymous200Response]
|
|
1464
|
+
def auth_update_user(opts = {})
|
|
1465
|
+
data, _status_code, _headers = auth_update_user_with_http_info(opts)
|
|
1466
|
+
data
|
|
1467
|
+
end
|
|
1468
|
+
|
|
1469
|
+
# Update user profile
|
|
1470
|
+
# Update password or metadata. Requires access token.
|
|
1471
|
+
# @param [Hash] opts the optional parameters
|
|
1472
|
+
# @option opts [AuthUpdateUserRequest] :auth_update_user_request
|
|
1473
|
+
# @return [Array<(AuthConvertAnonymous200Response, Integer, Hash)>] AuthConvertAnonymous200Response data, response status code and response headers
|
|
1474
|
+
def auth_update_user_with_http_info(opts = {})
|
|
1475
|
+
if @api_client.config.debugging
|
|
1476
|
+
@api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_update_user ...'
|
|
1477
|
+
end
|
|
1478
|
+
# resource path
|
|
1479
|
+
local_var_path = '/auth/user'
|
|
1480
|
+
|
|
1481
|
+
# query parameters
|
|
1482
|
+
query_params = opts[:query_params] || {}
|
|
1483
|
+
|
|
1484
|
+
# header parameters
|
|
1485
|
+
header_params = opts[:header_params] || {}
|
|
1486
|
+
# HTTP header 'Accept' (if needed)
|
|
1487
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1488
|
+
# HTTP header 'Content-Type'
|
|
1489
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1490
|
+
if !content_type.nil?
|
|
1491
|
+
header_params['Content-Type'] = content_type
|
|
1492
|
+
end
|
|
1493
|
+
|
|
1494
|
+
# form parameters
|
|
1495
|
+
form_params = opts[:form_params] || {}
|
|
1496
|
+
|
|
1497
|
+
# http body (model)
|
|
1498
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'auth_update_user_request'])
|
|
1499
|
+
|
|
1500
|
+
# return_type
|
|
1501
|
+
return_type = opts[:debug_return_type] || 'AuthConvertAnonymous200Response'
|
|
1502
|
+
|
|
1503
|
+
# auth_names
|
|
1504
|
+
auth_names = opts[:debug_auth_names] || ['AuthUserAccessToken']
|
|
1505
|
+
|
|
1506
|
+
new_options = opts.merge(
|
|
1507
|
+
:operation => :"AuthenticationApi.auth_update_user",
|
|
1508
|
+
:header_params => header_params,
|
|
1509
|
+
:query_params => query_params,
|
|
1510
|
+
:form_params => form_params,
|
|
1511
|
+
:body => post_body,
|
|
1512
|
+
:auth_names => auth_names,
|
|
1513
|
+
:return_type => return_type
|
|
1514
|
+
)
|
|
1515
|
+
|
|
1516
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1517
|
+
if @api_client.config.debugging
|
|
1518
|
+
@api_client.config.logger.debug "API called: AuthenticationApi#auth_update_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1519
|
+
end
|
|
1520
|
+
return data, status_code, headers
|
|
1521
|
+
end
|
|
1522
|
+
end
|
|
1523
|
+
end
|