From ba0b25cb4bd2318922e355a57136eee27297ce16 Mon Sep 17 00:00:00 2001 From: Stanislav Novosad Date: Mon, 27 Oct 2025 16:26:37 -0600 Subject: [PATCH] Fern: regenerated Python SDK (#3829) --- skyvern/client/__init__.py | 1361 ++++-- skyvern/client/client.py | 2412 ++-------- skyvern/client/core/__init__.py | 96 +- skyvern/client/core/api_error.py | 18 +- skyvern/client/core/client_wrapper.py | 24 +- skyvern/client/core/force_multipart.py | 18 + skyvern/client/core/http_client.py | 96 +- skyvern/client/core/http_response.py | 55 + skyvern/client/core/http_sse/__init__.py | 42 + skyvern/client/core/http_sse/_api.py | 112 + skyvern/client/core/http_sse/_decoders.py | 61 + skyvern/client/core/http_sse/_exceptions.py | 7 + skyvern/client/core/http_sse/_models.py | 17 + skyvern/client/core/jsonable_encoder.py | 1 - skyvern/client/core/pydantic_utilities.py | 188 +- skyvern/client/core/serialization.py | 10 +- skyvern/client/errors/__init__.py | 42 +- skyvern/client/errors/bad_request_error.py | 7 +- skyvern/client/errors/forbidden_error.py | 7 +- skyvern/client/errors/not_found_error.py | 7 +- .../errors/unprocessable_entity_error.py | 7 +- skyvern/client/raw_client.py | 4066 +++++++++++++++++ skyvern/client/scripts/__init__.py | 2 + skyvern/client/scripts/client.py | 98 +- skyvern/client/scripts/raw_client.py | 126 + skyvern/client/types/__init__.py | 1424 ++++-- skyvern/client/types/action.py | 12 +- skyvern/client/types/action_block.py | 18 +- .../types/action_block_parameters_item.py | 14 +- skyvern/client/types/action_block_yaml.py | 6 +- skyvern/client/types/action_type.py | 1 + skyvern/client/types/artifact.py | 8 +- skyvern/client/types/aws_secret_parameter.py | 6 +- .../client/types/aws_secret_parameter_yaml.py | 4 +- .../client/types/azure_secret_parameter.py | 6 +- .../types/azure_vault_credential_parameter.py | 6 +- .../azure_vault_credential_parameter_yaml.py | 4 +- .../bitwarden_credit_card_data_parameter.py | 6 +- ...twarden_credit_card_data_parameter_yaml.py | 4 +- .../bitwarden_login_credential_parameter.py | 6 +- ...twarden_login_credential_parameter_yaml.py | 4 +- ...twarden_sensitive_information_parameter.py | 6 +- ...en_sensitive_information_parameter_yaml.py | 4 +- skyvern/client/types/block_type.py | 1 + .../client/types/browser_session_response.py | 10 +- skyvern/client/types/code_block.py | 16 +- .../types/code_block_parameters_item.py | 14 +- skyvern/client/types/code_block_yaml.py | 4 +- skyvern/client/types/context_parameter.py | 10 +- .../client/types/context_parameter_source.py | 14 +- .../client/types/context_parameter_yaml.py | 4 +- .../create_credential_request_credential.py | 3 +- .../client/types/create_script_response.py | 18 +- skyvern/client/types/credential_parameter.py | 6 +- .../client/types/credential_parameter_yaml.py | 4 +- skyvern/client/types/credential_response.py | 6 +- .../types/credential_response_credential.py | 3 +- .../types/credit_card_credential_response.py | 6 +- skyvern/client/types/download_to_s3block.py | 6 +- .../client/types/download_to_s3block_yaml.py | 4 +- skyvern/client/types/extraction_block.py | 18 +- .../types/extraction_block_parameters_item.py | 14 +- skyvern/client/types/extraction_block_yaml.py | 8 +- skyvern/client/types/file_download_block.py | 18 +- .../file_download_block_parameters_item.py | 14 +- .../client/types/file_download_block_yaml.py | 6 +- skyvern/client/types/file_info.py | 8 +- skyvern/client/types/file_node.py | 10 +- skyvern/client/types/file_parser_block.py | 8 +- .../client/types/file_parser_block_yaml.py | 6 +- skyvern/client/types/file_upload_block.py | 12 +- .../client/types/file_upload_block_yaml.py | 10 +- skyvern/client/types/for_loop_block.py | 14 +- .../types/for_loop_block_loop_blocks_item.py | 90 +- .../client/types/for_loop_block_loop_over.py | 14 +- skyvern/client/types/for_loop_block_yaml.py | 8 +- .../for_loop_block_yaml_loop_blocks_item.py | 45 +- skyvern/client/types/get_run_response.py | 17 +- skyvern/client/types/http_request_block.py | 16 +- .../http_request_block_parameters_item.py | 14 +- .../client/types/http_request_block_yaml.py | 4 +- skyvern/client/types/http_validation_error.py | 6 +- .../client/types/human_interaction_block.py | 75 + .../human_interaction_block_data_schema.py | 7 + ...human_interaction_block_parameters_item.py | 277 ++ .../types/human_interaction_block_yaml.py | 29 + .../client/types/input_or_select_context.py | 4 +- skyvern/client/types/login_block.py | 18 +- .../types/login_block_parameters_item.py | 14 +- skyvern/client/types/login_block_yaml.py | 6 +- skyvern/client/types/navigation_block.py | 18 +- .../types/navigation_block_parameters_item.py | 14 +- skyvern/client/types/navigation_block_yaml.py | 6 +- .../types/non_empty_credit_card_credential.py | 6 +- .../types/non_empty_password_credential.py | 6 +- .../one_password_credential_parameter.py | 6 +- .../one_password_credential_parameter_yaml.py | 4 +- skyvern/client/types/output_parameter.py | 6 +- skyvern/client/types/output_parameter_yaml.py | 4 +- .../types/password_credential_response.py | 6 +- skyvern/client/types/pdf_parser_block.py | 6 +- skyvern/client/types/pdf_parser_block_yaml.py | 4 +- skyvern/client/types/script.py | 8 +- skyvern/client/types/script_file_create.py | 6 +- skyvern/client/types/script_run_response.py | 4 +- skyvern/client/types/select_option.py | 4 +- skyvern/client/types/send_email_block.py | 8 +- skyvern/client/types/send_email_block_yaml.py | 4 +- skyvern/client/types/task_block.py | 16 +- .../types/task_block_parameters_item.py | 14 +- skyvern/client/types/task_block_yaml.py | 6 +- skyvern/client/types/task_run_request.py | 8 +- skyvern/client/types/task_run_response.py | 14 +- skyvern/client/types/task_v2block.py | 6 +- skyvern/client/types/task_v2block_yaml.py | 4 +- skyvern/client/types/text_prompt_block.py | 16 +- .../text_prompt_block_parameters_item.py | 14 +- .../client/types/text_prompt_block_yaml.py | 4 +- skyvern/client/types/thought.py | 10 +- skyvern/client/types/totp_code.py | 8 +- skyvern/client/types/upload_to_s3block.py | 6 +- .../client/types/upload_to_s3block_yaml.py | 4 +- skyvern/client/types/url_block.py | 16 +- .../client/types/url_block_parameters_item.py | 14 +- skyvern/client/types/url_block_yaml.py | 4 +- skyvern/client/types/user_defined_error.py | 4 +- skyvern/client/types/validation_block.py | 16 +- .../types/validation_block_parameters_item.py | 14 +- skyvern/client/types/validation_block_yaml.py | 4 +- skyvern/client/types/validation_error.py | 6 +- skyvern/client/types/wait_block.py | 16 +- .../types/wait_block_parameters_item.py | 14 +- skyvern/client/types/wait_block_yaml.py | 4 +- skyvern/client/types/workflow.py | 22 +- .../types/workflow_create_yaml_request.py | 14 +- skyvern/client/types/workflow_definition.py | 18 +- .../types/workflow_definition_blocks_item.py | 92 +- .../workflow_definition_parameters_item.py | 14 +- .../client/types/workflow_definition_yaml.py | 16 +- .../workflow_definition_yaml_blocks_item.py | 41 +- ...orkflow_definition_yaml_parameters_item.py | 5 +- skyvern/client/types/workflow_parameter.py | 10 +- .../client/types/workflow_parameter_yaml.py | 6 +- skyvern/client/types/workflow_request.py | 14 +- skyvern/client/types/workflow_run_block.py | 18 +- skyvern/client/types/workflow_run_request.py | 6 +- skyvern/client/types/workflow_run_response.py | 14 +- skyvern/client/types/workflow_run_timeline.py | 14 +- skyvern/library/skyvern.py | 1 - skyvern/library/skyvern_sdk.py | 1 - 150 files changed, 8305 insertions(+), 3701 deletions(-) create mode 100644 skyvern/client/core/force_multipart.py create mode 100644 skyvern/client/core/http_response.py create mode 100644 skyvern/client/core/http_sse/__init__.py create mode 100644 skyvern/client/core/http_sse/_api.py create mode 100644 skyvern/client/core/http_sse/_decoders.py create mode 100644 skyvern/client/core/http_sse/_exceptions.py create mode 100644 skyvern/client/core/http_sse/_models.py create mode 100644 skyvern/client/raw_client.py create mode 100644 skyvern/client/scripts/raw_client.py create mode 100644 skyvern/client/types/human_interaction_block.py create mode 100644 skyvern/client/types/human_interaction_block_data_schema.py create mode 100644 skyvern/client/types/human_interaction_block_parameters_item.py create mode 100644 skyvern/client/types/human_interaction_block_yaml.py diff --git a/skyvern/client/__init__.py b/skyvern/client/__init__.py index f186c57d..d94ef537 100644 --- a/skyvern/client/__init__.py +++ b/skyvern/client/__init__.py @@ -1,429 +1,923 @@ # This file was auto-generated by Fern from our API Definition. -from .types import ( - Action, - ActionBlock, - ActionBlockDataSchema, - ActionBlockParametersItem, - ActionBlockParametersItem_AwsSecret, - ActionBlockParametersItem_AzureSecret, - ActionBlockParametersItem_AzureVaultCredential, - ActionBlockParametersItem_BitwardenCreditCardData, - ActionBlockParametersItem_BitwardenLoginCredential, - ActionBlockParametersItem_BitwardenSensitiveInformation, - ActionBlockParametersItem_Context, - ActionBlockParametersItem_Credential, - ActionBlockParametersItem_Onepassword, - ActionBlockParametersItem_Output, - ActionBlockParametersItem_Workflow, - ActionBlockYaml, - ActionStatus, - ActionType, - Artifact, - ArtifactType, - AwsSecretParameter, - AwsSecretParameterYaml, - AzureSecretParameter, - AzureVaultCredentialParameter, - AzureVaultCredentialParameterYaml, - BitwardenCreditCardDataParameter, - BitwardenCreditCardDataParameterYaml, - BitwardenLoginCredentialParameter, - BitwardenLoginCredentialParameterYaml, - BitwardenSensitiveInformationParameter, - BitwardenSensitiveInformationParameterYaml, - BlockType, - BrowserSessionResponse, - CodeBlock, - CodeBlockParametersItem, - CodeBlockParametersItem_AwsSecret, - CodeBlockParametersItem_AzureSecret, - CodeBlockParametersItem_AzureVaultCredential, - CodeBlockParametersItem_BitwardenCreditCardData, - CodeBlockParametersItem_BitwardenLoginCredential, - CodeBlockParametersItem_BitwardenSensitiveInformation, - CodeBlockParametersItem_Context, - CodeBlockParametersItem_Credential, - CodeBlockParametersItem_Onepassword, - CodeBlockParametersItem_Output, - CodeBlockParametersItem_Workflow, - CodeBlockYaml, - ContextParameter, - ContextParameterSource, - ContextParameterSource_AwsSecret, - ContextParameterSource_AzureSecret, - ContextParameterSource_AzureVaultCredential, - ContextParameterSource_BitwardenCreditCardData, - ContextParameterSource_BitwardenLoginCredential, - ContextParameterSource_BitwardenSensitiveInformation, - ContextParameterSource_Context, - ContextParameterSource_Credential, - ContextParameterSource_Onepassword, - ContextParameterSource_Output, - ContextParameterSource_Workflow, - ContextParameterValue, - ContextParameterYaml, - CreateCredentialRequestCredential, - CreateScriptResponse, - CredentialParameter, - CredentialParameterYaml, - CredentialResponse, - CredentialResponseCredential, - CredentialTypeOutput, - CreditCardCredentialResponse, - DownloadToS3Block, - DownloadToS3BlockYaml, - ExtractionBlock, - ExtractionBlockDataSchema, - ExtractionBlockParametersItem, - ExtractionBlockParametersItem_AwsSecret, - ExtractionBlockParametersItem_AzureSecret, - ExtractionBlockParametersItem_AzureVaultCredential, - ExtractionBlockParametersItem_BitwardenCreditCardData, - ExtractionBlockParametersItem_BitwardenLoginCredential, - ExtractionBlockParametersItem_BitwardenSensitiveInformation, - ExtractionBlockParametersItem_Context, - ExtractionBlockParametersItem_Credential, - ExtractionBlockParametersItem_Onepassword, - ExtractionBlockParametersItem_Output, - ExtractionBlockParametersItem_Workflow, - ExtractionBlockYaml, - ExtractionBlockYamlDataSchema, - FileDownloadBlock, - FileDownloadBlockDataSchema, - FileDownloadBlockParametersItem, - FileDownloadBlockParametersItem_AwsSecret, - FileDownloadBlockParametersItem_AzureSecret, - FileDownloadBlockParametersItem_AzureVaultCredential, - FileDownloadBlockParametersItem_BitwardenCreditCardData, - FileDownloadBlockParametersItem_BitwardenLoginCredential, - FileDownloadBlockParametersItem_BitwardenSensitiveInformation, - FileDownloadBlockParametersItem_Context, - FileDownloadBlockParametersItem_Credential, - FileDownloadBlockParametersItem_Onepassword, - FileDownloadBlockParametersItem_Output, - FileDownloadBlockParametersItem_Workflow, - FileDownloadBlockYaml, - FileEncoding, - FileInfo, - FileNode, - FileParserBlock, - FileParserBlockYaml, - FileStorageType, - FileType, - FileUploadBlock, - FileUploadBlockYaml, - ForLoopBlock, - ForLoopBlockLoopBlocksItem, - ForLoopBlockLoopBlocksItem_Action, - ForLoopBlockLoopBlocksItem_Code, - ForLoopBlockLoopBlocksItem_DownloadToS3, - ForLoopBlockLoopBlocksItem_Extraction, - ForLoopBlockLoopBlocksItem_FileDownload, - ForLoopBlockLoopBlocksItem_FileUpload, - ForLoopBlockLoopBlocksItem_FileUrlParser, - ForLoopBlockLoopBlocksItem_ForLoop, - ForLoopBlockLoopBlocksItem_GotoUrl, - ForLoopBlockLoopBlocksItem_HttpRequest, - ForLoopBlockLoopBlocksItem_Login, - ForLoopBlockLoopBlocksItem_Navigation, - ForLoopBlockLoopBlocksItem_PdfParser, - ForLoopBlockLoopBlocksItem_SendEmail, - ForLoopBlockLoopBlocksItem_Task, - ForLoopBlockLoopBlocksItem_TaskV2, - ForLoopBlockLoopBlocksItem_TextPrompt, - ForLoopBlockLoopBlocksItem_UploadToS3, - ForLoopBlockLoopBlocksItem_Validation, - ForLoopBlockLoopBlocksItem_Wait, - ForLoopBlockLoopOver, - ForLoopBlockLoopOver_AwsSecret, - ForLoopBlockLoopOver_AzureSecret, - ForLoopBlockLoopOver_AzureVaultCredential, - ForLoopBlockLoopOver_BitwardenCreditCardData, - ForLoopBlockLoopOver_BitwardenLoginCredential, - ForLoopBlockLoopOver_BitwardenSensitiveInformation, - ForLoopBlockLoopOver_Context, - ForLoopBlockLoopOver_Credential, - ForLoopBlockLoopOver_Onepassword, - ForLoopBlockLoopOver_Output, - ForLoopBlockLoopOver_Workflow, - ForLoopBlockYaml, - ForLoopBlockYamlLoopBlocksItem, - ForLoopBlockYamlLoopBlocksItem_Action, - ForLoopBlockYamlLoopBlocksItem_Code, - ForLoopBlockYamlLoopBlocksItem_DownloadToS3, - ForLoopBlockYamlLoopBlocksItem_Extraction, - ForLoopBlockYamlLoopBlocksItem_FileDownload, - ForLoopBlockYamlLoopBlocksItem_FileUpload, - ForLoopBlockYamlLoopBlocksItem_FileUrlParser, - ForLoopBlockYamlLoopBlocksItem_ForLoop, - ForLoopBlockYamlLoopBlocksItem_GotoUrl, - ForLoopBlockYamlLoopBlocksItem_HttpRequest, - ForLoopBlockYamlLoopBlocksItem_Login, - ForLoopBlockYamlLoopBlocksItem_Navigation, - ForLoopBlockYamlLoopBlocksItem_PdfParser, - ForLoopBlockYamlLoopBlocksItem_SendEmail, - ForLoopBlockYamlLoopBlocksItem_Task, - ForLoopBlockYamlLoopBlocksItem_TaskV2, - ForLoopBlockYamlLoopBlocksItem_TextPrompt, - ForLoopBlockYamlLoopBlocksItem_UploadToS3, - ForLoopBlockYamlLoopBlocksItem_Validation, - ForLoopBlockYamlLoopBlocksItem_Wait, - GetRunResponse, - GetRunResponse_AnthropicCua, - GetRunResponse_OpenaiCua, - GetRunResponse_TaskV1, - GetRunResponse_TaskV2, - GetRunResponse_UiTars, - GetRunResponse_WorkflowRun, - HttpRequestBlock, - HttpRequestBlockParametersItem, - HttpRequestBlockParametersItem_AwsSecret, - HttpRequestBlockParametersItem_AzureSecret, - HttpRequestBlockParametersItem_AzureVaultCredential, - HttpRequestBlockParametersItem_BitwardenCreditCardData, - HttpRequestBlockParametersItem_BitwardenLoginCredential, - HttpRequestBlockParametersItem_BitwardenSensitiveInformation, - HttpRequestBlockParametersItem_Context, - HttpRequestBlockParametersItem_Credential, - HttpRequestBlockParametersItem_Onepassword, - HttpRequestBlockParametersItem_Output, - HttpRequestBlockParametersItem_Workflow, - HttpRequestBlockYaml, - HttpValidationError, - InputOrSelectContext, - LoginBlock, - LoginBlockDataSchema, - LoginBlockParametersItem, - LoginBlockParametersItem_AwsSecret, - LoginBlockParametersItem_AzureSecret, - LoginBlockParametersItem_AzureVaultCredential, - LoginBlockParametersItem_BitwardenCreditCardData, - LoginBlockParametersItem_BitwardenLoginCredential, - LoginBlockParametersItem_BitwardenSensitiveInformation, - LoginBlockParametersItem_Context, - LoginBlockParametersItem_Credential, - LoginBlockParametersItem_Onepassword, - LoginBlockParametersItem_Output, - LoginBlockParametersItem_Workflow, - LoginBlockYaml, - NavigationBlock, - NavigationBlockDataSchema, - NavigationBlockParametersItem, - NavigationBlockParametersItem_AwsSecret, - NavigationBlockParametersItem_AzureSecret, - NavigationBlockParametersItem_AzureVaultCredential, - NavigationBlockParametersItem_BitwardenCreditCardData, - NavigationBlockParametersItem_BitwardenLoginCredential, - NavigationBlockParametersItem_BitwardenSensitiveInformation, - NavigationBlockParametersItem_Context, - NavigationBlockParametersItem_Credential, - NavigationBlockParametersItem_Onepassword, - NavigationBlockParametersItem_Output, - NavigationBlockParametersItem_Workflow, - NavigationBlockYaml, - NonEmptyCreditCardCredential, - NonEmptyPasswordCredential, - OnePasswordCredentialParameter, - OnePasswordCredentialParameterYaml, - OtpType, - OutputParameter, - OutputParameterYaml, - PasswordCredentialResponse, - PdfParserBlock, - PdfParserBlockYaml, - ProxyLocation, - RunEngine, - RunStatus, - Script, - ScriptFileCreate, - ScriptRunResponse, - SelectOption, - SendEmailBlock, - SendEmailBlockYaml, - SkyvernForgeSdkSchemasCredentialsCredentialType, - SkyvernSchemasRunBlocksCredentialType, - TaskBlock, - TaskBlockDataSchema, - TaskBlockParametersItem, - TaskBlockParametersItem_AwsSecret, - TaskBlockParametersItem_AzureSecret, - TaskBlockParametersItem_AzureVaultCredential, - TaskBlockParametersItem_BitwardenCreditCardData, - TaskBlockParametersItem_BitwardenLoginCredential, - TaskBlockParametersItem_BitwardenSensitiveInformation, - TaskBlockParametersItem_Context, - TaskBlockParametersItem_Credential, - TaskBlockParametersItem_Onepassword, - TaskBlockParametersItem_Output, - TaskBlockParametersItem_Workflow, - TaskBlockYaml, - TaskBlockYamlDataSchema, - TaskRunRequest, - TaskRunRequestDataExtractionSchema, - TaskRunResponse, - TaskRunResponseOutput, - TaskV2Block, - TaskV2BlockYaml, - TextPromptBlock, - TextPromptBlockParametersItem, - TextPromptBlockParametersItem_AwsSecret, - TextPromptBlockParametersItem_AzureSecret, - TextPromptBlockParametersItem_AzureVaultCredential, - TextPromptBlockParametersItem_BitwardenCreditCardData, - TextPromptBlockParametersItem_BitwardenLoginCredential, - TextPromptBlockParametersItem_BitwardenSensitiveInformation, - TextPromptBlockParametersItem_Context, - TextPromptBlockParametersItem_Credential, - TextPromptBlockParametersItem_Onepassword, - TextPromptBlockParametersItem_Output, - TextPromptBlockParametersItem_Workflow, - TextPromptBlockYaml, - Thought, - ThoughtScenario, - ThoughtType, - TotpCode, - TotpType, - UploadToS3Block, - UploadToS3BlockYaml, - UrlBlock, - UrlBlockDataSchema, - UrlBlockParametersItem, - UrlBlockParametersItem_AwsSecret, - UrlBlockParametersItem_AzureSecret, - UrlBlockParametersItem_AzureVaultCredential, - UrlBlockParametersItem_BitwardenCreditCardData, - UrlBlockParametersItem_BitwardenLoginCredential, - UrlBlockParametersItem_BitwardenSensitiveInformation, - UrlBlockParametersItem_Context, - UrlBlockParametersItem_Credential, - UrlBlockParametersItem_Onepassword, - UrlBlockParametersItem_Output, - UrlBlockParametersItem_Workflow, - UrlBlockYaml, - UserDefinedError, - ValidationBlock, - ValidationBlockDataSchema, - ValidationBlockParametersItem, - ValidationBlockParametersItem_AwsSecret, - ValidationBlockParametersItem_AzureSecret, - ValidationBlockParametersItem_AzureVaultCredential, - ValidationBlockParametersItem_BitwardenCreditCardData, - ValidationBlockParametersItem_BitwardenLoginCredential, - ValidationBlockParametersItem_BitwardenSensitiveInformation, - ValidationBlockParametersItem_Context, - ValidationBlockParametersItem_Credential, - ValidationBlockParametersItem_Onepassword, - ValidationBlockParametersItem_Output, - ValidationBlockParametersItem_Workflow, - ValidationBlockYaml, - ValidationError, - ValidationErrorLocItem, - WaitBlock, - WaitBlockParametersItem, - WaitBlockParametersItem_AwsSecret, - WaitBlockParametersItem_AzureSecret, - WaitBlockParametersItem_AzureVaultCredential, - WaitBlockParametersItem_BitwardenCreditCardData, - WaitBlockParametersItem_BitwardenLoginCredential, - WaitBlockParametersItem_BitwardenSensitiveInformation, - WaitBlockParametersItem_Context, - WaitBlockParametersItem_Credential, - WaitBlockParametersItem_Onepassword, - WaitBlockParametersItem_Output, - WaitBlockParametersItem_Workflow, - WaitBlockYaml, - Workflow, - WorkflowCreateYamlRequest, - WorkflowDefinition, - WorkflowDefinitionBlocksItem, - WorkflowDefinitionBlocksItem_Action, - WorkflowDefinitionBlocksItem_Code, - WorkflowDefinitionBlocksItem_DownloadToS3, - WorkflowDefinitionBlocksItem_Extraction, - WorkflowDefinitionBlocksItem_FileDownload, - WorkflowDefinitionBlocksItem_FileUpload, - WorkflowDefinitionBlocksItem_FileUrlParser, - WorkflowDefinitionBlocksItem_ForLoop, - WorkflowDefinitionBlocksItem_GotoUrl, - WorkflowDefinitionBlocksItem_HttpRequest, - WorkflowDefinitionBlocksItem_Login, - WorkflowDefinitionBlocksItem_Navigation, - WorkflowDefinitionBlocksItem_PdfParser, - WorkflowDefinitionBlocksItem_SendEmail, - WorkflowDefinitionBlocksItem_Task, - WorkflowDefinitionBlocksItem_TaskV2, - WorkflowDefinitionBlocksItem_TextPrompt, - WorkflowDefinitionBlocksItem_UploadToS3, - WorkflowDefinitionBlocksItem_Validation, - WorkflowDefinitionBlocksItem_Wait, - WorkflowDefinitionParametersItem, - WorkflowDefinitionParametersItem_AwsSecret, - WorkflowDefinitionParametersItem_AzureSecret, - WorkflowDefinitionParametersItem_AzureVaultCredential, - WorkflowDefinitionParametersItem_BitwardenCreditCardData, - WorkflowDefinitionParametersItem_BitwardenLoginCredential, - WorkflowDefinitionParametersItem_BitwardenSensitiveInformation, - WorkflowDefinitionParametersItem_Context, - WorkflowDefinitionParametersItem_Credential, - WorkflowDefinitionParametersItem_Onepassword, - WorkflowDefinitionParametersItem_Output, - WorkflowDefinitionParametersItem_Workflow, - WorkflowDefinitionYaml, - WorkflowDefinitionYamlBlocksItem, - WorkflowDefinitionYamlBlocksItem_Action, - WorkflowDefinitionYamlBlocksItem_Code, - WorkflowDefinitionYamlBlocksItem_DownloadToS3, - WorkflowDefinitionYamlBlocksItem_Extraction, - WorkflowDefinitionYamlBlocksItem_FileDownload, - WorkflowDefinitionYamlBlocksItem_FileUpload, - WorkflowDefinitionYamlBlocksItem_FileUrlParser, - WorkflowDefinitionYamlBlocksItem_ForLoop, - WorkflowDefinitionYamlBlocksItem_GotoUrl, - WorkflowDefinitionYamlBlocksItem_HttpRequest, - WorkflowDefinitionYamlBlocksItem_Login, - WorkflowDefinitionYamlBlocksItem_Navigation, - WorkflowDefinitionYamlBlocksItem_PdfParser, - WorkflowDefinitionYamlBlocksItem_SendEmail, - WorkflowDefinitionYamlBlocksItem_Task, - WorkflowDefinitionYamlBlocksItem_TaskV2, - WorkflowDefinitionYamlBlocksItem_TextPrompt, - WorkflowDefinitionYamlBlocksItem_UploadToS3, - WorkflowDefinitionYamlBlocksItem_Validation, - WorkflowDefinitionYamlBlocksItem_Wait, - WorkflowDefinitionYamlParametersItem, - WorkflowDefinitionYamlParametersItem_AwsSecret, - WorkflowDefinitionYamlParametersItem_AzureVaultCredential, - WorkflowDefinitionYamlParametersItem_BitwardenCreditCardData, - WorkflowDefinitionYamlParametersItem_BitwardenLoginCredential, - WorkflowDefinitionYamlParametersItem_BitwardenSensitiveInformation, - WorkflowDefinitionYamlParametersItem_Context, - WorkflowDefinitionYamlParametersItem_Credential, - WorkflowDefinitionYamlParametersItem_Onepassword, - WorkflowDefinitionYamlParametersItem_Output, - WorkflowDefinitionYamlParametersItem_Workflow, - WorkflowParameter, - WorkflowParameterDefaultValue, - WorkflowParameterType, - WorkflowParameterYaml, - WorkflowParameterYamlDefaultValue, - WorkflowRequest, - WorkflowRunBlock, - WorkflowRunBlockDataSchema, - WorkflowRunBlockNavigationPayload, - WorkflowRunBlockOutput, - WorkflowRunRequest, - WorkflowRunResponse, - WorkflowRunResponseOutput, - WorkflowRunTimeline, - WorkflowRunTimelineType, - WorkflowStatus, -) -from .errors import BadRequestError, ForbiddenError, NotFoundError, UnprocessableEntityError -from . import scripts -from .client import AsyncSkyvern, Skyvern -from .environment import SkyvernEnvironment -from .version import __version__ +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + Action, + ActionBlock, + ActionBlockDataSchema, + ActionBlockParametersItem, + ActionBlockParametersItem_AwsSecret, + ActionBlockParametersItem_AzureSecret, + ActionBlockParametersItem_AzureVaultCredential, + ActionBlockParametersItem_BitwardenCreditCardData, + ActionBlockParametersItem_BitwardenLoginCredential, + ActionBlockParametersItem_BitwardenSensitiveInformation, + ActionBlockParametersItem_Context, + ActionBlockParametersItem_Credential, + ActionBlockParametersItem_Onepassword, + ActionBlockParametersItem_Output, + ActionBlockParametersItem_Workflow, + ActionBlockYaml, + ActionStatus, + ActionType, + Artifact, + ArtifactType, + AwsSecretParameter, + AwsSecretParameterYaml, + AzureSecretParameter, + AzureVaultCredentialParameter, + AzureVaultCredentialParameterYaml, + BitwardenCreditCardDataParameter, + BitwardenCreditCardDataParameterYaml, + BitwardenLoginCredentialParameter, + BitwardenLoginCredentialParameterYaml, + BitwardenSensitiveInformationParameter, + BitwardenSensitiveInformationParameterYaml, + BlockType, + BrowserSessionResponse, + CodeBlock, + CodeBlockParametersItem, + CodeBlockParametersItem_AwsSecret, + CodeBlockParametersItem_AzureSecret, + CodeBlockParametersItem_AzureVaultCredential, + CodeBlockParametersItem_BitwardenCreditCardData, + CodeBlockParametersItem_BitwardenLoginCredential, + CodeBlockParametersItem_BitwardenSensitiveInformation, + CodeBlockParametersItem_Context, + CodeBlockParametersItem_Credential, + CodeBlockParametersItem_Onepassword, + CodeBlockParametersItem_Output, + CodeBlockParametersItem_Workflow, + CodeBlockYaml, + ContextParameter, + ContextParameterSource, + ContextParameterSource_AwsSecret, + ContextParameterSource_AzureSecret, + ContextParameterSource_AzureVaultCredential, + ContextParameterSource_BitwardenCreditCardData, + ContextParameterSource_BitwardenLoginCredential, + ContextParameterSource_BitwardenSensitiveInformation, + ContextParameterSource_Context, + ContextParameterSource_Credential, + ContextParameterSource_Onepassword, + ContextParameterSource_Output, + ContextParameterSource_Workflow, + ContextParameterValue, + ContextParameterYaml, + CreateCredentialRequestCredential, + CreateScriptResponse, + CredentialParameter, + CredentialParameterYaml, + CredentialResponse, + CredentialResponseCredential, + CredentialTypeOutput, + CreditCardCredentialResponse, + DownloadToS3Block, + DownloadToS3BlockYaml, + ExtractionBlock, + ExtractionBlockDataSchema, + ExtractionBlockParametersItem, + ExtractionBlockParametersItem_AwsSecret, + ExtractionBlockParametersItem_AzureSecret, + ExtractionBlockParametersItem_AzureVaultCredential, + ExtractionBlockParametersItem_BitwardenCreditCardData, + ExtractionBlockParametersItem_BitwardenLoginCredential, + ExtractionBlockParametersItem_BitwardenSensitiveInformation, + ExtractionBlockParametersItem_Context, + ExtractionBlockParametersItem_Credential, + ExtractionBlockParametersItem_Onepassword, + ExtractionBlockParametersItem_Output, + ExtractionBlockParametersItem_Workflow, + ExtractionBlockYaml, + ExtractionBlockYamlDataSchema, + FileDownloadBlock, + FileDownloadBlockDataSchema, + FileDownloadBlockParametersItem, + FileDownloadBlockParametersItem_AwsSecret, + FileDownloadBlockParametersItem_AzureSecret, + FileDownloadBlockParametersItem_AzureVaultCredential, + FileDownloadBlockParametersItem_BitwardenCreditCardData, + FileDownloadBlockParametersItem_BitwardenLoginCredential, + FileDownloadBlockParametersItem_BitwardenSensitiveInformation, + FileDownloadBlockParametersItem_Context, + FileDownloadBlockParametersItem_Credential, + FileDownloadBlockParametersItem_Onepassword, + FileDownloadBlockParametersItem_Output, + FileDownloadBlockParametersItem_Workflow, + FileDownloadBlockYaml, + FileEncoding, + FileInfo, + FileNode, + FileParserBlock, + FileParserBlockYaml, + FileStorageType, + FileType, + FileUploadBlock, + FileUploadBlockYaml, + ForLoopBlock, + ForLoopBlockLoopBlocksItem, + ForLoopBlockLoopBlocksItem_Action, + ForLoopBlockLoopBlocksItem_Code, + ForLoopBlockLoopBlocksItem_DownloadToS3, + ForLoopBlockLoopBlocksItem_Extraction, + ForLoopBlockLoopBlocksItem_FileDownload, + ForLoopBlockLoopBlocksItem_FileUpload, + ForLoopBlockLoopBlocksItem_FileUrlParser, + ForLoopBlockLoopBlocksItem_ForLoop, + ForLoopBlockLoopBlocksItem_GotoUrl, + ForLoopBlockLoopBlocksItem_HttpRequest, + ForLoopBlockLoopBlocksItem_HumanInteraction, + ForLoopBlockLoopBlocksItem_Login, + ForLoopBlockLoopBlocksItem_Navigation, + ForLoopBlockLoopBlocksItem_PdfParser, + ForLoopBlockLoopBlocksItem_SendEmail, + ForLoopBlockLoopBlocksItem_Task, + ForLoopBlockLoopBlocksItem_TaskV2, + ForLoopBlockLoopBlocksItem_TextPrompt, + ForLoopBlockLoopBlocksItem_UploadToS3, + ForLoopBlockLoopBlocksItem_Validation, + ForLoopBlockLoopBlocksItem_Wait, + ForLoopBlockLoopOver, + ForLoopBlockLoopOver_AwsSecret, + ForLoopBlockLoopOver_AzureSecret, + ForLoopBlockLoopOver_AzureVaultCredential, + ForLoopBlockLoopOver_BitwardenCreditCardData, + ForLoopBlockLoopOver_BitwardenLoginCredential, + ForLoopBlockLoopOver_BitwardenSensitiveInformation, + ForLoopBlockLoopOver_Context, + ForLoopBlockLoopOver_Credential, + ForLoopBlockLoopOver_Onepassword, + ForLoopBlockLoopOver_Output, + ForLoopBlockLoopOver_Workflow, + ForLoopBlockYaml, + ForLoopBlockYamlLoopBlocksItem, + ForLoopBlockYamlLoopBlocksItem_Action, + ForLoopBlockYamlLoopBlocksItem_Code, + ForLoopBlockYamlLoopBlocksItem_DownloadToS3, + ForLoopBlockYamlLoopBlocksItem_Extraction, + ForLoopBlockYamlLoopBlocksItem_FileDownload, + ForLoopBlockYamlLoopBlocksItem_FileUpload, + ForLoopBlockYamlLoopBlocksItem_FileUrlParser, + ForLoopBlockYamlLoopBlocksItem_ForLoop, + ForLoopBlockYamlLoopBlocksItem_GotoUrl, + ForLoopBlockYamlLoopBlocksItem_HttpRequest, + ForLoopBlockYamlLoopBlocksItem_HumanInteraction, + ForLoopBlockYamlLoopBlocksItem_Login, + ForLoopBlockYamlLoopBlocksItem_Navigation, + ForLoopBlockYamlLoopBlocksItem_PdfParser, + ForLoopBlockYamlLoopBlocksItem_SendEmail, + ForLoopBlockYamlLoopBlocksItem_Task, + ForLoopBlockYamlLoopBlocksItem_TaskV2, + ForLoopBlockYamlLoopBlocksItem_TextPrompt, + ForLoopBlockYamlLoopBlocksItem_UploadToS3, + ForLoopBlockYamlLoopBlocksItem_Validation, + ForLoopBlockYamlLoopBlocksItem_Wait, + GetRunResponse, + GetRunResponse_AnthropicCua, + GetRunResponse_OpenaiCua, + GetRunResponse_TaskV1, + GetRunResponse_TaskV2, + GetRunResponse_UiTars, + GetRunResponse_WorkflowRun, + HttpRequestBlock, + HttpRequestBlockParametersItem, + HttpRequestBlockParametersItem_AwsSecret, + HttpRequestBlockParametersItem_AzureSecret, + HttpRequestBlockParametersItem_AzureVaultCredential, + HttpRequestBlockParametersItem_BitwardenCreditCardData, + HttpRequestBlockParametersItem_BitwardenLoginCredential, + HttpRequestBlockParametersItem_BitwardenSensitiveInformation, + HttpRequestBlockParametersItem_Context, + HttpRequestBlockParametersItem_Credential, + HttpRequestBlockParametersItem_Onepassword, + HttpRequestBlockParametersItem_Output, + HttpRequestBlockParametersItem_Workflow, + HttpRequestBlockYaml, + HttpValidationError, + HumanInteractionBlock, + HumanInteractionBlockDataSchema, + HumanInteractionBlockParametersItem, + HumanInteractionBlockParametersItem_AwsSecret, + HumanInteractionBlockParametersItem_AzureSecret, + HumanInteractionBlockParametersItem_AzureVaultCredential, + HumanInteractionBlockParametersItem_BitwardenCreditCardData, + HumanInteractionBlockParametersItem_BitwardenLoginCredential, + HumanInteractionBlockParametersItem_BitwardenSensitiveInformation, + HumanInteractionBlockParametersItem_Context, + HumanInteractionBlockParametersItem_Credential, + HumanInteractionBlockParametersItem_Onepassword, + HumanInteractionBlockParametersItem_Output, + HumanInteractionBlockParametersItem_Workflow, + HumanInteractionBlockYaml, + InputOrSelectContext, + LoginBlock, + LoginBlockDataSchema, + LoginBlockParametersItem, + LoginBlockParametersItem_AwsSecret, + LoginBlockParametersItem_AzureSecret, + LoginBlockParametersItem_AzureVaultCredential, + LoginBlockParametersItem_BitwardenCreditCardData, + LoginBlockParametersItem_BitwardenLoginCredential, + LoginBlockParametersItem_BitwardenSensitiveInformation, + LoginBlockParametersItem_Context, + LoginBlockParametersItem_Credential, + LoginBlockParametersItem_Onepassword, + LoginBlockParametersItem_Output, + LoginBlockParametersItem_Workflow, + LoginBlockYaml, + NavigationBlock, + NavigationBlockDataSchema, + NavigationBlockParametersItem, + NavigationBlockParametersItem_AwsSecret, + NavigationBlockParametersItem_AzureSecret, + NavigationBlockParametersItem_AzureVaultCredential, + NavigationBlockParametersItem_BitwardenCreditCardData, + NavigationBlockParametersItem_BitwardenLoginCredential, + NavigationBlockParametersItem_BitwardenSensitiveInformation, + NavigationBlockParametersItem_Context, + NavigationBlockParametersItem_Credential, + NavigationBlockParametersItem_Onepassword, + NavigationBlockParametersItem_Output, + NavigationBlockParametersItem_Workflow, + NavigationBlockYaml, + NonEmptyCreditCardCredential, + NonEmptyPasswordCredential, + OnePasswordCredentialParameter, + OnePasswordCredentialParameterYaml, + OtpType, + OutputParameter, + OutputParameterYaml, + PasswordCredentialResponse, + PdfParserBlock, + PdfParserBlockYaml, + ProxyLocation, + RunEngine, + RunStatus, + Script, + ScriptFileCreate, + ScriptRunResponse, + SelectOption, + SendEmailBlock, + SendEmailBlockYaml, + SkyvernForgeSdkSchemasCredentialsCredentialType, + SkyvernSchemasRunBlocksCredentialType, + TaskBlock, + TaskBlockDataSchema, + TaskBlockParametersItem, + TaskBlockParametersItem_AwsSecret, + TaskBlockParametersItem_AzureSecret, + TaskBlockParametersItem_AzureVaultCredential, + TaskBlockParametersItem_BitwardenCreditCardData, + TaskBlockParametersItem_BitwardenLoginCredential, + TaskBlockParametersItem_BitwardenSensitiveInformation, + TaskBlockParametersItem_Context, + TaskBlockParametersItem_Credential, + TaskBlockParametersItem_Onepassword, + TaskBlockParametersItem_Output, + TaskBlockParametersItem_Workflow, + TaskBlockYaml, + TaskBlockYamlDataSchema, + TaskRunRequest, + TaskRunRequestDataExtractionSchema, + TaskRunResponse, + TaskRunResponseOutput, + TaskV2Block, + TaskV2BlockYaml, + TextPromptBlock, + TextPromptBlockParametersItem, + TextPromptBlockParametersItem_AwsSecret, + TextPromptBlockParametersItem_AzureSecret, + TextPromptBlockParametersItem_AzureVaultCredential, + TextPromptBlockParametersItem_BitwardenCreditCardData, + TextPromptBlockParametersItem_BitwardenLoginCredential, + TextPromptBlockParametersItem_BitwardenSensitiveInformation, + TextPromptBlockParametersItem_Context, + TextPromptBlockParametersItem_Credential, + TextPromptBlockParametersItem_Onepassword, + TextPromptBlockParametersItem_Output, + TextPromptBlockParametersItem_Workflow, + TextPromptBlockYaml, + Thought, + ThoughtScenario, + ThoughtType, + TotpCode, + TotpType, + UploadToS3Block, + UploadToS3BlockYaml, + UrlBlock, + UrlBlockDataSchema, + UrlBlockParametersItem, + UrlBlockParametersItem_AwsSecret, + UrlBlockParametersItem_AzureSecret, + UrlBlockParametersItem_AzureVaultCredential, + UrlBlockParametersItem_BitwardenCreditCardData, + UrlBlockParametersItem_BitwardenLoginCredential, + UrlBlockParametersItem_BitwardenSensitiveInformation, + UrlBlockParametersItem_Context, + UrlBlockParametersItem_Credential, + UrlBlockParametersItem_Onepassword, + UrlBlockParametersItem_Output, + UrlBlockParametersItem_Workflow, + UrlBlockYaml, + UserDefinedError, + ValidationBlock, + ValidationBlockDataSchema, + ValidationBlockParametersItem, + ValidationBlockParametersItem_AwsSecret, + ValidationBlockParametersItem_AzureSecret, + ValidationBlockParametersItem_AzureVaultCredential, + ValidationBlockParametersItem_BitwardenCreditCardData, + ValidationBlockParametersItem_BitwardenLoginCredential, + ValidationBlockParametersItem_BitwardenSensitiveInformation, + ValidationBlockParametersItem_Context, + ValidationBlockParametersItem_Credential, + ValidationBlockParametersItem_Onepassword, + ValidationBlockParametersItem_Output, + ValidationBlockParametersItem_Workflow, + ValidationBlockYaml, + ValidationError, + ValidationErrorLocItem, + WaitBlock, + WaitBlockParametersItem, + WaitBlockParametersItem_AwsSecret, + WaitBlockParametersItem_AzureSecret, + WaitBlockParametersItem_AzureVaultCredential, + WaitBlockParametersItem_BitwardenCreditCardData, + WaitBlockParametersItem_BitwardenLoginCredential, + WaitBlockParametersItem_BitwardenSensitiveInformation, + WaitBlockParametersItem_Context, + WaitBlockParametersItem_Credential, + WaitBlockParametersItem_Onepassword, + WaitBlockParametersItem_Output, + WaitBlockParametersItem_Workflow, + WaitBlockYaml, + Workflow, + WorkflowCreateYamlRequest, + WorkflowDefinition, + WorkflowDefinitionBlocksItem, + WorkflowDefinitionBlocksItem_Action, + WorkflowDefinitionBlocksItem_Code, + WorkflowDefinitionBlocksItem_DownloadToS3, + WorkflowDefinitionBlocksItem_Extraction, + WorkflowDefinitionBlocksItem_FileDownload, + WorkflowDefinitionBlocksItem_FileUpload, + WorkflowDefinitionBlocksItem_FileUrlParser, + WorkflowDefinitionBlocksItem_ForLoop, + WorkflowDefinitionBlocksItem_GotoUrl, + WorkflowDefinitionBlocksItem_HttpRequest, + WorkflowDefinitionBlocksItem_HumanInteraction, + WorkflowDefinitionBlocksItem_Login, + WorkflowDefinitionBlocksItem_Navigation, + WorkflowDefinitionBlocksItem_PdfParser, + WorkflowDefinitionBlocksItem_SendEmail, + WorkflowDefinitionBlocksItem_Task, + WorkflowDefinitionBlocksItem_TaskV2, + WorkflowDefinitionBlocksItem_TextPrompt, + WorkflowDefinitionBlocksItem_UploadToS3, + WorkflowDefinitionBlocksItem_Validation, + WorkflowDefinitionBlocksItem_Wait, + WorkflowDefinitionParametersItem, + WorkflowDefinitionParametersItem_AwsSecret, + WorkflowDefinitionParametersItem_AzureSecret, + WorkflowDefinitionParametersItem_AzureVaultCredential, + WorkflowDefinitionParametersItem_BitwardenCreditCardData, + WorkflowDefinitionParametersItem_BitwardenLoginCredential, + WorkflowDefinitionParametersItem_BitwardenSensitiveInformation, + WorkflowDefinitionParametersItem_Context, + WorkflowDefinitionParametersItem_Credential, + WorkflowDefinitionParametersItem_Onepassword, + WorkflowDefinitionParametersItem_Output, + WorkflowDefinitionParametersItem_Workflow, + WorkflowDefinitionYaml, + WorkflowDefinitionYamlBlocksItem, + WorkflowDefinitionYamlBlocksItem_Action, + WorkflowDefinitionYamlBlocksItem_Code, + WorkflowDefinitionYamlBlocksItem_DownloadToS3, + WorkflowDefinitionYamlBlocksItem_Extraction, + WorkflowDefinitionYamlBlocksItem_FileDownload, + WorkflowDefinitionYamlBlocksItem_FileUpload, + WorkflowDefinitionYamlBlocksItem_FileUrlParser, + WorkflowDefinitionYamlBlocksItem_ForLoop, + WorkflowDefinitionYamlBlocksItem_GotoUrl, + WorkflowDefinitionYamlBlocksItem_HttpRequest, + WorkflowDefinitionYamlBlocksItem_HumanInteraction, + WorkflowDefinitionYamlBlocksItem_Login, + WorkflowDefinitionYamlBlocksItem_Navigation, + WorkflowDefinitionYamlBlocksItem_PdfParser, + WorkflowDefinitionYamlBlocksItem_SendEmail, + WorkflowDefinitionYamlBlocksItem_Task, + WorkflowDefinitionYamlBlocksItem_TaskV2, + WorkflowDefinitionYamlBlocksItem_TextPrompt, + WorkflowDefinitionYamlBlocksItem_UploadToS3, + WorkflowDefinitionYamlBlocksItem_Validation, + WorkflowDefinitionYamlBlocksItem_Wait, + WorkflowDefinitionYamlParametersItem, + WorkflowDefinitionYamlParametersItem_AwsSecret, + WorkflowDefinitionYamlParametersItem_AzureVaultCredential, + WorkflowDefinitionYamlParametersItem_BitwardenCreditCardData, + WorkflowDefinitionYamlParametersItem_BitwardenLoginCredential, + WorkflowDefinitionYamlParametersItem_BitwardenSensitiveInformation, + WorkflowDefinitionYamlParametersItem_Context, + WorkflowDefinitionYamlParametersItem_Credential, + WorkflowDefinitionYamlParametersItem_Onepassword, + WorkflowDefinitionYamlParametersItem_Output, + WorkflowDefinitionYamlParametersItem_Workflow, + WorkflowParameter, + WorkflowParameterDefaultValue, + WorkflowParameterType, + WorkflowParameterYaml, + WorkflowParameterYamlDefaultValue, + WorkflowRequest, + WorkflowRunBlock, + WorkflowRunBlockDataSchema, + WorkflowRunBlockNavigationPayload, + WorkflowRunBlockOutput, + WorkflowRunRequest, + WorkflowRunResponse, + WorkflowRunResponseOutput, + WorkflowRunTimeline, + WorkflowRunTimelineType, + WorkflowStatus, + ) + from .errors import BadRequestError, ForbiddenError, NotFoundError, UnprocessableEntityError + from . import scripts + from .client import AsyncSkyvern, Skyvern + from .environment import SkyvernEnvironment + from .version import __version__ +_dynamic_imports: typing.Dict[str, str] = { + "Action": ".types", + "ActionBlock": ".types", + "ActionBlockDataSchema": ".types", + "ActionBlockParametersItem": ".types", + "ActionBlockParametersItem_AwsSecret": ".types", + "ActionBlockParametersItem_AzureSecret": ".types", + "ActionBlockParametersItem_AzureVaultCredential": ".types", + "ActionBlockParametersItem_BitwardenCreditCardData": ".types", + "ActionBlockParametersItem_BitwardenLoginCredential": ".types", + "ActionBlockParametersItem_BitwardenSensitiveInformation": ".types", + "ActionBlockParametersItem_Context": ".types", + "ActionBlockParametersItem_Credential": ".types", + "ActionBlockParametersItem_Onepassword": ".types", + "ActionBlockParametersItem_Output": ".types", + "ActionBlockParametersItem_Workflow": ".types", + "ActionBlockYaml": ".types", + "ActionStatus": ".types", + "ActionType": ".types", + "Artifact": ".types", + "ArtifactType": ".types", + "AsyncSkyvern": ".client", + "AwsSecretParameter": ".types", + "AwsSecretParameterYaml": ".types", + "AzureSecretParameter": ".types", + "AzureVaultCredentialParameter": ".types", + "AzureVaultCredentialParameterYaml": ".types", + "BadRequestError": ".errors", + "BitwardenCreditCardDataParameter": ".types", + "BitwardenCreditCardDataParameterYaml": ".types", + "BitwardenLoginCredentialParameter": ".types", + "BitwardenLoginCredentialParameterYaml": ".types", + "BitwardenSensitiveInformationParameter": ".types", + "BitwardenSensitiveInformationParameterYaml": ".types", + "BlockType": ".types", + "BrowserSessionResponse": ".types", + "CodeBlock": ".types", + "CodeBlockParametersItem": ".types", + "CodeBlockParametersItem_AwsSecret": ".types", + "CodeBlockParametersItem_AzureSecret": ".types", + "CodeBlockParametersItem_AzureVaultCredential": ".types", + "CodeBlockParametersItem_BitwardenCreditCardData": ".types", + "CodeBlockParametersItem_BitwardenLoginCredential": ".types", + "CodeBlockParametersItem_BitwardenSensitiveInformation": ".types", + "CodeBlockParametersItem_Context": ".types", + "CodeBlockParametersItem_Credential": ".types", + "CodeBlockParametersItem_Onepassword": ".types", + "CodeBlockParametersItem_Output": ".types", + "CodeBlockParametersItem_Workflow": ".types", + "CodeBlockYaml": ".types", + "ContextParameter": ".types", + "ContextParameterSource": ".types", + "ContextParameterSource_AwsSecret": ".types", + "ContextParameterSource_AzureSecret": ".types", + "ContextParameterSource_AzureVaultCredential": ".types", + "ContextParameterSource_BitwardenCreditCardData": ".types", + "ContextParameterSource_BitwardenLoginCredential": ".types", + "ContextParameterSource_BitwardenSensitiveInformation": ".types", + "ContextParameterSource_Context": ".types", + "ContextParameterSource_Credential": ".types", + "ContextParameterSource_Onepassword": ".types", + "ContextParameterSource_Output": ".types", + "ContextParameterSource_Workflow": ".types", + "ContextParameterValue": ".types", + "ContextParameterYaml": ".types", + "CreateCredentialRequestCredential": ".types", + "CreateScriptResponse": ".types", + "CredentialParameter": ".types", + "CredentialParameterYaml": ".types", + "CredentialResponse": ".types", + "CredentialResponseCredential": ".types", + "CredentialTypeOutput": ".types", + "CreditCardCredentialResponse": ".types", + "DownloadToS3Block": ".types", + "DownloadToS3BlockYaml": ".types", + "ExtractionBlock": ".types", + "ExtractionBlockDataSchema": ".types", + "ExtractionBlockParametersItem": ".types", + "ExtractionBlockParametersItem_AwsSecret": ".types", + "ExtractionBlockParametersItem_AzureSecret": ".types", + "ExtractionBlockParametersItem_AzureVaultCredential": ".types", + "ExtractionBlockParametersItem_BitwardenCreditCardData": ".types", + "ExtractionBlockParametersItem_BitwardenLoginCredential": ".types", + "ExtractionBlockParametersItem_BitwardenSensitiveInformation": ".types", + "ExtractionBlockParametersItem_Context": ".types", + "ExtractionBlockParametersItem_Credential": ".types", + "ExtractionBlockParametersItem_Onepassword": ".types", + "ExtractionBlockParametersItem_Output": ".types", + "ExtractionBlockParametersItem_Workflow": ".types", + "ExtractionBlockYaml": ".types", + "ExtractionBlockYamlDataSchema": ".types", + "FileDownloadBlock": ".types", + "FileDownloadBlockDataSchema": ".types", + "FileDownloadBlockParametersItem": ".types", + "FileDownloadBlockParametersItem_AwsSecret": ".types", + "FileDownloadBlockParametersItem_AzureSecret": ".types", + "FileDownloadBlockParametersItem_AzureVaultCredential": ".types", + "FileDownloadBlockParametersItem_BitwardenCreditCardData": ".types", + "FileDownloadBlockParametersItem_BitwardenLoginCredential": ".types", + "FileDownloadBlockParametersItem_BitwardenSensitiveInformation": ".types", + "FileDownloadBlockParametersItem_Context": ".types", + "FileDownloadBlockParametersItem_Credential": ".types", + "FileDownloadBlockParametersItem_Onepassword": ".types", + "FileDownloadBlockParametersItem_Output": ".types", + "FileDownloadBlockParametersItem_Workflow": ".types", + "FileDownloadBlockYaml": ".types", + "FileEncoding": ".types", + "FileInfo": ".types", + "FileNode": ".types", + "FileParserBlock": ".types", + "FileParserBlockYaml": ".types", + "FileStorageType": ".types", + "FileType": ".types", + "FileUploadBlock": ".types", + "FileUploadBlockYaml": ".types", + "ForLoopBlock": ".types", + "ForLoopBlockLoopBlocksItem": ".types", + "ForLoopBlockLoopBlocksItem_Action": ".types", + "ForLoopBlockLoopBlocksItem_Code": ".types", + "ForLoopBlockLoopBlocksItem_DownloadToS3": ".types", + "ForLoopBlockLoopBlocksItem_Extraction": ".types", + "ForLoopBlockLoopBlocksItem_FileDownload": ".types", + "ForLoopBlockLoopBlocksItem_FileUpload": ".types", + "ForLoopBlockLoopBlocksItem_FileUrlParser": ".types", + "ForLoopBlockLoopBlocksItem_ForLoop": ".types", + "ForLoopBlockLoopBlocksItem_GotoUrl": ".types", + "ForLoopBlockLoopBlocksItem_HttpRequest": ".types", + "ForLoopBlockLoopBlocksItem_HumanInteraction": ".types", + "ForLoopBlockLoopBlocksItem_Login": ".types", + "ForLoopBlockLoopBlocksItem_Navigation": ".types", + "ForLoopBlockLoopBlocksItem_PdfParser": ".types", + "ForLoopBlockLoopBlocksItem_SendEmail": ".types", + "ForLoopBlockLoopBlocksItem_Task": ".types", + "ForLoopBlockLoopBlocksItem_TaskV2": ".types", + "ForLoopBlockLoopBlocksItem_TextPrompt": ".types", + "ForLoopBlockLoopBlocksItem_UploadToS3": ".types", + "ForLoopBlockLoopBlocksItem_Validation": ".types", + "ForLoopBlockLoopBlocksItem_Wait": ".types", + "ForLoopBlockLoopOver": ".types", + "ForLoopBlockLoopOver_AwsSecret": ".types", + "ForLoopBlockLoopOver_AzureSecret": ".types", + "ForLoopBlockLoopOver_AzureVaultCredential": ".types", + "ForLoopBlockLoopOver_BitwardenCreditCardData": ".types", + "ForLoopBlockLoopOver_BitwardenLoginCredential": ".types", + "ForLoopBlockLoopOver_BitwardenSensitiveInformation": ".types", + "ForLoopBlockLoopOver_Context": ".types", + "ForLoopBlockLoopOver_Credential": ".types", + "ForLoopBlockLoopOver_Onepassword": ".types", + "ForLoopBlockLoopOver_Output": ".types", + "ForLoopBlockLoopOver_Workflow": ".types", + "ForLoopBlockYaml": ".types", + "ForLoopBlockYamlLoopBlocksItem": ".types", + "ForLoopBlockYamlLoopBlocksItem_Action": ".types", + "ForLoopBlockYamlLoopBlocksItem_Code": ".types", + "ForLoopBlockYamlLoopBlocksItem_DownloadToS3": ".types", + "ForLoopBlockYamlLoopBlocksItem_Extraction": ".types", + "ForLoopBlockYamlLoopBlocksItem_FileDownload": ".types", + "ForLoopBlockYamlLoopBlocksItem_FileUpload": ".types", + "ForLoopBlockYamlLoopBlocksItem_FileUrlParser": ".types", + "ForLoopBlockYamlLoopBlocksItem_ForLoop": ".types", + "ForLoopBlockYamlLoopBlocksItem_GotoUrl": ".types", + "ForLoopBlockYamlLoopBlocksItem_HttpRequest": ".types", + "ForLoopBlockYamlLoopBlocksItem_HumanInteraction": ".types", + "ForLoopBlockYamlLoopBlocksItem_Login": ".types", + "ForLoopBlockYamlLoopBlocksItem_Navigation": ".types", + "ForLoopBlockYamlLoopBlocksItem_PdfParser": ".types", + "ForLoopBlockYamlLoopBlocksItem_SendEmail": ".types", + "ForLoopBlockYamlLoopBlocksItem_Task": ".types", + "ForLoopBlockYamlLoopBlocksItem_TaskV2": ".types", + "ForLoopBlockYamlLoopBlocksItem_TextPrompt": ".types", + "ForLoopBlockYamlLoopBlocksItem_UploadToS3": ".types", + "ForLoopBlockYamlLoopBlocksItem_Validation": ".types", + "ForLoopBlockYamlLoopBlocksItem_Wait": ".types", + "ForbiddenError": ".errors", + "GetRunResponse": ".types", + "GetRunResponse_AnthropicCua": ".types", + "GetRunResponse_OpenaiCua": ".types", + "GetRunResponse_TaskV1": ".types", + "GetRunResponse_TaskV2": ".types", + "GetRunResponse_UiTars": ".types", + "GetRunResponse_WorkflowRun": ".types", + "HttpRequestBlock": ".types", + "HttpRequestBlockParametersItem": ".types", + "HttpRequestBlockParametersItem_AwsSecret": ".types", + "HttpRequestBlockParametersItem_AzureSecret": ".types", + "HttpRequestBlockParametersItem_AzureVaultCredential": ".types", + "HttpRequestBlockParametersItem_BitwardenCreditCardData": ".types", + "HttpRequestBlockParametersItem_BitwardenLoginCredential": ".types", + "HttpRequestBlockParametersItem_BitwardenSensitiveInformation": ".types", + "HttpRequestBlockParametersItem_Context": ".types", + "HttpRequestBlockParametersItem_Credential": ".types", + "HttpRequestBlockParametersItem_Onepassword": ".types", + "HttpRequestBlockParametersItem_Output": ".types", + "HttpRequestBlockParametersItem_Workflow": ".types", + "HttpRequestBlockYaml": ".types", + "HttpValidationError": ".types", + "HumanInteractionBlock": ".types", + "HumanInteractionBlockDataSchema": ".types", + "HumanInteractionBlockParametersItem": ".types", + "HumanInteractionBlockParametersItem_AwsSecret": ".types", + "HumanInteractionBlockParametersItem_AzureSecret": ".types", + "HumanInteractionBlockParametersItem_AzureVaultCredential": ".types", + "HumanInteractionBlockParametersItem_BitwardenCreditCardData": ".types", + "HumanInteractionBlockParametersItem_BitwardenLoginCredential": ".types", + "HumanInteractionBlockParametersItem_BitwardenSensitiveInformation": ".types", + "HumanInteractionBlockParametersItem_Context": ".types", + "HumanInteractionBlockParametersItem_Credential": ".types", + "HumanInteractionBlockParametersItem_Onepassword": ".types", + "HumanInteractionBlockParametersItem_Output": ".types", + "HumanInteractionBlockParametersItem_Workflow": ".types", + "HumanInteractionBlockYaml": ".types", + "InputOrSelectContext": ".types", + "LoginBlock": ".types", + "LoginBlockDataSchema": ".types", + "LoginBlockParametersItem": ".types", + "LoginBlockParametersItem_AwsSecret": ".types", + "LoginBlockParametersItem_AzureSecret": ".types", + "LoginBlockParametersItem_AzureVaultCredential": ".types", + "LoginBlockParametersItem_BitwardenCreditCardData": ".types", + "LoginBlockParametersItem_BitwardenLoginCredential": ".types", + "LoginBlockParametersItem_BitwardenSensitiveInformation": ".types", + "LoginBlockParametersItem_Context": ".types", + "LoginBlockParametersItem_Credential": ".types", + "LoginBlockParametersItem_Onepassword": ".types", + "LoginBlockParametersItem_Output": ".types", + "LoginBlockParametersItem_Workflow": ".types", + "LoginBlockYaml": ".types", + "NavigationBlock": ".types", + "NavigationBlockDataSchema": ".types", + "NavigationBlockParametersItem": ".types", + "NavigationBlockParametersItem_AwsSecret": ".types", + "NavigationBlockParametersItem_AzureSecret": ".types", + "NavigationBlockParametersItem_AzureVaultCredential": ".types", + "NavigationBlockParametersItem_BitwardenCreditCardData": ".types", + "NavigationBlockParametersItem_BitwardenLoginCredential": ".types", + "NavigationBlockParametersItem_BitwardenSensitiveInformation": ".types", + "NavigationBlockParametersItem_Context": ".types", + "NavigationBlockParametersItem_Credential": ".types", + "NavigationBlockParametersItem_Onepassword": ".types", + "NavigationBlockParametersItem_Output": ".types", + "NavigationBlockParametersItem_Workflow": ".types", + "NavigationBlockYaml": ".types", + "NonEmptyCreditCardCredential": ".types", + "NonEmptyPasswordCredential": ".types", + "NotFoundError": ".errors", + "OnePasswordCredentialParameter": ".types", + "OnePasswordCredentialParameterYaml": ".types", + "OtpType": ".types", + "OutputParameter": ".types", + "OutputParameterYaml": ".types", + "PasswordCredentialResponse": ".types", + "PdfParserBlock": ".types", + "PdfParserBlockYaml": ".types", + "ProxyLocation": ".types", + "RunEngine": ".types", + "RunStatus": ".types", + "Script": ".types", + "ScriptFileCreate": ".types", + "ScriptRunResponse": ".types", + "SelectOption": ".types", + "SendEmailBlock": ".types", + "SendEmailBlockYaml": ".types", + "Skyvern": ".client", + "SkyvernEnvironment": ".environment", + "SkyvernForgeSdkSchemasCredentialsCredentialType": ".types", + "SkyvernSchemasRunBlocksCredentialType": ".types", + "TaskBlock": ".types", + "TaskBlockDataSchema": ".types", + "TaskBlockParametersItem": ".types", + "TaskBlockParametersItem_AwsSecret": ".types", + "TaskBlockParametersItem_AzureSecret": ".types", + "TaskBlockParametersItem_AzureVaultCredential": ".types", + "TaskBlockParametersItem_BitwardenCreditCardData": ".types", + "TaskBlockParametersItem_BitwardenLoginCredential": ".types", + "TaskBlockParametersItem_BitwardenSensitiveInformation": ".types", + "TaskBlockParametersItem_Context": ".types", + "TaskBlockParametersItem_Credential": ".types", + "TaskBlockParametersItem_Onepassword": ".types", + "TaskBlockParametersItem_Output": ".types", + "TaskBlockParametersItem_Workflow": ".types", + "TaskBlockYaml": ".types", + "TaskBlockYamlDataSchema": ".types", + "TaskRunRequest": ".types", + "TaskRunRequestDataExtractionSchema": ".types", + "TaskRunResponse": ".types", + "TaskRunResponseOutput": ".types", + "TaskV2Block": ".types", + "TaskV2BlockYaml": ".types", + "TextPromptBlock": ".types", + "TextPromptBlockParametersItem": ".types", + "TextPromptBlockParametersItem_AwsSecret": ".types", + "TextPromptBlockParametersItem_AzureSecret": ".types", + "TextPromptBlockParametersItem_AzureVaultCredential": ".types", + "TextPromptBlockParametersItem_BitwardenCreditCardData": ".types", + "TextPromptBlockParametersItem_BitwardenLoginCredential": ".types", + "TextPromptBlockParametersItem_BitwardenSensitiveInformation": ".types", + "TextPromptBlockParametersItem_Context": ".types", + "TextPromptBlockParametersItem_Credential": ".types", + "TextPromptBlockParametersItem_Onepassword": ".types", + "TextPromptBlockParametersItem_Output": ".types", + "TextPromptBlockParametersItem_Workflow": ".types", + "TextPromptBlockYaml": ".types", + "Thought": ".types", + "ThoughtScenario": ".types", + "ThoughtType": ".types", + "TotpCode": ".types", + "TotpType": ".types", + "UnprocessableEntityError": ".errors", + "UploadToS3Block": ".types", + "UploadToS3BlockYaml": ".types", + "UrlBlock": ".types", + "UrlBlockDataSchema": ".types", + "UrlBlockParametersItem": ".types", + "UrlBlockParametersItem_AwsSecret": ".types", + "UrlBlockParametersItem_AzureSecret": ".types", + "UrlBlockParametersItem_AzureVaultCredential": ".types", + "UrlBlockParametersItem_BitwardenCreditCardData": ".types", + "UrlBlockParametersItem_BitwardenLoginCredential": ".types", + "UrlBlockParametersItem_BitwardenSensitiveInformation": ".types", + "UrlBlockParametersItem_Context": ".types", + "UrlBlockParametersItem_Credential": ".types", + "UrlBlockParametersItem_Onepassword": ".types", + "UrlBlockParametersItem_Output": ".types", + "UrlBlockParametersItem_Workflow": ".types", + "UrlBlockYaml": ".types", + "UserDefinedError": ".types", + "ValidationBlock": ".types", + "ValidationBlockDataSchema": ".types", + "ValidationBlockParametersItem": ".types", + "ValidationBlockParametersItem_AwsSecret": ".types", + "ValidationBlockParametersItem_AzureSecret": ".types", + "ValidationBlockParametersItem_AzureVaultCredential": ".types", + "ValidationBlockParametersItem_BitwardenCreditCardData": ".types", + "ValidationBlockParametersItem_BitwardenLoginCredential": ".types", + "ValidationBlockParametersItem_BitwardenSensitiveInformation": ".types", + "ValidationBlockParametersItem_Context": ".types", + "ValidationBlockParametersItem_Credential": ".types", + "ValidationBlockParametersItem_Onepassword": ".types", + "ValidationBlockParametersItem_Output": ".types", + "ValidationBlockParametersItem_Workflow": ".types", + "ValidationBlockYaml": ".types", + "ValidationError": ".types", + "ValidationErrorLocItem": ".types", + "WaitBlock": ".types", + "WaitBlockParametersItem": ".types", + "WaitBlockParametersItem_AwsSecret": ".types", + "WaitBlockParametersItem_AzureSecret": ".types", + "WaitBlockParametersItem_AzureVaultCredential": ".types", + "WaitBlockParametersItem_BitwardenCreditCardData": ".types", + "WaitBlockParametersItem_BitwardenLoginCredential": ".types", + "WaitBlockParametersItem_BitwardenSensitiveInformation": ".types", + "WaitBlockParametersItem_Context": ".types", + "WaitBlockParametersItem_Credential": ".types", + "WaitBlockParametersItem_Onepassword": ".types", + "WaitBlockParametersItem_Output": ".types", + "WaitBlockParametersItem_Workflow": ".types", + "WaitBlockYaml": ".types", + "Workflow": ".types", + "WorkflowCreateYamlRequest": ".types", + "WorkflowDefinition": ".types", + "WorkflowDefinitionBlocksItem": ".types", + "WorkflowDefinitionBlocksItem_Action": ".types", + "WorkflowDefinitionBlocksItem_Code": ".types", + "WorkflowDefinitionBlocksItem_DownloadToS3": ".types", + "WorkflowDefinitionBlocksItem_Extraction": ".types", + "WorkflowDefinitionBlocksItem_FileDownload": ".types", + "WorkflowDefinitionBlocksItem_FileUpload": ".types", + "WorkflowDefinitionBlocksItem_FileUrlParser": ".types", + "WorkflowDefinitionBlocksItem_ForLoop": ".types", + "WorkflowDefinitionBlocksItem_GotoUrl": ".types", + "WorkflowDefinitionBlocksItem_HttpRequest": ".types", + "WorkflowDefinitionBlocksItem_HumanInteraction": ".types", + "WorkflowDefinitionBlocksItem_Login": ".types", + "WorkflowDefinitionBlocksItem_Navigation": ".types", + "WorkflowDefinitionBlocksItem_PdfParser": ".types", + "WorkflowDefinitionBlocksItem_SendEmail": ".types", + "WorkflowDefinitionBlocksItem_Task": ".types", + "WorkflowDefinitionBlocksItem_TaskV2": ".types", + "WorkflowDefinitionBlocksItem_TextPrompt": ".types", + "WorkflowDefinitionBlocksItem_UploadToS3": ".types", + "WorkflowDefinitionBlocksItem_Validation": ".types", + "WorkflowDefinitionBlocksItem_Wait": ".types", + "WorkflowDefinitionParametersItem": ".types", + "WorkflowDefinitionParametersItem_AwsSecret": ".types", + "WorkflowDefinitionParametersItem_AzureSecret": ".types", + "WorkflowDefinitionParametersItem_AzureVaultCredential": ".types", + "WorkflowDefinitionParametersItem_BitwardenCreditCardData": ".types", + "WorkflowDefinitionParametersItem_BitwardenLoginCredential": ".types", + "WorkflowDefinitionParametersItem_BitwardenSensitiveInformation": ".types", + "WorkflowDefinitionParametersItem_Context": ".types", + "WorkflowDefinitionParametersItem_Credential": ".types", + "WorkflowDefinitionParametersItem_Onepassword": ".types", + "WorkflowDefinitionParametersItem_Output": ".types", + "WorkflowDefinitionParametersItem_Workflow": ".types", + "WorkflowDefinitionYaml": ".types", + "WorkflowDefinitionYamlBlocksItem": ".types", + "WorkflowDefinitionYamlBlocksItem_Action": ".types", + "WorkflowDefinitionYamlBlocksItem_Code": ".types", + "WorkflowDefinitionYamlBlocksItem_DownloadToS3": ".types", + "WorkflowDefinitionYamlBlocksItem_Extraction": ".types", + "WorkflowDefinitionYamlBlocksItem_FileDownload": ".types", + "WorkflowDefinitionYamlBlocksItem_FileUpload": ".types", + "WorkflowDefinitionYamlBlocksItem_FileUrlParser": ".types", + "WorkflowDefinitionYamlBlocksItem_ForLoop": ".types", + "WorkflowDefinitionYamlBlocksItem_GotoUrl": ".types", + "WorkflowDefinitionYamlBlocksItem_HttpRequest": ".types", + "WorkflowDefinitionYamlBlocksItem_HumanInteraction": ".types", + "WorkflowDefinitionYamlBlocksItem_Login": ".types", + "WorkflowDefinitionYamlBlocksItem_Navigation": ".types", + "WorkflowDefinitionYamlBlocksItem_PdfParser": ".types", + "WorkflowDefinitionYamlBlocksItem_SendEmail": ".types", + "WorkflowDefinitionYamlBlocksItem_Task": ".types", + "WorkflowDefinitionYamlBlocksItem_TaskV2": ".types", + "WorkflowDefinitionYamlBlocksItem_TextPrompt": ".types", + "WorkflowDefinitionYamlBlocksItem_UploadToS3": ".types", + "WorkflowDefinitionYamlBlocksItem_Validation": ".types", + "WorkflowDefinitionYamlBlocksItem_Wait": ".types", + "WorkflowDefinitionYamlParametersItem": ".types", + "WorkflowDefinitionYamlParametersItem_AwsSecret": ".types", + "WorkflowDefinitionYamlParametersItem_AzureVaultCredential": ".types", + "WorkflowDefinitionYamlParametersItem_BitwardenCreditCardData": ".types", + "WorkflowDefinitionYamlParametersItem_BitwardenLoginCredential": ".types", + "WorkflowDefinitionYamlParametersItem_BitwardenSensitiveInformation": ".types", + "WorkflowDefinitionYamlParametersItem_Context": ".types", + "WorkflowDefinitionYamlParametersItem_Credential": ".types", + "WorkflowDefinitionYamlParametersItem_Onepassword": ".types", + "WorkflowDefinitionYamlParametersItem_Output": ".types", + "WorkflowDefinitionYamlParametersItem_Workflow": ".types", + "WorkflowParameter": ".types", + "WorkflowParameterDefaultValue": ".types", + "WorkflowParameterType": ".types", + "WorkflowParameterYaml": ".types", + "WorkflowParameterYamlDefaultValue": ".types", + "WorkflowRequest": ".types", + "WorkflowRunBlock": ".types", + "WorkflowRunBlockDataSchema": ".types", + "WorkflowRunBlockNavigationPayload": ".types", + "WorkflowRunBlockOutput": ".types", + "WorkflowRunRequest": ".types", + "WorkflowRunResponse": ".types", + "WorkflowRunResponseOutput": ".types", + "WorkflowRunTimeline": ".types", + "WorkflowRunTimelineType": ".types", + "WorkflowStatus": ".types", + "__version__": ".version", + "scripts": ".scripts", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "Action", @@ -552,6 +1046,7 @@ __all__ = [ "ForLoopBlockLoopBlocksItem_ForLoop", "ForLoopBlockLoopBlocksItem_GotoUrl", "ForLoopBlockLoopBlocksItem_HttpRequest", + "ForLoopBlockLoopBlocksItem_HumanInteraction", "ForLoopBlockLoopBlocksItem_Login", "ForLoopBlockLoopBlocksItem_Navigation", "ForLoopBlockLoopBlocksItem_PdfParser", @@ -586,6 +1081,7 @@ __all__ = [ "ForLoopBlockYamlLoopBlocksItem_ForLoop", "ForLoopBlockYamlLoopBlocksItem_GotoUrl", "ForLoopBlockYamlLoopBlocksItem_HttpRequest", + "ForLoopBlockYamlLoopBlocksItem_HumanInteraction", "ForLoopBlockYamlLoopBlocksItem_Login", "ForLoopBlockYamlLoopBlocksItem_Navigation", "ForLoopBlockYamlLoopBlocksItem_PdfParser", @@ -619,6 +1115,21 @@ __all__ = [ "HttpRequestBlockParametersItem_Workflow", "HttpRequestBlockYaml", "HttpValidationError", + "HumanInteractionBlock", + "HumanInteractionBlockDataSchema", + "HumanInteractionBlockParametersItem", + "HumanInteractionBlockParametersItem_AwsSecret", + "HumanInteractionBlockParametersItem_AzureSecret", + "HumanInteractionBlockParametersItem_AzureVaultCredential", + "HumanInteractionBlockParametersItem_BitwardenCreditCardData", + "HumanInteractionBlockParametersItem_BitwardenLoginCredential", + "HumanInteractionBlockParametersItem_BitwardenSensitiveInformation", + "HumanInteractionBlockParametersItem_Context", + "HumanInteractionBlockParametersItem_Credential", + "HumanInteractionBlockParametersItem_Onepassword", + "HumanInteractionBlockParametersItem_Output", + "HumanInteractionBlockParametersItem_Workflow", + "HumanInteractionBlockYaml", "InputOrSelectContext", "LoginBlock", "LoginBlockDataSchema", @@ -779,6 +1290,7 @@ __all__ = [ "WorkflowDefinitionBlocksItem_ForLoop", "WorkflowDefinitionBlocksItem_GotoUrl", "WorkflowDefinitionBlocksItem_HttpRequest", + "WorkflowDefinitionBlocksItem_HumanInteraction", "WorkflowDefinitionBlocksItem_Login", "WorkflowDefinitionBlocksItem_Navigation", "WorkflowDefinitionBlocksItem_PdfParser", @@ -813,6 +1325,7 @@ __all__ = [ "WorkflowDefinitionYamlBlocksItem_ForLoop", "WorkflowDefinitionYamlBlocksItem_GotoUrl", "WorkflowDefinitionYamlBlocksItem_HttpRequest", + "WorkflowDefinitionYamlBlocksItem_HumanInteraction", "WorkflowDefinitionYamlBlocksItem_Login", "WorkflowDefinitionYamlBlocksItem_Navigation", "WorkflowDefinitionYamlBlocksItem_PdfParser", diff --git a/skyvern/client/client.py b/skyvern/client/client.py index a3af9d34..cfc95d85 100644 --- a/skyvern/client/client.py +++ b/skyvern/client/client.py @@ -1,44 +1,38 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + +import datetime as dt import typing -from .environment import SkyvernEnvironment + import httpx -from .core.client_wrapper import SyncClientWrapper -from .scripts.client import ScriptsClient -from .types.run_engine import RunEngine -from .types.proxy_location import ProxyLocation -from .types.task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema +from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from .core.request_options import RequestOptions -from .types.task_run_response import TaskRunResponse -from .core.serialization import convert_and_respect_annotation_metadata -from .core.pydantic_utilities import parse_obj_as -from .errors.bad_request_error import BadRequestError -from .errors.unprocessable_entity_error import UnprocessableEntityError -from json.decoder import JSONDecodeError -from .core.api_error import ApiError -from .types.workflow_run_response import WorkflowRunResponse -from .types.get_run_response import GetRunResponse -from .core.jsonable_encoder import jsonable_encoder -from .errors.not_found_error import NotFoundError -from .types.workflow import Workflow -from .types.workflow_create_yaml_request import WorkflowCreateYamlRequest +from .environment import SkyvernEnvironment +from .raw_client import AsyncRawSkyvern, RawSkyvern from .types.artifact import Artifact from .types.artifact_type import ArtifactType -from .types.workflow_run_timeline import WorkflowRunTimeline from .types.browser_session_response import BrowserSessionResponse -from .errors.forbidden_error import ForbiddenError -import datetime as dt -from .types.totp_code import TotpCode -from .types.credential_response import CredentialResponse -from .types.skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType from .types.create_credential_request_credential import CreateCredentialRequestCredential -from .types.skyvern_schemas_run_blocks_credential_type import SkyvernSchemasRunBlocksCredentialType +from .types.create_script_response import CreateScriptResponse +from .types.credential_response import CredentialResponse +from .types.get_run_response import GetRunResponse +from .types.proxy_location import ProxyLocation +from .types.run_engine import RunEngine from .types.script import Script from .types.script_file_create import ScriptFileCreate -from .types.create_script_response import CreateScriptResponse -from .core.client_wrapper import AsyncClientWrapper -from .scripts.client import AsyncScriptsClient +from .types.skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType +from .types.skyvern_schemas_run_blocks_credential_type import SkyvernSchemasRunBlocksCredentialType +from .types.task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema +from .types.task_run_response import TaskRunResponse +from .types.totp_code import TotpCode +from .types.workflow import Workflow +from .types.workflow_create_yaml_request import WorkflowCreateYamlRequest +from .types.workflow_run_response import WorkflowRunResponse +from .types.workflow_run_timeline import WorkflowRunTimeline +if typing.TYPE_CHECKING: + from .scripts.client import AsyncScriptsClient, ScriptsClient # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -62,7 +56,9 @@ class Skyvern: api_key : typing.Optional[str] - x_api_key : str + headers : typing.Optional[typing.Dict[str, str]] + Additional headers to send with every request. + timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -78,7 +74,6 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) """ @@ -88,16 +83,18 @@ class Skyvern: base_url: typing.Optional[str] = None, environment: SkyvernEnvironment = SkyvernEnvironment.PRODUCTION, api_key: typing.Optional[str] = None, - x_api_key: str, + headers: typing.Optional[typing.Dict[str, str]] = None, timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.Client] = None, ): - _defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None + _defaulted_timeout = ( + timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read + ) self._client_wrapper = SyncClientWrapper( base_url=_get_base_url(base_url=base_url, environment=environment), api_key=api_key, - x_api_key=x_api_key, + headers=headers, httpx_client=httpx_client if httpx_client is not None else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects) @@ -105,7 +102,19 @@ class Skyvern: else httpx.Client(timeout=_defaulted_timeout), timeout=_defaulted_timeout, ) - self.scripts = ScriptsClient(client_wrapper=self._client_wrapper) + self._raw_client = RawSkyvern(client_wrapper=self._client_wrapper) + self._scripts: typing.Optional[ScriptsClient] = None + + @property + def with_raw_response(self) -> RawSkyvern: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawSkyvern + """ + return self._raw_client def run_task( self, @@ -239,76 +248,35 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.run_task( + user_agent="x-user-agent", prompt="Find the top 3 posts on Hacker News.", ) """ - _response = self._client_wrapper.httpx_client.request( - "v1/run/tasks", - method="POST", - json={ - "prompt": prompt, - "url": url, - "engine": engine, - "title": title, - "proxy_location": proxy_location, - "data_extraction_schema": convert_and_respect_annotation_metadata( - object_=data_extraction_schema, annotation=TaskRunRequestDataExtractionSchema, direction="write" - ), - "error_code_mapping": error_code_mapping, - "max_steps": max_steps, - "webhook_url": webhook_url, - "totp_identifier": totp_identifier, - "totp_url": totp_url, - "browser_session_id": browser_session_id, - "model": model, - "extra_http_headers": extra_http_headers, - "publish_workflow": publish_workflow, - "include_action_history_in_verification": include_action_history_in_verification, - "max_screenshot_scrolls": max_screenshot_scrolls, - "browser_address": browser_address, - }, - headers={ - "x-user-agent": str(user_agent) if user_agent is not None else None, - }, + _response = self._raw_client.run_task( + prompt=prompt, + user_agent=user_agent, + url=url, + engine=engine, + title=title, + proxy_location=proxy_location, + data_extraction_schema=data_extraction_schema, + error_code_mapping=error_code_mapping, + max_steps=max_steps, + webhook_url=webhook_url, + totp_identifier=totp_identifier, + totp_url=totp_url, + browser_session_id=browser_session_id, + model=model, + extra_http_headers=extra_http_headers, + publish_workflow=publish_workflow, + include_action_history_in_verification=include_action_history_in_verification, + max_screenshot_scrolls=max_screenshot_scrolls, + browser_address=browser_address, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - TaskRunResponse, - parse_obj_as( - type_=TaskRunResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 400: - raise BadRequestError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def run_workflow( self, @@ -419,73 +387,34 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.run_workflow( + max_steps_override=1, + user_agent="x-user-agent", + template=True, workflow_id="wpid_123", ) """ - _response = self._client_wrapper.httpx_client.request( - "v1/run/workflows", - method="POST", - params={ - "template": template, - }, - json={ - "workflow_id": workflow_id, - "parameters": parameters, - "title": title, - "proxy_location": proxy_location, - "webhook_url": webhook_url, - "totp_url": totp_url, - "totp_identifier": totp_identifier, - "browser_session_id": browser_session_id, - "max_screenshot_scrolls": max_screenshot_scrolls, - "extra_http_headers": extra_http_headers, - "browser_address": browser_address, - "ai_fallback": ai_fallback, - "run_with": run_with, - }, - headers={ - "x-max-steps-override": str(max_steps_override) if max_steps_override is not None else None, - "x-user-agent": str(user_agent) if user_agent is not None else None, - }, + _response = self._raw_client.run_workflow( + workflow_id=workflow_id, + template=template, + max_steps_override=max_steps_override, + user_agent=user_agent, + parameters=parameters, + title=title, + proxy_location=proxy_location, + webhook_url=webhook_url, + totp_url=totp_url, + totp_identifier=totp_identifier, + browser_session_id=browser_session_id, + max_screenshot_scrolls=max_screenshot_scrolls, + extra_http_headers=extra_http_headers, + browser_address=browser_address, + ai_fallback=ai_fallback, + run_with=run_with, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - WorkflowRunResponse, - parse_obj_as( - type_=WorkflowRunResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 400: - raise BadRequestError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def get_run(self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> GetRunResponse: """ @@ -510,50 +439,13 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.get_run( run_id="tsk_123", ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/runs/{jsonable_encoder(run_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - GetRunResponse, - parse_obj_as( - type_=GetRunResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.get_run(run_id, request_options=request_options) + return _response.data def cancel_run( self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -580,40 +472,13 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.cancel_run( run_id="run_id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/runs/{jsonable_encoder(run_id)}/cancel", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.cancel_run(run_id, request_options=request_options) + return _response.data def get_workflows( self, @@ -669,47 +534,28 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) - client.get_workflows() + client.get_workflows( + page=1, + page_size=1, + only_saved_tasks=True, + only_workflows=True, + search_key="search_key", + title="title", + template=True, + ) """ - _response = self._client_wrapper.httpx_client.request( - "v1/workflows", - method="GET", - params={ - "page": page, - "page_size": page_size, - "only_saved_tasks": only_saved_tasks, - "only_workflows": only_workflows, - "search_key": search_key, - "title": title, - "template": template, - }, + _response = self._raw_client.get_workflows( + page=page, + page_size=page_size, + only_saved_tasks=only_saved_tasks, + only_workflows=only_workflows, + search_key=search_key, + title=title, + template=template, request_options=request_options, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[Workflow], - parse_obj_as( - type_=typing.List[Workflow], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def create_workflow( self, @@ -743,45 +589,13 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.create_workflow() """ - _response = self._client_wrapper.httpx_client.request( - "v1/workflows", - method="POST", - json={ - "json_definition": convert_and_respect_annotation_metadata( - object_=json_definition, annotation=WorkflowCreateYamlRequest, direction="write" - ), - "yaml_definition": yaml_definition, - }, - request_options=request_options, - omit=OMIT, + _response = self._raw_client.create_workflow( + json_definition=json_definition, yaml_definition=yaml_definition, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Workflow, - parse_obj_as( - type_=Workflow, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def update_workflow( self, @@ -819,47 +633,18 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.update_workflow( workflow_id="wpid_123", ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/workflows/{jsonable_encoder(workflow_id)}", - method="POST", - json={ - "json_definition": convert_and_respect_annotation_metadata( - object_=json_definition, annotation=WorkflowCreateYamlRequest, direction="write" - ), - "yaml_definition": yaml_definition, - }, + _response = self._raw_client.update_workflow( + workflow_id, + json_definition=json_definition, + yaml_definition=yaml_definition, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Workflow, - parse_obj_as( - type_=Workflow, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def delete_workflow( self, workflow_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -886,40 +671,13 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.delete_workflow( workflow_id="wpid_123", ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/workflows/{jsonable_encoder(workflow_id)}/delete", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.delete_workflow(workflow_id, request_options=request_options) + return _response.data def get_artifact(self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Artifact: """ @@ -943,50 +701,13 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.get_artifact( artifact_id="artifact_id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/artifacts/{jsonable_encoder(artifact_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Artifact, - parse_obj_as( - type_=Artifact, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.get_artifact(artifact_id, request_options=request_options) + return _response.data def get_run_artifacts( self, @@ -1019,43 +740,15 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.get_run_artifacts( run_id="run_id", ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/runs/{jsonable_encoder(run_id)}/artifacts", - method="GET", - params={ - "artifact_type": artifact_type, - }, - request_options=request_options, + _response = self._raw_client.get_run_artifacts( + run_id, artifact_type=artifact_type, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[Artifact], - parse_obj_as( - type_=typing.List[Artifact], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def retry_run_webhook( self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -1082,40 +775,13 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.retry_run_webhook( run_id="tsk_123", ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/runs/{jsonable_encoder(run_id)}/retry_webhook", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.retry_run_webhook(run_id, request_options=request_options) + return _response.data def get_run_timeline( self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -1142,60 +808,13 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.get_run_timeline( run_id="wr_123", ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/runs/{jsonable_encoder(run_id)}/timeline", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[WorkflowRunTimeline], - parse_obj_as( - type_=typing.List[WorkflowRunTimeline], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 400: - raise BadRequestError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 404: - raise NotFoundError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.get_run_timeline(run_id, request_options=request_options) + return _response.data def get_browser_sessions( self, *, request_options: typing.Optional[RequestOptions] = None @@ -1219,48 +838,11 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.get_browser_sessions() """ - _response = self._client_wrapper.httpx_client.request( - "v1/browser_sessions", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[BrowserSessionResponse], - parse_obj_as( - type_=typing.List[BrowserSessionResponse], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.get_browser_sessions(request_options=request_options) + return _response.data def create_browser_session( self, @@ -1316,56 +898,13 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.create_browser_session() """ - _response = self._client_wrapper.httpx_client.request( - "v1/browser_sessions", - method="POST", - json={ - "timeout": timeout, - "proxy_location": proxy_location, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, + _response = self._raw_client.create_browser_session( + timeout=timeout, proxy_location=proxy_location, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - BrowserSessionResponse, - parse_obj_as( - type_=BrowserSessionResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def close_browser_session( self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -1392,50 +931,13 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.close_browser_session( browser_session_id="pbs_123456", ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}/close", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.close_browser_session(browser_session_id, request_options=request_options) + return _response.data def get_browser_session( self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -1462,60 +964,13 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.get_browser_session( browser_session_id="pbs_123456", ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - BrowserSessionResponse, - parse_obj_as( - type_=BrowserSessionResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 404: - raise NotFoundError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.get_browser_session(browser_session_id, request_options=request_options) + return _response.data def send_totp_code( self, @@ -1569,54 +1024,23 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.send_totp_code( totp_identifier="john.doe@example.com", content="Hello, your verification code is 123456", ) """ - _response = self._client_wrapper.httpx_client.request( - "v1/credentials/totp", - method="POST", - json={ - "totp_identifier": totp_identifier, - "task_id": task_id, - "workflow_id": workflow_id, - "workflow_run_id": workflow_run_id, - "source": source, - "content": content, - "expired_at": expired_at, - }, - headers={ - "content-type": "application/json", - }, + _response = self._raw_client.send_totp_code( + totp_identifier=totp_identifier, + content=content, + task_id=task_id, + workflow_id=workflow_id, + workflow_run_id=workflow_run_id, + source=source, + expired_at=expired_at, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - TotpCode, - parse_obj_as( - type_=TotpCode, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def get_credentials( self, @@ -1650,45 +1074,14 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.get_credentials( page=1, page_size=10, ) """ - _response = self._client_wrapper.httpx_client.request( - "v1/credentials", - method="GET", - params={ - "page": page, - "page_size": page_size, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[CredentialResponse], - parse_obj_as( - type_=typing.List[CredentialResponse], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.get_credentials(page=page, page_size=page_size, request_options=request_options) + return _response.data def create_credential( self, @@ -1726,7 +1119,6 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.create_credential( name="My Credential", @@ -1738,45 +1130,10 @@ class Skyvern: ), ) """ - _response = self._client_wrapper.httpx_client.request( - "v1/credentials", - method="POST", - json={ - "name": name, - "credential_type": credential_type, - "credential": convert_and_respect_annotation_metadata( - object_=credential, annotation=CreateCredentialRequestCredential, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, + _response = self._raw_client.create_credential( + name=name, credential_type=credential_type, credential=credential, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - CredentialResponse, - parse_obj_as( - type_=CredentialResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def delete_credential(self, credential_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ @@ -1800,34 +1157,13 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.delete_credential( credential_id="cred_1234567890", ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/credentials/{jsonable_encoder(credential_id)}/delete", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.delete_credential(credential_id, request_options=request_options) + return _response.data def get_credential( self, credential_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -1854,40 +1190,13 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.get_credential( credential_id="cred_1234567890", ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/credentials/{jsonable_encoder(credential_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - CredentialResponse, - parse_obj_as( - type_=CredentialResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.get_credential(credential_id, request_options=request_options) + return _response.data def login( self, @@ -1993,66 +1302,35 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.login( credential_type="skyvern", ) """ - _response = self._client_wrapper.httpx_client.request( - "v1/run/tasks/login", - method="POST", - json={ - "credential_type": credential_type, - "url": url, - "prompt": prompt, - "webhook_url": webhook_url, - "proxy_location": proxy_location, - "totp_identifier": totp_identifier, - "totp_url": totp_url, - "browser_session_id": browser_session_id, - "browser_address": browser_address, - "extra_http_headers": extra_http_headers, - "max_screenshot_scrolling_times": max_screenshot_scrolling_times, - "credential_id": credential_id, - "bitwarden_collection_id": bitwarden_collection_id, - "bitwarden_item_id": bitwarden_item_id, - "onepassword_vault_id": onepassword_vault_id, - "onepassword_item_id": onepassword_item_id, - "azure_vault_name": azure_vault_name, - "azure_vault_username_key": azure_vault_username_key, - "azure_vault_password_key": azure_vault_password_key, - "azure_vault_totp_secret_key": azure_vault_totp_secret_key, - }, - headers={ - "content-type": "application/json", - }, + _response = self._raw_client.login( + credential_type=credential_type, + url=url, + prompt=prompt, + webhook_url=webhook_url, + proxy_location=proxy_location, + totp_identifier=totp_identifier, + totp_url=totp_url, + browser_session_id=browser_session_id, + browser_address=browser_address, + extra_http_headers=extra_http_headers, + max_screenshot_scrolling_times=max_screenshot_scrolling_times, + credential_id=credential_id, + bitwarden_collection_id=bitwarden_collection_id, + bitwarden_item_id=bitwarden_item_id, + onepassword_vault_id=onepassword_vault_id, + onepassword_item_id=onepassword_item_id, + azure_vault_name=azure_vault_name, + azure_vault_username_key=azure_vault_username_key, + azure_vault_password_key=azure_vault_password_key, + azure_vault_totp_secret_key=azure_vault_totp_secret_key, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - WorkflowRunResponse, - parse_obj_as( - type_=WorkflowRunResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def get_scripts( self, @@ -2086,45 +1364,14 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.get_scripts( page=1, page_size=10, ) """ - _response = self._client_wrapper.httpx_client.request( - "v1/scripts", - method="GET", - params={ - "page": page, - "page_size": page_size, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[Script], - parse_obj_as( - type_=typing.List[Script], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.get_scripts(page=page, page_size=page_size, request_options=request_options) + return _response.data def create_script( self, @@ -2162,49 +1409,13 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.create_script() """ - _response = self._client_wrapper.httpx_client.request( - "v1/scripts", - method="POST", - json={ - "workflow_id": workflow_id, - "run_id": run_id, - "files": convert_and_respect_annotation_metadata( - object_=files, annotation=typing.Sequence[ScriptFileCreate], direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, + _response = self._raw_client.create_script( + workflow_id=workflow_id, run_id=run_id, files=files, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - CreateScriptResponse, - parse_obj_as( - type_=CreateScriptResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data def get_script(self, script_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Script: """ @@ -2229,40 +1440,13 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.get_script( script_id="s_abc123", ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/scripts/{jsonable_encoder(script_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Script, - parse_obj_as( - type_=Script, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.get_script(script_id, request_options=request_options) + return _response.data def deploy_script( self, @@ -2296,7 +1480,6 @@ class Skyvern: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.deploy_script( script_id="s_abc123", @@ -2308,43 +1491,16 @@ class Skyvern: ], ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/scripts/{jsonable_encoder(script_id)}/deploy", - method="POST", - json={ - "files": convert_and_respect_annotation_metadata( - object_=files, annotation=typing.Sequence[ScriptFileCreate], direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - CreateScriptResponse, - parse_obj_as( - type_=CreateScriptResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.deploy_script(script_id, files=files, request_options=request_options) + return _response.data + + @property + def scripts(self): + if self._scripts is None: + from .scripts.client import ScriptsClient # noqa: E402 + + self._scripts = ScriptsClient(client_wrapper=self._client_wrapper) + return self._scripts class AsyncSkyvern: @@ -2366,7 +1522,9 @@ class AsyncSkyvern: api_key : typing.Optional[str] - x_api_key : str + headers : typing.Optional[typing.Dict[str, str]] + Additional headers to send with every request. + timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -2382,7 +1540,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) """ @@ -2392,16 +1549,18 @@ class AsyncSkyvern: base_url: typing.Optional[str] = None, environment: SkyvernEnvironment = SkyvernEnvironment.PRODUCTION, api_key: typing.Optional[str] = None, - x_api_key: str, + headers: typing.Optional[typing.Dict[str, str]] = None, timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.AsyncClient] = None, ): - _defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None + _defaulted_timeout = ( + timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read + ) self._client_wrapper = AsyncClientWrapper( base_url=_get_base_url(base_url=base_url, environment=environment), api_key=api_key, - x_api_key=x_api_key, + headers=headers, httpx_client=httpx_client if httpx_client is not None else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects) @@ -2409,7 +1568,19 @@ class AsyncSkyvern: else httpx.AsyncClient(timeout=_defaulted_timeout), timeout=_defaulted_timeout, ) - self.scripts = AsyncScriptsClient(client_wrapper=self._client_wrapper) + self._raw_client = AsyncRawSkyvern(client_wrapper=self._client_wrapper) + self._scripts: typing.Optional[AsyncScriptsClient] = None + + @property + def with_raw_response(self) -> AsyncRawSkyvern: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawSkyvern + """ + return self._raw_client async def run_task( self, @@ -2545,82 +1716,41 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) async def main() -> None: await client.run_task( + user_agent="x-user-agent", prompt="Find the top 3 posts on Hacker News.", ) asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "v1/run/tasks", - method="POST", - json={ - "prompt": prompt, - "url": url, - "engine": engine, - "title": title, - "proxy_location": proxy_location, - "data_extraction_schema": convert_and_respect_annotation_metadata( - object_=data_extraction_schema, annotation=TaskRunRequestDataExtractionSchema, direction="write" - ), - "error_code_mapping": error_code_mapping, - "max_steps": max_steps, - "webhook_url": webhook_url, - "totp_identifier": totp_identifier, - "totp_url": totp_url, - "browser_session_id": browser_session_id, - "model": model, - "extra_http_headers": extra_http_headers, - "publish_workflow": publish_workflow, - "include_action_history_in_verification": include_action_history_in_verification, - "max_screenshot_scrolls": max_screenshot_scrolls, - "browser_address": browser_address, - }, - headers={ - "x-user-agent": str(user_agent) if user_agent is not None else None, - }, + _response = await self._raw_client.run_task( + prompt=prompt, + user_agent=user_agent, + url=url, + engine=engine, + title=title, + proxy_location=proxy_location, + data_extraction_schema=data_extraction_schema, + error_code_mapping=error_code_mapping, + max_steps=max_steps, + webhook_url=webhook_url, + totp_identifier=totp_identifier, + totp_url=totp_url, + browser_session_id=browser_session_id, + model=model, + extra_http_headers=extra_http_headers, + publish_workflow=publish_workflow, + include_action_history_in_verification=include_action_history_in_verification, + max_screenshot_scrolls=max_screenshot_scrolls, + browser_address=browser_address, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - TaskRunResponse, - parse_obj_as( - type_=TaskRunResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 400: - raise BadRequestError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def run_workflow( self, @@ -2733,79 +1863,40 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) async def main() -> None: await client.run_workflow( + max_steps_override=1, + user_agent="x-user-agent", + template=True, workflow_id="wpid_123", ) asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "v1/run/workflows", - method="POST", - params={ - "template": template, - }, - json={ - "workflow_id": workflow_id, - "parameters": parameters, - "title": title, - "proxy_location": proxy_location, - "webhook_url": webhook_url, - "totp_url": totp_url, - "totp_identifier": totp_identifier, - "browser_session_id": browser_session_id, - "max_screenshot_scrolls": max_screenshot_scrolls, - "extra_http_headers": extra_http_headers, - "browser_address": browser_address, - "ai_fallback": ai_fallback, - "run_with": run_with, - }, - headers={ - "x-max-steps-override": str(max_steps_override) if max_steps_override is not None else None, - "x-user-agent": str(user_agent) if user_agent is not None else None, - }, + _response = await self._raw_client.run_workflow( + workflow_id=workflow_id, + template=template, + max_steps_override=max_steps_override, + user_agent=user_agent, + parameters=parameters, + title=title, + proxy_location=proxy_location, + webhook_url=webhook_url, + totp_url=totp_url, + totp_identifier=totp_identifier, + browser_session_id=browser_session_id, + max_screenshot_scrolls=max_screenshot_scrolls, + extra_http_headers=extra_http_headers, + browser_address=browser_address, + ai_fallback=ai_fallback, + run_with=run_with, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - WorkflowRunResponse, - parse_obj_as( - type_=WorkflowRunResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 400: - raise BadRequestError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def get_run(self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> GetRunResponse: """ @@ -2832,7 +1923,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -2844,44 +1934,8 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/runs/{jsonable_encoder(run_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - GetRunResponse, - parse_obj_as( - type_=GetRunResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.get_run(run_id, request_options=request_options) + return _response.data async def cancel_run( self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -2910,7 +1964,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -2922,34 +1975,8 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/runs/{jsonable_encoder(run_id)}/cancel", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.cancel_run(run_id, request_options=request_options) + return _response.data async def get_workflows( self, @@ -3007,53 +2034,34 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) async def main() -> None: - await client.get_workflows() + await client.get_workflows( + page=1, + page_size=1, + only_saved_tasks=True, + only_workflows=True, + search_key="search_key", + title="title", + template=True, + ) asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "v1/workflows", - method="GET", - params={ - "page": page, - "page_size": page_size, - "only_saved_tasks": only_saved_tasks, - "only_workflows": only_workflows, - "search_key": search_key, - "title": title, - "template": template, - }, + _response = await self._raw_client.get_workflows( + page=page, + page_size=page_size, + only_saved_tasks=only_saved_tasks, + only_workflows=only_workflows, + search_key=search_key, + title=title, + template=template, request_options=request_options, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[Workflow], - parse_obj_as( - type_=typing.List[Workflow], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def create_workflow( self, @@ -3089,7 +2097,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -3099,41 +2106,10 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "v1/workflows", - method="POST", - json={ - "json_definition": convert_and_respect_annotation_metadata( - object_=json_definition, annotation=WorkflowCreateYamlRequest, direction="write" - ), - "yaml_definition": yaml_definition, - }, - request_options=request_options, - omit=OMIT, + _response = await self._raw_client.create_workflow( + json_definition=json_definition, yaml_definition=yaml_definition, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Workflow, - parse_obj_as( - type_=Workflow, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def update_workflow( self, @@ -3173,7 +2149,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -3185,41 +2160,13 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/workflows/{jsonable_encoder(workflow_id)}", - method="POST", - json={ - "json_definition": convert_and_respect_annotation_metadata( - object_=json_definition, annotation=WorkflowCreateYamlRequest, direction="write" - ), - "yaml_definition": yaml_definition, - }, + _response = await self._raw_client.update_workflow( + workflow_id, + json_definition=json_definition, + yaml_definition=yaml_definition, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Workflow, - parse_obj_as( - type_=Workflow, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def delete_workflow( self, workflow_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -3248,7 +2195,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -3260,34 +2206,8 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/workflows/{jsonable_encoder(workflow_id)}/delete", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.delete_workflow(workflow_id, request_options=request_options) + return _response.data async def get_artifact( self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -3315,7 +2235,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -3327,44 +2246,8 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/artifacts/{jsonable_encoder(artifact_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Artifact, - parse_obj_as( - type_=Artifact, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.get_artifact(artifact_id, request_options=request_options) + return _response.data async def get_run_artifacts( self, @@ -3399,7 +2282,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -3411,37 +2293,10 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/runs/{jsonable_encoder(run_id)}/artifacts", - method="GET", - params={ - "artifact_type": artifact_type, - }, - request_options=request_options, + _response = await self._raw_client.get_run_artifacts( + run_id, artifact_type=artifact_type, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[Artifact], - parse_obj_as( - type_=typing.List[Artifact], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def retry_run_webhook( self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -3470,7 +2325,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -3482,34 +2336,8 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/runs/{jsonable_encoder(run_id)}/retry_webhook", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.retry_run_webhook(run_id, request_options=request_options) + return _response.data async def get_run_timeline( self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -3538,7 +2366,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -3550,54 +2377,8 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/runs/{jsonable_encoder(run_id)}/timeline", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[WorkflowRunTimeline], - parse_obj_as( - type_=typing.List[WorkflowRunTimeline], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 400: - raise BadRequestError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 404: - raise NotFoundError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.get_run_timeline(run_id, request_options=request_options) + return _response.data async def get_browser_sessions( self, *, request_options: typing.Optional[RequestOptions] = None @@ -3623,7 +2404,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -3633,44 +2413,8 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "v1/browser_sessions", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[BrowserSessionResponse], - parse_obj_as( - type_=typing.List[BrowserSessionResponse], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.get_browser_sessions(request_options=request_options) + return _response.data async def create_browser_session( self, @@ -3728,7 +2472,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -3738,52 +2481,10 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "v1/browser_sessions", - method="POST", - json={ - "timeout": timeout, - "proxy_location": proxy_location, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, + _response = await self._raw_client.create_browser_session( + timeout=timeout, proxy_location=proxy_location, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - BrowserSessionResponse, - parse_obj_as( - type_=BrowserSessionResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def close_browser_session( self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -3812,7 +2513,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -3824,44 +2524,8 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}/close", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.close_browser_session(browser_session_id, request_options=request_options) + return _response.data async def get_browser_session( self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -3890,7 +2554,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -3902,54 +2565,8 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - BrowserSessionResponse, - parse_obj_as( - type_=BrowserSessionResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 404: - raise NotFoundError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.get_browser_session(browser_session_id, request_options=request_options) + return _response.data async def send_totp_code( self, @@ -4005,7 +2622,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -4018,47 +2634,17 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "v1/credentials/totp", - method="POST", - json={ - "totp_identifier": totp_identifier, - "task_id": task_id, - "workflow_id": workflow_id, - "workflow_run_id": workflow_run_id, - "source": source, - "content": content, - "expired_at": expired_at, - }, - headers={ - "content-type": "application/json", - }, + _response = await self._raw_client.send_totp_code( + totp_identifier=totp_identifier, + content=content, + task_id=task_id, + workflow_id=workflow_id, + workflow_run_id=workflow_run_id, + source=source, + expired_at=expired_at, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - TotpCode, - parse_obj_as( - type_=TotpCode, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def get_credentials( self, @@ -4094,7 +2680,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -4107,38 +2692,10 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "v1/credentials", - method="GET", - params={ - "page": page, - "page_size": page_size, - }, - request_options=request_options, + _response = await self._raw_client.get_credentials( + page=page, page_size=page_size, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[CredentialResponse], - parse_obj_as( - type_=typing.List[CredentialResponse], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def create_credential( self, @@ -4178,7 +2735,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -4196,45 +2752,10 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "v1/credentials", - method="POST", - json={ - "name": name, - "credential_type": credential_type, - "credential": convert_and_respect_annotation_metadata( - object_=credential, annotation=CreateCredentialRequestCredential, direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, + _response = await self._raw_client.create_credential( + name=name, credential_type=credential_type, credential=credential, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - CredentialResponse, - parse_obj_as( - type_=CredentialResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def delete_credential( self, credential_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -4262,7 +2783,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -4274,28 +2794,8 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/credentials/{jsonable_encoder(credential_id)}/delete", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.delete_credential(credential_id, request_options=request_options) + return _response.data async def get_credential( self, credential_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -4324,7 +2824,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -4336,34 +2835,8 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/credentials/{jsonable_encoder(credential_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - CredentialResponse, - parse_obj_as( - type_=CredentialResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.get_credential(credential_id, request_options=request_options) + return _response.data async def login( self, @@ -4471,7 +2944,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -4483,60 +2955,30 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "v1/run/tasks/login", - method="POST", - json={ - "credential_type": credential_type, - "url": url, - "prompt": prompt, - "webhook_url": webhook_url, - "proxy_location": proxy_location, - "totp_identifier": totp_identifier, - "totp_url": totp_url, - "browser_session_id": browser_session_id, - "browser_address": browser_address, - "extra_http_headers": extra_http_headers, - "max_screenshot_scrolling_times": max_screenshot_scrolling_times, - "credential_id": credential_id, - "bitwarden_collection_id": bitwarden_collection_id, - "bitwarden_item_id": bitwarden_item_id, - "onepassword_vault_id": onepassword_vault_id, - "onepassword_item_id": onepassword_item_id, - "azure_vault_name": azure_vault_name, - "azure_vault_username_key": azure_vault_username_key, - "azure_vault_password_key": azure_vault_password_key, - "azure_vault_totp_secret_key": azure_vault_totp_secret_key, - }, - headers={ - "content-type": "application/json", - }, + _response = await self._raw_client.login( + credential_type=credential_type, + url=url, + prompt=prompt, + webhook_url=webhook_url, + proxy_location=proxy_location, + totp_identifier=totp_identifier, + totp_url=totp_url, + browser_session_id=browser_session_id, + browser_address=browser_address, + extra_http_headers=extra_http_headers, + max_screenshot_scrolling_times=max_screenshot_scrolling_times, + credential_id=credential_id, + bitwarden_collection_id=bitwarden_collection_id, + bitwarden_item_id=bitwarden_item_id, + onepassword_vault_id=onepassword_vault_id, + onepassword_item_id=onepassword_item_id, + azure_vault_name=azure_vault_name, + azure_vault_username_key=azure_vault_username_key, + azure_vault_password_key=azure_vault_password_key, + azure_vault_totp_secret_key=azure_vault_totp_secret_key, request_options=request_options, - omit=OMIT, ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - WorkflowRunResponse, - parse_obj_as( - type_=WorkflowRunResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def get_scripts( self, @@ -4572,7 +3014,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -4585,38 +3026,8 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "v1/scripts", - method="GET", - params={ - "page": page, - "page_size": page_size, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.List[Script], - parse_obj_as( - type_=typing.List[Script], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.get_scripts(page=page, page_size=page_size, request_options=request_options) + return _response.data async def create_script( self, @@ -4656,7 +3067,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -4666,45 +3076,10 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - "v1/scripts", - method="POST", - json={ - "workflow_id": workflow_id, - "run_id": run_id, - "files": convert_and_respect_annotation_metadata( - object_=files, annotation=typing.Sequence[ScriptFileCreate], direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, + _response = await self._raw_client.create_script( + workflow_id=workflow_id, run_id=run_id, files=files, request_options=request_options ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - CreateScriptResponse, - parse_obj_as( - type_=CreateScriptResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + return _response.data async def get_script(self, script_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Script: """ @@ -4731,7 +3106,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -4743,34 +3117,8 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/scripts/{jsonable_encoder(script_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Script, - parse_obj_as( - type_=Script, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.get_script(script_id, request_options=request_options) + return _response.data async def deploy_script( self, @@ -4806,7 +3154,6 @@ class AsyncSkyvern: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -4824,43 +3171,16 @@ class AsyncSkyvern: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/scripts/{jsonable_encoder(script_id)}/deploy", - method="POST", - json={ - "files": convert_and_respect_annotation_metadata( - object_=files, annotation=typing.Sequence[ScriptFileCreate], direction="write" - ), - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - CreateScriptResponse, - parse_obj_as( - type_=CreateScriptResponse, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.deploy_script(script_id, files=files, request_options=request_options) + return _response.data + + @property + def scripts(self): + if self._scripts is None: + from .scripts.client import AsyncScriptsClient # noqa: E402 + + self._scripts = AsyncScriptsClient(client_wrapper=self._client_wrapper) + return self._scripts def _get_base_url(*, base_url: typing.Optional[str] = None, environment: SkyvernEnvironment) -> str: diff --git a/skyvern/client/core/__init__.py b/skyvern/client/core/__init__.py index f03aecbf..9a33e233 100644 --- a/skyvern/client/core/__init__.py +++ b/skyvern/client/core/__init__.py @@ -1,33 +1,91 @@ # This file was auto-generated by Fern from our API Definition. -from .api_error import ApiError -from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper -from .datetime_utils import serialize_datetime -from .file import File, convert_file_dict_to_httpx_tuples, with_content_type -from .http_client import AsyncHttpClient, HttpClient -from .jsonable_encoder import jsonable_encoder -from .pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - UniversalRootModel, - parse_obj_as, - universal_field_validator, - universal_root_validator, - update_forward_refs, -) -from .query_encoder import encode_query -from .remove_none_from_dict import remove_none_from_dict -from .request_options import RequestOptions -from .serialization import FieldMetadata, convert_and_respect_annotation_metadata +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .api_error import ApiError + from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper + from .datetime_utils import serialize_datetime + from .file import File, convert_file_dict_to_httpx_tuples, with_content_type + from .http_client import AsyncHttpClient, HttpClient + from .http_response import AsyncHttpResponse, HttpResponse + from .jsonable_encoder import jsonable_encoder + from .pydantic_utilities import ( + IS_PYDANTIC_V2, + UniversalBaseModel, + UniversalRootModel, + parse_obj_as, + universal_field_validator, + universal_root_validator, + update_forward_refs, + ) + from .query_encoder import encode_query + from .remove_none_from_dict import remove_none_from_dict + from .request_options import RequestOptions + from .serialization import FieldMetadata, convert_and_respect_annotation_metadata +_dynamic_imports: typing.Dict[str, str] = { + "ApiError": ".api_error", + "AsyncClientWrapper": ".client_wrapper", + "AsyncHttpClient": ".http_client", + "AsyncHttpResponse": ".http_response", + "BaseClientWrapper": ".client_wrapper", + "FieldMetadata": ".serialization", + "File": ".file", + "HttpClient": ".http_client", + "HttpResponse": ".http_response", + "IS_PYDANTIC_V2": ".pydantic_utilities", + "RequestOptions": ".request_options", + "SyncClientWrapper": ".client_wrapper", + "UniversalBaseModel": ".pydantic_utilities", + "UniversalRootModel": ".pydantic_utilities", + "convert_and_respect_annotation_metadata": ".serialization", + "convert_file_dict_to_httpx_tuples": ".file", + "encode_query": ".query_encoder", + "jsonable_encoder": ".jsonable_encoder", + "parse_obj_as": ".pydantic_utilities", + "remove_none_from_dict": ".remove_none_from_dict", + "serialize_datetime": ".datetime_utils", + "universal_field_validator": ".pydantic_utilities", + "universal_root_validator": ".pydantic_utilities", + "update_forward_refs": ".pydantic_utilities", + "with_content_type": ".file", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "ApiError", "AsyncClientWrapper", "AsyncHttpClient", + "AsyncHttpResponse", "BaseClientWrapper", "FieldMetadata", "File", "HttpClient", + "HttpResponse", "IS_PYDANTIC_V2", "RequestOptions", "SyncClientWrapper", diff --git a/skyvern/client/core/api_error.py b/skyvern/client/core/api_error.py index 2e9fc543..6f850a60 100644 --- a/skyvern/client/core/api_error.py +++ b/skyvern/client/core/api_error.py @@ -1,15 +1,23 @@ # This file was auto-generated by Fern from our API Definition. -import typing +from typing import Any, Dict, Optional class ApiError(Exception): - status_code: typing.Optional[int] - body: typing.Any + headers: Optional[Dict[str, str]] + status_code: Optional[int] + body: Any - def __init__(self, *, status_code: typing.Optional[int] = None, body: typing.Any = None): + def __init__( + self, + *, + headers: Optional[Dict[str, str]] = None, + status_code: Optional[int] = None, + body: Any = None, + ) -> None: + self.headers = headers self.status_code = status_code self.body = body def __str__(self) -> str: - return f"status_code: {self.status_code}, body: {self.body}" + return f"headers: {self.headers}, status_code: {self.status_code}, body: {self.body}" diff --git a/skyvern/client/core/client_wrapper.py b/skyvern/client/core/client_wrapper.py index 85026120..9adc9075 100644 --- a/skyvern/client/core/client_wrapper.py +++ b/skyvern/client/core/client_wrapper.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. import typing + import httpx -from .http_client import HttpClient -from .http_client import AsyncHttpClient +from .http_client import AsyncHttpClient, HttpClient class BaseClientWrapper: @@ -11,26 +11,30 @@ class BaseClientWrapper: self, *, api_key: typing.Optional[str] = None, - x_api_key: str, + headers: typing.Optional[typing.Dict[str, str]] = None, base_url: str, timeout: typing.Optional[float] = None, ): self._api_key = api_key - self.x_api_key = x_api_key + self._headers = headers self._base_url = base_url self._timeout = timeout def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { + "User-Agent": "skyvern/0.2.20", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "skyvern", - "X-Fern-SDK-Version": "0.2.18", + "X-Fern-SDK-Version": "0.2.20", + **(self.get_custom_headers() or {}), } if self._api_key is not None: headers["x-api-key"] = self._api_key - headers["x-api-key"] = self.x_api_key return headers + def get_custom_headers(self) -> typing.Optional[typing.Dict[str, str]]: + return self._headers + def get_base_url(self) -> str: return self._base_url @@ -43,12 +47,12 @@ class SyncClientWrapper(BaseClientWrapper): self, *, api_key: typing.Optional[str] = None, - x_api_key: str, + headers: typing.Optional[typing.Dict[str, str]] = None, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.Client, ): - super().__init__(api_key=api_key, x_api_key=x_api_key, base_url=base_url, timeout=timeout) + super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout) self.httpx_client = HttpClient( httpx_client=httpx_client, base_headers=self.get_headers, @@ -62,12 +66,12 @@ class AsyncClientWrapper(BaseClientWrapper): self, *, api_key: typing.Optional[str] = None, - x_api_key: str, + headers: typing.Optional[typing.Dict[str, str]] = None, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.AsyncClient, ): - super().__init__(api_key=api_key, x_api_key=x_api_key, base_url=base_url, timeout=timeout) + super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout) self.httpx_client = AsyncHttpClient( httpx_client=httpx_client, base_headers=self.get_headers, diff --git a/skyvern/client/core/force_multipart.py b/skyvern/client/core/force_multipart.py new file mode 100644 index 00000000..5440913f --- /dev/null +++ b/skyvern/client/core/force_multipart.py @@ -0,0 +1,18 @@ +# This file was auto-generated by Fern from our API Definition. + +from typing import Any, Dict + + +class ForceMultipartDict(Dict[str, Any]): + """ + A dictionary subclass that always evaluates to True in boolean contexts. + + This is used to force multipart/form-data encoding in HTTP requests even when + the dictionary is empty, which would normally evaluate to False. + """ + + def __bool__(self) -> bool: + return True + + +FORCE_MULTIPART = ForceMultipartDict() diff --git a/skyvern/client/core/http_client.py b/skyvern/client/core/http_client.py index 275a54cc..e4173f99 100644 --- a/skyvern/client/core/http_client.py +++ b/skyvern/client/core/http_client.py @@ -2,7 +2,6 @@ import asyncio import email.utils -import json import re import time import typing @@ -11,12 +10,13 @@ from contextlib import asynccontextmanager, contextmanager from random import random import httpx - from .file import File, convert_file_dict_to_httpx_tuples +from .force_multipart import FORCE_MULTIPART from .jsonable_encoder import jsonable_encoder from .query_encoder import encode_query from .remove_none_from_dict import remove_none_from_dict from .request_options import RequestOptions +from httpx._types import RequestFiles INITIAL_RETRY_DELAY_SECONDS = 0.5 MAX_RETRY_DELAY_SECONDS = 10 @@ -180,11 +180,17 @@ class HttpClient: json: typing.Optional[typing.Any] = None, data: typing.Optional[typing.Any] = None, content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, - files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, + files: typing.Optional[ + typing.Union[ + typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]], + typing.List[typing.Tuple[str, File]], + ] + ] = None, headers: typing.Optional[typing.Dict[str, typing.Any]] = None, request_options: typing.Optional[RequestOptions] = None, retries: int = 2, omit: typing.Optional[typing.Any] = None, + force_multipart: typing.Optional[bool] = None, ) -> httpx.Response: base_url = self.get_base_url(base_url) timeout = ( @@ -195,6 +201,15 @@ class HttpClient: json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) + request_files: typing.Optional[RequestFiles] = ( + convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) + if (files is not None and files is not omit and isinstance(files, dict)) + else None + ) + + if (request_files is None or len(request_files) == 0) and force_multipart: + request_files = FORCE_MULTIPART + response = self.httpx_client.request( method=method, url=urllib.parse.urljoin(f"{base_url}/", path), @@ -227,11 +242,7 @@ class HttpClient: json=json_body, data=data_body, content=content, - files=( - convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) - if (files is not None and files is not omit) - else None - ), + files=request_files, timeout=timeout, ) @@ -266,11 +277,17 @@ class HttpClient: json: typing.Optional[typing.Any] = None, data: typing.Optional[typing.Any] = None, content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, - files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, + files: typing.Optional[ + typing.Union[ + typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]], + typing.List[typing.Tuple[str, File]], + ] + ] = None, headers: typing.Optional[typing.Dict[str, typing.Any]] = None, request_options: typing.Optional[RequestOptions] = None, retries: int = 2, omit: typing.Optional[typing.Any] = None, + force_multipart: typing.Optional[bool] = None, ) -> typing.Iterator[httpx.Response]: base_url = self.get_base_url(base_url) timeout = ( @@ -279,6 +296,15 @@ class HttpClient: else self.base_timeout() ) + request_files: typing.Optional[RequestFiles] = ( + convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) + if (files is not None and files is not omit and isinstance(files, dict)) + else None + ) + + if (request_files is None or len(request_files) == 0) and force_multipart: + request_files = FORCE_MULTIPART + json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) with self.httpx_client.stream( @@ -313,11 +339,7 @@ class HttpClient: json=json_body, data=data_body, content=content, - files=( - convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) - if (files is not None and files is not omit) - else None - ), + files=request_files, timeout=timeout, ) as stream: yield stream @@ -356,11 +378,17 @@ class AsyncHttpClient: json: typing.Optional[typing.Any] = None, data: typing.Optional[typing.Any] = None, content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, - files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, + files: typing.Optional[ + typing.Union[ + typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]], + typing.List[typing.Tuple[str, File]], + ] + ] = None, headers: typing.Optional[typing.Dict[str, typing.Any]] = None, request_options: typing.Optional[RequestOptions] = None, retries: int = 2, omit: typing.Optional[typing.Any] = None, + force_multipart: typing.Optional[bool] = None, ) -> httpx.Response: base_url = self.get_base_url(base_url) timeout = ( @@ -369,6 +397,15 @@ class AsyncHttpClient: else self.base_timeout() ) + request_files: typing.Optional[RequestFiles] = ( + convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) + if (files is not None and files is not omit and isinstance(files, dict)) + else None + ) + + if (request_files is None or len(request_files) == 0) and force_multipart: + request_files = FORCE_MULTIPART + json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) # Add the input to each of these and do None-safety checks @@ -404,11 +441,7 @@ class AsyncHttpClient: json=json_body, data=data_body, content=content, - files=( - convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) - if files is not None - else None - ), + files=request_files, timeout=timeout, ) @@ -442,11 +475,17 @@ class AsyncHttpClient: json: typing.Optional[typing.Any] = None, data: typing.Optional[typing.Any] = None, content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, - files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, + files: typing.Optional[ + typing.Union[ + typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]], + typing.List[typing.Tuple[str, File]], + ] + ] = None, headers: typing.Optional[typing.Dict[str, typing.Any]] = None, request_options: typing.Optional[RequestOptions] = None, retries: int = 2, omit: typing.Optional[typing.Any] = None, + force_multipart: typing.Optional[bool] = None, ) -> typing.AsyncIterator[httpx.Response]: base_url = self.get_base_url(base_url) timeout = ( @@ -455,6 +494,15 @@ class AsyncHttpClient: else self.base_timeout() ) + request_files: typing.Optional[RequestFiles] = ( + convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) + if (files is not None and files is not omit and isinstance(files, dict)) + else None + ) + + if (request_files is None or len(request_files) == 0) and force_multipart: + request_files = FORCE_MULTIPART + json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) async with self.httpx_client.stream( @@ -489,11 +537,7 @@ class AsyncHttpClient: json=json_body, data=data_body, content=content, - files=( - convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) - if files is not None - else None - ), + files=request_files, timeout=timeout, ) as stream: yield stream diff --git a/skyvern/client/core/http_response.py b/skyvern/client/core/http_response.py new file mode 100644 index 00000000..2479747e --- /dev/null +++ b/skyvern/client/core/http_response.py @@ -0,0 +1,55 @@ +# This file was auto-generated by Fern from our API Definition. + +from typing import Dict, Generic, TypeVar + +import httpx + +# Generic to represent the underlying type of the data wrapped by the HTTP response. +T = TypeVar("T") + + +class BaseHttpResponse: + """Minimalist HTTP response wrapper that exposes response headers.""" + + _response: httpx.Response + + def __init__(self, response: httpx.Response): + self._response = response + + @property + def headers(self) -> Dict[str, str]: + return dict(self._response.headers) + + +class HttpResponse(Generic[T], BaseHttpResponse): + """HTTP response wrapper that exposes response headers and data.""" + + _data: T + + def __init__(self, response: httpx.Response, data: T): + super().__init__(response) + self._data = data + + @property + def data(self) -> T: + return self._data + + def close(self) -> None: + self._response.close() + + +class AsyncHttpResponse(Generic[T], BaseHttpResponse): + """HTTP response wrapper that exposes response headers and data.""" + + _data: T + + def __init__(self, response: httpx.Response, data: T): + super().__init__(response) + self._data = data + + @property + def data(self) -> T: + return self._data + + async def close(self) -> None: + await self._response.aclose() diff --git a/skyvern/client/core/http_sse/__init__.py b/skyvern/client/core/http_sse/__init__.py new file mode 100644 index 00000000..730e5a33 --- /dev/null +++ b/skyvern/client/core/http_sse/__init__.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from ._api import EventSource, aconnect_sse, connect_sse + from ._exceptions import SSEError + from ._models import ServerSentEvent +_dynamic_imports: typing.Dict[str, str] = { + "EventSource": "._api", + "SSEError": "._exceptions", + "ServerSentEvent": "._models", + "aconnect_sse": "._api", + "connect_sse": "._api", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["EventSource", "SSEError", "ServerSentEvent", "aconnect_sse", "connect_sse"] diff --git a/skyvern/client/core/http_sse/_api.py b/skyvern/client/core/http_sse/_api.py new file mode 100644 index 00000000..f900b3b6 --- /dev/null +++ b/skyvern/client/core/http_sse/_api.py @@ -0,0 +1,112 @@ +# This file was auto-generated by Fern from our API Definition. + +import re +from contextlib import asynccontextmanager, contextmanager +from typing import Any, AsyncGenerator, AsyncIterator, Iterator, cast + +import httpx +from ._decoders import SSEDecoder +from ._exceptions import SSEError +from ._models import ServerSentEvent + + +class EventSource: + def __init__(self, response: httpx.Response) -> None: + self._response = response + + def _check_content_type(self) -> None: + content_type = self._response.headers.get("content-type", "").partition(";")[0] + if "text/event-stream" not in content_type: + raise SSEError( + f"Expected response header Content-Type to contain 'text/event-stream', got {content_type!r}" + ) + + def _get_charset(self) -> str: + """Extract charset from Content-Type header, fallback to UTF-8.""" + content_type = self._response.headers.get("content-type", "") + + # Parse charset parameter using regex + charset_match = re.search(r"charset=([^;\s]+)", content_type, re.IGNORECASE) + if charset_match: + charset = charset_match.group(1).strip("\"'") + # Validate that it's a known encoding + try: + # Test if the charset is valid by trying to encode/decode + "test".encode(charset).decode(charset) + return charset + except (LookupError, UnicodeError): + # If charset is invalid, fall back to UTF-8 + pass + + # Default to UTF-8 if no charset specified or invalid charset + return "utf-8" + + @property + def response(self) -> httpx.Response: + return self._response + + def iter_sse(self) -> Iterator[ServerSentEvent]: + self._check_content_type() + decoder = SSEDecoder() + charset = self._get_charset() + + buffer = "" + for chunk in self._response.iter_bytes(): + # Decode chunk using detected charset + text_chunk = chunk.decode(charset, errors="replace") + buffer += text_chunk + + # Process complete lines + while "\n" in buffer: + line, buffer = buffer.split("\n", 1) + line = line.rstrip("\r") + sse = decoder.decode(line) + # when we reach a "\n\n" => line = '' + # => decoder will attempt to return an SSE Event + if sse is not None: + yield sse + + # Process any remaining data in buffer + if buffer.strip(): + line = buffer.rstrip("\r") + sse = decoder.decode(line) + if sse is not None: + yield sse + + async def aiter_sse(self) -> AsyncGenerator[ServerSentEvent, None]: + self._check_content_type() + decoder = SSEDecoder() + lines = cast(AsyncGenerator[str, None], self._response.aiter_lines()) + try: + async for line in lines: + line = line.rstrip("\n") + sse = decoder.decode(line) + if sse is not None: + yield sse + finally: + await lines.aclose() + + +@contextmanager +def connect_sse(client: httpx.Client, method: str, url: str, **kwargs: Any) -> Iterator[EventSource]: + headers = kwargs.pop("headers", {}) + headers["Accept"] = "text/event-stream" + headers["Cache-Control"] = "no-store" + + with client.stream(method, url, headers=headers, **kwargs) as response: + yield EventSource(response) + + +@asynccontextmanager +async def aconnect_sse( + client: httpx.AsyncClient, + method: str, + url: str, + **kwargs: Any, +) -> AsyncIterator[EventSource]: + headers = kwargs.pop("headers", {}) + headers["Accept"] = "text/event-stream" + headers["Cache-Control"] = "no-store" + + async with client.stream(method, url, headers=headers, **kwargs) as response: + yield EventSource(response) diff --git a/skyvern/client/core/http_sse/_decoders.py b/skyvern/client/core/http_sse/_decoders.py new file mode 100644 index 00000000..339b0890 --- /dev/null +++ b/skyvern/client/core/http_sse/_decoders.py @@ -0,0 +1,61 @@ +# This file was auto-generated by Fern from our API Definition. + +from typing import List, Optional + +from ._models import ServerSentEvent + + +class SSEDecoder: + def __init__(self) -> None: + self._event = "" + self._data: List[str] = [] + self._last_event_id = "" + self._retry: Optional[int] = None + + def decode(self, line: str) -> Optional[ServerSentEvent]: + # See: https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation # noqa: E501 + + if not line: + if not self._event and not self._data and not self._last_event_id and self._retry is None: + return None + + sse = ServerSentEvent( + event=self._event, + data="\n".join(self._data), + id=self._last_event_id, + retry=self._retry, + ) + + # NOTE: as per the SSE spec, do not reset last_event_id. + self._event = "" + self._data = [] + self._retry = None + + return sse + + if line.startswith(":"): + return None + + fieldname, _, value = line.partition(":") + + if value.startswith(" "): + value = value[1:] + + if fieldname == "event": + self._event = value + elif fieldname == "data": + self._data.append(value) + elif fieldname == "id": + if "\0" in value: + pass + else: + self._last_event_id = value + elif fieldname == "retry": + try: + self._retry = int(value) + except (TypeError, ValueError): + pass + else: + pass # Field is ignored. + + return None diff --git a/skyvern/client/core/http_sse/_exceptions.py b/skyvern/client/core/http_sse/_exceptions.py new file mode 100644 index 00000000..81605a8a --- /dev/null +++ b/skyvern/client/core/http_sse/_exceptions.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import httpx + + +class SSEError(httpx.TransportError): + pass diff --git a/skyvern/client/core/http_sse/_models.py b/skyvern/client/core/http_sse/_models.py new file mode 100644 index 00000000..1af57f8f --- /dev/null +++ b/skyvern/client/core/http_sse/_models.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import json +from dataclasses import dataclass +from typing import Any, Optional + + +@dataclass(frozen=True) +class ServerSentEvent: + event: str = "message" + data: str = "" + id: str = "" + retry: Optional[int] = None + + def json(self) -> Any: + """Parse the data field as JSON.""" + return json.loads(self.data) diff --git a/skyvern/client/core/jsonable_encoder.py b/skyvern/client/core/jsonable_encoder.py index 1b631e90..afee3662 100644 --- a/skyvern/client/core/jsonable_encoder.py +++ b/skyvern/client/core/jsonable_encoder.py @@ -17,7 +17,6 @@ from types import GeneratorType from typing import Any, Callable, Dict, List, Optional, Set, Union import pydantic - from .datetime_utils import serialize_datetime from .pydantic_utilities import ( IS_PYDANTIC_V2, diff --git a/skyvern/client/core/pydantic_utilities.py b/skyvern/client/core/pydantic_utilities.py index ca1f4792..8906cdfa 100644 --- a/skyvern/client/core/pydantic_utilities.py +++ b/skyvern/client/core/pydantic_utilities.py @@ -2,90 +2,66 @@ # nopycln: file import datetime as dt -import typing from collections import defaultdict - -import typing_extensions +from typing import Any, Callable, ClassVar, Dict, List, Mapping, Optional, Set, Tuple, Type, TypeVar, Union, cast import pydantic -from .datetime_utils import serialize_datetime -from .serialization import convert_and_respect_annotation_metadata - IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.") if IS_PYDANTIC_V2: - # isort will try to reformat the comments on these imports, which breaks mypy - # isort: off - from pydantic.v1.datetime_parse import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - parse_date as parse_date, - ) - from pydantic.v1.datetime_parse import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - parse_datetime as parse_datetime, - ) - from pydantic.v1.json import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - ENCODERS_BY_TYPE as encoders_by_type, - ) - from pydantic.v1.typing import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - get_args as get_args, - ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - get_origin as get_origin, - ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - is_literal_type as is_literal_type, - ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - is_union as is_union, - ) - from pydantic.v1.fields import ModelField as ModelField # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 + from pydantic.v1.datetime_parse import parse_date as parse_date + from pydantic.v1.datetime_parse import parse_datetime as parse_datetime + from pydantic.v1.fields import ModelField as ModelField + from pydantic.v1.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore[attr-defined] + from pydantic.v1.typing import get_args as get_args + from pydantic.v1.typing import get_origin as get_origin + from pydantic.v1.typing import is_literal_type as is_literal_type + from pydantic.v1.typing import is_union as is_union else: - from pydantic.datetime_parse import parse_date as parse_date # type: ignore # Pydantic v1 - from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore # Pydantic v1 - from pydantic.fields import ModelField as ModelField # type: ignore # Pydantic v1 - from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore # Pydantic v1 - from pydantic.typing import get_args as get_args # type: ignore # Pydantic v1 - from pydantic.typing import get_origin as get_origin # type: ignore # Pydantic v1 - from pydantic.typing import is_literal_type as is_literal_type # type: ignore # Pydantic v1 - from pydantic.typing import is_union as is_union # type: ignore # Pydantic v1 + from pydantic.datetime_parse import parse_date as parse_date # type: ignore[no-redef] + from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore[no-redef] + from pydantic.fields import ModelField as ModelField # type: ignore[attr-defined, no-redef] + from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore[no-redef] + from pydantic.typing import get_args as get_args # type: ignore[no-redef] + from pydantic.typing import get_origin as get_origin # type: ignore[no-redef] + from pydantic.typing import is_literal_type as is_literal_type # type: ignore[no-redef] + from pydantic.typing import is_union as is_union # type: ignore[no-redef] - # isort: on +from .datetime_utils import serialize_datetime +from .serialization import convert_and_respect_annotation_metadata +from typing_extensions import TypeAlias + +T = TypeVar("T") +Model = TypeVar("Model", bound=pydantic.BaseModel) -T = typing.TypeVar("T") -Model = typing.TypeVar("Model", bound=pydantic.BaseModel) - - -def parse_obj_as(type_: typing.Type[T], object_: typing.Any) -> T: +def parse_obj_as(type_: Type[T], object_: Any) -> T: dealiased_object = convert_and_respect_annotation_metadata(object_=object_, annotation=type_, direction="read") if IS_PYDANTIC_V2: - adapter = pydantic.TypeAdapter(type_) # type: ignore # Pydantic v2 + adapter = pydantic.TypeAdapter(type_) # type: ignore[attr-defined] return adapter.validate_python(dealiased_object) - else: - return pydantic.parse_obj_as(type_, dealiased_object) + return pydantic.parse_obj_as(type_, dealiased_object) -def to_jsonable_with_fallback( - obj: typing.Any, fallback_serializer: typing.Callable[[typing.Any], typing.Any] -) -> typing.Any: +def to_jsonable_with_fallback(obj: Any, fallback_serializer: Callable[[Any], Any]) -> Any: if IS_PYDANTIC_V2: from pydantic_core import to_jsonable_python return to_jsonable_python(obj, fallback=fallback_serializer) - else: - return fallback_serializer(obj) + return fallback_serializer(obj) class UniversalBaseModel(pydantic.BaseModel): if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + model_config: ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( # type: ignore[typeddict-unknown-key] # Allow fields beginning with `model_` to be used in the model protected_namespaces=(), - ) # type: ignore # Pydantic v2 + ) - @pydantic.model_serializer(mode="wrap", when_used="json") # type: ignore # Pydantic v2 - def serialize_model(self, handler: pydantic.SerializerFunctionWrapHandler) -> typing.Any: # type: ignore # Pydantic v2 - serialized = handler(self) + @pydantic.model_serializer(mode="plain", when_used="json") # type: ignore[attr-defined] + def serialize_model(self) -> Any: # type: ignore[name-defined] + serialized = self.dict() # type: ignore[attr-defined] data = {k: serialize_datetime(v) if isinstance(v, dt.datetime) else v for k, v in serialized.items()} return data @@ -96,34 +72,28 @@ class UniversalBaseModel(pydantic.BaseModel): json_encoders = {dt.datetime: serialize_datetime} @classmethod - def model_construct( - cls: typing.Type["Model"], _fields_set: typing.Optional[typing.Set[str]] = None, **values: typing.Any - ) -> "Model": + def model_construct(cls: Type["Model"], _fields_set: Optional[Set[str]] = None, **values: Any) -> "Model": dealiased_object = convert_and_respect_annotation_metadata(object_=values, annotation=cls, direction="read") return cls.construct(_fields_set, **dealiased_object) @classmethod - def construct( - cls: typing.Type["Model"], _fields_set: typing.Optional[typing.Set[str]] = None, **values: typing.Any - ) -> "Model": + def construct(cls: Type["Model"], _fields_set: Optional[Set[str]] = None, **values: Any) -> "Model": dealiased_object = convert_and_respect_annotation_metadata(object_=values, annotation=cls, direction="read") if IS_PYDANTIC_V2: - return super().model_construct(_fields_set, **dealiased_object) # type: ignore # Pydantic v2 - else: - return super().construct(_fields_set, **dealiased_object) + return super().model_construct(_fields_set, **dealiased_object) # type: ignore[misc] + return super().construct(_fields_set, **dealiased_object) - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = { + def json(self, **kwargs: Any) -> str: + kwargs_with_defaults = { "by_alias": True, "exclude_unset": True, **kwargs, } if IS_PYDANTIC_V2: - return super().model_dump_json(**kwargs_with_defaults) # type: ignore # Pydantic v2 - else: - return super().json(**kwargs_with_defaults) + return super().model_dump_json(**kwargs_with_defaults) # type: ignore[misc] + return super().json(**kwargs_with_defaults) - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + def dict(self, **kwargs: Any) -> Dict[str, Any]: """ Override the default dict method to `exclude_unset` by default. This function patches `exclude_unset` to work include fields within non-None default values. @@ -134,21 +104,21 @@ class UniversalBaseModel(pydantic.BaseModel): # We'd ideally do the same for Pydantic V2, but it shells out to a library to serialize models # that we have less control over, and this is less intrusive than custom serializers for now. if IS_PYDANTIC_V2: - kwargs_with_defaults_exclude_unset: typing.Any = { + kwargs_with_defaults_exclude_unset = { **kwargs, "by_alias": True, "exclude_unset": True, "exclude_none": False, } - kwargs_with_defaults_exclude_none: typing.Any = { + kwargs_with_defaults_exclude_none = { **kwargs, "by_alias": True, "exclude_none": True, "exclude_unset": False, } dict_dump = deep_union_pydantic_dicts( - super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore # Pydantic v2 - super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore # Pydantic v2 + super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore[misc] + super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore[misc] ) else: @@ -168,7 +138,7 @@ class UniversalBaseModel(pydantic.BaseModel): if default is not None: self.__fields_set__.add(name) - kwargs_with_defaults_exclude_unset_include_fields: typing.Any = { + kwargs_with_defaults_exclude_unset_include_fields = { "by_alias": True, "exclude_unset": True, "include": _fields_set, @@ -177,15 +147,16 @@ class UniversalBaseModel(pydantic.BaseModel): dict_dump = super().dict(**kwargs_with_defaults_exclude_unset_include_fields) - return convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write") + return cast( + Dict[str, Any], + convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write"), + ) -def _union_list_of_pydantic_dicts( - source: typing.List[typing.Any], destination: typing.List[typing.Any] -) -> typing.List[typing.Any]: - converted_list: typing.List[typing.Any] = [] +def _union_list_of_pydantic_dicts(source: List[Any], destination: List[Any]) -> List[Any]: + converted_list: List[Any] = [] for i, item in enumerate(source): - destination_value = destination[i] # type: ignore + destination_value = destination[i] if isinstance(item, dict): converted_list.append(deep_union_pydantic_dicts(item, destination_value)) elif isinstance(item, list): @@ -195,9 +166,7 @@ def _union_list_of_pydantic_dicts( return converted_list -def deep_union_pydantic_dicts( - source: typing.Dict[str, typing.Any], destination: typing.Dict[str, typing.Any] -) -> typing.Dict[str, typing.Any]: +def deep_union_pydantic_dicts(source: Dict[str, Any], destination: Dict[str, Any]) -> Dict[str, Any]: for key, value in source.items(): node = destination.setdefault(key, {}) if isinstance(value, dict): @@ -215,18 +184,16 @@ def deep_union_pydantic_dicts( if IS_PYDANTIC_V2: - class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore # Pydantic v2 + class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore[misc, name-defined, type-arg] pass - UniversalRootModel: typing_extensions.TypeAlias = V2RootModel # type: ignore + UniversalRootModel: TypeAlias = V2RootModel # type: ignore[misc] else: - UniversalRootModel: typing_extensions.TypeAlias = UniversalBaseModel # type: ignore + UniversalRootModel: TypeAlias = UniversalBaseModel # type: ignore[misc, no-redef] -def encode_by_type(o: typing.Any) -> typing.Any: - encoders_by_class_tuples: typing.Dict[typing.Callable[[typing.Any], typing.Any], typing.Tuple[typing.Any, ...]] = ( - defaultdict(tuple) - ) +def encode_by_type(o: Any) -> Any: + encoders_by_class_tuples: Dict[Callable[[Any], Any], Tuple[Any, ...]] = defaultdict(tuple) for type_, encoder in encoders_by_type.items(): encoders_by_class_tuples[encoder] += (type_,) @@ -237,54 +204,49 @@ def encode_by_type(o: typing.Any) -> typing.Any: return encoder(o) -def update_forward_refs(model: typing.Type["Model"], **localns: typing.Any) -> None: +def update_forward_refs(model: Type["Model"], **localns: Any) -> None: if IS_PYDANTIC_V2: - model.model_rebuild(raise_errors=False) # type: ignore # Pydantic v2 + model.model_rebuild(raise_errors=False) # type: ignore[attr-defined] else: model.update_forward_refs(**localns) # Mirrors Pydantic's internal typing -AnyCallable = typing.Callable[..., typing.Any] +AnyCallable = Callable[..., Any] def universal_root_validator( pre: bool = False, -) -> typing.Callable[[AnyCallable], AnyCallable]: +) -> Callable[[AnyCallable], AnyCallable]: def decorator(func: AnyCallable) -> AnyCallable: if IS_PYDANTIC_V2: - return pydantic.model_validator(mode="before" if pre else "after")(func) # type: ignore # Pydantic v2 - else: - return pydantic.root_validator(pre=pre)(func) # type: ignore # Pydantic v1 + return cast(AnyCallable, pydantic.model_validator(mode="before" if pre else "after")(func)) # type: ignore[attr-defined] + return cast(AnyCallable, pydantic.root_validator(pre=pre)(func)) # type: ignore[call-overload] return decorator -def universal_field_validator(field_name: str, pre: bool = False) -> typing.Callable[[AnyCallable], AnyCallable]: +def universal_field_validator(field_name: str, pre: bool = False) -> Callable[[AnyCallable], AnyCallable]: def decorator(func: AnyCallable) -> AnyCallable: if IS_PYDANTIC_V2: - return pydantic.field_validator(field_name, mode="before" if pre else "after")(func) # type: ignore # Pydantic v2 - else: - return pydantic.validator(field_name, pre=pre)(func) # type: ignore # Pydantic v1 + return cast(AnyCallable, pydantic.field_validator(field_name, mode="before" if pre else "after")(func)) # type: ignore[attr-defined] + return cast(AnyCallable, pydantic.validator(field_name, pre=pre)(func)) return decorator -PydanticField = typing.Union[ModelField, pydantic.fields.FieldInfo] +PydanticField = Union[ModelField, pydantic.fields.FieldInfo] -def _get_model_fields( - model: typing.Type["Model"], -) -> typing.Mapping[str, PydanticField]: +def _get_model_fields(model: Type["Model"]) -> Mapping[str, PydanticField]: if IS_PYDANTIC_V2: - return model.model_fields # type: ignore # Pydantic v2 - else: - return model.__fields__ # type: ignore # Pydantic v1 + return cast(Mapping[str, PydanticField], model.model_fields) # type: ignore[attr-defined] + return cast(Mapping[str, PydanticField], model.__fields__) -def _get_field_default(field: PydanticField) -> typing.Any: +def _get_field_default(field: PydanticField) -> Any: try: - value = field.get_default() # type: ignore # Pydantic < v1.10.15 + value = field.get_default() # type: ignore[union-attr] except: value = field.default if IS_PYDANTIC_V2: diff --git a/skyvern/client/core/serialization.py b/skyvern/client/core/serialization.py index cb5dcbf9..c36e865c 100644 --- a/skyvern/client/core/serialization.py +++ b/skyvern/client/core/serialization.py @@ -4,9 +4,8 @@ import collections import inspect import typing -import typing_extensions - import pydantic +import typing_extensions class FieldMetadata: @@ -161,7 +160,12 @@ def _convert_mapping( direction: typing.Literal["read", "write"], ) -> typing.Mapping[str, object]: converted_object: typing.Dict[str, object] = {} - annotations = typing_extensions.get_type_hints(expected_type, include_extras=True) + try: + annotations = typing_extensions.get_type_hints(expected_type, include_extras=True) + except NameError: + # The TypedDict contains a circular reference, so + # we use the __annotations__ attribute directly. + annotations = getattr(expected_type, "__annotations__", {}) aliases_to_field_names = _get_alias_to_field_name(annotations) for key, value in object_.items(): if direction == "read" and key in aliases_to_field_names: diff --git a/skyvern/client/errors/__init__.py b/skyvern/client/errors/__init__.py index 2511a0e6..ccd00f5f 100644 --- a/skyvern/client/errors/__init__.py +++ b/skyvern/client/errors/__init__.py @@ -1,8 +1,42 @@ # This file was auto-generated by Fern from our API Definition. -from .bad_request_error import BadRequestError -from .forbidden_error import ForbiddenError -from .not_found_error import NotFoundError -from .unprocessable_entity_error import UnprocessableEntityError +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .bad_request_error import BadRequestError + from .forbidden_error import ForbiddenError + from .not_found_error import NotFoundError + from .unprocessable_entity_error import UnprocessableEntityError +_dynamic_imports: typing.Dict[str, str] = { + "BadRequestError": ".bad_request_error", + "ForbiddenError": ".forbidden_error", + "NotFoundError": ".not_found_error", + "UnprocessableEntityError": ".unprocessable_entity_error", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["BadRequestError", "ForbiddenError", "NotFoundError", "UnprocessableEntityError"] diff --git a/skyvern/client/errors/bad_request_error.py b/skyvern/client/errors/bad_request_error.py index 9c13c61f..baf5be4f 100644 --- a/skyvern/client/errors/bad_request_error.py +++ b/skyvern/client/errors/bad_request_error.py @@ -1,9 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.api_error import ApiError import typing +from ..core.api_error import ApiError + class BadRequestError(ApiError): - def __init__(self, body: typing.Optional[typing.Any]): - super().__init__(status_code=400, body=body) + def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None): + super().__init__(status_code=400, headers=headers, body=body) diff --git a/skyvern/client/errors/forbidden_error.py b/skyvern/client/errors/forbidden_error.py index d17eb4b9..3e390b0d 100644 --- a/skyvern/client/errors/forbidden_error.py +++ b/skyvern/client/errors/forbidden_error.py @@ -1,9 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.api_error import ApiError import typing +from ..core.api_error import ApiError + class ForbiddenError(ApiError): - def __init__(self, body: typing.Optional[typing.Any]): - super().__init__(status_code=403, body=body) + def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None): + super().__init__(status_code=403, headers=headers, body=body) diff --git a/skyvern/client/errors/not_found_error.py b/skyvern/client/errors/not_found_error.py index a1235b87..dcd60e38 100644 --- a/skyvern/client/errors/not_found_error.py +++ b/skyvern/client/errors/not_found_error.py @@ -1,9 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.api_error import ApiError import typing +from ..core.api_error import ApiError + class NotFoundError(ApiError): - def __init__(self, body: typing.Optional[typing.Any]): - super().__init__(status_code=404, body=body) + def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None): + super().__init__(status_code=404, headers=headers, body=body) diff --git a/skyvern/client/errors/unprocessable_entity_error.py b/skyvern/client/errors/unprocessable_entity_error.py index 5666f362..93cb1ab3 100644 --- a/skyvern/client/errors/unprocessable_entity_error.py +++ b/skyvern/client/errors/unprocessable_entity_error.py @@ -1,9 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.api_error import ApiError import typing +from ..core.api_error import ApiError + class UnprocessableEntityError(ApiError): - def __init__(self, body: typing.Optional[typing.Any]): - super().__init__(status_code=422, body=body) + def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None): + super().__init__(status_code=422, headers=headers, body=body) diff --git a/skyvern/client/raw_client.py b/skyvern/client/raw_client.py new file mode 100644 index 00000000..ea71b621 --- /dev/null +++ b/skyvern/client/raw_client.py @@ -0,0 +1,4066 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from .core.api_error import ApiError +from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .core.http_response import AsyncHttpResponse, HttpResponse +from .core.jsonable_encoder import jsonable_encoder +from .core.pydantic_utilities import parse_obj_as +from .core.request_options import RequestOptions +from .core.serialization import convert_and_respect_annotation_metadata +from .errors.bad_request_error import BadRequestError +from .errors.forbidden_error import ForbiddenError +from .errors.not_found_error import NotFoundError +from .errors.unprocessable_entity_error import UnprocessableEntityError +from .types.artifact import Artifact +from .types.artifact_type import ArtifactType +from .types.browser_session_response import BrowserSessionResponse +from .types.create_credential_request_credential import CreateCredentialRequestCredential +from .types.create_script_response import CreateScriptResponse +from .types.credential_response import CredentialResponse +from .types.get_run_response import GetRunResponse +from .types.proxy_location import ProxyLocation +from .types.run_engine import RunEngine +from .types.script import Script +from .types.script_file_create import ScriptFileCreate +from .types.skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType +from .types.skyvern_schemas_run_blocks_credential_type import SkyvernSchemasRunBlocksCredentialType +from .types.task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema +from .types.task_run_response import TaskRunResponse +from .types.totp_code import TotpCode +from .types.workflow import Workflow +from .types.workflow_create_yaml_request import WorkflowCreateYamlRequest +from .types.workflow_run_response import WorkflowRunResponse +from .types.workflow_run_timeline import WorkflowRunTimeline + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawSkyvern: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def run_task( + self, + *, + prompt: str, + user_agent: typing.Optional[str] = None, + url: typing.Optional[str] = OMIT, + engine: typing.Optional[RunEngine] = OMIT, + title: typing.Optional[str] = OMIT, + proxy_location: typing.Optional[ProxyLocation] = OMIT, + data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT, + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, + max_steps: typing.Optional[int] = OMIT, + webhook_url: typing.Optional[str] = OMIT, + totp_identifier: typing.Optional[str] = OMIT, + totp_url: typing.Optional[str] = OMIT, + browser_session_id: typing.Optional[str] = OMIT, + model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, + publish_workflow: typing.Optional[bool] = OMIT, + include_action_history_in_verification: typing.Optional[bool] = OMIT, + max_screenshot_scrolls: typing.Optional[int] = OMIT, + browser_address: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[TaskRunResponse]: + """ + Run a task + + Parameters + ---------- + prompt : str + + The goal or task description for Skyvern to accomplish + + user_agent : typing.Optional[str] + + url : typing.Optional[str] + + The starting URL for the task. If not provided, Skyvern will attempt to determine an appropriate URL + + engine : typing.Optional[RunEngine] + + The engine that powers the agent task. The default value is `skyvern-2.0`, the latest Skyvern agent that performs pretty well with complex and multi-step tasks. `skyvern-1.0` is good for simple tasks like filling a form, or searching for information on Google. The `openai-cua` engine uses OpenAI's CUA model. The `anthropic-cua` uses Anthropic's Claude Sonnet 3.7 model with the computer use tool. + + title : typing.Optional[str] + The title for the task + + proxy_location : typing.Optional[ProxyLocation] + + Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. + + Available geotargeting options: + - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy. + - RESIDENTIAL_ES: Spain + - RESIDENTIAL_IE: Ireland + - RESIDENTIAL_GB: United Kingdom + - RESIDENTIAL_IN: India + - RESIDENTIAL_JP: Japan + - RESIDENTIAL_FR: France + - RESIDENTIAL_DE: Germany + - RESIDENTIAL_NZ: New Zealand + - RESIDENTIAL_ZA: South Africa + - RESIDENTIAL_AR: Argentina + - RESIDENTIAL_AU: Australia + - RESIDENTIAL_ISP: ISP proxy + - US-CA: California + - US-NY: New York + - US-TX: Texas + - US-FL: Florida + - US-WA: Washington + - NONE: No proxy + + data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema] + + The schema for data to be extracted from the webpage. If you're looking for consistent data schema being returned by the agent, it's highly recommended to use https://json-schema.org/. + + error_code_mapping : typing.Optional[typing.Dict[str, typing.Optional[str]]] + + Custom mapping of error codes to error messages if Skyvern encounters an error. + + max_steps : typing.Optional[int] + + Maximum number of steps the task can take. Task will fail if it exceeds this number. Cautions: you are charged per step so please set this number to a reasonable value. Contact sales@skyvern.com for custom pricing. + + webhook_url : typing.Optional[str] + + After a run is finished, send an update to this URL. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for more details. + + totp_identifier : typing.Optional[str] + + Identifier for the TOTP/2FA/MFA code when the code is pushed to Skyvern. Refer to https://www.skyvern.com/docs/credentials/totp#option-3-push-code-to-skyvern for more details. + + totp_url : typing.Optional[str] + + URL that serves TOTP/2FA/MFA codes for Skyvern to use during the workflow run. Refer to https://www.skyvern.com/docs/credentials/totp#option-2-get-code-from-your-endpoint for more details. + + browser_session_id : typing.Optional[str] + + Run the task or workflow in the specific Skyvern browser session. Having a browser session can persist the real-time state of the browser, so that the next run can continue from where the previous run left off. + + model : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + Optional model configuration. + + extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]] + The extra HTTP headers for the requests in browser. + + publish_workflow : typing.Optional[bool] + Whether to publish this task as a reusable workflow. Only available for skyvern-2.0. + + include_action_history_in_verification : typing.Optional[bool] + Whether to include action history when verifying that the task is complete + + max_screenshot_scrolls : typing.Optional[int] + The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot. + + browser_address : typing.Optional[str] + The CDP address for the task. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[TaskRunResponse] + Successfully run task + """ + _response = self._client_wrapper.httpx_client.request( + "v1/run/tasks", + method="POST", + json={ + "prompt": prompt, + "url": url, + "engine": engine, + "title": title, + "proxy_location": proxy_location, + "data_extraction_schema": convert_and_respect_annotation_metadata( + object_=data_extraction_schema, annotation=TaskRunRequestDataExtractionSchema, direction="write" + ), + "error_code_mapping": error_code_mapping, + "max_steps": max_steps, + "webhook_url": webhook_url, + "totp_identifier": totp_identifier, + "totp_url": totp_url, + "browser_session_id": browser_session_id, + "model": model, + "extra_http_headers": extra_http_headers, + "publish_workflow": publish_workflow, + "include_action_history_in_verification": include_action_history_in_verification, + "max_screenshot_scrolls": max_screenshot_scrolls, + "browser_address": browser_address, + }, + headers={ + "content-type": "application/json", + "x-user-agent": str(user_agent) if user_agent is not None else None, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + TaskRunResponse, + parse_obj_as( + type_=TaskRunResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def run_workflow( + self, + *, + workflow_id: str, + template: typing.Optional[bool] = None, + max_steps_override: typing.Optional[int] = None, + user_agent: typing.Optional[str] = None, + parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + title: typing.Optional[str] = OMIT, + proxy_location: typing.Optional[ProxyLocation] = OMIT, + webhook_url: typing.Optional[str] = OMIT, + totp_url: typing.Optional[str] = OMIT, + totp_identifier: typing.Optional[str] = OMIT, + browser_session_id: typing.Optional[str] = OMIT, + max_screenshot_scrolls: typing.Optional[int] = OMIT, + extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, + browser_address: typing.Optional[str] = OMIT, + ai_fallback: typing.Optional[bool] = OMIT, + run_with: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[WorkflowRunResponse]: + """ + Run a workflow + + Parameters + ---------- + workflow_id : str + ID of the workflow to run. Workflow ID starts with `wpid_`. + + template : typing.Optional[bool] + + max_steps_override : typing.Optional[int] + + user_agent : typing.Optional[str] + + parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + Parameters to pass to the workflow + + title : typing.Optional[str] + The title for this workflow run + + proxy_location : typing.Optional[ProxyLocation] + + Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. + + Available geotargeting options: + - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy. + - RESIDENTIAL_ES: Spain + - RESIDENTIAL_IE: Ireland + - RESIDENTIAL_GB: United Kingdom + - RESIDENTIAL_IN: India + - RESIDENTIAL_JP: Japan + - RESIDENTIAL_FR: France + - RESIDENTIAL_DE: Germany + - RESIDENTIAL_NZ: New Zealand + - RESIDENTIAL_ZA: South Africa + - RESIDENTIAL_AR: Argentina + - RESIDENTIAL_AU: Australia + - RESIDENTIAL_ISP: ISP proxy + - US-CA: California + - US-NY: New York + - US-TX: Texas + - US-FL: Florida + - US-WA: Washington + - NONE: No proxy + + webhook_url : typing.Optional[str] + URL to send workflow status updates to after a run is finished. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for webhook questions. + + totp_url : typing.Optional[str] + + URL that serves TOTP/2FA/MFA codes for Skyvern to use during the workflow run. Refer to https://www.skyvern.com/docs/credentials/totp#option-2-get-code-from-your-endpoint for more details. + + totp_identifier : typing.Optional[str] + + Identifier for the TOTP/2FA/MFA code when the code is pushed to Skyvern. Refer to https://www.skyvern.com/docs/credentials/totp#option-3-push-code-to-skyvern for more details. + + browser_session_id : typing.Optional[str] + ID of a Skyvern browser session to reuse, having it continue from the current screen state + + max_screenshot_scrolls : typing.Optional[int] + The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot. + + extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]] + The extra HTTP headers for the requests in browser. + + browser_address : typing.Optional[str] + The CDP address for the workflow run. + + ai_fallback : typing.Optional[bool] + Whether to fallback to AI if the workflow run fails. + + run_with : typing.Optional[str] + Whether to run the workflow with agent or code. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[WorkflowRunResponse] + Successfully run workflow + """ + _response = self._client_wrapper.httpx_client.request( + "v1/run/workflows", + method="POST", + params={ + "template": template, + }, + json={ + "workflow_id": workflow_id, + "parameters": parameters, + "title": title, + "proxy_location": proxy_location, + "webhook_url": webhook_url, + "totp_url": totp_url, + "totp_identifier": totp_identifier, + "browser_session_id": browser_session_id, + "max_screenshot_scrolls": max_screenshot_scrolls, + "extra_http_headers": extra_http_headers, + "browser_address": browser_address, + "ai_fallback": ai_fallback, + "run_with": run_with, + }, + headers={ + "content-type": "application/json", + "x-max-steps-override": str(max_steps_override) if max_steps_override is not None else None, + "x-user-agent": str(user_agent) if user_agent is not None else None, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + WorkflowRunResponse, + parse_obj_as( + type_=WorkflowRunResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_run( + self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[GetRunResponse]: + """ + Get run information (task run, workflow run) + + Parameters + ---------- + run_id : str + The id of the task run or the workflow run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetRunResponse] + Successfully got run + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/runs/{jsonable_encoder(run_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetRunResponse, + parse_obj_as( + type_=GetRunResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def cancel_run( + self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.Optional[typing.Any]]: + """ + Cancel a run (task or workflow) + + Parameters + ---------- + run_id : str + The id of the task run or the workflow run to cancel. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/runs/{jsonable_encoder(run_id)}/cancel", + method="POST", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_workflows( + self, + *, + page: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, + only_saved_tasks: typing.Optional[bool] = None, + only_workflows: typing.Optional[bool] = None, + search_key: typing.Optional[str] = None, + title: typing.Optional[str] = None, + template: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[typing.List[Workflow]]: + """ + Get all workflows with the latest version for the organization. + + Search semantics: + - If `search_key` is provided, its value is used as a unified search term for both + `workflows.title` and workflow parameter metadata (key, description, and default_value for + `WorkflowParameterModel`). + - Falls back to deprecated `title` (title-only search) if `search_key` is not provided. + - Parameter metadata search excludes soft-deleted parameter rows across all parameter tables. + + Parameters + ---------- + page : typing.Optional[int] + + page_size : typing.Optional[int] + + only_saved_tasks : typing.Optional[bool] + + only_workflows : typing.Optional[bool] + + search_key : typing.Optional[str] + Unified search across workflow title and parameter metadata (key, description, default_value). + + title : typing.Optional[str] + Deprecated: use search_key instead. + + template : typing.Optional[bool] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[Workflow]] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/workflows", + method="GET", + params={ + "page": page, + "page_size": page_size, + "only_saved_tasks": only_saved_tasks, + "only_workflows": only_workflows, + "search_key": search_key, + "title": title, + "template": template, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[Workflow], + parse_obj_as( + type_=typing.List[Workflow], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create_workflow( + self, + *, + json_definition: typing.Optional[WorkflowCreateYamlRequest] = OMIT, + yaml_definition: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Workflow]: + """ + Create a new workflow + + Parameters + ---------- + json_definition : typing.Optional[WorkflowCreateYamlRequest] + Workflow definition in JSON format + + yaml_definition : typing.Optional[str] + Workflow definition in YAML format + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Workflow] + Successfully created workflow + """ + _response = self._client_wrapper.httpx_client.request( + "v1/workflows", + method="POST", + json={ + "json_definition": convert_and_respect_annotation_metadata( + object_=json_definition, annotation=WorkflowCreateYamlRequest, direction="write" + ), + "yaml_definition": yaml_definition, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Workflow, + parse_obj_as( + type_=Workflow, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update_workflow( + self, + workflow_id: str, + *, + json_definition: typing.Optional[WorkflowCreateYamlRequest] = OMIT, + yaml_definition: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Workflow]: + """ + Update a workflow + + Parameters + ---------- + workflow_id : str + The ID of the workflow to update. Workflow ID starts with `wpid_`. + + json_definition : typing.Optional[WorkflowCreateYamlRequest] + Workflow definition in JSON format + + yaml_definition : typing.Optional[str] + Workflow definition in YAML format + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Workflow] + Successfully updated workflow + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/workflows/{jsonable_encoder(workflow_id)}", + method="POST", + json={ + "json_definition": convert_and_respect_annotation_metadata( + object_=json_definition, annotation=WorkflowCreateYamlRequest, direction="write" + ), + "yaml_definition": yaml_definition, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Workflow, + parse_obj_as( + type_=Workflow, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete_workflow( + self, workflow_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.Optional[typing.Any]]: + """ + Delete a workflow + + Parameters + ---------- + workflow_id : str + The ID of the workflow to delete. Workflow ID starts with `wpid_`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.Optional[typing.Any]] + Successfully deleted workflow + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/workflows/{jsonable_encoder(workflow_id)}/delete", + method="POST", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_artifact( + self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[Artifact]: + """ + Get an artifact + + Parameters + ---------- + artifact_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Artifact] + Successfully retrieved artifact + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/artifacts/{jsonable_encoder(artifact_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Artifact, + parse_obj_as( + type_=Artifact, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_run_artifacts( + self, + run_id: str, + *, + artifact_type: typing.Optional[typing.Union[ArtifactType, typing.Sequence[ArtifactType]]] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[typing.List[Artifact]]: + """ + Get artifacts for a run + + Parameters + ---------- + run_id : str + The id of the task run or the workflow run. + + artifact_type : typing.Optional[typing.Union[ArtifactType, typing.Sequence[ArtifactType]]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[Artifact]] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/runs/{jsonable_encoder(run_id)}/artifacts", + method="GET", + params={ + "artifact_type": artifact_type, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[Artifact], + parse_obj_as( + type_=typing.List[Artifact], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def retry_run_webhook( + self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.Optional[typing.Any]]: + """ + Retry sending the webhook for a run + + Parameters + ---------- + run_id : str + The id of the task run or the workflow run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/runs/{jsonable_encoder(run_id)}/retry_webhook", + method="POST", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_run_timeline( + self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.List[WorkflowRunTimeline]]: + """ + Get timeline for a run (workflow run or task_v2 run) + + Parameters + ---------- + run_id : str + The id of the workflow run or task_v2 run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[WorkflowRunTimeline]] + Successfully retrieved run timeline + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/runs/{jsonable_encoder(run_id)}/timeline", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[WorkflowRunTimeline], + parse_obj_as( + type_=typing.List[WorkflowRunTimeline], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_browser_sessions( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.List[BrowserSessionResponse]]: + """ + Get all active browser sessions for the organization + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[BrowserSessionResponse]] + Successfully retrieved all active browser sessions + """ + _response = self._client_wrapper.httpx_client.request( + "v1/browser_sessions", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[BrowserSessionResponse], + parse_obj_as( + type_=typing.List[BrowserSessionResponse], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create_browser_session( + self, + *, + timeout: typing.Optional[int] = OMIT, + proxy_location: typing.Optional[ProxyLocation] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[BrowserSessionResponse]: + """ + Create a browser session that persists across multiple runs + + Parameters + ---------- + timeout : typing.Optional[int] + Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 1440. Defaults to 60. + + proxy_location : typing.Optional[ProxyLocation] + + Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. + + Available geotargeting options: + - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy. + - RESIDENTIAL_ES: Spain + - RESIDENTIAL_IE: Ireland + - RESIDENTIAL_GB: United Kingdom + - RESIDENTIAL_IN: India + - RESIDENTIAL_JP: Japan + - RESIDENTIAL_FR: France + - RESIDENTIAL_DE: Germany + - RESIDENTIAL_NZ: New Zealand + - RESIDENTIAL_ZA: South Africa + - RESIDENTIAL_AR: Argentina + - RESIDENTIAL_AU: Australia + - RESIDENTIAL_ISP: ISP proxy + - US-CA: California + - US-NY: New York + - US-TX: Texas + - US-FL: Florida + - US-WA: Washington + - NONE: No proxy + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[BrowserSessionResponse] + Successfully created browser session + """ + _response = self._client_wrapper.httpx_client.request( + "v1/browser_sessions", + method="POST", + json={ + "timeout": timeout, + "proxy_location": proxy_location, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + BrowserSessionResponse, + parse_obj_as( + type_=BrowserSessionResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def close_browser_session( + self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.Optional[typing.Any]]: + """ + Close a session. Once closed, the session cannot be used again. + + Parameters + ---------- + browser_session_id : str + The ID of the browser session to close. completed_at will be set when the browser session is closed. browser_session_id starts with `pbs_` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.Optional[typing.Any]] + Successfully closed browser session + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}/close", + method="POST", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_browser_session( + self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[BrowserSessionResponse]: + """ + Get details about a specific browser session, including the browser address for cdp connection. + + Parameters + ---------- + browser_session_id : str + The ID of the browser session. browser_session_id starts with `pbs_` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[BrowserSessionResponse] + Successfully retrieved browser session details + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + BrowserSessionResponse, + parse_obj_as( + type_=BrowserSessionResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def send_totp_code( + self, + *, + totp_identifier: str, + content: str, + task_id: typing.Optional[str] = OMIT, + workflow_id: typing.Optional[str] = OMIT, + workflow_run_id: typing.Optional[str] = OMIT, + source: typing.Optional[str] = OMIT, + expired_at: typing.Optional[dt.datetime] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[TotpCode]: + """ + Forward a TOTP (2FA, MFA) email or sms message containing the code to Skyvern. This endpoint stores the code in database so that Skyvern can use it while running tasks/workflows. + + Parameters + ---------- + totp_identifier : str + The identifier of the TOTP code. It can be the email address, phone number, or the identifier of the user. + + content : str + The content of the TOTP code. It can be the email content that contains the TOTP code, or the sms message that contains the TOTP code. Skyvern will automatically extract the TOTP code from the content. + + task_id : typing.Optional[str] + The task_id the totp code is for. It can be the task_id of the task that the TOTP code is for. + + workflow_id : typing.Optional[str] + The workflow ID the TOTP code is for. It can be the workflow ID of the workflow that the TOTP code is for. + + workflow_run_id : typing.Optional[str] + The workflow run id that the TOTP code is for. It can be the workflow run id of the workflow run that the TOTP code is for. + + source : typing.Optional[str] + An optional field. The source of the TOTP code. e.g. email, sms, etc. + + expired_at : typing.Optional[dt.datetime] + The timestamp when the TOTP code expires + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[TotpCode] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/credentials/totp", + method="POST", + json={ + "totp_identifier": totp_identifier, + "task_id": task_id, + "workflow_id": workflow_id, + "workflow_run_id": workflow_run_id, + "source": source, + "content": content, + "expired_at": expired_at, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + TotpCode, + parse_obj_as( + type_=TotpCode, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_credentials( + self, + *, + page: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[typing.List[CredentialResponse]]: + """ + Retrieves a paginated list of credentials for the current organization + + Parameters + ---------- + page : typing.Optional[int] + Page number for pagination + + page_size : typing.Optional[int] + Number of items per page + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[CredentialResponse]] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/credentials", + method="GET", + params={ + "page": page, + "page_size": page_size, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[CredentialResponse], + parse_obj_as( + type_=typing.List[CredentialResponse], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create_credential( + self, + *, + name: str, + credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType, + credential: CreateCredentialRequestCredential, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[CredentialResponse]: + """ + Creates a new credential for the current organization + + Parameters + ---------- + name : str + Name of the credential + + credential_type : SkyvernForgeSdkSchemasCredentialsCredentialType + Type of credential to create + + credential : CreateCredentialRequestCredential + The credential data to store + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CredentialResponse] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/credentials", + method="POST", + json={ + "name": name, + "credential_type": credential_type, + "credential": convert_and_respect_annotation_metadata( + object_=credential, annotation=CreateCredentialRequestCredential, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CredentialResponse, + parse_obj_as( + type_=CredentialResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete_credential( + self, credential_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[None]: + """ + Deletes a specific credential by its ID + + Parameters + ---------- + credential_id : str + The unique identifier of the credential to delete + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[None] + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/credentials/{jsonable_encoder(credential_id)}/delete", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return HttpResponse(response=_response, data=None) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_credential( + self, credential_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[CredentialResponse]: + """ + Retrieves a specific credential by its ID + + Parameters + ---------- + credential_id : str + The unique identifier of the credential + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CredentialResponse] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/credentials/{jsonable_encoder(credential_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CredentialResponse, + parse_obj_as( + type_=CredentialResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def login( + self, + *, + credential_type: SkyvernSchemasRunBlocksCredentialType, + url: typing.Optional[str] = OMIT, + prompt: typing.Optional[str] = OMIT, + webhook_url: typing.Optional[str] = OMIT, + proxy_location: typing.Optional[ProxyLocation] = OMIT, + totp_identifier: typing.Optional[str] = OMIT, + totp_url: typing.Optional[str] = OMIT, + browser_session_id: typing.Optional[str] = OMIT, + browser_address: typing.Optional[str] = OMIT, + extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, + max_screenshot_scrolling_times: typing.Optional[int] = OMIT, + credential_id: typing.Optional[str] = OMIT, + bitwarden_collection_id: typing.Optional[str] = OMIT, + bitwarden_item_id: typing.Optional[str] = OMIT, + onepassword_vault_id: typing.Optional[str] = OMIT, + onepassword_item_id: typing.Optional[str] = OMIT, + azure_vault_name: typing.Optional[str] = OMIT, + azure_vault_username_key: typing.Optional[str] = OMIT, + azure_vault_password_key: typing.Optional[str] = OMIT, + azure_vault_totp_secret_key: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[WorkflowRunResponse]: + """ + Log in to a website using either credential stored in Skyvern, Bitwarden, 1Password, or Azure Vault + + Parameters + ---------- + credential_type : SkyvernSchemasRunBlocksCredentialType + Where to get the credential from + + url : typing.Optional[str] + Website url + + prompt : typing.Optional[str] + Login instructions. Skyvern has default prompt/instruction for login if this field is not provided. + + webhook_url : typing.Optional[str] + Webhook URL to send login status updates + + proxy_location : typing.Optional[ProxyLocation] + Proxy location to use + + totp_identifier : typing.Optional[str] + Identifier for TOTP (Time-based One-Time Password) if required + + totp_url : typing.Optional[str] + TOTP URL to fetch one-time passwords + + browser_session_id : typing.Optional[str] + ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456` + + browser_address : typing.Optional[str] + The CDP address for the task. + + extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]] + Additional HTTP headers to include in requests + + max_screenshot_scrolling_times : typing.Optional[int] + Maximum number of times to scroll for screenshots + + credential_id : typing.Optional[str] + ID of the Skyvern credential to use for login. + + bitwarden_collection_id : typing.Optional[str] + Bitwarden collection ID. You can find it in the Bitwarden collection URL. e.g. `https://vault.bitwarden.com/vaults/collection_id/items` + + bitwarden_item_id : typing.Optional[str] + Bitwarden item ID + + onepassword_vault_id : typing.Optional[str] + 1Password vault ID + + onepassword_item_id : typing.Optional[str] + 1Password item ID + + azure_vault_name : typing.Optional[str] + Azure Vault Name + + azure_vault_username_key : typing.Optional[str] + Azure Vault username key + + azure_vault_password_key : typing.Optional[str] + Azure Vault password key + + azure_vault_totp_secret_key : typing.Optional[str] + Azure Vault TOTP secret key + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[WorkflowRunResponse] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/run/tasks/login", + method="POST", + json={ + "credential_type": credential_type, + "url": url, + "prompt": prompt, + "webhook_url": webhook_url, + "proxy_location": proxy_location, + "totp_identifier": totp_identifier, + "totp_url": totp_url, + "browser_session_id": browser_session_id, + "browser_address": browser_address, + "extra_http_headers": extra_http_headers, + "max_screenshot_scrolling_times": max_screenshot_scrolling_times, + "credential_id": credential_id, + "bitwarden_collection_id": bitwarden_collection_id, + "bitwarden_item_id": bitwarden_item_id, + "onepassword_vault_id": onepassword_vault_id, + "onepassword_item_id": onepassword_item_id, + "azure_vault_name": azure_vault_name, + "azure_vault_username_key": azure_vault_username_key, + "azure_vault_password_key": azure_vault_password_key, + "azure_vault_totp_secret_key": azure_vault_totp_secret_key, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + WorkflowRunResponse, + parse_obj_as( + type_=WorkflowRunResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_scripts( + self, + *, + page: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[typing.List[Script]]: + """ + Retrieves a paginated list of scripts for the current organization + + Parameters + ---------- + page : typing.Optional[int] + Page number for pagination + + page_size : typing.Optional[int] + Number of items per page + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[Script]] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/scripts", + method="GET", + params={ + "page": page, + "page_size": page_size, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[Script], + parse_obj_as( + type_=typing.List[Script], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create_script( + self, + *, + workflow_id: typing.Optional[str] = OMIT, + run_id: typing.Optional[str] = OMIT, + files: typing.Optional[typing.Sequence[ScriptFileCreate]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[CreateScriptResponse]: + """ + Create a new script with optional files and metadata + + Parameters + ---------- + workflow_id : typing.Optional[str] + Associated workflow ID + + run_id : typing.Optional[str] + Associated run ID + + files : typing.Optional[typing.Sequence[ScriptFileCreate]] + Array of files to include in the script + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CreateScriptResponse] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v1/scripts", + method="POST", + json={ + "workflow_id": workflow_id, + "run_id": run_id, + "files": convert_and_respect_annotation_metadata( + object_=files, annotation=typing.Sequence[ScriptFileCreate], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateScriptResponse, + parse_obj_as( + type_=CreateScriptResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_script( + self, script_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[Script]: + """ + Retrieves a specific script by its ID + + Parameters + ---------- + script_id : str + The unique identifier of the script + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Script] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/scripts/{jsonable_encoder(script_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Script, + parse_obj_as( + type_=Script, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def deploy_script( + self, + script_id: str, + *, + files: typing.Sequence[ScriptFileCreate], + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[CreateScriptResponse]: + """ + Deploy a script with updated files, creating a new version + + Parameters + ---------- + script_id : str + The unique identifier of the script + + files : typing.Sequence[ScriptFileCreate] + Array of files to include in the script + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CreateScriptResponse] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/scripts/{jsonable_encoder(script_id)}/deploy", + method="POST", + json={ + "files": convert_and_respect_annotation_metadata( + object_=files, annotation=typing.Sequence[ScriptFileCreate], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateScriptResponse, + parse_obj_as( + type_=CreateScriptResponse, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawSkyvern: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def run_task( + self, + *, + prompt: str, + user_agent: typing.Optional[str] = None, + url: typing.Optional[str] = OMIT, + engine: typing.Optional[RunEngine] = OMIT, + title: typing.Optional[str] = OMIT, + proxy_location: typing.Optional[ProxyLocation] = OMIT, + data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT, + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, + max_steps: typing.Optional[int] = OMIT, + webhook_url: typing.Optional[str] = OMIT, + totp_identifier: typing.Optional[str] = OMIT, + totp_url: typing.Optional[str] = OMIT, + browser_session_id: typing.Optional[str] = OMIT, + model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, + publish_workflow: typing.Optional[bool] = OMIT, + include_action_history_in_verification: typing.Optional[bool] = OMIT, + max_screenshot_scrolls: typing.Optional[int] = OMIT, + browser_address: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[TaskRunResponse]: + """ + Run a task + + Parameters + ---------- + prompt : str + + The goal or task description for Skyvern to accomplish + + user_agent : typing.Optional[str] + + url : typing.Optional[str] + + The starting URL for the task. If not provided, Skyvern will attempt to determine an appropriate URL + + engine : typing.Optional[RunEngine] + + The engine that powers the agent task. The default value is `skyvern-2.0`, the latest Skyvern agent that performs pretty well with complex and multi-step tasks. `skyvern-1.0` is good for simple tasks like filling a form, or searching for information on Google. The `openai-cua` engine uses OpenAI's CUA model. The `anthropic-cua` uses Anthropic's Claude Sonnet 3.7 model with the computer use tool. + + title : typing.Optional[str] + The title for the task + + proxy_location : typing.Optional[ProxyLocation] + + Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. + + Available geotargeting options: + - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy. + - RESIDENTIAL_ES: Spain + - RESIDENTIAL_IE: Ireland + - RESIDENTIAL_GB: United Kingdom + - RESIDENTIAL_IN: India + - RESIDENTIAL_JP: Japan + - RESIDENTIAL_FR: France + - RESIDENTIAL_DE: Germany + - RESIDENTIAL_NZ: New Zealand + - RESIDENTIAL_ZA: South Africa + - RESIDENTIAL_AR: Argentina + - RESIDENTIAL_AU: Australia + - RESIDENTIAL_ISP: ISP proxy + - US-CA: California + - US-NY: New York + - US-TX: Texas + - US-FL: Florida + - US-WA: Washington + - NONE: No proxy + + data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema] + + The schema for data to be extracted from the webpage. If you're looking for consistent data schema being returned by the agent, it's highly recommended to use https://json-schema.org/. + + error_code_mapping : typing.Optional[typing.Dict[str, typing.Optional[str]]] + + Custom mapping of error codes to error messages if Skyvern encounters an error. + + max_steps : typing.Optional[int] + + Maximum number of steps the task can take. Task will fail if it exceeds this number. Cautions: you are charged per step so please set this number to a reasonable value. Contact sales@skyvern.com for custom pricing. + + webhook_url : typing.Optional[str] + + After a run is finished, send an update to this URL. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for more details. + + totp_identifier : typing.Optional[str] + + Identifier for the TOTP/2FA/MFA code when the code is pushed to Skyvern. Refer to https://www.skyvern.com/docs/credentials/totp#option-3-push-code-to-skyvern for more details. + + totp_url : typing.Optional[str] + + URL that serves TOTP/2FA/MFA codes for Skyvern to use during the workflow run. Refer to https://www.skyvern.com/docs/credentials/totp#option-2-get-code-from-your-endpoint for more details. + + browser_session_id : typing.Optional[str] + + Run the task or workflow in the specific Skyvern browser session. Having a browser session can persist the real-time state of the browser, so that the next run can continue from where the previous run left off. + + model : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + Optional model configuration. + + extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]] + The extra HTTP headers for the requests in browser. + + publish_workflow : typing.Optional[bool] + Whether to publish this task as a reusable workflow. Only available for skyvern-2.0. + + include_action_history_in_verification : typing.Optional[bool] + Whether to include action history when verifying that the task is complete + + max_screenshot_scrolls : typing.Optional[int] + The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot. + + browser_address : typing.Optional[str] + The CDP address for the task. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[TaskRunResponse] + Successfully run task + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/run/tasks", + method="POST", + json={ + "prompt": prompt, + "url": url, + "engine": engine, + "title": title, + "proxy_location": proxy_location, + "data_extraction_schema": convert_and_respect_annotation_metadata( + object_=data_extraction_schema, annotation=TaskRunRequestDataExtractionSchema, direction="write" + ), + "error_code_mapping": error_code_mapping, + "max_steps": max_steps, + "webhook_url": webhook_url, + "totp_identifier": totp_identifier, + "totp_url": totp_url, + "browser_session_id": browser_session_id, + "model": model, + "extra_http_headers": extra_http_headers, + "publish_workflow": publish_workflow, + "include_action_history_in_verification": include_action_history_in_verification, + "max_screenshot_scrolls": max_screenshot_scrolls, + "browser_address": browser_address, + }, + headers={ + "content-type": "application/json", + "x-user-agent": str(user_agent) if user_agent is not None else None, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + TaskRunResponse, + parse_obj_as( + type_=TaskRunResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def run_workflow( + self, + *, + workflow_id: str, + template: typing.Optional[bool] = None, + max_steps_override: typing.Optional[int] = None, + user_agent: typing.Optional[str] = None, + parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + title: typing.Optional[str] = OMIT, + proxy_location: typing.Optional[ProxyLocation] = OMIT, + webhook_url: typing.Optional[str] = OMIT, + totp_url: typing.Optional[str] = OMIT, + totp_identifier: typing.Optional[str] = OMIT, + browser_session_id: typing.Optional[str] = OMIT, + max_screenshot_scrolls: typing.Optional[int] = OMIT, + extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, + browser_address: typing.Optional[str] = OMIT, + ai_fallback: typing.Optional[bool] = OMIT, + run_with: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[WorkflowRunResponse]: + """ + Run a workflow + + Parameters + ---------- + workflow_id : str + ID of the workflow to run. Workflow ID starts with `wpid_`. + + template : typing.Optional[bool] + + max_steps_override : typing.Optional[int] + + user_agent : typing.Optional[str] + + parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + Parameters to pass to the workflow + + title : typing.Optional[str] + The title for this workflow run + + proxy_location : typing.Optional[ProxyLocation] + + Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. + + Available geotargeting options: + - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy. + - RESIDENTIAL_ES: Spain + - RESIDENTIAL_IE: Ireland + - RESIDENTIAL_GB: United Kingdom + - RESIDENTIAL_IN: India + - RESIDENTIAL_JP: Japan + - RESIDENTIAL_FR: France + - RESIDENTIAL_DE: Germany + - RESIDENTIAL_NZ: New Zealand + - RESIDENTIAL_ZA: South Africa + - RESIDENTIAL_AR: Argentina + - RESIDENTIAL_AU: Australia + - RESIDENTIAL_ISP: ISP proxy + - US-CA: California + - US-NY: New York + - US-TX: Texas + - US-FL: Florida + - US-WA: Washington + - NONE: No proxy + + webhook_url : typing.Optional[str] + URL to send workflow status updates to after a run is finished. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for webhook questions. + + totp_url : typing.Optional[str] + + URL that serves TOTP/2FA/MFA codes for Skyvern to use during the workflow run. Refer to https://www.skyvern.com/docs/credentials/totp#option-2-get-code-from-your-endpoint for more details. + + totp_identifier : typing.Optional[str] + + Identifier for the TOTP/2FA/MFA code when the code is pushed to Skyvern. Refer to https://www.skyvern.com/docs/credentials/totp#option-3-push-code-to-skyvern for more details. + + browser_session_id : typing.Optional[str] + ID of a Skyvern browser session to reuse, having it continue from the current screen state + + max_screenshot_scrolls : typing.Optional[int] + The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot. + + extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]] + The extra HTTP headers for the requests in browser. + + browser_address : typing.Optional[str] + The CDP address for the workflow run. + + ai_fallback : typing.Optional[bool] + Whether to fallback to AI if the workflow run fails. + + run_with : typing.Optional[str] + Whether to run the workflow with agent or code. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[WorkflowRunResponse] + Successfully run workflow + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/run/workflows", + method="POST", + params={ + "template": template, + }, + json={ + "workflow_id": workflow_id, + "parameters": parameters, + "title": title, + "proxy_location": proxy_location, + "webhook_url": webhook_url, + "totp_url": totp_url, + "totp_identifier": totp_identifier, + "browser_session_id": browser_session_id, + "max_screenshot_scrolls": max_screenshot_scrolls, + "extra_http_headers": extra_http_headers, + "browser_address": browser_address, + "ai_fallback": ai_fallback, + "run_with": run_with, + }, + headers={ + "content-type": "application/json", + "x-max-steps-override": str(max_steps_override) if max_steps_override is not None else None, + "x-user-agent": str(user_agent) if user_agent is not None else None, + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + WorkflowRunResponse, + parse_obj_as( + type_=WorkflowRunResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_run( + self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[GetRunResponse]: + """ + Get run information (task run, workflow run) + + Parameters + ---------- + run_id : str + The id of the task run or the workflow run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetRunResponse] + Successfully got run + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/runs/{jsonable_encoder(run_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetRunResponse, + parse_obj_as( + type_=GetRunResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def cancel_run( + self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: + """ + Cancel a run (task or workflow) + + Parameters + ---------- + run_id : str + The id of the task run or the workflow run to cancel. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/runs/{jsonable_encoder(run_id)}/cancel", + method="POST", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_workflows( + self, + *, + page: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, + only_saved_tasks: typing.Optional[bool] = None, + only_workflows: typing.Optional[bool] = None, + search_key: typing.Optional[str] = None, + title: typing.Optional[str] = None, + template: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[typing.List[Workflow]]: + """ + Get all workflows with the latest version for the organization. + + Search semantics: + - If `search_key` is provided, its value is used as a unified search term for both + `workflows.title` and workflow parameter metadata (key, description, and default_value for + `WorkflowParameterModel`). + - Falls back to deprecated `title` (title-only search) if `search_key` is not provided. + - Parameter metadata search excludes soft-deleted parameter rows across all parameter tables. + + Parameters + ---------- + page : typing.Optional[int] + + page_size : typing.Optional[int] + + only_saved_tasks : typing.Optional[bool] + + only_workflows : typing.Optional[bool] + + search_key : typing.Optional[str] + Unified search across workflow title and parameter metadata (key, description, default_value). + + title : typing.Optional[str] + Deprecated: use search_key instead. + + template : typing.Optional[bool] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[Workflow]] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/workflows", + method="GET", + params={ + "page": page, + "page_size": page_size, + "only_saved_tasks": only_saved_tasks, + "only_workflows": only_workflows, + "search_key": search_key, + "title": title, + "template": template, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[Workflow], + parse_obj_as( + type_=typing.List[Workflow], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create_workflow( + self, + *, + json_definition: typing.Optional[WorkflowCreateYamlRequest] = OMIT, + yaml_definition: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Workflow]: + """ + Create a new workflow + + Parameters + ---------- + json_definition : typing.Optional[WorkflowCreateYamlRequest] + Workflow definition in JSON format + + yaml_definition : typing.Optional[str] + Workflow definition in YAML format + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Workflow] + Successfully created workflow + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/workflows", + method="POST", + json={ + "json_definition": convert_and_respect_annotation_metadata( + object_=json_definition, annotation=WorkflowCreateYamlRequest, direction="write" + ), + "yaml_definition": yaml_definition, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Workflow, + parse_obj_as( + type_=Workflow, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update_workflow( + self, + workflow_id: str, + *, + json_definition: typing.Optional[WorkflowCreateYamlRequest] = OMIT, + yaml_definition: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Workflow]: + """ + Update a workflow + + Parameters + ---------- + workflow_id : str + The ID of the workflow to update. Workflow ID starts with `wpid_`. + + json_definition : typing.Optional[WorkflowCreateYamlRequest] + Workflow definition in JSON format + + yaml_definition : typing.Optional[str] + Workflow definition in YAML format + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Workflow] + Successfully updated workflow + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/workflows/{jsonable_encoder(workflow_id)}", + method="POST", + json={ + "json_definition": convert_and_respect_annotation_metadata( + object_=json_definition, annotation=WorkflowCreateYamlRequest, direction="write" + ), + "yaml_definition": yaml_definition, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Workflow, + parse_obj_as( + type_=Workflow, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete_workflow( + self, workflow_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: + """ + Delete a workflow + + Parameters + ---------- + workflow_id : str + The ID of the workflow to delete. Workflow ID starts with `wpid_`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.Optional[typing.Any]] + Successfully deleted workflow + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/workflows/{jsonable_encoder(workflow_id)}/delete", + method="POST", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_artifact( + self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Artifact]: + """ + Get an artifact + + Parameters + ---------- + artifact_id : str + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Artifact] + Successfully retrieved artifact + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/artifacts/{jsonable_encoder(artifact_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Artifact, + parse_obj_as( + type_=Artifact, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_run_artifacts( + self, + run_id: str, + *, + artifact_type: typing.Optional[typing.Union[ArtifactType, typing.Sequence[ArtifactType]]] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[typing.List[Artifact]]: + """ + Get artifacts for a run + + Parameters + ---------- + run_id : str + The id of the task run or the workflow run. + + artifact_type : typing.Optional[typing.Union[ArtifactType, typing.Sequence[ArtifactType]]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[Artifact]] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/runs/{jsonable_encoder(run_id)}/artifacts", + method="GET", + params={ + "artifact_type": artifact_type, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[Artifact], + parse_obj_as( + type_=typing.List[Artifact], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def retry_run_webhook( + self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: + """ + Retry sending the webhook for a run + + Parameters + ---------- + run_id : str + The id of the task run or the workflow run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/runs/{jsonable_encoder(run_id)}/retry_webhook", + method="POST", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_run_timeline( + self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.List[WorkflowRunTimeline]]: + """ + Get timeline for a run (workflow run or task_v2 run) + + Parameters + ---------- + run_id : str + The id of the workflow run or task_v2 run. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[WorkflowRunTimeline]] + Successfully retrieved run timeline + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/runs/{jsonable_encoder(run_id)}/timeline", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[WorkflowRunTimeline], + parse_obj_as( + type_=typing.List[WorkflowRunTimeline], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_browser_sessions( + self, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.List[BrowserSessionResponse]]: + """ + Get all active browser sessions for the organization + + Parameters + ---------- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[BrowserSessionResponse]] + Successfully retrieved all active browser sessions + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/browser_sessions", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[BrowserSessionResponse], + parse_obj_as( + type_=typing.List[BrowserSessionResponse], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create_browser_session( + self, + *, + timeout: typing.Optional[int] = OMIT, + proxy_location: typing.Optional[ProxyLocation] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[BrowserSessionResponse]: + """ + Create a browser session that persists across multiple runs + + Parameters + ---------- + timeout : typing.Optional[int] + Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 1440. Defaults to 60. + + proxy_location : typing.Optional[ProxyLocation] + + Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. + + Available geotargeting options: + - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy. + - RESIDENTIAL_ES: Spain + - RESIDENTIAL_IE: Ireland + - RESIDENTIAL_GB: United Kingdom + - RESIDENTIAL_IN: India + - RESIDENTIAL_JP: Japan + - RESIDENTIAL_FR: France + - RESIDENTIAL_DE: Germany + - RESIDENTIAL_NZ: New Zealand + - RESIDENTIAL_ZA: South Africa + - RESIDENTIAL_AR: Argentina + - RESIDENTIAL_AU: Australia + - RESIDENTIAL_ISP: ISP proxy + - US-CA: California + - US-NY: New York + - US-TX: Texas + - US-FL: Florida + - US-WA: Washington + - NONE: No proxy + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[BrowserSessionResponse] + Successfully created browser session + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/browser_sessions", + method="POST", + json={ + "timeout": timeout, + "proxy_location": proxy_location, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + BrowserSessionResponse, + parse_obj_as( + type_=BrowserSessionResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def close_browser_session( + self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: + """ + Close a session. Once closed, the session cannot be used again. + + Parameters + ---------- + browser_session_id : str + The ID of the browser session to close. completed_at will be set when the browser session is closed. browser_session_id starts with `pbs_` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.Optional[typing.Any]] + Successfully closed browser session + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}/close", + method="POST", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_browser_session( + self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[BrowserSessionResponse]: + """ + Get details about a specific browser session, including the browser address for cdp connection. + + Parameters + ---------- + browser_session_id : str + The ID of the browser session. browser_session_id starts with `pbs_` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[BrowserSessionResponse] + Successfully retrieved browser session details + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + BrowserSessionResponse, + parse_obj_as( + type_=BrowserSessionResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def send_totp_code( + self, + *, + totp_identifier: str, + content: str, + task_id: typing.Optional[str] = OMIT, + workflow_id: typing.Optional[str] = OMIT, + workflow_run_id: typing.Optional[str] = OMIT, + source: typing.Optional[str] = OMIT, + expired_at: typing.Optional[dt.datetime] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[TotpCode]: + """ + Forward a TOTP (2FA, MFA) email or sms message containing the code to Skyvern. This endpoint stores the code in database so that Skyvern can use it while running tasks/workflows. + + Parameters + ---------- + totp_identifier : str + The identifier of the TOTP code. It can be the email address, phone number, or the identifier of the user. + + content : str + The content of the TOTP code. It can be the email content that contains the TOTP code, or the sms message that contains the TOTP code. Skyvern will automatically extract the TOTP code from the content. + + task_id : typing.Optional[str] + The task_id the totp code is for. It can be the task_id of the task that the TOTP code is for. + + workflow_id : typing.Optional[str] + The workflow ID the TOTP code is for. It can be the workflow ID of the workflow that the TOTP code is for. + + workflow_run_id : typing.Optional[str] + The workflow run id that the TOTP code is for. It can be the workflow run id of the workflow run that the TOTP code is for. + + source : typing.Optional[str] + An optional field. The source of the TOTP code. e.g. email, sms, etc. + + expired_at : typing.Optional[dt.datetime] + The timestamp when the TOTP code expires + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[TotpCode] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/credentials/totp", + method="POST", + json={ + "totp_identifier": totp_identifier, + "task_id": task_id, + "workflow_id": workflow_id, + "workflow_run_id": workflow_run_id, + "source": source, + "content": content, + "expired_at": expired_at, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + TotpCode, + parse_obj_as( + type_=TotpCode, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_credentials( + self, + *, + page: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[typing.List[CredentialResponse]]: + """ + Retrieves a paginated list of credentials for the current organization + + Parameters + ---------- + page : typing.Optional[int] + Page number for pagination + + page_size : typing.Optional[int] + Number of items per page + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[CredentialResponse]] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/credentials", + method="GET", + params={ + "page": page, + "page_size": page_size, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[CredentialResponse], + parse_obj_as( + type_=typing.List[CredentialResponse], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create_credential( + self, + *, + name: str, + credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType, + credential: CreateCredentialRequestCredential, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[CredentialResponse]: + """ + Creates a new credential for the current organization + + Parameters + ---------- + name : str + Name of the credential + + credential_type : SkyvernForgeSdkSchemasCredentialsCredentialType + Type of credential to create + + credential : CreateCredentialRequestCredential + The credential data to store + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CredentialResponse] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/credentials", + method="POST", + json={ + "name": name, + "credential_type": credential_type, + "credential": convert_and_respect_annotation_metadata( + object_=credential, annotation=CreateCredentialRequestCredential, direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CredentialResponse, + parse_obj_as( + type_=CredentialResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete_credential( + self, credential_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[None]: + """ + Deletes a specific credential by its ID + + Parameters + ---------- + credential_id : str + The unique identifier of the credential to delete + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[None] + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/credentials/{jsonable_encoder(credential_id)}/delete", + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return AsyncHttpResponse(response=_response, data=None) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_credential( + self, credential_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[CredentialResponse]: + """ + Retrieves a specific credential by its ID + + Parameters + ---------- + credential_id : str + The unique identifier of the credential + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CredentialResponse] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/credentials/{jsonable_encoder(credential_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CredentialResponse, + parse_obj_as( + type_=CredentialResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def login( + self, + *, + credential_type: SkyvernSchemasRunBlocksCredentialType, + url: typing.Optional[str] = OMIT, + prompt: typing.Optional[str] = OMIT, + webhook_url: typing.Optional[str] = OMIT, + proxy_location: typing.Optional[ProxyLocation] = OMIT, + totp_identifier: typing.Optional[str] = OMIT, + totp_url: typing.Optional[str] = OMIT, + browser_session_id: typing.Optional[str] = OMIT, + browser_address: typing.Optional[str] = OMIT, + extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, + max_screenshot_scrolling_times: typing.Optional[int] = OMIT, + credential_id: typing.Optional[str] = OMIT, + bitwarden_collection_id: typing.Optional[str] = OMIT, + bitwarden_item_id: typing.Optional[str] = OMIT, + onepassword_vault_id: typing.Optional[str] = OMIT, + onepassword_item_id: typing.Optional[str] = OMIT, + azure_vault_name: typing.Optional[str] = OMIT, + azure_vault_username_key: typing.Optional[str] = OMIT, + azure_vault_password_key: typing.Optional[str] = OMIT, + azure_vault_totp_secret_key: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[WorkflowRunResponse]: + """ + Log in to a website using either credential stored in Skyvern, Bitwarden, 1Password, or Azure Vault + + Parameters + ---------- + credential_type : SkyvernSchemasRunBlocksCredentialType + Where to get the credential from + + url : typing.Optional[str] + Website url + + prompt : typing.Optional[str] + Login instructions. Skyvern has default prompt/instruction for login if this field is not provided. + + webhook_url : typing.Optional[str] + Webhook URL to send login status updates + + proxy_location : typing.Optional[ProxyLocation] + Proxy location to use + + totp_identifier : typing.Optional[str] + Identifier for TOTP (Time-based One-Time Password) if required + + totp_url : typing.Optional[str] + TOTP URL to fetch one-time passwords + + browser_session_id : typing.Optional[str] + ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456` + + browser_address : typing.Optional[str] + The CDP address for the task. + + extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]] + Additional HTTP headers to include in requests + + max_screenshot_scrolling_times : typing.Optional[int] + Maximum number of times to scroll for screenshots + + credential_id : typing.Optional[str] + ID of the Skyvern credential to use for login. + + bitwarden_collection_id : typing.Optional[str] + Bitwarden collection ID. You can find it in the Bitwarden collection URL. e.g. `https://vault.bitwarden.com/vaults/collection_id/items` + + bitwarden_item_id : typing.Optional[str] + Bitwarden item ID + + onepassword_vault_id : typing.Optional[str] + 1Password vault ID + + onepassword_item_id : typing.Optional[str] + 1Password item ID + + azure_vault_name : typing.Optional[str] + Azure Vault Name + + azure_vault_username_key : typing.Optional[str] + Azure Vault username key + + azure_vault_password_key : typing.Optional[str] + Azure Vault password key + + azure_vault_totp_secret_key : typing.Optional[str] + Azure Vault TOTP secret key + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[WorkflowRunResponse] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/run/tasks/login", + method="POST", + json={ + "credential_type": credential_type, + "url": url, + "prompt": prompt, + "webhook_url": webhook_url, + "proxy_location": proxy_location, + "totp_identifier": totp_identifier, + "totp_url": totp_url, + "browser_session_id": browser_session_id, + "browser_address": browser_address, + "extra_http_headers": extra_http_headers, + "max_screenshot_scrolling_times": max_screenshot_scrolling_times, + "credential_id": credential_id, + "bitwarden_collection_id": bitwarden_collection_id, + "bitwarden_item_id": bitwarden_item_id, + "onepassword_vault_id": onepassword_vault_id, + "onepassword_item_id": onepassword_item_id, + "azure_vault_name": azure_vault_name, + "azure_vault_username_key": azure_vault_username_key, + "azure_vault_password_key": azure_vault_password_key, + "azure_vault_totp_secret_key": azure_vault_totp_secret_key, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + WorkflowRunResponse, + parse_obj_as( + type_=WorkflowRunResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_scripts( + self, + *, + page: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[typing.List[Script]]: + """ + Retrieves a paginated list of scripts for the current organization + + Parameters + ---------- + page : typing.Optional[int] + Page number for pagination + + page_size : typing.Optional[int] + Number of items per page + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[Script]] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/scripts", + method="GET", + params={ + "page": page, + "page_size": page_size, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[Script], + parse_obj_as( + type_=typing.List[Script], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create_script( + self, + *, + workflow_id: typing.Optional[str] = OMIT, + run_id: typing.Optional[str] = OMIT, + files: typing.Optional[typing.Sequence[ScriptFileCreate]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[CreateScriptResponse]: + """ + Create a new script with optional files and metadata + + Parameters + ---------- + workflow_id : typing.Optional[str] + Associated workflow ID + + run_id : typing.Optional[str] + Associated run ID + + files : typing.Optional[typing.Sequence[ScriptFileCreate]] + Array of files to include in the script + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CreateScriptResponse] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/scripts", + method="POST", + json={ + "workflow_id": workflow_id, + "run_id": run_id, + "files": convert_and_respect_annotation_metadata( + object_=files, annotation=typing.Sequence[ScriptFileCreate], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateScriptResponse, + parse_obj_as( + type_=CreateScriptResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_script( + self, script_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Script]: + """ + Retrieves a specific script by its ID + + Parameters + ---------- + script_id : str + The unique identifier of the script + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Script] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/scripts/{jsonable_encoder(script_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Script, + parse_obj_as( + type_=Script, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def deploy_script( + self, + script_id: str, + *, + files: typing.Sequence[ScriptFileCreate], + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[CreateScriptResponse]: + """ + Deploy a script with updated files, creating a new version + + Parameters + ---------- + script_id : str + The unique identifier of the script + + files : typing.Sequence[ScriptFileCreate] + Array of files to include in the script + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CreateScriptResponse] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/scripts/{jsonable_encoder(script_id)}/deploy", + method="POST", + json={ + "files": convert_and_respect_annotation_metadata( + object_=files, annotation=typing.Sequence[ScriptFileCreate], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreateScriptResponse, + parse_obj_as( + type_=CreateScriptResponse, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/skyvern/client/scripts/__init__.py b/skyvern/client/scripts/__init__.py index f3ea2659..5cde0202 100644 --- a/skyvern/client/scripts/__init__.py +++ b/skyvern/client/scripts/__init__.py @@ -1,2 +1,4 @@ # This file was auto-generated by Fern from our API Definition. +# isort: skip_file + diff --git a/skyvern/client/scripts/client.py b/skyvern/client/scripts/client.py index b6a9db4f..2e8d9bd2 100644 --- a/skyvern/client/scripts/client.py +++ b/skyvern/client/scripts/client.py @@ -1,19 +1,26 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.client_wrapper import SyncClientWrapper import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions -from ..core.jsonable_encoder import jsonable_encoder -from ..core.pydantic_utilities import parse_obj_as -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from json.decoder import JSONDecodeError -from ..core.api_error import ApiError -from ..core.client_wrapper import AsyncClientWrapper +from .raw_client import AsyncRawScriptsClient, RawScriptsClient class ScriptsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = RawScriptsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawScriptsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawScriptsClient + """ + return self._raw_client def run_script( self, script_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -40,45 +47,29 @@ class ScriptsClient: client = Skyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) client.scripts.run_script( script_id="s_abc123", ) """ - _response = self._client_wrapper.httpx_client.request( - f"v1/scripts/{jsonable_encoder(script_id)}/run", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = self._raw_client.run_script(script_id, request_options=request_options) + return _response.data class AsyncScriptsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper + self._raw_client = AsyncRawScriptsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawScriptsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawScriptsClient + """ + return self._raw_client async def run_script( self, script_id: str, *, request_options: typing.Optional[RequestOptions] = None @@ -107,7 +98,6 @@ class AsyncScriptsClient: client = AsyncSkyvern( api_key="YOUR_API_KEY", - x_api_key="YOUR_X_API_KEY", ) @@ -119,31 +109,5 @@ class AsyncScriptsClient: asyncio.run(main()) """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/scripts/{jsonable_encoder(script_id)}/run", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) + _response = await self._raw_client.run_script(script_id, request_options=request_options) + return _response.data diff --git a/skyvern/client/scripts/raw_client.py b/skyvern/client/scripts/raw_client.py new file mode 100644 index 00000000..4658a95e --- /dev/null +++ b/skyvern/client/scripts/raw_client.py @@ -0,0 +1,126 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.pydantic_utilities import parse_obj_as +from ..core.request_options import RequestOptions +from ..errors.unprocessable_entity_error import UnprocessableEntityError + + +class RawScriptsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def run_script( + self, script_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.Optional[typing.Any]]: + """ + Run a script + + Parameters + ---------- + script_id : str + The unique identifier of the script + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/scripts/{jsonable_encoder(script_id)}/run", + method="POST", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return HttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawScriptsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def run_script( + self, script_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.Optional[typing.Any]]: + """ + Run a script + + Parameters + ---------- + script_id : str + The unique identifier of the script + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.Optional[typing.Any]] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/scripts/{jsonable_encoder(script_id)}/run", + method="POST", + request_options=request_options, + ) + try: + if _response is None or not _response.text.strip(): + return AsyncHttpResponse(response=_response, data=None) + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/skyvern/client/types/__init__.py b/skyvern/client/types/__init__.py index 4483868e..363815d6 100644 --- a/skyvern/client/types/__init__.py +++ b/skyvern/client/types/__init__.py @@ -1,464 +1,951 @@ # This file was auto-generated by Fern from our API Definition. -from .action import Action -from .action_block import ActionBlock -from .action_block_data_schema import ActionBlockDataSchema -from .action_block_parameters_item import ( - ActionBlockParametersItem, - ActionBlockParametersItem_AwsSecret, - ActionBlockParametersItem_AzureSecret, - ActionBlockParametersItem_AzureVaultCredential, - ActionBlockParametersItem_BitwardenCreditCardData, - ActionBlockParametersItem_BitwardenLoginCredential, - ActionBlockParametersItem_BitwardenSensitiveInformation, - ActionBlockParametersItem_Context, - ActionBlockParametersItem_Credential, - ActionBlockParametersItem_Onepassword, - ActionBlockParametersItem_Output, - ActionBlockParametersItem_Workflow, -) -from .action_block_yaml import ActionBlockYaml -from .action_status import ActionStatus -from .action_type import ActionType -from .artifact import Artifact -from .artifact_type import ArtifactType -from .aws_secret_parameter import AwsSecretParameter -from .aws_secret_parameter_yaml import AwsSecretParameterYaml -from .azure_secret_parameter import AzureSecretParameter -from .azure_vault_credential_parameter import AzureVaultCredentialParameter -from .azure_vault_credential_parameter_yaml import AzureVaultCredentialParameterYaml -from .bitwarden_credit_card_data_parameter import BitwardenCreditCardDataParameter -from .bitwarden_credit_card_data_parameter_yaml import BitwardenCreditCardDataParameterYaml -from .bitwarden_login_credential_parameter import BitwardenLoginCredentialParameter -from .bitwarden_login_credential_parameter_yaml import BitwardenLoginCredentialParameterYaml -from .bitwarden_sensitive_information_parameter import BitwardenSensitiveInformationParameter -from .bitwarden_sensitive_information_parameter_yaml import BitwardenSensitiveInformationParameterYaml -from .block_type import BlockType -from .browser_session_response import BrowserSessionResponse -from .code_block import CodeBlock -from .code_block_parameters_item import ( - CodeBlockParametersItem, - CodeBlockParametersItem_AwsSecret, - CodeBlockParametersItem_AzureSecret, - CodeBlockParametersItem_AzureVaultCredential, - CodeBlockParametersItem_BitwardenCreditCardData, - CodeBlockParametersItem_BitwardenLoginCredential, - CodeBlockParametersItem_BitwardenSensitiveInformation, - CodeBlockParametersItem_Context, - CodeBlockParametersItem_Credential, - CodeBlockParametersItem_Onepassword, - CodeBlockParametersItem_Output, - CodeBlockParametersItem_Workflow, -) -from .code_block_yaml import CodeBlockYaml -from .context_parameter import ContextParameter -from .context_parameter_source import ( - ContextParameterSource, - ContextParameterSource_AwsSecret, - ContextParameterSource_AzureSecret, - ContextParameterSource_AzureVaultCredential, - ContextParameterSource_BitwardenCreditCardData, - ContextParameterSource_BitwardenLoginCredential, - ContextParameterSource_BitwardenSensitiveInformation, - ContextParameterSource_Context, - ContextParameterSource_Credential, - ContextParameterSource_Onepassword, - ContextParameterSource_Output, - ContextParameterSource_Workflow, -) -from .context_parameter_value import ContextParameterValue -from .context_parameter_yaml import ContextParameterYaml -from .create_credential_request_credential import CreateCredentialRequestCredential -from .create_script_response import CreateScriptResponse -from .credential_parameter import CredentialParameter -from .credential_parameter_yaml import CredentialParameterYaml -from .credential_response import CredentialResponse -from .credential_response_credential import CredentialResponseCredential -from .credential_type_output import CredentialTypeOutput -from .credit_card_credential_response import CreditCardCredentialResponse -from .download_to_s3block import DownloadToS3Block -from .download_to_s3block_yaml import DownloadToS3BlockYaml -from .extraction_block import ExtractionBlock -from .extraction_block_data_schema import ExtractionBlockDataSchema -from .extraction_block_parameters_item import ( - ExtractionBlockParametersItem, - ExtractionBlockParametersItem_AwsSecret, - ExtractionBlockParametersItem_AzureSecret, - ExtractionBlockParametersItem_AzureVaultCredential, - ExtractionBlockParametersItem_BitwardenCreditCardData, - ExtractionBlockParametersItem_BitwardenLoginCredential, - ExtractionBlockParametersItem_BitwardenSensitiveInformation, - ExtractionBlockParametersItem_Context, - ExtractionBlockParametersItem_Credential, - ExtractionBlockParametersItem_Onepassword, - ExtractionBlockParametersItem_Output, - ExtractionBlockParametersItem_Workflow, -) -from .extraction_block_yaml import ExtractionBlockYaml -from .extraction_block_yaml_data_schema import ExtractionBlockYamlDataSchema -from .file_download_block import FileDownloadBlock -from .file_download_block_data_schema import FileDownloadBlockDataSchema -from .file_download_block_parameters_item import ( - FileDownloadBlockParametersItem, - FileDownloadBlockParametersItem_AwsSecret, - FileDownloadBlockParametersItem_AzureSecret, - FileDownloadBlockParametersItem_AzureVaultCredential, - FileDownloadBlockParametersItem_BitwardenCreditCardData, - FileDownloadBlockParametersItem_BitwardenLoginCredential, - FileDownloadBlockParametersItem_BitwardenSensitiveInformation, - FileDownloadBlockParametersItem_Context, - FileDownloadBlockParametersItem_Credential, - FileDownloadBlockParametersItem_Onepassword, - FileDownloadBlockParametersItem_Output, - FileDownloadBlockParametersItem_Workflow, -) -from .file_download_block_yaml import FileDownloadBlockYaml -from .file_encoding import FileEncoding -from .file_info import FileInfo -from .file_node import FileNode -from .file_parser_block import FileParserBlock -from .file_parser_block_yaml import FileParserBlockYaml -from .file_storage_type import FileStorageType -from .file_type import FileType -from .file_upload_block import FileUploadBlock -from .file_upload_block_yaml import FileUploadBlockYaml -from .for_loop_block import ForLoopBlock -from .for_loop_block_loop_blocks_item import ( - ForLoopBlockLoopBlocksItem, - ForLoopBlockLoopBlocksItem_Action, - ForLoopBlockLoopBlocksItem_Code, - ForLoopBlockLoopBlocksItem_DownloadToS3, - ForLoopBlockLoopBlocksItem_Extraction, - ForLoopBlockLoopBlocksItem_FileDownload, - ForLoopBlockLoopBlocksItem_FileUpload, - ForLoopBlockLoopBlocksItem_FileUrlParser, - ForLoopBlockLoopBlocksItem_ForLoop, - ForLoopBlockLoopBlocksItem_GotoUrl, - ForLoopBlockLoopBlocksItem_HttpRequest, - ForLoopBlockLoopBlocksItem_Login, - ForLoopBlockLoopBlocksItem_Navigation, - ForLoopBlockLoopBlocksItem_PdfParser, - ForLoopBlockLoopBlocksItem_SendEmail, - ForLoopBlockLoopBlocksItem_Task, - ForLoopBlockLoopBlocksItem_TaskV2, - ForLoopBlockLoopBlocksItem_TextPrompt, - ForLoopBlockLoopBlocksItem_UploadToS3, - ForLoopBlockLoopBlocksItem_Validation, - ForLoopBlockLoopBlocksItem_Wait, -) -from .for_loop_block_loop_over import ( - ForLoopBlockLoopOver, - ForLoopBlockLoopOver_AwsSecret, - ForLoopBlockLoopOver_AzureSecret, - ForLoopBlockLoopOver_AzureVaultCredential, - ForLoopBlockLoopOver_BitwardenCreditCardData, - ForLoopBlockLoopOver_BitwardenLoginCredential, - ForLoopBlockLoopOver_BitwardenSensitiveInformation, - ForLoopBlockLoopOver_Context, - ForLoopBlockLoopOver_Credential, - ForLoopBlockLoopOver_Onepassword, - ForLoopBlockLoopOver_Output, - ForLoopBlockLoopOver_Workflow, -) -from .for_loop_block_yaml import ForLoopBlockYaml -from .for_loop_block_yaml_loop_blocks_item import ( - ForLoopBlockYamlLoopBlocksItem, - ForLoopBlockYamlLoopBlocksItem_Action, - ForLoopBlockYamlLoopBlocksItem_Code, - ForLoopBlockYamlLoopBlocksItem_DownloadToS3, - ForLoopBlockYamlLoopBlocksItem_Extraction, - ForLoopBlockYamlLoopBlocksItem_FileDownload, - ForLoopBlockYamlLoopBlocksItem_FileUpload, - ForLoopBlockYamlLoopBlocksItem_FileUrlParser, - ForLoopBlockYamlLoopBlocksItem_ForLoop, - ForLoopBlockYamlLoopBlocksItem_GotoUrl, - ForLoopBlockYamlLoopBlocksItem_HttpRequest, - ForLoopBlockYamlLoopBlocksItem_Login, - ForLoopBlockYamlLoopBlocksItem_Navigation, - ForLoopBlockYamlLoopBlocksItem_PdfParser, - ForLoopBlockYamlLoopBlocksItem_SendEmail, - ForLoopBlockYamlLoopBlocksItem_Task, - ForLoopBlockYamlLoopBlocksItem_TaskV2, - ForLoopBlockYamlLoopBlocksItem_TextPrompt, - ForLoopBlockYamlLoopBlocksItem_UploadToS3, - ForLoopBlockYamlLoopBlocksItem_Validation, - ForLoopBlockYamlLoopBlocksItem_Wait, -) -from .get_run_response import ( - GetRunResponse, - GetRunResponse_AnthropicCua, - GetRunResponse_OpenaiCua, - GetRunResponse_TaskV1, - GetRunResponse_TaskV2, - GetRunResponse_UiTars, - GetRunResponse_WorkflowRun, -) -from .http_request_block import HttpRequestBlock -from .http_request_block_parameters_item import ( - HttpRequestBlockParametersItem, - HttpRequestBlockParametersItem_AwsSecret, - HttpRequestBlockParametersItem_AzureSecret, - HttpRequestBlockParametersItem_AzureVaultCredential, - HttpRequestBlockParametersItem_BitwardenCreditCardData, - HttpRequestBlockParametersItem_BitwardenLoginCredential, - HttpRequestBlockParametersItem_BitwardenSensitiveInformation, - HttpRequestBlockParametersItem_Context, - HttpRequestBlockParametersItem_Credential, - HttpRequestBlockParametersItem_Onepassword, - HttpRequestBlockParametersItem_Output, - HttpRequestBlockParametersItem_Workflow, -) -from .http_request_block_yaml import HttpRequestBlockYaml -from .http_validation_error import HttpValidationError -from .input_or_select_context import InputOrSelectContext -from .login_block import LoginBlock -from .login_block_data_schema import LoginBlockDataSchema -from .login_block_parameters_item import ( - LoginBlockParametersItem, - LoginBlockParametersItem_AwsSecret, - LoginBlockParametersItem_AzureSecret, - LoginBlockParametersItem_AzureVaultCredential, - LoginBlockParametersItem_BitwardenCreditCardData, - LoginBlockParametersItem_BitwardenLoginCredential, - LoginBlockParametersItem_BitwardenSensitiveInformation, - LoginBlockParametersItem_Context, - LoginBlockParametersItem_Credential, - LoginBlockParametersItem_Onepassword, - LoginBlockParametersItem_Output, - LoginBlockParametersItem_Workflow, -) -from .login_block_yaml import LoginBlockYaml -from .navigation_block import NavigationBlock -from .navigation_block_data_schema import NavigationBlockDataSchema -from .navigation_block_parameters_item import ( - NavigationBlockParametersItem, - NavigationBlockParametersItem_AwsSecret, - NavigationBlockParametersItem_AzureSecret, - NavigationBlockParametersItem_AzureVaultCredential, - NavigationBlockParametersItem_BitwardenCreditCardData, - NavigationBlockParametersItem_BitwardenLoginCredential, - NavigationBlockParametersItem_BitwardenSensitiveInformation, - NavigationBlockParametersItem_Context, - NavigationBlockParametersItem_Credential, - NavigationBlockParametersItem_Onepassword, - NavigationBlockParametersItem_Output, - NavigationBlockParametersItem_Workflow, -) -from .navigation_block_yaml import NavigationBlockYaml -from .non_empty_credit_card_credential import NonEmptyCreditCardCredential -from .non_empty_password_credential import NonEmptyPasswordCredential -from .one_password_credential_parameter import OnePasswordCredentialParameter -from .one_password_credential_parameter_yaml import OnePasswordCredentialParameterYaml -from .otp_type import OtpType -from .output_parameter import OutputParameter -from .output_parameter_yaml import OutputParameterYaml -from .password_credential_response import PasswordCredentialResponse -from .pdf_parser_block import PdfParserBlock -from .pdf_parser_block_yaml import PdfParserBlockYaml -from .proxy_location import ProxyLocation -from .run_engine import RunEngine -from .run_status import RunStatus -from .script import Script -from .script_file_create import ScriptFileCreate -from .script_run_response import ScriptRunResponse -from .select_option import SelectOption -from .send_email_block import SendEmailBlock -from .send_email_block_yaml import SendEmailBlockYaml -from .skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType -from .skyvern_schemas_run_blocks_credential_type import SkyvernSchemasRunBlocksCredentialType -from .task_block import TaskBlock -from .task_block_data_schema import TaskBlockDataSchema -from .task_block_parameters_item import ( - TaskBlockParametersItem, - TaskBlockParametersItem_AwsSecret, - TaskBlockParametersItem_AzureSecret, - TaskBlockParametersItem_AzureVaultCredential, - TaskBlockParametersItem_BitwardenCreditCardData, - TaskBlockParametersItem_BitwardenLoginCredential, - TaskBlockParametersItem_BitwardenSensitiveInformation, - TaskBlockParametersItem_Context, - TaskBlockParametersItem_Credential, - TaskBlockParametersItem_Onepassword, - TaskBlockParametersItem_Output, - TaskBlockParametersItem_Workflow, -) -from .task_block_yaml import TaskBlockYaml -from .task_block_yaml_data_schema import TaskBlockYamlDataSchema -from .task_run_request import TaskRunRequest -from .task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema -from .task_run_response import TaskRunResponse -from .task_run_response_output import TaskRunResponseOutput -from .task_v2block import TaskV2Block -from .task_v2block_yaml import TaskV2BlockYaml -from .text_prompt_block import TextPromptBlock -from .text_prompt_block_parameters_item import ( - TextPromptBlockParametersItem, - TextPromptBlockParametersItem_AwsSecret, - TextPromptBlockParametersItem_AzureSecret, - TextPromptBlockParametersItem_AzureVaultCredential, - TextPromptBlockParametersItem_BitwardenCreditCardData, - TextPromptBlockParametersItem_BitwardenLoginCredential, - TextPromptBlockParametersItem_BitwardenSensitiveInformation, - TextPromptBlockParametersItem_Context, - TextPromptBlockParametersItem_Credential, - TextPromptBlockParametersItem_Onepassword, - TextPromptBlockParametersItem_Output, - TextPromptBlockParametersItem_Workflow, -) -from .text_prompt_block_yaml import TextPromptBlockYaml -from .thought import Thought -from .thought_scenario import ThoughtScenario -from .thought_type import ThoughtType -from .totp_code import TotpCode -from .totp_type import TotpType -from .upload_to_s3block import UploadToS3Block -from .upload_to_s3block_yaml import UploadToS3BlockYaml -from .url_block import UrlBlock -from .url_block_data_schema import UrlBlockDataSchema -from .url_block_parameters_item import ( - UrlBlockParametersItem, - UrlBlockParametersItem_AwsSecret, - UrlBlockParametersItem_AzureSecret, - UrlBlockParametersItem_AzureVaultCredential, - UrlBlockParametersItem_BitwardenCreditCardData, - UrlBlockParametersItem_BitwardenLoginCredential, - UrlBlockParametersItem_BitwardenSensitiveInformation, - UrlBlockParametersItem_Context, - UrlBlockParametersItem_Credential, - UrlBlockParametersItem_Onepassword, - UrlBlockParametersItem_Output, - UrlBlockParametersItem_Workflow, -) -from .url_block_yaml import UrlBlockYaml -from .user_defined_error import UserDefinedError -from .validation_block import ValidationBlock -from .validation_block_data_schema import ValidationBlockDataSchema -from .validation_block_parameters_item import ( - ValidationBlockParametersItem, - ValidationBlockParametersItem_AwsSecret, - ValidationBlockParametersItem_AzureSecret, - ValidationBlockParametersItem_AzureVaultCredential, - ValidationBlockParametersItem_BitwardenCreditCardData, - ValidationBlockParametersItem_BitwardenLoginCredential, - ValidationBlockParametersItem_BitwardenSensitiveInformation, - ValidationBlockParametersItem_Context, - ValidationBlockParametersItem_Credential, - ValidationBlockParametersItem_Onepassword, - ValidationBlockParametersItem_Output, - ValidationBlockParametersItem_Workflow, -) -from .validation_block_yaml import ValidationBlockYaml -from .validation_error import ValidationError -from .validation_error_loc_item import ValidationErrorLocItem -from .wait_block import WaitBlock -from .wait_block_parameters_item import ( - WaitBlockParametersItem, - WaitBlockParametersItem_AwsSecret, - WaitBlockParametersItem_AzureSecret, - WaitBlockParametersItem_AzureVaultCredential, - WaitBlockParametersItem_BitwardenCreditCardData, - WaitBlockParametersItem_BitwardenLoginCredential, - WaitBlockParametersItem_BitwardenSensitiveInformation, - WaitBlockParametersItem_Context, - WaitBlockParametersItem_Credential, - WaitBlockParametersItem_Onepassword, - WaitBlockParametersItem_Output, - WaitBlockParametersItem_Workflow, -) -from .wait_block_yaml import WaitBlockYaml -from .workflow import Workflow -from .workflow_create_yaml_request import WorkflowCreateYamlRequest -from .workflow_definition import WorkflowDefinition -from .workflow_definition_blocks_item import ( - WorkflowDefinitionBlocksItem, - WorkflowDefinitionBlocksItem_Action, - WorkflowDefinitionBlocksItem_Code, - WorkflowDefinitionBlocksItem_DownloadToS3, - WorkflowDefinitionBlocksItem_Extraction, - WorkflowDefinitionBlocksItem_FileDownload, - WorkflowDefinitionBlocksItem_FileUpload, - WorkflowDefinitionBlocksItem_FileUrlParser, - WorkflowDefinitionBlocksItem_ForLoop, - WorkflowDefinitionBlocksItem_GotoUrl, - WorkflowDefinitionBlocksItem_HttpRequest, - WorkflowDefinitionBlocksItem_Login, - WorkflowDefinitionBlocksItem_Navigation, - WorkflowDefinitionBlocksItem_PdfParser, - WorkflowDefinitionBlocksItem_SendEmail, - WorkflowDefinitionBlocksItem_Task, - WorkflowDefinitionBlocksItem_TaskV2, - WorkflowDefinitionBlocksItem_TextPrompt, - WorkflowDefinitionBlocksItem_UploadToS3, - WorkflowDefinitionBlocksItem_Validation, - WorkflowDefinitionBlocksItem_Wait, -) -from .workflow_definition_parameters_item import ( - WorkflowDefinitionParametersItem, - WorkflowDefinitionParametersItem_AwsSecret, - WorkflowDefinitionParametersItem_AzureSecret, - WorkflowDefinitionParametersItem_AzureVaultCredential, - WorkflowDefinitionParametersItem_BitwardenCreditCardData, - WorkflowDefinitionParametersItem_BitwardenLoginCredential, - WorkflowDefinitionParametersItem_BitwardenSensitiveInformation, - WorkflowDefinitionParametersItem_Context, - WorkflowDefinitionParametersItem_Credential, - WorkflowDefinitionParametersItem_Onepassword, - WorkflowDefinitionParametersItem_Output, - WorkflowDefinitionParametersItem_Workflow, -) -from .workflow_definition_yaml import WorkflowDefinitionYaml -from .workflow_definition_yaml_blocks_item import ( - WorkflowDefinitionYamlBlocksItem, - WorkflowDefinitionYamlBlocksItem_Action, - WorkflowDefinitionYamlBlocksItem_Code, - WorkflowDefinitionYamlBlocksItem_DownloadToS3, - WorkflowDefinitionYamlBlocksItem_Extraction, - WorkflowDefinitionYamlBlocksItem_FileDownload, - WorkflowDefinitionYamlBlocksItem_FileUpload, - WorkflowDefinitionYamlBlocksItem_FileUrlParser, - WorkflowDefinitionYamlBlocksItem_ForLoop, - WorkflowDefinitionYamlBlocksItem_GotoUrl, - WorkflowDefinitionYamlBlocksItem_HttpRequest, - WorkflowDefinitionYamlBlocksItem_Login, - WorkflowDefinitionYamlBlocksItem_Navigation, - WorkflowDefinitionYamlBlocksItem_PdfParser, - WorkflowDefinitionYamlBlocksItem_SendEmail, - WorkflowDefinitionYamlBlocksItem_Task, - WorkflowDefinitionYamlBlocksItem_TaskV2, - WorkflowDefinitionYamlBlocksItem_TextPrompt, - WorkflowDefinitionYamlBlocksItem_UploadToS3, - WorkflowDefinitionYamlBlocksItem_Validation, - WorkflowDefinitionYamlBlocksItem_Wait, -) -from .workflow_definition_yaml_parameters_item import ( - WorkflowDefinitionYamlParametersItem, - WorkflowDefinitionYamlParametersItem_AwsSecret, - WorkflowDefinitionYamlParametersItem_AzureVaultCredential, - WorkflowDefinitionYamlParametersItem_BitwardenCreditCardData, - WorkflowDefinitionYamlParametersItem_BitwardenLoginCredential, - WorkflowDefinitionYamlParametersItem_BitwardenSensitiveInformation, - WorkflowDefinitionYamlParametersItem_Context, - WorkflowDefinitionYamlParametersItem_Credential, - WorkflowDefinitionYamlParametersItem_Onepassword, - WorkflowDefinitionYamlParametersItem_Output, - WorkflowDefinitionYamlParametersItem_Workflow, -) -from .workflow_parameter import WorkflowParameter -from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from .workflow_parameter_type import WorkflowParameterType -from .workflow_parameter_yaml import WorkflowParameterYaml -from .workflow_parameter_yaml_default_value import WorkflowParameterYamlDefaultValue -from .workflow_request import WorkflowRequest -from .workflow_run_block import WorkflowRunBlock -from .workflow_run_block_data_schema import WorkflowRunBlockDataSchema -from .workflow_run_block_navigation_payload import WorkflowRunBlockNavigationPayload -from .workflow_run_block_output import WorkflowRunBlockOutput -from .workflow_run_request import WorkflowRunRequest -from .workflow_run_response import WorkflowRunResponse -from .workflow_run_response_output import WorkflowRunResponseOutput -from .workflow_run_timeline import WorkflowRunTimeline -from .workflow_run_timeline_type import WorkflowRunTimelineType -from .workflow_status import WorkflowStatus +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .action import Action + from .action_block import ActionBlock + from .action_block_data_schema import ActionBlockDataSchema + from .action_block_parameters_item import ( + ActionBlockParametersItem, + ActionBlockParametersItem_AwsSecret, + ActionBlockParametersItem_AzureSecret, + ActionBlockParametersItem_AzureVaultCredential, + ActionBlockParametersItem_BitwardenCreditCardData, + ActionBlockParametersItem_BitwardenLoginCredential, + ActionBlockParametersItem_BitwardenSensitiveInformation, + ActionBlockParametersItem_Context, + ActionBlockParametersItem_Credential, + ActionBlockParametersItem_Onepassword, + ActionBlockParametersItem_Output, + ActionBlockParametersItem_Workflow, + ) + from .action_block_yaml import ActionBlockYaml + from .action_status import ActionStatus + from .action_type import ActionType + from .artifact import Artifact + from .artifact_type import ArtifactType + from .aws_secret_parameter import AwsSecretParameter + from .aws_secret_parameter_yaml import AwsSecretParameterYaml + from .azure_secret_parameter import AzureSecretParameter + from .azure_vault_credential_parameter import AzureVaultCredentialParameter + from .azure_vault_credential_parameter_yaml import AzureVaultCredentialParameterYaml + from .bitwarden_credit_card_data_parameter import BitwardenCreditCardDataParameter + from .bitwarden_credit_card_data_parameter_yaml import BitwardenCreditCardDataParameterYaml + from .bitwarden_login_credential_parameter import BitwardenLoginCredentialParameter + from .bitwarden_login_credential_parameter_yaml import BitwardenLoginCredentialParameterYaml + from .bitwarden_sensitive_information_parameter import BitwardenSensitiveInformationParameter + from .bitwarden_sensitive_information_parameter_yaml import BitwardenSensitiveInformationParameterYaml + from .block_type import BlockType + from .browser_session_response import BrowserSessionResponse + from .code_block import CodeBlock + from .code_block_parameters_item import ( + CodeBlockParametersItem, + CodeBlockParametersItem_AwsSecret, + CodeBlockParametersItem_AzureSecret, + CodeBlockParametersItem_AzureVaultCredential, + CodeBlockParametersItem_BitwardenCreditCardData, + CodeBlockParametersItem_BitwardenLoginCredential, + CodeBlockParametersItem_BitwardenSensitiveInformation, + CodeBlockParametersItem_Context, + CodeBlockParametersItem_Credential, + CodeBlockParametersItem_Onepassword, + CodeBlockParametersItem_Output, + CodeBlockParametersItem_Workflow, + ) + from .code_block_yaml import CodeBlockYaml + from .context_parameter import ContextParameter + from .context_parameter_source import ( + ContextParameterSource, + ContextParameterSource_AwsSecret, + ContextParameterSource_AzureSecret, + ContextParameterSource_AzureVaultCredential, + ContextParameterSource_BitwardenCreditCardData, + ContextParameterSource_BitwardenLoginCredential, + ContextParameterSource_BitwardenSensitiveInformation, + ContextParameterSource_Context, + ContextParameterSource_Credential, + ContextParameterSource_Onepassword, + ContextParameterSource_Output, + ContextParameterSource_Workflow, + ) + from .context_parameter_value import ContextParameterValue + from .context_parameter_yaml import ContextParameterYaml + from .create_credential_request_credential import CreateCredentialRequestCredential + from .create_script_response import CreateScriptResponse + from .credential_parameter import CredentialParameter + from .credential_parameter_yaml import CredentialParameterYaml + from .credential_response import CredentialResponse + from .credential_response_credential import CredentialResponseCredential + from .credential_type_output import CredentialTypeOutput + from .credit_card_credential_response import CreditCardCredentialResponse + from .download_to_s3block import DownloadToS3Block + from .download_to_s3block_yaml import DownloadToS3BlockYaml + from .extraction_block import ExtractionBlock + from .extraction_block_data_schema import ExtractionBlockDataSchema + from .extraction_block_parameters_item import ( + ExtractionBlockParametersItem, + ExtractionBlockParametersItem_AwsSecret, + ExtractionBlockParametersItem_AzureSecret, + ExtractionBlockParametersItem_AzureVaultCredential, + ExtractionBlockParametersItem_BitwardenCreditCardData, + ExtractionBlockParametersItem_BitwardenLoginCredential, + ExtractionBlockParametersItem_BitwardenSensitiveInformation, + ExtractionBlockParametersItem_Context, + ExtractionBlockParametersItem_Credential, + ExtractionBlockParametersItem_Onepassword, + ExtractionBlockParametersItem_Output, + ExtractionBlockParametersItem_Workflow, + ) + from .extraction_block_yaml import ExtractionBlockYaml + from .extraction_block_yaml_data_schema import ExtractionBlockYamlDataSchema + from .file_download_block import FileDownloadBlock + from .file_download_block_data_schema import FileDownloadBlockDataSchema + from .file_download_block_parameters_item import ( + FileDownloadBlockParametersItem, + FileDownloadBlockParametersItem_AwsSecret, + FileDownloadBlockParametersItem_AzureSecret, + FileDownloadBlockParametersItem_AzureVaultCredential, + FileDownloadBlockParametersItem_BitwardenCreditCardData, + FileDownloadBlockParametersItem_BitwardenLoginCredential, + FileDownloadBlockParametersItem_BitwardenSensitiveInformation, + FileDownloadBlockParametersItem_Context, + FileDownloadBlockParametersItem_Credential, + FileDownloadBlockParametersItem_Onepassword, + FileDownloadBlockParametersItem_Output, + FileDownloadBlockParametersItem_Workflow, + ) + from .file_download_block_yaml import FileDownloadBlockYaml + from .file_encoding import FileEncoding + from .file_info import FileInfo + from .file_node import FileNode + from .file_parser_block import FileParserBlock + from .file_parser_block_yaml import FileParserBlockYaml + from .file_storage_type import FileStorageType + from .file_type import FileType + from .file_upload_block import FileUploadBlock + from .file_upload_block_yaml import FileUploadBlockYaml + from .for_loop_block import ForLoopBlock + from .for_loop_block_loop_blocks_item import ( + ForLoopBlockLoopBlocksItem, + ForLoopBlockLoopBlocksItem_Action, + ForLoopBlockLoopBlocksItem_Code, + ForLoopBlockLoopBlocksItem_DownloadToS3, + ForLoopBlockLoopBlocksItem_Extraction, + ForLoopBlockLoopBlocksItem_FileDownload, + ForLoopBlockLoopBlocksItem_FileUpload, + ForLoopBlockLoopBlocksItem_FileUrlParser, + ForLoopBlockLoopBlocksItem_ForLoop, + ForLoopBlockLoopBlocksItem_GotoUrl, + ForLoopBlockLoopBlocksItem_HttpRequest, + ForLoopBlockLoopBlocksItem_HumanInteraction, + ForLoopBlockLoopBlocksItem_Login, + ForLoopBlockLoopBlocksItem_Navigation, + ForLoopBlockLoopBlocksItem_PdfParser, + ForLoopBlockLoopBlocksItem_SendEmail, + ForLoopBlockLoopBlocksItem_Task, + ForLoopBlockLoopBlocksItem_TaskV2, + ForLoopBlockLoopBlocksItem_TextPrompt, + ForLoopBlockLoopBlocksItem_UploadToS3, + ForLoopBlockLoopBlocksItem_Validation, + ForLoopBlockLoopBlocksItem_Wait, + ) + from .for_loop_block_loop_over import ( + ForLoopBlockLoopOver, + ForLoopBlockLoopOver_AwsSecret, + ForLoopBlockLoopOver_AzureSecret, + ForLoopBlockLoopOver_AzureVaultCredential, + ForLoopBlockLoopOver_BitwardenCreditCardData, + ForLoopBlockLoopOver_BitwardenLoginCredential, + ForLoopBlockLoopOver_BitwardenSensitiveInformation, + ForLoopBlockLoopOver_Context, + ForLoopBlockLoopOver_Credential, + ForLoopBlockLoopOver_Onepassword, + ForLoopBlockLoopOver_Output, + ForLoopBlockLoopOver_Workflow, + ) + from .for_loop_block_yaml import ForLoopBlockYaml + from .for_loop_block_yaml_loop_blocks_item import ( + ForLoopBlockYamlLoopBlocksItem, + ForLoopBlockYamlLoopBlocksItem_Action, + ForLoopBlockYamlLoopBlocksItem_Code, + ForLoopBlockYamlLoopBlocksItem_DownloadToS3, + ForLoopBlockYamlLoopBlocksItem_Extraction, + ForLoopBlockYamlLoopBlocksItem_FileDownload, + ForLoopBlockYamlLoopBlocksItem_FileUpload, + ForLoopBlockYamlLoopBlocksItem_FileUrlParser, + ForLoopBlockYamlLoopBlocksItem_ForLoop, + ForLoopBlockYamlLoopBlocksItem_GotoUrl, + ForLoopBlockYamlLoopBlocksItem_HttpRequest, + ForLoopBlockYamlLoopBlocksItem_HumanInteraction, + ForLoopBlockYamlLoopBlocksItem_Login, + ForLoopBlockYamlLoopBlocksItem_Navigation, + ForLoopBlockYamlLoopBlocksItem_PdfParser, + ForLoopBlockYamlLoopBlocksItem_SendEmail, + ForLoopBlockYamlLoopBlocksItem_Task, + ForLoopBlockYamlLoopBlocksItem_TaskV2, + ForLoopBlockYamlLoopBlocksItem_TextPrompt, + ForLoopBlockYamlLoopBlocksItem_UploadToS3, + ForLoopBlockYamlLoopBlocksItem_Validation, + ForLoopBlockYamlLoopBlocksItem_Wait, + ) + from .get_run_response import ( + GetRunResponse, + GetRunResponse_AnthropicCua, + GetRunResponse_OpenaiCua, + GetRunResponse_TaskV1, + GetRunResponse_TaskV2, + GetRunResponse_UiTars, + GetRunResponse_WorkflowRun, + ) + from .http_request_block import HttpRequestBlock + from .http_request_block_parameters_item import ( + HttpRequestBlockParametersItem, + HttpRequestBlockParametersItem_AwsSecret, + HttpRequestBlockParametersItem_AzureSecret, + HttpRequestBlockParametersItem_AzureVaultCredential, + HttpRequestBlockParametersItem_BitwardenCreditCardData, + HttpRequestBlockParametersItem_BitwardenLoginCredential, + HttpRequestBlockParametersItem_BitwardenSensitiveInformation, + HttpRequestBlockParametersItem_Context, + HttpRequestBlockParametersItem_Credential, + HttpRequestBlockParametersItem_Onepassword, + HttpRequestBlockParametersItem_Output, + HttpRequestBlockParametersItem_Workflow, + ) + from .http_request_block_yaml import HttpRequestBlockYaml + from .http_validation_error import HttpValidationError + from .human_interaction_block import HumanInteractionBlock + from .human_interaction_block_data_schema import HumanInteractionBlockDataSchema + from .human_interaction_block_parameters_item import ( + HumanInteractionBlockParametersItem, + HumanInteractionBlockParametersItem_AwsSecret, + HumanInteractionBlockParametersItem_AzureSecret, + HumanInteractionBlockParametersItem_AzureVaultCredential, + HumanInteractionBlockParametersItem_BitwardenCreditCardData, + HumanInteractionBlockParametersItem_BitwardenLoginCredential, + HumanInteractionBlockParametersItem_BitwardenSensitiveInformation, + HumanInteractionBlockParametersItem_Context, + HumanInteractionBlockParametersItem_Credential, + HumanInteractionBlockParametersItem_Onepassword, + HumanInteractionBlockParametersItem_Output, + HumanInteractionBlockParametersItem_Workflow, + ) + from .human_interaction_block_yaml import HumanInteractionBlockYaml + from .input_or_select_context import InputOrSelectContext + from .login_block import LoginBlock + from .login_block_data_schema import LoginBlockDataSchema + from .login_block_parameters_item import ( + LoginBlockParametersItem, + LoginBlockParametersItem_AwsSecret, + LoginBlockParametersItem_AzureSecret, + LoginBlockParametersItem_AzureVaultCredential, + LoginBlockParametersItem_BitwardenCreditCardData, + LoginBlockParametersItem_BitwardenLoginCredential, + LoginBlockParametersItem_BitwardenSensitiveInformation, + LoginBlockParametersItem_Context, + LoginBlockParametersItem_Credential, + LoginBlockParametersItem_Onepassword, + LoginBlockParametersItem_Output, + LoginBlockParametersItem_Workflow, + ) + from .login_block_yaml import LoginBlockYaml + from .navigation_block import NavigationBlock + from .navigation_block_data_schema import NavigationBlockDataSchema + from .navigation_block_parameters_item import ( + NavigationBlockParametersItem, + NavigationBlockParametersItem_AwsSecret, + NavigationBlockParametersItem_AzureSecret, + NavigationBlockParametersItem_AzureVaultCredential, + NavigationBlockParametersItem_BitwardenCreditCardData, + NavigationBlockParametersItem_BitwardenLoginCredential, + NavigationBlockParametersItem_BitwardenSensitiveInformation, + NavigationBlockParametersItem_Context, + NavigationBlockParametersItem_Credential, + NavigationBlockParametersItem_Onepassword, + NavigationBlockParametersItem_Output, + NavigationBlockParametersItem_Workflow, + ) + from .navigation_block_yaml import NavigationBlockYaml + from .non_empty_credit_card_credential import NonEmptyCreditCardCredential + from .non_empty_password_credential import NonEmptyPasswordCredential + from .one_password_credential_parameter import OnePasswordCredentialParameter + from .one_password_credential_parameter_yaml import OnePasswordCredentialParameterYaml + from .otp_type import OtpType + from .output_parameter import OutputParameter + from .output_parameter_yaml import OutputParameterYaml + from .password_credential_response import PasswordCredentialResponse + from .pdf_parser_block import PdfParserBlock + from .pdf_parser_block_yaml import PdfParserBlockYaml + from .proxy_location import ProxyLocation + from .run_engine import RunEngine + from .run_status import RunStatus + from .script import Script + from .script_file_create import ScriptFileCreate + from .script_run_response import ScriptRunResponse + from .select_option import SelectOption + from .send_email_block import SendEmailBlock + from .send_email_block_yaml import SendEmailBlockYaml + from .skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType + from .skyvern_schemas_run_blocks_credential_type import SkyvernSchemasRunBlocksCredentialType + from .task_block import TaskBlock + from .task_block_data_schema import TaskBlockDataSchema + from .task_block_parameters_item import ( + TaskBlockParametersItem, + TaskBlockParametersItem_AwsSecret, + TaskBlockParametersItem_AzureSecret, + TaskBlockParametersItem_AzureVaultCredential, + TaskBlockParametersItem_BitwardenCreditCardData, + TaskBlockParametersItem_BitwardenLoginCredential, + TaskBlockParametersItem_BitwardenSensitiveInformation, + TaskBlockParametersItem_Context, + TaskBlockParametersItem_Credential, + TaskBlockParametersItem_Onepassword, + TaskBlockParametersItem_Output, + TaskBlockParametersItem_Workflow, + ) + from .task_block_yaml import TaskBlockYaml + from .task_block_yaml_data_schema import TaskBlockYamlDataSchema + from .task_run_request import TaskRunRequest + from .task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema + from .task_run_response import TaskRunResponse + from .task_run_response_output import TaskRunResponseOutput + from .task_v2block import TaskV2Block + from .task_v2block_yaml import TaskV2BlockYaml + from .text_prompt_block import TextPromptBlock + from .text_prompt_block_parameters_item import ( + TextPromptBlockParametersItem, + TextPromptBlockParametersItem_AwsSecret, + TextPromptBlockParametersItem_AzureSecret, + TextPromptBlockParametersItem_AzureVaultCredential, + TextPromptBlockParametersItem_BitwardenCreditCardData, + TextPromptBlockParametersItem_BitwardenLoginCredential, + TextPromptBlockParametersItem_BitwardenSensitiveInformation, + TextPromptBlockParametersItem_Context, + TextPromptBlockParametersItem_Credential, + TextPromptBlockParametersItem_Onepassword, + TextPromptBlockParametersItem_Output, + TextPromptBlockParametersItem_Workflow, + ) + from .text_prompt_block_yaml import TextPromptBlockYaml + from .thought import Thought + from .thought_scenario import ThoughtScenario + from .thought_type import ThoughtType + from .totp_code import TotpCode + from .totp_type import TotpType + from .upload_to_s3block import UploadToS3Block + from .upload_to_s3block_yaml import UploadToS3BlockYaml + from .url_block import UrlBlock + from .url_block_data_schema import UrlBlockDataSchema + from .url_block_parameters_item import ( + UrlBlockParametersItem, + UrlBlockParametersItem_AwsSecret, + UrlBlockParametersItem_AzureSecret, + UrlBlockParametersItem_AzureVaultCredential, + UrlBlockParametersItem_BitwardenCreditCardData, + UrlBlockParametersItem_BitwardenLoginCredential, + UrlBlockParametersItem_BitwardenSensitiveInformation, + UrlBlockParametersItem_Context, + UrlBlockParametersItem_Credential, + UrlBlockParametersItem_Onepassword, + UrlBlockParametersItem_Output, + UrlBlockParametersItem_Workflow, + ) + from .url_block_yaml import UrlBlockYaml + from .user_defined_error import UserDefinedError + from .validation_block import ValidationBlock + from .validation_block_data_schema import ValidationBlockDataSchema + from .validation_block_parameters_item import ( + ValidationBlockParametersItem, + ValidationBlockParametersItem_AwsSecret, + ValidationBlockParametersItem_AzureSecret, + ValidationBlockParametersItem_AzureVaultCredential, + ValidationBlockParametersItem_BitwardenCreditCardData, + ValidationBlockParametersItem_BitwardenLoginCredential, + ValidationBlockParametersItem_BitwardenSensitiveInformation, + ValidationBlockParametersItem_Context, + ValidationBlockParametersItem_Credential, + ValidationBlockParametersItem_Onepassword, + ValidationBlockParametersItem_Output, + ValidationBlockParametersItem_Workflow, + ) + from .validation_block_yaml import ValidationBlockYaml + from .validation_error import ValidationError + from .validation_error_loc_item import ValidationErrorLocItem + from .wait_block import WaitBlock + from .wait_block_parameters_item import ( + WaitBlockParametersItem, + WaitBlockParametersItem_AwsSecret, + WaitBlockParametersItem_AzureSecret, + WaitBlockParametersItem_AzureVaultCredential, + WaitBlockParametersItem_BitwardenCreditCardData, + WaitBlockParametersItem_BitwardenLoginCredential, + WaitBlockParametersItem_BitwardenSensitiveInformation, + WaitBlockParametersItem_Context, + WaitBlockParametersItem_Credential, + WaitBlockParametersItem_Onepassword, + WaitBlockParametersItem_Output, + WaitBlockParametersItem_Workflow, + ) + from .wait_block_yaml import WaitBlockYaml + from .workflow import Workflow + from .workflow_create_yaml_request import WorkflowCreateYamlRequest + from .workflow_definition import WorkflowDefinition + from .workflow_definition_blocks_item import ( + WorkflowDefinitionBlocksItem, + WorkflowDefinitionBlocksItem_Action, + WorkflowDefinitionBlocksItem_Code, + WorkflowDefinitionBlocksItem_DownloadToS3, + WorkflowDefinitionBlocksItem_Extraction, + WorkflowDefinitionBlocksItem_FileDownload, + WorkflowDefinitionBlocksItem_FileUpload, + WorkflowDefinitionBlocksItem_FileUrlParser, + WorkflowDefinitionBlocksItem_ForLoop, + WorkflowDefinitionBlocksItem_GotoUrl, + WorkflowDefinitionBlocksItem_HttpRequest, + WorkflowDefinitionBlocksItem_HumanInteraction, + WorkflowDefinitionBlocksItem_Login, + WorkflowDefinitionBlocksItem_Navigation, + WorkflowDefinitionBlocksItem_PdfParser, + WorkflowDefinitionBlocksItem_SendEmail, + WorkflowDefinitionBlocksItem_Task, + WorkflowDefinitionBlocksItem_TaskV2, + WorkflowDefinitionBlocksItem_TextPrompt, + WorkflowDefinitionBlocksItem_UploadToS3, + WorkflowDefinitionBlocksItem_Validation, + WorkflowDefinitionBlocksItem_Wait, + ) + from .workflow_definition_parameters_item import ( + WorkflowDefinitionParametersItem, + WorkflowDefinitionParametersItem_AwsSecret, + WorkflowDefinitionParametersItem_AzureSecret, + WorkflowDefinitionParametersItem_AzureVaultCredential, + WorkflowDefinitionParametersItem_BitwardenCreditCardData, + WorkflowDefinitionParametersItem_BitwardenLoginCredential, + WorkflowDefinitionParametersItem_BitwardenSensitiveInformation, + WorkflowDefinitionParametersItem_Context, + WorkflowDefinitionParametersItem_Credential, + WorkflowDefinitionParametersItem_Onepassword, + WorkflowDefinitionParametersItem_Output, + WorkflowDefinitionParametersItem_Workflow, + ) + from .workflow_definition_yaml import WorkflowDefinitionYaml + from .workflow_definition_yaml_blocks_item import ( + WorkflowDefinitionYamlBlocksItem, + WorkflowDefinitionYamlBlocksItem_Action, + WorkflowDefinitionYamlBlocksItem_Code, + WorkflowDefinitionYamlBlocksItem_DownloadToS3, + WorkflowDefinitionYamlBlocksItem_Extraction, + WorkflowDefinitionYamlBlocksItem_FileDownload, + WorkflowDefinitionYamlBlocksItem_FileUpload, + WorkflowDefinitionYamlBlocksItem_FileUrlParser, + WorkflowDefinitionYamlBlocksItem_ForLoop, + WorkflowDefinitionYamlBlocksItem_GotoUrl, + WorkflowDefinitionYamlBlocksItem_HttpRequest, + WorkflowDefinitionYamlBlocksItem_HumanInteraction, + WorkflowDefinitionYamlBlocksItem_Login, + WorkflowDefinitionYamlBlocksItem_Navigation, + WorkflowDefinitionYamlBlocksItem_PdfParser, + WorkflowDefinitionYamlBlocksItem_SendEmail, + WorkflowDefinitionYamlBlocksItem_Task, + WorkflowDefinitionYamlBlocksItem_TaskV2, + WorkflowDefinitionYamlBlocksItem_TextPrompt, + WorkflowDefinitionYamlBlocksItem_UploadToS3, + WorkflowDefinitionYamlBlocksItem_Validation, + WorkflowDefinitionYamlBlocksItem_Wait, + ) + from .workflow_definition_yaml_parameters_item import ( + WorkflowDefinitionYamlParametersItem, + WorkflowDefinitionYamlParametersItem_AwsSecret, + WorkflowDefinitionYamlParametersItem_AzureVaultCredential, + WorkflowDefinitionYamlParametersItem_BitwardenCreditCardData, + WorkflowDefinitionYamlParametersItem_BitwardenLoginCredential, + WorkflowDefinitionYamlParametersItem_BitwardenSensitiveInformation, + WorkflowDefinitionYamlParametersItem_Context, + WorkflowDefinitionYamlParametersItem_Credential, + WorkflowDefinitionYamlParametersItem_Onepassword, + WorkflowDefinitionYamlParametersItem_Output, + WorkflowDefinitionYamlParametersItem_Workflow, + ) + from .workflow_parameter import WorkflowParameter + from .workflow_parameter_default_value import WorkflowParameterDefaultValue + from .workflow_parameter_type import WorkflowParameterType + from .workflow_parameter_yaml import WorkflowParameterYaml + from .workflow_parameter_yaml_default_value import WorkflowParameterYamlDefaultValue + from .workflow_request import WorkflowRequest + from .workflow_run_block import WorkflowRunBlock + from .workflow_run_block_data_schema import WorkflowRunBlockDataSchema + from .workflow_run_block_navigation_payload import WorkflowRunBlockNavigationPayload + from .workflow_run_block_output import WorkflowRunBlockOutput + from .workflow_run_request import WorkflowRunRequest + from .workflow_run_response import WorkflowRunResponse + from .workflow_run_response_output import WorkflowRunResponseOutput + from .workflow_run_timeline import WorkflowRunTimeline + from .workflow_run_timeline_type import WorkflowRunTimelineType + from .workflow_status import WorkflowStatus +_dynamic_imports: typing.Dict[str, str] = { + "Action": ".action", + "ActionBlock": ".action_block", + "ActionBlockDataSchema": ".action_block_data_schema", + "ActionBlockParametersItem": ".action_block_parameters_item", + "ActionBlockParametersItem_AwsSecret": ".action_block_parameters_item", + "ActionBlockParametersItem_AzureSecret": ".action_block_parameters_item", + "ActionBlockParametersItem_AzureVaultCredential": ".action_block_parameters_item", + "ActionBlockParametersItem_BitwardenCreditCardData": ".action_block_parameters_item", + "ActionBlockParametersItem_BitwardenLoginCredential": ".action_block_parameters_item", + "ActionBlockParametersItem_BitwardenSensitiveInformation": ".action_block_parameters_item", + "ActionBlockParametersItem_Context": ".action_block_parameters_item", + "ActionBlockParametersItem_Credential": ".action_block_parameters_item", + "ActionBlockParametersItem_Onepassword": ".action_block_parameters_item", + "ActionBlockParametersItem_Output": ".action_block_parameters_item", + "ActionBlockParametersItem_Workflow": ".action_block_parameters_item", + "ActionBlockYaml": ".action_block_yaml", + "ActionStatus": ".action_status", + "ActionType": ".action_type", + "Artifact": ".artifact", + "ArtifactType": ".artifact_type", + "AwsSecretParameter": ".aws_secret_parameter", + "AwsSecretParameterYaml": ".aws_secret_parameter_yaml", + "AzureSecretParameter": ".azure_secret_parameter", + "AzureVaultCredentialParameter": ".azure_vault_credential_parameter", + "AzureVaultCredentialParameterYaml": ".azure_vault_credential_parameter_yaml", + "BitwardenCreditCardDataParameter": ".bitwarden_credit_card_data_parameter", + "BitwardenCreditCardDataParameterYaml": ".bitwarden_credit_card_data_parameter_yaml", + "BitwardenLoginCredentialParameter": ".bitwarden_login_credential_parameter", + "BitwardenLoginCredentialParameterYaml": ".bitwarden_login_credential_parameter_yaml", + "BitwardenSensitiveInformationParameter": ".bitwarden_sensitive_information_parameter", + "BitwardenSensitiveInformationParameterYaml": ".bitwarden_sensitive_information_parameter_yaml", + "BlockType": ".block_type", + "BrowserSessionResponse": ".browser_session_response", + "CodeBlock": ".code_block", + "CodeBlockParametersItem": ".code_block_parameters_item", + "CodeBlockParametersItem_AwsSecret": ".code_block_parameters_item", + "CodeBlockParametersItem_AzureSecret": ".code_block_parameters_item", + "CodeBlockParametersItem_AzureVaultCredential": ".code_block_parameters_item", + "CodeBlockParametersItem_BitwardenCreditCardData": ".code_block_parameters_item", + "CodeBlockParametersItem_BitwardenLoginCredential": ".code_block_parameters_item", + "CodeBlockParametersItem_BitwardenSensitiveInformation": ".code_block_parameters_item", + "CodeBlockParametersItem_Context": ".code_block_parameters_item", + "CodeBlockParametersItem_Credential": ".code_block_parameters_item", + "CodeBlockParametersItem_Onepassword": ".code_block_parameters_item", + "CodeBlockParametersItem_Output": ".code_block_parameters_item", + "CodeBlockParametersItem_Workflow": ".code_block_parameters_item", + "CodeBlockYaml": ".code_block_yaml", + "ContextParameter": ".context_parameter", + "ContextParameterSource": ".context_parameter_source", + "ContextParameterSource_AwsSecret": ".context_parameter_source", + "ContextParameterSource_AzureSecret": ".context_parameter_source", + "ContextParameterSource_AzureVaultCredential": ".context_parameter_source", + "ContextParameterSource_BitwardenCreditCardData": ".context_parameter_source", + "ContextParameterSource_BitwardenLoginCredential": ".context_parameter_source", + "ContextParameterSource_BitwardenSensitiveInformation": ".context_parameter_source", + "ContextParameterSource_Context": ".context_parameter_source", + "ContextParameterSource_Credential": ".context_parameter_source", + "ContextParameterSource_Onepassword": ".context_parameter_source", + "ContextParameterSource_Output": ".context_parameter_source", + "ContextParameterSource_Workflow": ".context_parameter_source", + "ContextParameterValue": ".context_parameter_value", + "ContextParameterYaml": ".context_parameter_yaml", + "CreateCredentialRequestCredential": ".create_credential_request_credential", + "CreateScriptResponse": ".create_script_response", + "CredentialParameter": ".credential_parameter", + "CredentialParameterYaml": ".credential_parameter_yaml", + "CredentialResponse": ".credential_response", + "CredentialResponseCredential": ".credential_response_credential", + "CredentialTypeOutput": ".credential_type_output", + "CreditCardCredentialResponse": ".credit_card_credential_response", + "DownloadToS3Block": ".download_to_s3block", + "DownloadToS3BlockYaml": ".download_to_s3block_yaml", + "ExtractionBlock": ".extraction_block", + "ExtractionBlockDataSchema": ".extraction_block_data_schema", + "ExtractionBlockParametersItem": ".extraction_block_parameters_item", + "ExtractionBlockParametersItem_AwsSecret": ".extraction_block_parameters_item", + "ExtractionBlockParametersItem_AzureSecret": ".extraction_block_parameters_item", + "ExtractionBlockParametersItem_AzureVaultCredential": ".extraction_block_parameters_item", + "ExtractionBlockParametersItem_BitwardenCreditCardData": ".extraction_block_parameters_item", + "ExtractionBlockParametersItem_BitwardenLoginCredential": ".extraction_block_parameters_item", + "ExtractionBlockParametersItem_BitwardenSensitiveInformation": ".extraction_block_parameters_item", + "ExtractionBlockParametersItem_Context": ".extraction_block_parameters_item", + "ExtractionBlockParametersItem_Credential": ".extraction_block_parameters_item", + "ExtractionBlockParametersItem_Onepassword": ".extraction_block_parameters_item", + "ExtractionBlockParametersItem_Output": ".extraction_block_parameters_item", + "ExtractionBlockParametersItem_Workflow": ".extraction_block_parameters_item", + "ExtractionBlockYaml": ".extraction_block_yaml", + "ExtractionBlockYamlDataSchema": ".extraction_block_yaml_data_schema", + "FileDownloadBlock": ".file_download_block", + "FileDownloadBlockDataSchema": ".file_download_block_data_schema", + "FileDownloadBlockParametersItem": ".file_download_block_parameters_item", + "FileDownloadBlockParametersItem_AwsSecret": ".file_download_block_parameters_item", + "FileDownloadBlockParametersItem_AzureSecret": ".file_download_block_parameters_item", + "FileDownloadBlockParametersItem_AzureVaultCredential": ".file_download_block_parameters_item", + "FileDownloadBlockParametersItem_BitwardenCreditCardData": ".file_download_block_parameters_item", + "FileDownloadBlockParametersItem_BitwardenLoginCredential": ".file_download_block_parameters_item", + "FileDownloadBlockParametersItem_BitwardenSensitiveInformation": ".file_download_block_parameters_item", + "FileDownloadBlockParametersItem_Context": ".file_download_block_parameters_item", + "FileDownloadBlockParametersItem_Credential": ".file_download_block_parameters_item", + "FileDownloadBlockParametersItem_Onepassword": ".file_download_block_parameters_item", + "FileDownloadBlockParametersItem_Output": ".file_download_block_parameters_item", + "FileDownloadBlockParametersItem_Workflow": ".file_download_block_parameters_item", + "FileDownloadBlockYaml": ".file_download_block_yaml", + "FileEncoding": ".file_encoding", + "FileInfo": ".file_info", + "FileNode": ".file_node", + "FileParserBlock": ".file_parser_block", + "FileParserBlockYaml": ".file_parser_block_yaml", + "FileStorageType": ".file_storage_type", + "FileType": ".file_type", + "FileUploadBlock": ".file_upload_block", + "FileUploadBlockYaml": ".file_upload_block_yaml", + "ForLoopBlock": ".for_loop_block", + "ForLoopBlockLoopBlocksItem": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_Action": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_Code": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_DownloadToS3": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_Extraction": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_FileDownload": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_FileUpload": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_FileUrlParser": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_ForLoop": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_GotoUrl": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_HttpRequest": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_HumanInteraction": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_Login": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_Navigation": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_PdfParser": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_SendEmail": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_Task": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_TaskV2": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_TextPrompt": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_UploadToS3": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_Validation": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_Wait": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopOver": ".for_loop_block_loop_over", + "ForLoopBlockLoopOver_AwsSecret": ".for_loop_block_loop_over", + "ForLoopBlockLoopOver_AzureSecret": ".for_loop_block_loop_over", + "ForLoopBlockLoopOver_AzureVaultCredential": ".for_loop_block_loop_over", + "ForLoopBlockLoopOver_BitwardenCreditCardData": ".for_loop_block_loop_over", + "ForLoopBlockLoopOver_BitwardenLoginCredential": ".for_loop_block_loop_over", + "ForLoopBlockLoopOver_BitwardenSensitiveInformation": ".for_loop_block_loop_over", + "ForLoopBlockLoopOver_Context": ".for_loop_block_loop_over", + "ForLoopBlockLoopOver_Credential": ".for_loop_block_loop_over", + "ForLoopBlockLoopOver_Onepassword": ".for_loop_block_loop_over", + "ForLoopBlockLoopOver_Output": ".for_loop_block_loop_over", + "ForLoopBlockLoopOver_Workflow": ".for_loop_block_loop_over", + "ForLoopBlockYaml": ".for_loop_block_yaml", + "ForLoopBlockYamlLoopBlocksItem": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_Action": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_Code": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_DownloadToS3": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_Extraction": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_FileDownload": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_FileUpload": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_FileUrlParser": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_ForLoop": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_GotoUrl": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_HttpRequest": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_HumanInteraction": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_Login": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_Navigation": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_PdfParser": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_SendEmail": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_Task": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_TaskV2": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_TextPrompt": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_UploadToS3": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_Validation": ".for_loop_block_yaml_loop_blocks_item", + "ForLoopBlockYamlLoopBlocksItem_Wait": ".for_loop_block_yaml_loop_blocks_item", + "GetRunResponse": ".get_run_response", + "GetRunResponse_AnthropicCua": ".get_run_response", + "GetRunResponse_OpenaiCua": ".get_run_response", + "GetRunResponse_TaskV1": ".get_run_response", + "GetRunResponse_TaskV2": ".get_run_response", + "GetRunResponse_UiTars": ".get_run_response", + "GetRunResponse_WorkflowRun": ".get_run_response", + "HttpRequestBlock": ".http_request_block", + "HttpRequestBlockParametersItem": ".http_request_block_parameters_item", + "HttpRequestBlockParametersItem_AwsSecret": ".http_request_block_parameters_item", + "HttpRequestBlockParametersItem_AzureSecret": ".http_request_block_parameters_item", + "HttpRequestBlockParametersItem_AzureVaultCredential": ".http_request_block_parameters_item", + "HttpRequestBlockParametersItem_BitwardenCreditCardData": ".http_request_block_parameters_item", + "HttpRequestBlockParametersItem_BitwardenLoginCredential": ".http_request_block_parameters_item", + "HttpRequestBlockParametersItem_BitwardenSensitiveInformation": ".http_request_block_parameters_item", + "HttpRequestBlockParametersItem_Context": ".http_request_block_parameters_item", + "HttpRequestBlockParametersItem_Credential": ".http_request_block_parameters_item", + "HttpRequestBlockParametersItem_Onepassword": ".http_request_block_parameters_item", + "HttpRequestBlockParametersItem_Output": ".http_request_block_parameters_item", + "HttpRequestBlockParametersItem_Workflow": ".http_request_block_parameters_item", + "HttpRequestBlockYaml": ".http_request_block_yaml", + "HttpValidationError": ".http_validation_error", + "HumanInteractionBlock": ".human_interaction_block", + "HumanInteractionBlockDataSchema": ".human_interaction_block_data_schema", + "HumanInteractionBlockParametersItem": ".human_interaction_block_parameters_item", + "HumanInteractionBlockParametersItem_AwsSecret": ".human_interaction_block_parameters_item", + "HumanInteractionBlockParametersItem_AzureSecret": ".human_interaction_block_parameters_item", + "HumanInteractionBlockParametersItem_AzureVaultCredential": ".human_interaction_block_parameters_item", + "HumanInteractionBlockParametersItem_BitwardenCreditCardData": ".human_interaction_block_parameters_item", + "HumanInteractionBlockParametersItem_BitwardenLoginCredential": ".human_interaction_block_parameters_item", + "HumanInteractionBlockParametersItem_BitwardenSensitiveInformation": ".human_interaction_block_parameters_item", + "HumanInteractionBlockParametersItem_Context": ".human_interaction_block_parameters_item", + "HumanInteractionBlockParametersItem_Credential": ".human_interaction_block_parameters_item", + "HumanInteractionBlockParametersItem_Onepassword": ".human_interaction_block_parameters_item", + "HumanInteractionBlockParametersItem_Output": ".human_interaction_block_parameters_item", + "HumanInteractionBlockParametersItem_Workflow": ".human_interaction_block_parameters_item", + "HumanInteractionBlockYaml": ".human_interaction_block_yaml", + "InputOrSelectContext": ".input_or_select_context", + "LoginBlock": ".login_block", + "LoginBlockDataSchema": ".login_block_data_schema", + "LoginBlockParametersItem": ".login_block_parameters_item", + "LoginBlockParametersItem_AwsSecret": ".login_block_parameters_item", + "LoginBlockParametersItem_AzureSecret": ".login_block_parameters_item", + "LoginBlockParametersItem_AzureVaultCredential": ".login_block_parameters_item", + "LoginBlockParametersItem_BitwardenCreditCardData": ".login_block_parameters_item", + "LoginBlockParametersItem_BitwardenLoginCredential": ".login_block_parameters_item", + "LoginBlockParametersItem_BitwardenSensitiveInformation": ".login_block_parameters_item", + "LoginBlockParametersItem_Context": ".login_block_parameters_item", + "LoginBlockParametersItem_Credential": ".login_block_parameters_item", + "LoginBlockParametersItem_Onepassword": ".login_block_parameters_item", + "LoginBlockParametersItem_Output": ".login_block_parameters_item", + "LoginBlockParametersItem_Workflow": ".login_block_parameters_item", + "LoginBlockYaml": ".login_block_yaml", + "NavigationBlock": ".navigation_block", + "NavigationBlockDataSchema": ".navigation_block_data_schema", + "NavigationBlockParametersItem": ".navigation_block_parameters_item", + "NavigationBlockParametersItem_AwsSecret": ".navigation_block_parameters_item", + "NavigationBlockParametersItem_AzureSecret": ".navigation_block_parameters_item", + "NavigationBlockParametersItem_AzureVaultCredential": ".navigation_block_parameters_item", + "NavigationBlockParametersItem_BitwardenCreditCardData": ".navigation_block_parameters_item", + "NavigationBlockParametersItem_BitwardenLoginCredential": ".navigation_block_parameters_item", + "NavigationBlockParametersItem_BitwardenSensitiveInformation": ".navigation_block_parameters_item", + "NavigationBlockParametersItem_Context": ".navigation_block_parameters_item", + "NavigationBlockParametersItem_Credential": ".navigation_block_parameters_item", + "NavigationBlockParametersItem_Onepassword": ".navigation_block_parameters_item", + "NavigationBlockParametersItem_Output": ".navigation_block_parameters_item", + "NavigationBlockParametersItem_Workflow": ".navigation_block_parameters_item", + "NavigationBlockYaml": ".navigation_block_yaml", + "NonEmptyCreditCardCredential": ".non_empty_credit_card_credential", + "NonEmptyPasswordCredential": ".non_empty_password_credential", + "OnePasswordCredentialParameter": ".one_password_credential_parameter", + "OnePasswordCredentialParameterYaml": ".one_password_credential_parameter_yaml", + "OtpType": ".otp_type", + "OutputParameter": ".output_parameter", + "OutputParameterYaml": ".output_parameter_yaml", + "PasswordCredentialResponse": ".password_credential_response", + "PdfParserBlock": ".pdf_parser_block", + "PdfParserBlockYaml": ".pdf_parser_block_yaml", + "ProxyLocation": ".proxy_location", + "RunEngine": ".run_engine", + "RunStatus": ".run_status", + "Script": ".script", + "ScriptFileCreate": ".script_file_create", + "ScriptRunResponse": ".script_run_response", + "SelectOption": ".select_option", + "SendEmailBlock": ".send_email_block", + "SendEmailBlockYaml": ".send_email_block_yaml", + "SkyvernForgeSdkSchemasCredentialsCredentialType": ".skyvern_forge_sdk_schemas_credentials_credential_type", + "SkyvernSchemasRunBlocksCredentialType": ".skyvern_schemas_run_blocks_credential_type", + "TaskBlock": ".task_block", + "TaskBlockDataSchema": ".task_block_data_schema", + "TaskBlockParametersItem": ".task_block_parameters_item", + "TaskBlockParametersItem_AwsSecret": ".task_block_parameters_item", + "TaskBlockParametersItem_AzureSecret": ".task_block_parameters_item", + "TaskBlockParametersItem_AzureVaultCredential": ".task_block_parameters_item", + "TaskBlockParametersItem_BitwardenCreditCardData": ".task_block_parameters_item", + "TaskBlockParametersItem_BitwardenLoginCredential": ".task_block_parameters_item", + "TaskBlockParametersItem_BitwardenSensitiveInformation": ".task_block_parameters_item", + "TaskBlockParametersItem_Context": ".task_block_parameters_item", + "TaskBlockParametersItem_Credential": ".task_block_parameters_item", + "TaskBlockParametersItem_Onepassword": ".task_block_parameters_item", + "TaskBlockParametersItem_Output": ".task_block_parameters_item", + "TaskBlockParametersItem_Workflow": ".task_block_parameters_item", + "TaskBlockYaml": ".task_block_yaml", + "TaskBlockYamlDataSchema": ".task_block_yaml_data_schema", + "TaskRunRequest": ".task_run_request", + "TaskRunRequestDataExtractionSchema": ".task_run_request_data_extraction_schema", + "TaskRunResponse": ".task_run_response", + "TaskRunResponseOutput": ".task_run_response_output", + "TaskV2Block": ".task_v2block", + "TaskV2BlockYaml": ".task_v2block_yaml", + "TextPromptBlock": ".text_prompt_block", + "TextPromptBlockParametersItem": ".text_prompt_block_parameters_item", + "TextPromptBlockParametersItem_AwsSecret": ".text_prompt_block_parameters_item", + "TextPromptBlockParametersItem_AzureSecret": ".text_prompt_block_parameters_item", + "TextPromptBlockParametersItem_AzureVaultCredential": ".text_prompt_block_parameters_item", + "TextPromptBlockParametersItem_BitwardenCreditCardData": ".text_prompt_block_parameters_item", + "TextPromptBlockParametersItem_BitwardenLoginCredential": ".text_prompt_block_parameters_item", + "TextPromptBlockParametersItem_BitwardenSensitiveInformation": ".text_prompt_block_parameters_item", + "TextPromptBlockParametersItem_Context": ".text_prompt_block_parameters_item", + "TextPromptBlockParametersItem_Credential": ".text_prompt_block_parameters_item", + "TextPromptBlockParametersItem_Onepassword": ".text_prompt_block_parameters_item", + "TextPromptBlockParametersItem_Output": ".text_prompt_block_parameters_item", + "TextPromptBlockParametersItem_Workflow": ".text_prompt_block_parameters_item", + "TextPromptBlockYaml": ".text_prompt_block_yaml", + "Thought": ".thought", + "ThoughtScenario": ".thought_scenario", + "ThoughtType": ".thought_type", + "TotpCode": ".totp_code", + "TotpType": ".totp_type", + "UploadToS3Block": ".upload_to_s3block", + "UploadToS3BlockYaml": ".upload_to_s3block_yaml", + "UrlBlock": ".url_block", + "UrlBlockDataSchema": ".url_block_data_schema", + "UrlBlockParametersItem": ".url_block_parameters_item", + "UrlBlockParametersItem_AwsSecret": ".url_block_parameters_item", + "UrlBlockParametersItem_AzureSecret": ".url_block_parameters_item", + "UrlBlockParametersItem_AzureVaultCredential": ".url_block_parameters_item", + "UrlBlockParametersItem_BitwardenCreditCardData": ".url_block_parameters_item", + "UrlBlockParametersItem_BitwardenLoginCredential": ".url_block_parameters_item", + "UrlBlockParametersItem_BitwardenSensitiveInformation": ".url_block_parameters_item", + "UrlBlockParametersItem_Context": ".url_block_parameters_item", + "UrlBlockParametersItem_Credential": ".url_block_parameters_item", + "UrlBlockParametersItem_Onepassword": ".url_block_parameters_item", + "UrlBlockParametersItem_Output": ".url_block_parameters_item", + "UrlBlockParametersItem_Workflow": ".url_block_parameters_item", + "UrlBlockYaml": ".url_block_yaml", + "UserDefinedError": ".user_defined_error", + "ValidationBlock": ".validation_block", + "ValidationBlockDataSchema": ".validation_block_data_schema", + "ValidationBlockParametersItem": ".validation_block_parameters_item", + "ValidationBlockParametersItem_AwsSecret": ".validation_block_parameters_item", + "ValidationBlockParametersItem_AzureSecret": ".validation_block_parameters_item", + "ValidationBlockParametersItem_AzureVaultCredential": ".validation_block_parameters_item", + "ValidationBlockParametersItem_BitwardenCreditCardData": ".validation_block_parameters_item", + "ValidationBlockParametersItem_BitwardenLoginCredential": ".validation_block_parameters_item", + "ValidationBlockParametersItem_BitwardenSensitiveInformation": ".validation_block_parameters_item", + "ValidationBlockParametersItem_Context": ".validation_block_parameters_item", + "ValidationBlockParametersItem_Credential": ".validation_block_parameters_item", + "ValidationBlockParametersItem_Onepassword": ".validation_block_parameters_item", + "ValidationBlockParametersItem_Output": ".validation_block_parameters_item", + "ValidationBlockParametersItem_Workflow": ".validation_block_parameters_item", + "ValidationBlockYaml": ".validation_block_yaml", + "ValidationError": ".validation_error", + "ValidationErrorLocItem": ".validation_error_loc_item", + "WaitBlock": ".wait_block", + "WaitBlockParametersItem": ".wait_block_parameters_item", + "WaitBlockParametersItem_AwsSecret": ".wait_block_parameters_item", + "WaitBlockParametersItem_AzureSecret": ".wait_block_parameters_item", + "WaitBlockParametersItem_AzureVaultCredential": ".wait_block_parameters_item", + "WaitBlockParametersItem_BitwardenCreditCardData": ".wait_block_parameters_item", + "WaitBlockParametersItem_BitwardenLoginCredential": ".wait_block_parameters_item", + "WaitBlockParametersItem_BitwardenSensitiveInformation": ".wait_block_parameters_item", + "WaitBlockParametersItem_Context": ".wait_block_parameters_item", + "WaitBlockParametersItem_Credential": ".wait_block_parameters_item", + "WaitBlockParametersItem_Onepassword": ".wait_block_parameters_item", + "WaitBlockParametersItem_Output": ".wait_block_parameters_item", + "WaitBlockParametersItem_Workflow": ".wait_block_parameters_item", + "WaitBlockYaml": ".wait_block_yaml", + "Workflow": ".workflow", + "WorkflowCreateYamlRequest": ".workflow_create_yaml_request", + "WorkflowDefinition": ".workflow_definition", + "WorkflowDefinitionBlocksItem": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_Action": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_Code": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_DownloadToS3": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_Extraction": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_FileDownload": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_FileUpload": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_FileUrlParser": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_ForLoop": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_GotoUrl": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_HttpRequest": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_HumanInteraction": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_Login": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_Navigation": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_PdfParser": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_SendEmail": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_Task": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_TaskV2": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_TextPrompt": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_UploadToS3": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_Validation": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_Wait": ".workflow_definition_blocks_item", + "WorkflowDefinitionParametersItem": ".workflow_definition_parameters_item", + "WorkflowDefinitionParametersItem_AwsSecret": ".workflow_definition_parameters_item", + "WorkflowDefinitionParametersItem_AzureSecret": ".workflow_definition_parameters_item", + "WorkflowDefinitionParametersItem_AzureVaultCredential": ".workflow_definition_parameters_item", + "WorkflowDefinitionParametersItem_BitwardenCreditCardData": ".workflow_definition_parameters_item", + "WorkflowDefinitionParametersItem_BitwardenLoginCredential": ".workflow_definition_parameters_item", + "WorkflowDefinitionParametersItem_BitwardenSensitiveInformation": ".workflow_definition_parameters_item", + "WorkflowDefinitionParametersItem_Context": ".workflow_definition_parameters_item", + "WorkflowDefinitionParametersItem_Credential": ".workflow_definition_parameters_item", + "WorkflowDefinitionParametersItem_Onepassword": ".workflow_definition_parameters_item", + "WorkflowDefinitionParametersItem_Output": ".workflow_definition_parameters_item", + "WorkflowDefinitionParametersItem_Workflow": ".workflow_definition_parameters_item", + "WorkflowDefinitionYaml": ".workflow_definition_yaml", + "WorkflowDefinitionYamlBlocksItem": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_Action": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_Code": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_DownloadToS3": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_Extraction": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_FileDownload": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_FileUpload": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_FileUrlParser": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_ForLoop": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_GotoUrl": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_HttpRequest": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_HumanInteraction": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_Login": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_Navigation": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_PdfParser": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_SendEmail": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_Task": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_TaskV2": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_TextPrompt": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_UploadToS3": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_Validation": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlBlocksItem_Wait": ".workflow_definition_yaml_blocks_item", + "WorkflowDefinitionYamlParametersItem": ".workflow_definition_yaml_parameters_item", + "WorkflowDefinitionYamlParametersItem_AwsSecret": ".workflow_definition_yaml_parameters_item", + "WorkflowDefinitionYamlParametersItem_AzureVaultCredential": ".workflow_definition_yaml_parameters_item", + "WorkflowDefinitionYamlParametersItem_BitwardenCreditCardData": ".workflow_definition_yaml_parameters_item", + "WorkflowDefinitionYamlParametersItem_BitwardenLoginCredential": ".workflow_definition_yaml_parameters_item", + "WorkflowDefinitionYamlParametersItem_BitwardenSensitiveInformation": ".workflow_definition_yaml_parameters_item", + "WorkflowDefinitionYamlParametersItem_Context": ".workflow_definition_yaml_parameters_item", + "WorkflowDefinitionYamlParametersItem_Credential": ".workflow_definition_yaml_parameters_item", + "WorkflowDefinitionYamlParametersItem_Onepassword": ".workflow_definition_yaml_parameters_item", + "WorkflowDefinitionYamlParametersItem_Output": ".workflow_definition_yaml_parameters_item", + "WorkflowDefinitionYamlParametersItem_Workflow": ".workflow_definition_yaml_parameters_item", + "WorkflowParameter": ".workflow_parameter", + "WorkflowParameterDefaultValue": ".workflow_parameter_default_value", + "WorkflowParameterType": ".workflow_parameter_type", + "WorkflowParameterYaml": ".workflow_parameter_yaml", + "WorkflowParameterYamlDefaultValue": ".workflow_parameter_yaml_default_value", + "WorkflowRequest": ".workflow_request", + "WorkflowRunBlock": ".workflow_run_block", + "WorkflowRunBlockDataSchema": ".workflow_run_block_data_schema", + "WorkflowRunBlockNavigationPayload": ".workflow_run_block_navigation_payload", + "WorkflowRunBlockOutput": ".workflow_run_block_output", + "WorkflowRunRequest": ".workflow_run_request", + "WorkflowRunResponse": ".workflow_run_response", + "WorkflowRunResponseOutput": ".workflow_run_response_output", + "WorkflowRunTimeline": ".workflow_run_timeline", + "WorkflowRunTimelineType": ".workflow_run_timeline_type", + "WorkflowStatus": ".workflow_status", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "Action", @@ -585,6 +1072,7 @@ __all__ = [ "ForLoopBlockLoopBlocksItem_ForLoop", "ForLoopBlockLoopBlocksItem_GotoUrl", "ForLoopBlockLoopBlocksItem_HttpRequest", + "ForLoopBlockLoopBlocksItem_HumanInteraction", "ForLoopBlockLoopBlocksItem_Login", "ForLoopBlockLoopBlocksItem_Navigation", "ForLoopBlockLoopBlocksItem_PdfParser", @@ -619,6 +1107,7 @@ __all__ = [ "ForLoopBlockYamlLoopBlocksItem_ForLoop", "ForLoopBlockYamlLoopBlocksItem_GotoUrl", "ForLoopBlockYamlLoopBlocksItem_HttpRequest", + "ForLoopBlockYamlLoopBlocksItem_HumanInteraction", "ForLoopBlockYamlLoopBlocksItem_Login", "ForLoopBlockYamlLoopBlocksItem_Navigation", "ForLoopBlockYamlLoopBlocksItem_PdfParser", @@ -651,6 +1140,21 @@ __all__ = [ "HttpRequestBlockParametersItem_Workflow", "HttpRequestBlockYaml", "HttpValidationError", + "HumanInteractionBlock", + "HumanInteractionBlockDataSchema", + "HumanInteractionBlockParametersItem", + "HumanInteractionBlockParametersItem_AwsSecret", + "HumanInteractionBlockParametersItem_AzureSecret", + "HumanInteractionBlockParametersItem_AzureVaultCredential", + "HumanInteractionBlockParametersItem_BitwardenCreditCardData", + "HumanInteractionBlockParametersItem_BitwardenLoginCredential", + "HumanInteractionBlockParametersItem_BitwardenSensitiveInformation", + "HumanInteractionBlockParametersItem_Context", + "HumanInteractionBlockParametersItem_Credential", + "HumanInteractionBlockParametersItem_Onepassword", + "HumanInteractionBlockParametersItem_Output", + "HumanInteractionBlockParametersItem_Workflow", + "HumanInteractionBlockYaml", "InputOrSelectContext", "LoginBlock", "LoginBlockDataSchema", @@ -807,6 +1311,7 @@ __all__ = [ "WorkflowDefinitionBlocksItem_ForLoop", "WorkflowDefinitionBlocksItem_GotoUrl", "WorkflowDefinitionBlocksItem_HttpRequest", + "WorkflowDefinitionBlocksItem_HumanInteraction", "WorkflowDefinitionBlocksItem_Login", "WorkflowDefinitionBlocksItem_Navigation", "WorkflowDefinitionBlocksItem_PdfParser", @@ -841,6 +1346,7 @@ __all__ = [ "WorkflowDefinitionYamlBlocksItem_ForLoop", "WorkflowDefinitionYamlBlocksItem_GotoUrl", "WorkflowDefinitionYamlBlocksItem_HttpRequest", + "WorkflowDefinitionYamlBlocksItem_HumanInteraction", "WorkflowDefinitionYamlBlocksItem_Login", "WorkflowDefinitionYamlBlocksItem_Navigation", "WorkflowDefinitionYamlBlocksItem_PdfParser", diff --git a/skyvern/client/types/action.py b/skyvern/client/types/action.py index d3b83633..830cf7eb 100644 --- a/skyvern/client/types/action.py +++ b/skyvern/client/types/action.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .action_type import ActionType +import datetime as dt import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .action_status import ActionStatus -from .user_defined_error import UserDefinedError +from .action_type import ActionType from .input_or_select_context import InputOrSelectContext from .select_option import SelectOption -import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic +from .user_defined_error import UserDefinedError class Action(UniversalBaseModel): diff --git a/skyvern/client/types/action_block.py b/skyvern/client/types/action_block.py index 791d1591..d134460b 100644 --- a/skyvern/client/types/action_block.py +++ b/skyvern/client/types/action_block.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .output_parameter import OutputParameter +from __future__ import annotations + import typing -from .run_engine import RunEngine + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .action_block_data_schema import ActionBlockDataSchema from .action_block_parameters_item import ActionBlockParametersItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic +from .output_parameter import OutputParameter +from .run_engine import RunEngine class ActionBlock(UniversalBaseModel): @@ -47,3 +48,8 @@ class ActionBlock(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + +update_forward_refs(ActionBlock) diff --git a/skyvern/client/types/action_block_parameters_item.py b/skyvern/client/types/action_block_parameters_item.py index 39f65871..d2662830 100644 --- a/skyvern/client/types/action_block_parameters_item.py +++ b/skyvern/client/types/action_block_parameters_item.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_type import WorkflowParameterType class ActionBlockParametersItem_AwsSecret(UniversalBaseModel): @@ -172,8 +172,8 @@ class ActionBlockParametersItem_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 class ActionBlockParametersItem_Credential(UniversalBaseModel): diff --git a/skyvern/client/types/action_block_yaml.py b/skyvern/client/types/action_block_yaml.py index 1e847aa7..6319eb0d 100644 --- a/skyvern/client/types/action_block_yaml.py +++ b/skyvern/client/types/action_block_yaml.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .run_engine import RunEngine -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .run_engine import RunEngine class ActionBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/action_type.py b/skyvern/client/types/action_type.py index ed0d14c8..a8105938 100644 --- a/skyvern/client/types/action_type.py +++ b/skyvern/client/types/action_type.py @@ -16,6 +16,7 @@ ActionType = typing.Union[ "terminate", "complete", "reload_page", + "close_page", "extract", "verification_code", "goto_url", diff --git a/skyvern/client/types/artifact.py b/skyvern/client/types/artifact.py index 93880889..f3dc9f84 100644 --- a/skyvern/client/types/artifact.py +++ b/skyvern/client/types/artifact.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic -from .artifact_type import ArtifactType import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .artifact_type import ArtifactType class Artifact(UniversalBaseModel): diff --git a/skyvern/client/types/aws_secret_parameter.py b/skyvern/client/types/aws_secret_parameter.py index 990763d2..da611f9b 100644 --- a/skyvern/client/types/aws_secret_parameter.py +++ b/skyvern/client/types/aws_secret_parameter.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class AwsSecretParameter(UniversalBaseModel): diff --git a/skyvern/client/types/aws_secret_parameter_yaml.py b/skyvern/client/types/aws_secret_parameter_yaml.py index b448c861..b0ab50b9 100644 --- a/skyvern/client/types/aws_secret_parameter_yaml.py +++ b/skyvern/client/types/aws_secret_parameter_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class AwsSecretParameterYaml(UniversalBaseModel): diff --git a/skyvern/client/types/azure_secret_parameter.py b/skyvern/client/types/azure_secret_parameter.py index 0b7f6a9d..f0a5a528 100644 --- a/skyvern/client/types/azure_secret_parameter.py +++ b/skyvern/client/types/azure_secret_parameter.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class AzureSecretParameter(UniversalBaseModel): diff --git a/skyvern/client/types/azure_vault_credential_parameter.py b/skyvern/client/types/azure_vault_credential_parameter.py index 315c72f0..556d77b7 100644 --- a/skyvern/client/types/azure_vault_credential_parameter.py +++ b/skyvern/client/types/azure_vault_credential_parameter.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class AzureVaultCredentialParameter(UniversalBaseModel): diff --git a/skyvern/client/types/azure_vault_credential_parameter_yaml.py b/skyvern/client/types/azure_vault_credential_parameter_yaml.py index edce4c90..85adb301 100644 --- a/skyvern/client/types/azure_vault_credential_parameter_yaml.py +++ b/skyvern/client/types/azure_vault_credential_parameter_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class AzureVaultCredentialParameterYaml(UniversalBaseModel): diff --git a/skyvern/client/types/bitwarden_credit_card_data_parameter.py b/skyvern/client/types/bitwarden_credit_card_data_parameter.py index 14d373e2..543fcbd5 100644 --- a/skyvern/client/types/bitwarden_credit_card_data_parameter.py +++ b/skyvern/client/types/bitwarden_credit_card_data_parameter.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class BitwardenCreditCardDataParameter(UniversalBaseModel): diff --git a/skyvern/client/types/bitwarden_credit_card_data_parameter_yaml.py b/skyvern/client/types/bitwarden_credit_card_data_parameter_yaml.py index d2c5e646..94e03822 100644 --- a/skyvern/client/types/bitwarden_credit_card_data_parameter_yaml.py +++ b/skyvern/client/types/bitwarden_credit_card_data_parameter_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class BitwardenCreditCardDataParameterYaml(UniversalBaseModel): diff --git a/skyvern/client/types/bitwarden_login_credential_parameter.py b/skyvern/client/types/bitwarden_login_credential_parameter.py index 349cd2f1..9145fc2e 100644 --- a/skyvern/client/types/bitwarden_login_credential_parameter.py +++ b/skyvern/client/types/bitwarden_login_credential_parameter.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class BitwardenLoginCredentialParameter(UniversalBaseModel): diff --git a/skyvern/client/types/bitwarden_login_credential_parameter_yaml.py b/skyvern/client/types/bitwarden_login_credential_parameter_yaml.py index dc375b9c..268bc945 100644 --- a/skyvern/client/types/bitwarden_login_credential_parameter_yaml.py +++ b/skyvern/client/types/bitwarden_login_credential_parameter_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class BitwardenLoginCredentialParameterYaml(UniversalBaseModel): diff --git a/skyvern/client/types/bitwarden_sensitive_information_parameter.py b/skyvern/client/types/bitwarden_sensitive_information_parameter.py index 2047780b..32039c6b 100644 --- a/skyvern/client/types/bitwarden_sensitive_information_parameter.py +++ b/skyvern/client/types/bitwarden_sensitive_information_parameter.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class BitwardenSensitiveInformationParameter(UniversalBaseModel): diff --git a/skyvern/client/types/bitwarden_sensitive_information_parameter_yaml.py b/skyvern/client/types/bitwarden_sensitive_information_parameter_yaml.py index 58d9a27f..28a73f02 100644 --- a/skyvern/client/types/bitwarden_sensitive_information_parameter_yaml.py +++ b/skyvern/client/types/bitwarden_sensitive_information_parameter_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class BitwardenSensitiveInformationParameterYaml(UniversalBaseModel): diff --git a/skyvern/client/types/block_type.py b/skyvern/client/types/block_type.py index c653f844..8aca5226 100644 --- a/skyvern/client/types/block_type.py +++ b/skyvern/client/types/block_type.py @@ -24,6 +24,7 @@ BlockType = typing.Union[ "goto_url", "pdf_parser", "http_request", + "human_interaction", ], typing.Any, ] diff --git a/skyvern/client/types/browser_session_response.py b/skyvern/client/types/browser_session_response.py index 16b32549..6df279b7 100644 --- a/skyvern/client/types/browser_session_response.py +++ b/skyvern/client/types/browser_session_response.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic -import typing -from .file_info import FileInfo import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .file_info import FileInfo class BrowserSessionResponse(UniversalBaseModel): diff --git a/skyvern/client/types/code_block.py b/skyvern/client/types/code_block.py index f95ba966..a04b29d6 100644 --- a/skyvern/client/types/code_block.py +++ b/skyvern/client/types/code_block.py @@ -1,12 +1,13 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .output_parameter import OutputParameter +from __future__ import annotations + import typing -from .code_block_parameters_item import CodeBlockParametersItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .code_block_parameters_item import CodeBlockParametersItem +from .output_parameter import OutputParameter class CodeBlock(UniversalBaseModel): @@ -26,3 +27,8 @@ class CodeBlock(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + +update_forward_refs(CodeBlock) diff --git a/skyvern/client/types/code_block_parameters_item.py b/skyvern/client/types/code_block_parameters_item.py index a06ceba2..9124c170 100644 --- a/skyvern/client/types/code_block_parameters_item.py +++ b/skyvern/client/types/code_block_parameters_item.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_type import WorkflowParameterType class CodeBlockParametersItem_AwsSecret(UniversalBaseModel): @@ -172,8 +172,8 @@ class CodeBlockParametersItem_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 class CodeBlockParametersItem_Credential(UniversalBaseModel): diff --git a/skyvern/client/types/code_block_yaml.py b/skyvern/client/types/code_block_yaml.py index c5a8184e..fbf4ca1b 100644 --- a/skyvern/client/types/code_block_yaml.py +++ b/skyvern/client/types/code_block_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class CodeBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/context_parameter.py b/skyvern/client/types/context_parameter.py index de2cff89..53250779 100644 --- a/skyvern/client/types/context_parameter.py +++ b/skyvern/client/types/context_parameter.py @@ -1,12 +1,12 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel + import typing -from .context_parameter_value import ContextParameterValue -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic -from ..core.pydantic_utilities import update_forward_refs +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .context_parameter_value import ContextParameterValue class ContextParameter(UniversalBaseModel): @@ -25,6 +25,6 @@ class ContextParameter(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 update_forward_refs(ContextParameter) diff --git a/skyvern/client/types/context_parameter_source.py b/skyvern/client/types/context_parameter_source.py index 5ee6c21c..3240a6b8 100644 --- a/skyvern/client/types/context_parameter_source.py +++ b/skyvern/client/types/context_parameter_source.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .workflow_parameter_type import WorkflowParameterType -from .workflow_parameter_default_value import WorkflowParameterDefaultValue + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_default_value import WorkflowParameterDefaultValue +from .workflow_parameter_type import WorkflowParameterType class ContextParameterSource_Workflow(UniversalBaseModel): @@ -51,7 +51,7 @@ class ContextParameterSource_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 class ContextParameterSource_AwsSecret(UniversalBaseModel): diff --git a/skyvern/client/types/context_parameter_yaml.py b/skyvern/client/types/context_parameter_yaml.py index bdf2d6ae..412d3581 100644 --- a/skyvern/client/types/context_parameter_yaml.py +++ b/skyvern/client/types/context_parameter_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class ContextParameterYaml(UniversalBaseModel): diff --git a/skyvern/client/types/create_credential_request_credential.py b/skyvern/client/types/create_credential_request_credential.py index 4df3e0af..76d78fd4 100644 --- a/skyvern/client/types/create_credential_request_credential.py +++ b/skyvern/client/types/create_credential_request_credential.py @@ -1,7 +1,8 @@ # This file was auto-generated by Fern from our API Definition. import typing -from .non_empty_password_credential import NonEmptyPasswordCredential + from .non_empty_credit_card_credential import NonEmptyCreditCardCredential +from .non_empty_password_credential import NonEmptyPasswordCredential CreateCredentialRequestCredential = typing.Union[NonEmptyPasswordCredential, NonEmptyCreditCardCredential] diff --git a/skyvern/client/types/create_script_response.py b/skyvern/client/types/create_script_response.py index d07b7a79..efd813ec 100644 --- a/skyvern/client/types/create_script_response.py +++ b/skyvern/client/types/create_script_response.py @@ -1,11 +1,12 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic -import typing -from .file_node import FileNode +from __future__ import annotations + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs class CreateScriptResponse(UniversalBaseModel): @@ -29,7 +30,7 @@ class CreateScriptResponse(UniversalBaseModel): Total number of files in the script """ - file_tree: typing.Dict[str, FileNode] = pydantic.Field() + file_tree: typing.Dict[str, "FileNode"] = pydantic.Field() """ Hierarchical file tree structure """ @@ -47,3 +48,8 @@ class CreateScriptResponse(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .file_node import FileNode # noqa: E402, F401, I001 + +update_forward_refs(CreateScriptResponse) diff --git a/skyvern/client/types/credential_parameter.py b/skyvern/client/types/credential_parameter.py index 1fcca362..6d4705bd 100644 --- a/skyvern/client/types/credential_parameter.py +++ b/skyvern/client/types/credential_parameter.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class CredentialParameter(UniversalBaseModel): diff --git a/skyvern/client/types/credential_parameter_yaml.py b/skyvern/client/types/credential_parameter_yaml.py index 9a2f8bfd..aa8a22e1 100644 --- a/skyvern/client/types/credential_parameter_yaml.py +++ b/skyvern/client/types/credential_parameter_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class CredentialParameterYaml(UniversalBaseModel): diff --git a/skyvern/client/types/credential_response.py b/skyvern/client/types/credential_response.py index 1d2a0cb5..dc8c303b 100644 --- a/skyvern/client/types/credential_response.py +++ b/skyvern/client/types/credential_response.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .credential_response_credential import CredentialResponseCredential from .credential_type_output import CredentialTypeOutput -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing class CredentialResponse(UniversalBaseModel): diff --git a/skyvern/client/types/credential_response_credential.py b/skyvern/client/types/credential_response_credential.py index 1b3ce063..43e28d3b 100644 --- a/skyvern/client/types/credential_response_credential.py +++ b/skyvern/client/types/credential_response_credential.py @@ -1,7 +1,8 @@ # This file was auto-generated by Fern from our API Definition. import typing -from .password_credential_response import PasswordCredentialResponse + from .credit_card_credential_response import CreditCardCredentialResponse +from .password_credential_response import PasswordCredentialResponse CredentialResponseCredential = typing.Union[PasswordCredentialResponse, CreditCardCredentialResponse] diff --git a/skyvern/client/types/credit_card_credential_response.py b/skyvern/client/types/credit_card_credential_response.py index de49348a..b21bf507 100644 --- a/skyvern/client/types/credit_card_credential_response.py +++ b/skyvern/client/types/credit_card_credential_response.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + class CreditCardCredentialResponse(UniversalBaseModel): """ diff --git a/skyvern/client/types/download_to_s3block.py b/skyvern/client/types/download_to_s3block.py index 15fef063..ea4d2fba 100644 --- a/skyvern/client/types/download_to_s3block.py +++ b/skyvern/client/types/download_to_s3block.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .output_parameter import OutputParameter import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .output_parameter import OutputParameter class DownloadToS3Block(UniversalBaseModel): diff --git a/skyvern/client/types/download_to_s3block_yaml.py b/skyvern/client/types/download_to_s3block_yaml.py index de9109ad..ad916888 100644 --- a/skyvern/client/types/download_to_s3block_yaml.py +++ b/skyvern/client/types/download_to_s3block_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class DownloadToS3BlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/extraction_block.py b/skyvern/client/types/extraction_block.py index 7c0aa333..9b234424 100644 --- a/skyvern/client/types/extraction_block.py +++ b/skyvern/client/types/extraction_block.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .output_parameter import OutputParameter +from __future__ import annotations + import typing -from .run_engine import RunEngine + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .extraction_block_data_schema import ExtractionBlockDataSchema from .extraction_block_parameters_item import ExtractionBlockParametersItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic +from .output_parameter import OutputParameter +from .run_engine import RunEngine class ExtractionBlock(UniversalBaseModel): @@ -47,3 +48,8 @@ class ExtractionBlock(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + +update_forward_refs(ExtractionBlock) diff --git a/skyvern/client/types/extraction_block_parameters_item.py b/skyvern/client/types/extraction_block_parameters_item.py index 50cde828..437380f4 100644 --- a/skyvern/client/types/extraction_block_parameters_item.py +++ b/skyvern/client/types/extraction_block_parameters_item.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_type import WorkflowParameterType class ExtractionBlockParametersItem_AwsSecret(UniversalBaseModel): @@ -172,8 +172,8 @@ class ExtractionBlockParametersItem_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 class ExtractionBlockParametersItem_Credential(UniversalBaseModel): diff --git a/skyvern/client/types/extraction_block_yaml.py b/skyvern/client/types/extraction_block_yaml.py index 798b995c..57a64bd3 100644 --- a/skyvern/client/types/extraction_block_yaml.py +++ b/skyvern/client/types/extraction_block_yaml.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .run_engine import RunEngine -from .extraction_block_yaml_data_schema import ExtractionBlockYamlDataSchema -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .extraction_block_yaml_data_schema import ExtractionBlockYamlDataSchema +from .run_engine import RunEngine class ExtractionBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/file_download_block.py b/skyvern/client/types/file_download_block.py index 5b0c395c..d1952cda 100644 --- a/skyvern/client/types/file_download_block.py +++ b/skyvern/client/types/file_download_block.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .output_parameter import OutputParameter +from __future__ import annotations + import typing -from .run_engine import RunEngine + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .file_download_block_data_schema import FileDownloadBlockDataSchema from .file_download_block_parameters_item import FileDownloadBlockParametersItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic +from .output_parameter import OutputParameter +from .run_engine import RunEngine class FileDownloadBlock(UniversalBaseModel): @@ -47,3 +48,8 @@ class FileDownloadBlock(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + +update_forward_refs(FileDownloadBlock) diff --git a/skyvern/client/types/file_download_block_parameters_item.py b/skyvern/client/types/file_download_block_parameters_item.py index ea5336f5..07e4b042 100644 --- a/skyvern/client/types/file_download_block_parameters_item.py +++ b/skyvern/client/types/file_download_block_parameters_item.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_type import WorkflowParameterType class FileDownloadBlockParametersItem_AwsSecret(UniversalBaseModel): @@ -172,8 +172,8 @@ class FileDownloadBlockParametersItem_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 class FileDownloadBlockParametersItem_Credential(UniversalBaseModel): diff --git a/skyvern/client/types/file_download_block_yaml.py b/skyvern/client/types/file_download_block_yaml.py index dd5d5d8c..3b8d6c9d 100644 --- a/skyvern/client/types/file_download_block_yaml.py +++ b/skyvern/client/types/file_download_block_yaml.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .run_engine import RunEngine -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .run_engine import RunEngine class FileDownloadBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/file_info.py b/skyvern/client/types/file_info.py index d5c91a3a..6495fad8 100644 --- a/skyvern/client/types/file_info.py +++ b/skyvern/client/types/file_info.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic -import typing import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class FileInfo(UniversalBaseModel): diff --git a/skyvern/client/types/file_node.py b/skyvern/client/types/file_node.py index 7367a983..37c11804 100644 --- a/skyvern/client/types/file_node.py +++ b/skyvern/client/types/file_node.py @@ -1,12 +1,12 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.pydantic_utilities import update_forward_refs +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs class FileNode(UniversalBaseModel): diff --git a/skyvern/client/types/file_parser_block.py b/skyvern/client/types/file_parser_block.py index 31a555f9..114af4fd 100644 --- a/skyvern/client/types/file_parser_block.py +++ b/skyvern/client/types/file_parser_block.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .output_parameter import OutputParameter import typing -from .file_type import FileType -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .file_type import FileType +from .output_parameter import OutputParameter class FileParserBlock(UniversalBaseModel): diff --git a/skyvern/client/types/file_parser_block_yaml.py b/skyvern/client/types/file_parser_block_yaml.py index f264e099..87c11ea3 100644 --- a/skyvern/client/types/file_parser_block_yaml.py +++ b/skyvern/client/types/file_parser_block_yaml.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .file_type import FileType -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .file_type import FileType class FileParserBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/file_upload_block.py b/skyvern/client/types/file_upload_block.py index 076a1854..0b85c6d6 100644 --- a/skyvern/client/types/file_upload_block.py +++ b/skyvern/client/types/file_upload_block.py @@ -1,13 +1,13 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .output_parameter import OutputParameter import typing -from .file_storage_type import FileStorageType -import typing_extensions -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ..core.serialization import FieldMetadata +from .file_storage_type import FileStorageType +from .output_parameter import OutputParameter class FileUploadBlock(UniversalBaseModel): diff --git a/skyvern/client/types/file_upload_block_yaml.py b/skyvern/client/types/file_upload_block_yaml.py index b654008b..6813c56e 100644 --- a/skyvern/client/types/file_upload_block_yaml.py +++ b/skyvern/client/types/file_upload_block_yaml.py @@ -1,12 +1,12 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .file_storage_type import FileStorageType -import typing_extensions -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ..core.serialization import FieldMetadata +from .file_storage_type import FileStorageType class FileUploadBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/for_loop_block.py b/skyvern/client/types/for_loop_block.py index 9f1ba493..af9853a4 100644 --- a/skyvern/client/types/for_loop_block.py +++ b/skyvern/client/types/for_loop_block.py @@ -1,14 +1,13 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .output_parameter import OutputParameter + import typing -from .for_loop_block_loop_over import ForLoopBlockLoopOver -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic -from ..core.pydantic_utilities import update_forward_refs +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .for_loop_block_loop_over import ForLoopBlockLoopOver +from .output_parameter import OutputParameter class ForLoopBlock(UniversalBaseModel): @@ -32,6 +31,7 @@ class ForLoopBlock(UniversalBaseModel): extra = pydantic.Extra.allow -from .for_loop_block_loop_blocks_item import ForLoopBlockLoopBlocksItem # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .for_loop_block_loop_blocks_item import ForLoopBlockLoopBlocksItem # noqa: E402, F401, I001 update_forward_refs(ForLoopBlock) diff --git a/skyvern/client/types/for_loop_block_loop_blocks_item.py b/skyvern/client/types/for_loop_block_loop_blocks_item.py index aeeffbcd..1ad899d1 100644 --- a/skyvern/client/types/for_loop_block_loop_blocks_item.py +++ b/skyvern/client/types/for_loop_block_loop_blocks_item.py @@ -1,40 +1,41 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter + import typing -from .output_parameter import OutputParameter -from .run_engine import RunEngine + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from ..core.serialization import FieldMetadata from .action_block_data_schema import ActionBlockDataSchema from .action_block_parameters_item import ActionBlockParametersItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic +from .aws_secret_parameter import AwsSecretParameter from .code_block_parameters_item import CodeBlockParametersItem from .extraction_block_data_schema import ExtractionBlockDataSchema from .extraction_block_parameters_item import ExtractionBlockParametersItem from .file_download_block_data_schema import FileDownloadBlockDataSchema from .file_download_block_parameters_item import FileDownloadBlockParametersItem from .file_storage_type import FileStorageType -import typing_extensions -from ..core.serialization import FieldMetadata from .file_type import FileType from .for_loop_block_loop_over import ForLoopBlockLoopOver -from .url_block_data_schema import UrlBlockDataSchema -from .url_block_parameters_item import UrlBlockParametersItem from .http_request_block_parameters_item import HttpRequestBlockParametersItem +from .human_interaction_block_data_schema import HumanInteractionBlockDataSchema +from .human_interaction_block_parameters_item import HumanInteractionBlockParametersItem from .login_block_data_schema import LoginBlockDataSchema from .login_block_parameters_item import LoginBlockParametersItem from .navigation_block_data_schema import NavigationBlockDataSchema from .navigation_block_parameters_item import NavigationBlockParametersItem -from .aws_secret_parameter import AwsSecretParameter +from .output_parameter import OutputParameter +from .run_engine import RunEngine from .task_block_data_schema import TaskBlockDataSchema from .task_block_parameters_item import TaskBlockParametersItem from .text_prompt_block_parameters_item import TextPromptBlockParametersItem +from .url_block_data_schema import UrlBlockDataSchema +from .url_block_parameters_item import UrlBlockParametersItem from .validation_block_data_schema import ValidationBlockDataSchema from .validation_block_parameters_item import ValidationBlockParametersItem from .wait_block_parameters_item import WaitBlockParametersItem -from ..core.pydantic_utilities import update_forward_refs class ForLoopBlockLoopBlocksItem_Action(UniversalBaseModel): @@ -263,7 +264,7 @@ class ForLoopBlockLoopBlocksItem_ForLoop(UniversalBaseModel): extra = pydantic.Extra.allow -from .for_loop_block import ForLoopBlock # noqa: E402 +from .for_loop_block import ForLoopBlock # noqa: E402, F401, I001 class ForLoopBlockLoopBlocksItem_GotoUrl(UniversalBaseModel): @@ -330,6 +331,53 @@ class ForLoopBlockLoopBlocksItem_HttpRequest(UniversalBaseModel): extra = pydantic.Extra.allow +class ForLoopBlockLoopBlocksItem_HumanInteraction(UniversalBaseModel): + block_type: typing.Literal["human_interaction"] = "human_interaction" + label: str + output_parameter: OutputParameter + continue_on_failure: typing.Optional[bool] = None + model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + disable_cache: typing.Optional[bool] = None + task_type: typing.Optional[str] = None + url: typing.Optional[str] = None + title: typing.Optional[str] = None + engine: typing.Optional[RunEngine] = None + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + navigation_goal: typing.Optional[str] = None + data_extraction_goal: typing.Optional[str] = None + data_schema: typing.Optional[HumanInteractionBlockDataSchema] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + parameters: typing.Optional[typing.List[HumanInteractionBlockParametersItem]] = None + complete_on_download: typing.Optional[bool] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + complete_verification: typing.Optional[bool] = None + include_action_history_in_verification: typing.Optional[bool] = None + download_timeout: typing.Optional[float] = None + instructions: typing.Optional[str] = None + positive_descriptor: typing.Optional[str] = None + negative_descriptor: typing.Optional[str] = None + timeout_seconds: typing.Optional[int] = None + sender: typing.Optional[str] = None + recipients: typing.Optional[typing.List[str]] = None + subject: typing.Optional[str] = None + body: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class ForLoopBlockLoopBlocksItem_Login(UniversalBaseModel): block_type: typing.Literal["login"] = "login" label: str @@ -618,6 +666,8 @@ class ForLoopBlockLoopBlocksItem_Wait(UniversalBaseModel): extra = pydantic.Extra.allow +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + ForLoopBlockLoopBlocksItem = typing.Union[ ForLoopBlockLoopBlocksItem_Action, ForLoopBlockLoopBlocksItem_Code, @@ -629,6 +679,7 @@ ForLoopBlockLoopBlocksItem = typing.Union[ ForLoopBlockLoopBlocksItem_ForLoop, ForLoopBlockLoopBlocksItem_GotoUrl, ForLoopBlockLoopBlocksItem_HttpRequest, + ForLoopBlockLoopBlocksItem_HumanInteraction, ForLoopBlockLoopBlocksItem_Login, ForLoopBlockLoopBlocksItem_Navigation, ForLoopBlockLoopBlocksItem_PdfParser, @@ -640,4 +691,17 @@ ForLoopBlockLoopBlocksItem = typing.Union[ ForLoopBlockLoopBlocksItem_Validation, ForLoopBlockLoopBlocksItem_Wait, ] +update_forward_refs(ForLoopBlockLoopBlocksItem_Action) +update_forward_refs(ForLoopBlockLoopBlocksItem_Code) +update_forward_refs(ForLoopBlockLoopBlocksItem_Extraction) +update_forward_refs(ForLoopBlockLoopBlocksItem_FileDownload) update_forward_refs(ForLoopBlockLoopBlocksItem_ForLoop) +update_forward_refs(ForLoopBlockLoopBlocksItem_GotoUrl) +update_forward_refs(ForLoopBlockLoopBlocksItem_HttpRequest) +update_forward_refs(ForLoopBlockLoopBlocksItem_HumanInteraction) +update_forward_refs(ForLoopBlockLoopBlocksItem_Login) +update_forward_refs(ForLoopBlockLoopBlocksItem_Navigation) +update_forward_refs(ForLoopBlockLoopBlocksItem_Task) +update_forward_refs(ForLoopBlockLoopBlocksItem_TextPrompt) +update_forward_refs(ForLoopBlockLoopBlocksItem_Validation) +update_forward_refs(ForLoopBlockLoopBlocksItem_Wait) diff --git a/skyvern/client/types/for_loop_block_loop_over.py b/skyvern/client/types/for_loop_block_loop_over.py index 8291b579..8da93d7d 100644 --- a/skyvern/client/types/for_loop_block_loop_over.py +++ b/skyvern/client/types/for_loop_block_loop_over.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_type import WorkflowParameterType class ForLoopBlockLoopOver_AwsSecret(UniversalBaseModel): @@ -172,8 +172,8 @@ class ForLoopBlockLoopOver_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 class ForLoopBlockLoopOver_Credential(UniversalBaseModel): diff --git a/skyvern/client/types/for_loop_block_yaml.py b/skyvern/client/types/for_loop_block_yaml.py index 3296d550..341862d7 100644 --- a/skyvern/client/types/for_loop_block_yaml.py +++ b/skyvern/client/types/for_loop_block_yaml.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel + import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic -from ..core.pydantic_utilities import update_forward_refs +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs class ForLoopBlockYaml(UniversalBaseModel): @@ -27,6 +27,6 @@ class ForLoopBlockYaml(UniversalBaseModel): extra = pydantic.Extra.allow -from .for_loop_block_yaml_loop_blocks_item import ForLoopBlockYamlLoopBlocksItem # noqa: E402 +from .for_loop_block_yaml_loop_blocks_item import ForLoopBlockYamlLoopBlocksItem # noqa: E402, F401, I001 update_forward_refs(ForLoopBlockYaml) diff --git a/skyvern/client/types/for_loop_block_yaml_loop_blocks_item.py b/skyvern/client/types/for_loop_block_yaml_loop_blocks_item.py index f2a3bc34..4cf9e6e4 100644 --- a/skyvern/client/types/for_loop_block_yaml_loop_blocks_item.py +++ b/skyvern/client/types/for_loop_block_yaml_loop_blocks_item.py @@ -1,18 +1,18 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel + import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from ..core.serialization import FieldMetadata +from .extraction_block_yaml_data_schema import ExtractionBlockYamlDataSchema +from .file_storage_type import FileStorageType +from .file_type import FileType from .run_engine import RunEngine from .task_block_yaml_data_schema import TaskBlockYamlDataSchema -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic -from .file_storage_type import FileStorageType -import typing_extensions -from ..core.serialization import FieldMetadata -from .file_type import FileType -from .extraction_block_yaml_data_schema import ExtractionBlockYamlDataSchema -from ..core.pydantic_utilities import update_forward_refs class ForLoopBlockYamlLoopBlocksItem_Task(UniversalBaseModel): @@ -71,7 +71,7 @@ class ForLoopBlockYamlLoopBlocksItem_ForLoop(UniversalBaseModel): extra = pydantic.Extra.allow -from .for_loop_block_yaml import ForLoopBlockYaml # noqa: E402 +from .for_loop_block_yaml import ForLoopBlockYaml # noqa: E402, F401, I001 class ForLoopBlockYamlLoopBlocksItem_Code(UniversalBaseModel): @@ -374,6 +374,30 @@ class ForLoopBlockYamlLoopBlocksItem_Wait(UniversalBaseModel): extra = pydantic.Extra.allow +class ForLoopBlockYamlLoopBlocksItem_HumanInteraction(UniversalBaseModel): + block_type: typing.Literal["human_interaction"] = "human_interaction" + label: str + continue_on_failure: typing.Optional[bool] = None + model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + instructions: typing.Optional[str] = None + positive_descriptor: typing.Optional[str] = None + negative_descriptor: typing.Optional[str] = None + timeout_seconds: int + sender: str + recipients: typing.List[str] + subject: str + body: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class ForLoopBlockYamlLoopBlocksItem_FileDownload(UniversalBaseModel): block_type: typing.Literal["file_download"] = "file_download" label: str @@ -501,6 +525,7 @@ ForLoopBlockYamlLoopBlocksItem = typing.Union[ ForLoopBlockYamlLoopBlocksItem_Extraction, ForLoopBlockYamlLoopBlocksItem_Login, ForLoopBlockYamlLoopBlocksItem_Wait, + ForLoopBlockYamlLoopBlocksItem_HumanInteraction, ForLoopBlockYamlLoopBlocksItem_FileDownload, ForLoopBlockYamlLoopBlocksItem_GotoUrl, ForLoopBlockYamlLoopBlocksItem_PdfParser, diff --git a/skyvern/client/types/get_run_response.py b/skyvern/client/types/get_run_response.py index 535da042..e86943aa 100644 --- a/skyvern/client/types/get_run_response.py +++ b/skyvern/client/types/get_run_response.py @@ -1,18 +1,19 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .run_status import RunStatus -from .task_run_response_output import TaskRunResponseOutput -from .file_info import FileInfo + import datetime as dt +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .file_info import FileInfo +from .run_status import RunStatus from .script_run_response import ScriptRunResponse from .task_run_request import TaskRunRequest -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic -from .workflow_run_response_output import WorkflowRunResponseOutput +from .task_run_response_output import TaskRunResponseOutput from .workflow_run_request import WorkflowRunRequest +from .workflow_run_response_output import WorkflowRunResponseOutput class GetRunResponse_TaskV1(UniversalBaseModel): diff --git a/skyvern/client/types/http_request_block.py b/skyvern/client/types/http_request_block.py index 758c4d6c..aed2423a 100644 --- a/skyvern/client/types/http_request_block.py +++ b/skyvern/client/types/http_request_block.py @@ -1,12 +1,13 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .output_parameter import OutputParameter +from __future__ import annotations + import typing -from .http_request_block_parameters_item import HttpRequestBlockParametersItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .http_request_block_parameters_item import HttpRequestBlockParametersItem +from .output_parameter import OutputParameter class HttpRequestBlock(UniversalBaseModel): @@ -31,3 +32,8 @@ class HttpRequestBlock(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + +update_forward_refs(HttpRequestBlock) diff --git a/skyvern/client/types/http_request_block_parameters_item.py b/skyvern/client/types/http_request_block_parameters_item.py index 3069b31c..aa6bec5e 100644 --- a/skyvern/client/types/http_request_block_parameters_item.py +++ b/skyvern/client/types/http_request_block_parameters_item.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_type import WorkflowParameterType class HttpRequestBlockParametersItem_AwsSecret(UniversalBaseModel): @@ -172,8 +172,8 @@ class HttpRequestBlockParametersItem_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 class HttpRequestBlockParametersItem_Credential(UniversalBaseModel): diff --git a/skyvern/client/types/http_request_block_yaml.py b/skyvern/client/types/http_request_block_yaml.py index 7e878e9b..691a085d 100644 --- a/skyvern/client/types/http_request_block_yaml.py +++ b/skyvern/client/types/http_request_block_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class HttpRequestBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/http_validation_error.py b/skyvern/client/types/http_validation_error.py index f52507fe..70a0f5f1 100644 --- a/skyvern/client/types/http_validation_error.py +++ b/skyvern/client/types/http_validation_error.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .validation_error import ValidationError -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .validation_error import ValidationError class HttpValidationError(UniversalBaseModel): diff --git a/skyvern/client/types/human_interaction_block.py b/skyvern/client/types/human_interaction_block.py new file mode 100644 index 00000000..71493fad --- /dev/null +++ b/skyvern/client/types/human_interaction_block.py @@ -0,0 +1,75 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .human_interaction_block_data_schema import HumanInteractionBlockDataSchema +from .human_interaction_block_parameters_item import HumanInteractionBlockParametersItem +from .output_parameter import OutputParameter +from .run_engine import RunEngine + + +class HumanInteractionBlock(UniversalBaseModel): + """ + A block for human/agent interaction. + + For the first pass at this, the implicit behaviour is that the user is given a single binary + choice (a go//no-go). + + If the human: + - chooses positively, the workflow continues + - chooses negatively, the workflow is terminated + - does not respond within the timeout period, the workflow terminates + """ + + label: str + output_parameter: OutputParameter + continue_on_failure: typing.Optional[bool] = None + model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + disable_cache: typing.Optional[bool] = None + task_type: typing.Optional[str] = None + url: typing.Optional[str] = None + title: typing.Optional[str] = None + engine: typing.Optional[RunEngine] = None + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + navigation_goal: typing.Optional[str] = None + data_extraction_goal: typing.Optional[str] = None + data_schema: typing.Optional[HumanInteractionBlockDataSchema] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + parameters: typing.Optional[typing.List[HumanInteractionBlockParametersItem]] = None + complete_on_download: typing.Optional[bool] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + complete_verification: typing.Optional[bool] = None + include_action_history_in_verification: typing.Optional[bool] = None + download_timeout: typing.Optional[float] = None + instructions: typing.Optional[str] = None + positive_descriptor: typing.Optional[str] = None + negative_descriptor: typing.Optional[str] = None + timeout_seconds: typing.Optional[int] = None + sender: typing.Optional[str] = None + recipients: typing.Optional[typing.List[str]] = None + subject: typing.Optional[str] = None + body: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + +update_forward_refs(HumanInteractionBlock) diff --git a/skyvern/client/types/human_interaction_block_data_schema.py b/skyvern/client/types/human_interaction_block_data_schema.py new file mode 100644 index 00000000..c12ce7c4 --- /dev/null +++ b/skyvern/client/types/human_interaction_block_data_schema.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +HumanInteractionBlockDataSchema = typing.Union[ + typing.Dict[str, typing.Optional[typing.Any]], typing.List[typing.Optional[typing.Any]], str +] diff --git a/skyvern/client/types/human_interaction_block_parameters_item.py b/skyvern/client/types/human_interaction_block_parameters_item.py new file mode 100644 index 00000000..f9e760ff --- /dev/null +++ b/skyvern/client/types/human_interaction_block_parameters_item.py @@ -0,0 +1,277 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import datetime as dt +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .context_parameter_value import ContextParameterValue +from .workflow_parameter_default_value import WorkflowParameterDefaultValue +from .workflow_parameter_type import WorkflowParameterType + + +class HumanInteractionBlockParametersItem_AwsSecret(UniversalBaseModel): + parameter_type: typing.Literal["aws_secret"] = "aws_secret" + key: str + description: typing.Optional[str] = None + aws_secret_parameter_id: str + workflow_id: str + aws_key: str + created_at: dt.datetime + modified_at: dt.datetime + deleted_at: typing.Optional[dt.datetime] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HumanInteractionBlockParametersItem_AzureSecret(UniversalBaseModel): + parameter_type: typing.Literal["azure_secret"] = "azure_secret" + key: str + description: typing.Optional[str] = None + azure_secret_parameter_id: str + workflow_id: str + azure_key: str + created_at: dt.datetime + modified_at: dt.datetime + deleted_at: typing.Optional[dt.datetime] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HumanInteractionBlockParametersItem_AzureVaultCredential(UniversalBaseModel): + parameter_type: typing.Literal["azure_vault_credential"] = "azure_vault_credential" + key: str + description: typing.Optional[str] = None + azure_vault_credential_parameter_id: str + workflow_id: str + vault_name: str + username_key: str + password_key: str + totp_secret_key: typing.Optional[str] = None + created_at: dt.datetime + modified_at: dt.datetime + deleted_at: typing.Optional[dt.datetime] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HumanInteractionBlockParametersItem_BitwardenCreditCardData(UniversalBaseModel): + parameter_type: typing.Literal["bitwarden_credit_card_data"] = "bitwarden_credit_card_data" + key: str + description: typing.Optional[str] = None + bitwarden_credit_card_data_parameter_id: str + workflow_id: str + bitwarden_client_id_aws_secret_key: str + bitwarden_client_secret_aws_secret_key: str + bitwarden_master_password_aws_secret_key: str + bitwarden_collection_id: str + bitwarden_item_id: str + created_at: dt.datetime + modified_at: dt.datetime + deleted_at: typing.Optional[dt.datetime] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HumanInteractionBlockParametersItem_BitwardenLoginCredential(UniversalBaseModel): + parameter_type: typing.Literal["bitwarden_login_credential"] = "bitwarden_login_credential" + key: str + description: typing.Optional[str] = None + bitwarden_login_credential_parameter_id: str + workflow_id: str + bitwarden_client_id_aws_secret_key: str + bitwarden_client_secret_aws_secret_key: str + bitwarden_master_password_aws_secret_key: str + url_parameter_key: typing.Optional[str] = None + bitwarden_collection_id: typing.Optional[str] = None + bitwarden_item_id: typing.Optional[str] = None + created_at: dt.datetime + modified_at: dt.datetime + deleted_at: typing.Optional[dt.datetime] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HumanInteractionBlockParametersItem_BitwardenSensitiveInformation(UniversalBaseModel): + parameter_type: typing.Literal["bitwarden_sensitive_information"] = "bitwarden_sensitive_information" + key: str + description: typing.Optional[str] = None + bitwarden_sensitive_information_parameter_id: str + workflow_id: str + bitwarden_client_id_aws_secret_key: str + bitwarden_client_secret_aws_secret_key: str + bitwarden_master_password_aws_secret_key: str + bitwarden_collection_id: str + bitwarden_identity_key: str + bitwarden_identity_fields: typing.List[str] + created_at: dt.datetime + modified_at: dt.datetime + deleted_at: typing.Optional[dt.datetime] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HumanInteractionBlockParametersItem_Context(UniversalBaseModel): + parameter_type: typing.Literal["context"] = "context" + key: str + description: typing.Optional[str] = None + source: "ContextParameterSource" + value: typing.Optional[ContextParameterValue] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 + + +class HumanInteractionBlockParametersItem_Credential(UniversalBaseModel): + parameter_type: typing.Literal["credential"] = "credential" + key: str + description: typing.Optional[str] = None + credential_parameter_id: str + workflow_id: str + credential_id: str + created_at: dt.datetime + modified_at: dt.datetime + deleted_at: typing.Optional[dt.datetime] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HumanInteractionBlockParametersItem_Onepassword(UniversalBaseModel): + parameter_type: typing.Literal["onepassword"] = "onepassword" + key: str + description: typing.Optional[str] = None + onepassword_credential_parameter_id: str + workflow_id: str + vault_id: str + item_id: str + created_at: dt.datetime + modified_at: dt.datetime + deleted_at: typing.Optional[dt.datetime] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HumanInteractionBlockParametersItem_Output(UniversalBaseModel): + parameter_type: typing.Literal["output"] = "output" + key: str + description: typing.Optional[str] = None + output_parameter_id: str + workflow_id: str + created_at: dt.datetime + modified_at: dt.datetime + deleted_at: typing.Optional[dt.datetime] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class HumanInteractionBlockParametersItem_Workflow(UniversalBaseModel): + parameter_type: typing.Literal["workflow"] = "workflow" + key: str + description: typing.Optional[str] = None + workflow_parameter_id: str + workflow_parameter_type: WorkflowParameterType + workflow_id: str + default_value: typing.Optional[WorkflowParameterDefaultValue] = None + created_at: dt.datetime + modified_at: dt.datetime + deleted_at: typing.Optional[dt.datetime] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +HumanInteractionBlockParametersItem = typing.Union[ + HumanInteractionBlockParametersItem_AwsSecret, + HumanInteractionBlockParametersItem_AzureSecret, + HumanInteractionBlockParametersItem_AzureVaultCredential, + HumanInteractionBlockParametersItem_BitwardenCreditCardData, + HumanInteractionBlockParametersItem_BitwardenLoginCredential, + HumanInteractionBlockParametersItem_BitwardenSensitiveInformation, + HumanInteractionBlockParametersItem_Context, + HumanInteractionBlockParametersItem_Credential, + HumanInteractionBlockParametersItem_Onepassword, + HumanInteractionBlockParametersItem_Output, + HumanInteractionBlockParametersItem_Workflow, +] +update_forward_refs(HumanInteractionBlockParametersItem_Context) diff --git a/skyvern/client/types/human_interaction_block_yaml.py b/skyvern/client/types/human_interaction_block_yaml.py new file mode 100644 index 00000000..71cbda80 --- /dev/null +++ b/skyvern/client/types/human_interaction_block_yaml.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class HumanInteractionBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + instructions: typing.Optional[str] = None + positive_descriptor: typing.Optional[str] = None + negative_descriptor: typing.Optional[str] = None + timeout_seconds: int + sender: str + recipients: typing.List[str] + subject: str + body: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/skyvern/client/types/input_or_select_context.py b/skyvern/client/types/input_or_select_context.py index 2fccd7b7..1de646bc 100644 --- a/skyvern/client/types/input_or_select_context.py +++ b/skyvern/client/types/input_or_select_context.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class InputOrSelectContext(UniversalBaseModel): diff --git a/skyvern/client/types/login_block.py b/skyvern/client/types/login_block.py index 7673f7bd..a5d26f8e 100644 --- a/skyvern/client/types/login_block.py +++ b/skyvern/client/types/login_block.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .output_parameter import OutputParameter +from __future__ import annotations + import typing -from .run_engine import RunEngine + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .login_block_data_schema import LoginBlockDataSchema from .login_block_parameters_item import LoginBlockParametersItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic +from .output_parameter import OutputParameter +from .run_engine import RunEngine class LoginBlock(UniversalBaseModel): @@ -47,3 +48,8 @@ class LoginBlock(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + +update_forward_refs(LoginBlock) diff --git a/skyvern/client/types/login_block_parameters_item.py b/skyvern/client/types/login_block_parameters_item.py index d48303c6..37f026ce 100644 --- a/skyvern/client/types/login_block_parameters_item.py +++ b/skyvern/client/types/login_block_parameters_item.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_type import WorkflowParameterType class LoginBlockParametersItem_AwsSecret(UniversalBaseModel): @@ -172,8 +172,8 @@ class LoginBlockParametersItem_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 class LoginBlockParametersItem_Credential(UniversalBaseModel): diff --git a/skyvern/client/types/login_block_yaml.py b/skyvern/client/types/login_block_yaml.py index a62684dd..0ae5df79 100644 --- a/skyvern/client/types/login_block_yaml.py +++ b/skyvern/client/types/login_block_yaml.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .run_engine import RunEngine -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .run_engine import RunEngine class LoginBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/navigation_block.py b/skyvern/client/types/navigation_block.py index d7a152d5..08bc1c12 100644 --- a/skyvern/client/types/navigation_block.py +++ b/skyvern/client/types/navigation_block.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .output_parameter import OutputParameter +from __future__ import annotations + import typing -from .run_engine import RunEngine + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .navigation_block_data_schema import NavigationBlockDataSchema from .navigation_block_parameters_item import NavigationBlockParametersItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic +from .output_parameter import OutputParameter +from .run_engine import RunEngine class NavigationBlock(UniversalBaseModel): @@ -47,3 +48,8 @@ class NavigationBlock(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + +update_forward_refs(NavigationBlock) diff --git a/skyvern/client/types/navigation_block_parameters_item.py b/skyvern/client/types/navigation_block_parameters_item.py index dd375392..ebd7d01a 100644 --- a/skyvern/client/types/navigation_block_parameters_item.py +++ b/skyvern/client/types/navigation_block_parameters_item.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_type import WorkflowParameterType class NavigationBlockParametersItem_AwsSecret(UniversalBaseModel): @@ -172,8 +172,8 @@ class NavigationBlockParametersItem_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 class NavigationBlockParametersItem_Credential(UniversalBaseModel): diff --git a/skyvern/client/types/navigation_block_yaml.py b/skyvern/client/types/navigation_block_yaml.py index 2b0bac42..1cbb4fd1 100644 --- a/skyvern/client/types/navigation_block_yaml.py +++ b/skyvern/client/types/navigation_block_yaml.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .run_engine import RunEngine -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .run_engine import RunEngine class NavigationBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/non_empty_credit_card_credential.py b/skyvern/client/types/non_empty_credit_card_credential.py index 5656a25c..6f8ee4c9 100644 --- a/skyvern/client/types/non_empty_credit_card_credential.py +++ b/skyvern/client/types/non_empty_credit_card_credential.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + class NonEmptyCreditCardCredential(UniversalBaseModel): """ diff --git a/skyvern/client/types/non_empty_password_credential.py b/skyvern/client/types/non_empty_password_credential.py index ba154620..7d4fccf1 100644 --- a/skyvern/client/types/non_empty_password_credential.py +++ b/skyvern/client/types/non_empty_password_credential.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .totp_type import TotpType -from ..core.pydantic_utilities import IS_PYDANTIC_V2 class NonEmptyPasswordCredential(UniversalBaseModel): diff --git a/skyvern/client/types/one_password_credential_parameter.py b/skyvern/client/types/one_password_credential_parameter.py index bae88255..36542394 100644 --- a/skyvern/client/types/one_password_credential_parameter.py +++ b/skyvern/client/types/one_password_credential_parameter.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class OnePasswordCredentialParameter(UniversalBaseModel): diff --git a/skyvern/client/types/one_password_credential_parameter_yaml.py b/skyvern/client/types/one_password_credential_parameter_yaml.py index dc82845d..82209bd4 100644 --- a/skyvern/client/types/one_password_credential_parameter_yaml.py +++ b/skyvern/client/types/one_password_credential_parameter_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class OnePasswordCredentialParameterYaml(UniversalBaseModel): diff --git a/skyvern/client/types/output_parameter.py b/skyvern/client/types/output_parameter.py index 35f89c96..fab0df29 100644 --- a/skyvern/client/types/output_parameter.py +++ b/skyvern/client/types/output_parameter.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class OutputParameter(UniversalBaseModel): diff --git a/skyvern/client/types/output_parameter_yaml.py b/skyvern/client/types/output_parameter_yaml.py index 15f041d2..6a651acf 100644 --- a/skyvern/client/types/output_parameter_yaml.py +++ b/skyvern/client/types/output_parameter_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class OutputParameterYaml(UniversalBaseModel): diff --git a/skyvern/client/types/password_credential_response.py b/skyvern/client/types/password_credential_response.py index 9a0c5887..c984ed81 100644 --- a/skyvern/client/types/password_credential_response.py +++ b/skyvern/client/types/password_credential_response.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .totp_type import TotpType -from ..core.pydantic_utilities import IS_PYDANTIC_V2 class PasswordCredentialResponse(UniversalBaseModel): diff --git a/skyvern/client/types/pdf_parser_block.py b/skyvern/client/types/pdf_parser_block.py index 79b7fc74..a9ea452a 100644 --- a/skyvern/client/types/pdf_parser_block.py +++ b/skyvern/client/types/pdf_parser_block.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .output_parameter import OutputParameter import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .output_parameter import OutputParameter class PdfParserBlock(UniversalBaseModel): diff --git a/skyvern/client/types/pdf_parser_block_yaml.py b/skyvern/client/types/pdf_parser_block_yaml.py index f4fb46ae..315d089f 100644 --- a/skyvern/client/types/pdf_parser_block_yaml.py +++ b/skyvern/client/types/pdf_parser_block_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class PdfParserBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/script.py b/skyvern/client/types/script.py index c31ad210..7f412ab9 100644 --- a/skyvern/client/types/script.py +++ b/skyvern/client/types/script.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic -import typing import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class Script(UniversalBaseModel): diff --git a/skyvern/client/types/script_file_create.py b/skyvern/client/types/script_file_create.py index 3099379b..36266fc7 100644 --- a/skyvern/client/types/script_file_create.py +++ b/skyvern/client/types/script_file_create.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .file_encoding import FileEncoding -from ..core.pydantic_utilities import IS_PYDANTIC_V2 class ScriptFileCreate(UniversalBaseModel): diff --git a/skyvern/client/types/script_run_response.py b/skyvern/client/types/script_run_response.py index 5c01f0e1..96f61a47 100644 --- a/skyvern/client/types/script_run_response.py +++ b/skyvern/client/types/script_run_response.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class ScriptRunResponse(UniversalBaseModel): diff --git a/skyvern/client/types/select_option.py b/skyvern/client/types/select_option.py index 3b8a6d9d..30c0e42e 100644 --- a/skyvern/client/types/select_option.py +++ b/skyvern/client/types/select_option.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class SelectOption(UniversalBaseModel): diff --git a/skyvern/client/types/send_email_block.py b/skyvern/client/types/send_email_block.py index cdac72b7..084a9786 100644 --- a/skyvern/client/types/send_email_block.py +++ b/skyvern/client/types/send_email_block.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .output_parameter import OutputParameter import typing -from .aws_secret_parameter import AwsSecretParameter -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .aws_secret_parameter import AwsSecretParameter +from .output_parameter import OutputParameter class SendEmailBlock(UniversalBaseModel): diff --git a/skyvern/client/types/send_email_block_yaml.py b/skyvern/client/types/send_email_block_yaml.py index 0ced188f..527aafda 100644 --- a/skyvern/client/types/send_email_block_yaml.py +++ b/skyvern/client/types/send_email_block_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class SendEmailBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/task_block.py b/skyvern/client/types/task_block.py index 48b4454c..c9b9aa49 100644 --- a/skyvern/client/types/task_block.py +++ b/skyvern/client/types/task_block.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .output_parameter import OutputParameter +from __future__ import annotations + import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .output_parameter import OutputParameter from .run_engine import RunEngine from .task_block_data_schema import TaskBlockDataSchema from .task_block_parameters_item import TaskBlockParametersItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic class TaskBlock(UniversalBaseModel): @@ -47,3 +48,8 @@ class TaskBlock(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + +update_forward_refs(TaskBlock) diff --git a/skyvern/client/types/task_block_parameters_item.py b/skyvern/client/types/task_block_parameters_item.py index 38981971..63ca5a12 100644 --- a/skyvern/client/types/task_block_parameters_item.py +++ b/skyvern/client/types/task_block_parameters_item.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_type import WorkflowParameterType class TaskBlockParametersItem_AwsSecret(UniversalBaseModel): @@ -172,8 +172,8 @@ class TaskBlockParametersItem_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 class TaskBlockParametersItem_Credential(UniversalBaseModel): diff --git a/skyvern/client/types/task_block_yaml.py b/skyvern/client/types/task_block_yaml.py index 20b9a458..39d42146 100644 --- a/skyvern/client/types/task_block_yaml.py +++ b/skyvern/client/types/task_block_yaml.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .run_engine import RunEngine from .task_block_yaml_data_schema import TaskBlockYamlDataSchema -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic class TaskBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/task_run_request.py b/skyvern/client/types/task_run_request.py index b8f26d12..b8a131b4 100644 --- a/skyvern/client/types/task_run_request.py +++ b/skyvern/client/types/task_run_request.py @@ -1,12 +1,12 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic import typing -from .run_engine import RunEngine + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .proxy_location import ProxyLocation +from .run_engine import RunEngine from .task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema -from ..core.pydantic_utilities import IS_PYDANTIC_V2 class TaskRunRequest(UniversalBaseModel): diff --git a/skyvern/client/types/task_run_response.py b/skyvern/client/types/task_run_response.py index f4d1657c..6409b93b 100644 --- a/skyvern/client/types/task_run_response.py +++ b/skyvern/client/types/task_run_response.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic -from .run_status import RunStatus -import typing -from .task_run_response_output import TaskRunResponseOutput -from .file_info import FileInfo import datetime as dt +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .file_info import FileInfo +from .run_status import RunStatus from .script_run_response import ScriptRunResponse from .task_run_request import TaskRunRequest -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .task_run_response_output import TaskRunResponseOutput class TaskRunResponse(UniversalBaseModel): diff --git a/skyvern/client/types/task_v2block.py b/skyvern/client/types/task_v2block.py index 37000f66..8ece1478 100644 --- a/skyvern/client/types/task_v2block.py +++ b/skyvern/client/types/task_v2block.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .output_parameter import OutputParameter import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .output_parameter import OutputParameter class TaskV2Block(UniversalBaseModel): diff --git a/skyvern/client/types/task_v2block_yaml.py b/skyvern/client/types/task_v2block_yaml.py index fbc3188e..80b062bd 100644 --- a/skyvern/client/types/task_v2block_yaml.py +++ b/skyvern/client/types/task_v2block_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class TaskV2BlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/text_prompt_block.py b/skyvern/client/types/text_prompt_block.py index f0343882..e472e941 100644 --- a/skyvern/client/types/text_prompt_block.py +++ b/skyvern/client/types/text_prompt_block.py @@ -1,12 +1,13 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .output_parameter import OutputParameter +from __future__ import annotations + import typing -from .text_prompt_block_parameters_item import TextPromptBlockParametersItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .output_parameter import OutputParameter +from .text_prompt_block_parameters_item import TextPromptBlockParametersItem class TextPromptBlock(UniversalBaseModel): @@ -28,3 +29,8 @@ class TextPromptBlock(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + +update_forward_refs(TextPromptBlock) diff --git a/skyvern/client/types/text_prompt_block_parameters_item.py b/skyvern/client/types/text_prompt_block_parameters_item.py index ab462a91..e8bcf29d 100644 --- a/skyvern/client/types/text_prompt_block_parameters_item.py +++ b/skyvern/client/types/text_prompt_block_parameters_item.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_type import WorkflowParameterType class TextPromptBlockParametersItem_AwsSecret(UniversalBaseModel): @@ -172,8 +172,8 @@ class TextPromptBlockParametersItem_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 class TextPromptBlockParametersItem_Credential(UniversalBaseModel): diff --git a/skyvern/client/types/text_prompt_block_yaml.py b/skyvern/client/types/text_prompt_block_yaml.py index 07018a6a..b8f6a1b5 100644 --- a/skyvern/client/types/text_prompt_block_yaml.py +++ b/skyvern/client/types/text_prompt_block_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class TextPromptBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/thought.py b/skyvern/client/types/thought.py index 579b92f5..c632dba8 100644 --- a/skyvern/client/types/thought.py +++ b/skyvern/client/types/thought.py @@ -1,12 +1,12 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .thought_type import ThoughtType -from .thought_scenario import ThoughtScenario import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .thought_scenario import ThoughtScenario +from .thought_type import ThoughtType class Thought(UniversalBaseModel): diff --git a/skyvern/client/types/totp_code.py b/skyvern/client/types/totp_code.py index 210fbbf8..2caff2ed 100644 --- a/skyvern/client/types/totp_code.py +++ b/skyvern/client/types/totp_code.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic -import typing import datetime as dt +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .otp_type import OtpType -from ..core.pydantic_utilities import IS_PYDANTIC_V2 class TotpCode(UniversalBaseModel): diff --git a/skyvern/client/types/upload_to_s3block.py b/skyvern/client/types/upload_to_s3block.py index 08787236..3ffd7253 100644 --- a/skyvern/client/types/upload_to_s3block.py +++ b/skyvern/client/types/upload_to_s3block.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .output_parameter import OutputParameter import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .output_parameter import OutputParameter class UploadToS3Block(UniversalBaseModel): diff --git a/skyvern/client/types/upload_to_s3block_yaml.py b/skyvern/client/types/upload_to_s3block_yaml.py index 5cf34f61..ee3ee9fc 100644 --- a/skyvern/client/types/upload_to_s3block_yaml.py +++ b/skyvern/client/types/upload_to_s3block_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class UploadToS3BlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/url_block.py b/skyvern/client/types/url_block.py index d1769c6e..4de1e729 100644 --- a/skyvern/client/types/url_block.py +++ b/skyvern/client/types/url_block.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .output_parameter import OutputParameter +from __future__ import annotations + import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .output_parameter import OutputParameter from .run_engine import RunEngine from .url_block_data_schema import UrlBlockDataSchema from .url_block_parameters_item import UrlBlockParametersItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic class UrlBlock(UniversalBaseModel): @@ -47,3 +48,8 @@ class UrlBlock(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + +update_forward_refs(UrlBlock) diff --git a/skyvern/client/types/url_block_parameters_item.py b/skyvern/client/types/url_block_parameters_item.py index 795872cf..0ca3a068 100644 --- a/skyvern/client/types/url_block_parameters_item.py +++ b/skyvern/client/types/url_block_parameters_item.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_type import WorkflowParameterType class UrlBlockParametersItem_AwsSecret(UniversalBaseModel): @@ -172,8 +172,8 @@ class UrlBlockParametersItem_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 class UrlBlockParametersItem_Credential(UniversalBaseModel): diff --git a/skyvern/client/types/url_block_yaml.py b/skyvern/client/types/url_block_yaml.py index 61361b82..5b956265 100644 --- a/skyvern/client/types/url_block_yaml.py +++ b/skyvern/client/types/url_block_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class UrlBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/user_defined_error.py b/skyvern/client/types/user_defined_error.py index 0ef64bcc..4dcd2e01 100644 --- a/skyvern/client/types/user_defined_error.py +++ b/skyvern/client/types/user_defined_error.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from ..core.pydantic_utilities import IS_PYDANTIC_V2 import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class UserDefinedError(UniversalBaseModel): diff --git a/skyvern/client/types/validation_block.py b/skyvern/client/types/validation_block.py index 3190bd2f..0acffdb3 100644 --- a/skyvern/client/types/validation_block.py +++ b/skyvern/client/types/validation_block.py @@ -1,14 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .output_parameter import OutputParameter +from __future__ import annotations + import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .output_parameter import OutputParameter from .run_engine import RunEngine from .validation_block_data_schema import ValidationBlockDataSchema from .validation_block_parameters_item import ValidationBlockParametersItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic class ValidationBlock(UniversalBaseModel): @@ -47,3 +48,8 @@ class ValidationBlock(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + +update_forward_refs(ValidationBlock) diff --git a/skyvern/client/types/validation_block_parameters_item.py b/skyvern/client/types/validation_block_parameters_item.py index 403c3c7a..05b929df 100644 --- a/skyvern/client/types/validation_block_parameters_item.py +++ b/skyvern/client/types/validation_block_parameters_item.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_type import WorkflowParameterType class ValidationBlockParametersItem_AwsSecret(UniversalBaseModel): @@ -172,8 +172,8 @@ class ValidationBlockParametersItem_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 class ValidationBlockParametersItem_Credential(UniversalBaseModel): diff --git a/skyvern/client/types/validation_block_yaml.py b/skyvern/client/types/validation_block_yaml.py index 3ade5ccb..e5579e6d 100644 --- a/skyvern/client/types/validation_block_yaml.py +++ b/skyvern/client/types/validation_block_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class ValidationBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/validation_error.py b/skyvern/client/types/validation_error.py index 93a2d803..e388c3c1 100644 --- a/skyvern/client/types/validation_error.py +++ b/skyvern/client/types/validation_error.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from .validation_error_loc_item import ValidationErrorLocItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .validation_error_loc_item import ValidationErrorLocItem class ValidationError(UniversalBaseModel): diff --git a/skyvern/client/types/wait_block.py b/skyvern/client/types/wait_block.py index 3e4371f4..870f4110 100644 --- a/skyvern/client/types/wait_block.py +++ b/skyvern/client/types/wait_block.py @@ -1,12 +1,13 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .output_parameter import OutputParameter +from __future__ import annotations + import typing -from .wait_block_parameters_item import WaitBlockParametersItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .output_parameter import OutputParameter +from .wait_block_parameters_item import WaitBlockParametersItem class WaitBlock(UniversalBaseModel): @@ -26,3 +27,8 @@ class WaitBlock(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + +update_forward_refs(WaitBlock) diff --git a/skyvern/client/types/wait_block_parameters_item.py b/skyvern/client/types/wait_block_parameters_item.py index 1e8caa3c..9529dba8 100644 --- a/skyvern/client/types/wait_block_parameters_item.py +++ b/skyvern/client/types/wait_block_parameters_item.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_type import WorkflowParameterType class WaitBlockParametersItem_AwsSecret(UniversalBaseModel): @@ -172,8 +172,8 @@ class WaitBlockParametersItem_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 class WaitBlockParametersItem_Credential(UniversalBaseModel): diff --git a/skyvern/client/types/wait_block_yaml.py b/skyvern/client/types/wait_block_yaml.py index 6739ace4..59805637 100644 --- a/skyvern/client/types/wait_block_yaml.py +++ b/skyvern/client/types/wait_block_yaml.py @@ -1,9 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class WaitBlockYaml(UniversalBaseModel): diff --git a/skyvern/client/types/workflow.py b/skyvern/client/types/workflow.py index 50f08780..e5908ce9 100644 --- a/skyvern/client/types/workflow.py +++ b/skyvern/client/types/workflow.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .for_loop_block import ForLoopBlock -import typing -from .workflow_definition import WorkflowDefinition -from .proxy_location import ProxyLocation -from .workflow_status import WorkflowStatus +from __future__ import annotations + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .proxy_location import ProxyLocation +from .workflow_definition import WorkflowDefinition +from .workflow_status import WorkflowStatus class Workflow(UniversalBaseModel): @@ -47,3 +47,9 @@ class Workflow(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .for_loop_block import ForLoopBlock # noqa: E402, F401, I001 + +update_forward_refs(Workflow) diff --git a/skyvern/client/types/workflow_create_yaml_request.py b/skyvern/client/types/workflow_create_yaml_request.py index 9f2f868c..63a971ee 100644 --- a/skyvern/client/types/workflow_create_yaml_request.py +++ b/skyvern/client/types/workflow_create_yaml_request.py @@ -1,13 +1,14 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .for_loop_block_yaml import ForLoopBlockYaml +from __future__ import annotations + import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .proxy_location import ProxyLocation from .workflow_definition_yaml import WorkflowDefinitionYaml from .workflow_status import WorkflowStatus -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic class WorkflowCreateYamlRequest(UniversalBaseModel): @@ -38,3 +39,8 @@ class WorkflowCreateYamlRequest(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .for_loop_block_yaml import ForLoopBlockYaml # noqa: E402, F401, I001 + +update_forward_refs(WorkflowCreateYamlRequest) diff --git a/skyvern/client/types/workflow_definition.py b/skyvern/client/types/workflow_definition.py index ab9117f4..0fcdee45 100644 --- a/skyvern/client/types/workflow_definition.py +++ b/skyvern/client/types/workflow_definition.py @@ -1,13 +1,13 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter -from .for_loop_block import ForLoopBlock +from __future__ import annotations + import typing -from .workflow_definition_parameters_item import WorkflowDefinitionParametersItem -from .workflow_definition_blocks_item import WorkflowDefinitionBlocksItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .workflow_definition_blocks_item import WorkflowDefinitionBlocksItem +from .workflow_definition_parameters_item import WorkflowDefinitionParametersItem class WorkflowDefinition(UniversalBaseModel): @@ -22,3 +22,9 @@ class WorkflowDefinition(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .for_loop_block import ForLoopBlock # noqa: E402, F401, I001 + +update_forward_refs(WorkflowDefinition) diff --git a/skyvern/client/types/workflow_definition_blocks_item.py b/skyvern/client/types/workflow_definition_blocks_item.py index fb8f7042..062ecc96 100644 --- a/skyvern/client/types/workflow_definition_blocks_item.py +++ b/skyvern/client/types/workflow_definition_blocks_item.py @@ -1,40 +1,41 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .context_parameter import ContextParameter + import typing -from .output_parameter import OutputParameter -from .run_engine import RunEngine + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from ..core.serialization import FieldMetadata from .action_block_data_schema import ActionBlockDataSchema from .action_block_parameters_item import ActionBlockParametersItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic +from .aws_secret_parameter import AwsSecretParameter from .code_block_parameters_item import CodeBlockParametersItem from .extraction_block_data_schema import ExtractionBlockDataSchema from .extraction_block_parameters_item import ExtractionBlockParametersItem from .file_download_block_data_schema import FileDownloadBlockDataSchema from .file_download_block_parameters_item import FileDownloadBlockParametersItem from .file_storage_type import FileStorageType -import typing_extensions -from ..core.serialization import FieldMetadata from .file_type import FileType from .for_loop_block_loop_over import ForLoopBlockLoopOver -from .url_block_data_schema import UrlBlockDataSchema -from .url_block_parameters_item import UrlBlockParametersItem from .http_request_block_parameters_item import HttpRequestBlockParametersItem +from .human_interaction_block_data_schema import HumanInteractionBlockDataSchema +from .human_interaction_block_parameters_item import HumanInteractionBlockParametersItem from .login_block_data_schema import LoginBlockDataSchema from .login_block_parameters_item import LoginBlockParametersItem from .navigation_block_data_schema import NavigationBlockDataSchema from .navigation_block_parameters_item import NavigationBlockParametersItem -from .aws_secret_parameter import AwsSecretParameter +from .output_parameter import OutputParameter +from .run_engine import RunEngine from .task_block_data_schema import TaskBlockDataSchema from .task_block_parameters_item import TaskBlockParametersItem from .text_prompt_block_parameters_item import TextPromptBlockParametersItem +from .url_block_data_schema import UrlBlockDataSchema +from .url_block_parameters_item import UrlBlockParametersItem from .validation_block_data_schema import ValidationBlockDataSchema from .validation_block_parameters_item import ValidationBlockParametersItem from .wait_block_parameters_item import WaitBlockParametersItem -from ..core.pydantic_utilities import update_forward_refs class WorkflowDefinitionBlocksItem_Action(UniversalBaseModel): @@ -263,8 +264,8 @@ class WorkflowDefinitionBlocksItem_ForLoop(UniversalBaseModel): extra = pydantic.Extra.allow -from .for_loop_block import ForLoopBlock # noqa: E402 -from .for_loop_block_loop_blocks_item import ForLoopBlockLoopBlocksItem # noqa: E402 +from .for_loop_block import ForLoopBlock # noqa: E402, F401, I001 +from .for_loop_block_loop_blocks_item import ForLoopBlockLoopBlocksItem # noqa: E402, F401, I001 class WorkflowDefinitionBlocksItem_GotoUrl(UniversalBaseModel): @@ -331,6 +332,53 @@ class WorkflowDefinitionBlocksItem_HttpRequest(UniversalBaseModel): extra = pydantic.Extra.allow +class WorkflowDefinitionBlocksItem_HumanInteraction(UniversalBaseModel): + block_type: typing.Literal["human_interaction"] = "human_interaction" + label: str + output_parameter: OutputParameter + continue_on_failure: typing.Optional[bool] = None + model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + disable_cache: typing.Optional[bool] = None + task_type: typing.Optional[str] = None + url: typing.Optional[str] = None + title: typing.Optional[str] = None + engine: typing.Optional[RunEngine] = None + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + navigation_goal: typing.Optional[str] = None + data_extraction_goal: typing.Optional[str] = None + data_schema: typing.Optional[HumanInteractionBlockDataSchema] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + parameters: typing.Optional[typing.List[HumanInteractionBlockParametersItem]] = None + complete_on_download: typing.Optional[bool] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + complete_verification: typing.Optional[bool] = None + include_action_history_in_verification: typing.Optional[bool] = None + download_timeout: typing.Optional[float] = None + instructions: typing.Optional[str] = None + positive_descriptor: typing.Optional[str] = None + negative_descriptor: typing.Optional[str] = None + timeout_seconds: typing.Optional[int] = None + sender: typing.Optional[str] = None + recipients: typing.Optional[typing.List[str]] = None + subject: typing.Optional[str] = None + body: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class WorkflowDefinitionBlocksItem_Login(UniversalBaseModel): block_type: typing.Literal["login"] = "login" label: str @@ -619,6 +667,8 @@ class WorkflowDefinitionBlocksItem_Wait(UniversalBaseModel): extra = pydantic.Extra.allow +from .context_parameter import ContextParameter # noqa: E402, F401, I001 + WorkflowDefinitionBlocksItem = typing.Union[ WorkflowDefinitionBlocksItem_Action, WorkflowDefinitionBlocksItem_Code, @@ -630,6 +680,7 @@ WorkflowDefinitionBlocksItem = typing.Union[ WorkflowDefinitionBlocksItem_ForLoop, WorkflowDefinitionBlocksItem_GotoUrl, WorkflowDefinitionBlocksItem_HttpRequest, + WorkflowDefinitionBlocksItem_HumanInteraction, WorkflowDefinitionBlocksItem_Login, WorkflowDefinitionBlocksItem_Navigation, WorkflowDefinitionBlocksItem_PdfParser, @@ -641,4 +692,17 @@ WorkflowDefinitionBlocksItem = typing.Union[ WorkflowDefinitionBlocksItem_Validation, WorkflowDefinitionBlocksItem_Wait, ] +update_forward_refs(WorkflowDefinitionBlocksItem_Action) +update_forward_refs(WorkflowDefinitionBlocksItem_Code) +update_forward_refs(WorkflowDefinitionBlocksItem_Extraction) +update_forward_refs(WorkflowDefinitionBlocksItem_FileDownload) update_forward_refs(WorkflowDefinitionBlocksItem_ForLoop) +update_forward_refs(WorkflowDefinitionBlocksItem_GotoUrl) +update_forward_refs(WorkflowDefinitionBlocksItem_HttpRequest) +update_forward_refs(WorkflowDefinitionBlocksItem_HumanInteraction) +update_forward_refs(WorkflowDefinitionBlocksItem_Login) +update_forward_refs(WorkflowDefinitionBlocksItem_Navigation) +update_forward_refs(WorkflowDefinitionBlocksItem_Task) +update_forward_refs(WorkflowDefinitionBlocksItem_TextPrompt) +update_forward_refs(WorkflowDefinitionBlocksItem_Validation) +update_forward_refs(WorkflowDefinitionBlocksItem_Wait) diff --git a/skyvern/client/types/workflow_definition_parameters_item.py b/skyvern/client/types/workflow_definition_parameters_item.py index df9f0c82..a2cf40f6 100644 --- a/skyvern/client/types/workflow_definition_parameters_item.py +++ b/skyvern/client/types/workflow_definition_parameters_item.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from .context_parameter_value import ContextParameterValue -from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_default_value import WorkflowParameterDefaultValue -from ..core.pydantic_utilities import update_forward_refs +from .workflow_parameter_type import WorkflowParameterType class WorkflowDefinitionParametersItem_AwsSecret(UniversalBaseModel): @@ -172,8 +172,8 @@ class WorkflowDefinitionParametersItem_Context(UniversalBaseModel): extra = pydantic.Extra.allow -from .context_parameter import ContextParameter # noqa: E402 -from .context_parameter_source import ContextParameterSource # noqa: E402 +from .context_parameter import ContextParameter # noqa: E402, F401, I001 +from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001 class WorkflowDefinitionParametersItem_Credential(UniversalBaseModel): diff --git a/skyvern/client/types/workflow_definition_yaml.py b/skyvern/client/types/workflow_definition_yaml.py index 7e93261f..a5024903 100644 --- a/skyvern/client/types/workflow_definition_yaml.py +++ b/skyvern/client/types/workflow_definition_yaml.py @@ -1,12 +1,13 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .for_loop_block_yaml import ForLoopBlockYaml +from __future__ import annotations + import typing -from .workflow_definition_yaml_parameters_item import WorkflowDefinitionYamlParametersItem -from .workflow_definition_yaml_blocks_item import WorkflowDefinitionYamlBlocksItem -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .workflow_definition_yaml_blocks_item import WorkflowDefinitionYamlBlocksItem +from .workflow_definition_yaml_parameters_item import WorkflowDefinitionYamlParametersItem class WorkflowDefinitionYaml(UniversalBaseModel): @@ -21,3 +22,8 @@ class WorkflowDefinitionYaml(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .for_loop_block_yaml import ForLoopBlockYaml # noqa: E402, F401, I001 + +update_forward_refs(WorkflowDefinitionYaml) diff --git a/skyvern/client/types/workflow_definition_yaml_blocks_item.py b/skyvern/client/types/workflow_definition_yaml_blocks_item.py index d99e549c..3d46db39 100644 --- a/skyvern/client/types/workflow_definition_yaml_blocks_item.py +++ b/skyvern/client/types/workflow_definition_yaml_blocks_item.py @@ -1,18 +1,18 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel + import typing -from .run_engine import RunEngine -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from ..core.serialization import FieldMetadata from .extraction_block_yaml_data_schema import ExtractionBlockYamlDataSchema from .file_storage_type import FileStorageType -import typing_extensions -from ..core.serialization import FieldMetadata from .file_type import FileType +from .run_engine import RunEngine from .task_block_yaml_data_schema import TaskBlockYamlDataSchema -from ..core.pydantic_utilities import update_forward_refs class WorkflowDefinitionYamlBlocksItem_Action(UniversalBaseModel): @@ -200,8 +200,8 @@ class WorkflowDefinitionYamlBlocksItem_ForLoop(UniversalBaseModel): extra = pydantic.Extra.allow -from .for_loop_block_yaml import ForLoopBlockYaml # noqa: E402 -from .for_loop_block_yaml_loop_blocks_item import ForLoopBlockYamlLoopBlocksItem # noqa: E402 +from .for_loop_block_yaml import ForLoopBlockYaml # noqa: E402, F401, I001 +from .for_loop_block_yaml_loop_blocks_item import ForLoopBlockYamlLoopBlocksItem # noqa: E402, F401, I001 class WorkflowDefinitionYamlBlocksItem_GotoUrl(UniversalBaseModel): @@ -244,6 +244,30 @@ class WorkflowDefinitionYamlBlocksItem_HttpRequest(UniversalBaseModel): extra = pydantic.Extra.allow +class WorkflowDefinitionYamlBlocksItem_HumanInteraction(UniversalBaseModel): + block_type: typing.Literal["human_interaction"] = "human_interaction" + label: str + continue_on_failure: typing.Optional[bool] = None + model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + instructions: typing.Optional[str] = None + positive_descriptor: typing.Optional[str] = None + negative_descriptor: typing.Optional[str] = None + timeout_seconds: int + sender: str + recipients: typing.List[str] + subject: str + body: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class WorkflowDefinitionYamlBlocksItem_Login(UniversalBaseModel): block_type: typing.Literal["login"] = "login" label: str @@ -497,6 +521,7 @@ WorkflowDefinitionYamlBlocksItem = typing.Union[ WorkflowDefinitionYamlBlocksItem_ForLoop, WorkflowDefinitionYamlBlocksItem_GotoUrl, WorkflowDefinitionYamlBlocksItem_HttpRequest, + WorkflowDefinitionYamlBlocksItem_HumanInteraction, WorkflowDefinitionYamlBlocksItem_Login, WorkflowDefinitionYamlBlocksItem_Navigation, WorkflowDefinitionYamlBlocksItem_PdfParser, diff --git a/skyvern/client/types/workflow_definition_yaml_parameters_item.py b/skyvern/client/types/workflow_definition_yaml_parameters_item.py index 00bd1254..35603ba6 100644 --- a/skyvern/client/types/workflow_definition_yaml_parameters_item.py +++ b/skyvern/client/types/workflow_definition_yaml_parameters_item.py @@ -1,10 +1,11 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel + import typing -from ..core.pydantic_utilities import IS_PYDANTIC_V2 + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_yaml_default_value import WorkflowParameterYamlDefaultValue diff --git a/skyvern/client/types/workflow_parameter.py b/skyvern/client/types/workflow_parameter.py index 1fcafdd8..7deaafc3 100644 --- a/skyvern/client/types/workflow_parameter.py +++ b/skyvern/client/types/workflow_parameter.py @@ -1,12 +1,12 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .workflow_parameter_type import WorkflowParameterType -from .workflow_parameter_default_value import WorkflowParameterDefaultValue import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .workflow_parameter_default_value import WorkflowParameterDefaultValue +from .workflow_parameter_type import WorkflowParameterType class WorkflowParameter(UniversalBaseModel): diff --git a/skyvern/client/types/workflow_parameter_yaml.py b/skyvern/client/types/workflow_parameter_yaml.py index 0a781161..d4565027 100644 --- a/skyvern/client/types/workflow_parameter_yaml.py +++ b/skyvern/client/types/workflow_parameter_yaml.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_yaml_default_value import WorkflowParameterYamlDefaultValue -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic class WorkflowParameterYaml(UniversalBaseModel): diff --git a/skyvern/client/types/workflow_request.py b/skyvern/client/types/workflow_request.py index 3bccd4fa..bfe77684 100644 --- a/skyvern/client/types/workflow_request.py +++ b/skyvern/client/types/workflow_request.py @@ -1,11 +1,12 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -from .for_loop_block_yaml import ForLoopBlockYaml +from __future__ import annotations + import typing -from .workflow_create_yaml_request import WorkflowCreateYamlRequest + import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .workflow_create_yaml_request import WorkflowCreateYamlRequest class WorkflowRequest(UniversalBaseModel): @@ -27,3 +28,8 @@ class WorkflowRequest(UniversalBaseModel): frozen = True smart_union = True extra = pydantic.Extra.allow + + +from .for_loop_block_yaml import ForLoopBlockYaml # noqa: E402, F401, I001 + +update_forward_refs(WorkflowRequest) diff --git a/skyvern/client/types/workflow_run_block.py b/skyvern/client/types/workflow_run_block.py index 7fd835e1..7f4466d2 100644 --- a/skyvern/client/types/workflow_run_block.py +++ b/skyvern/client/types/workflow_run_block.py @@ -1,16 +1,16 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .block_type import BlockType -from .workflow_run_block_output import WorkflowRunBlockOutput -from .run_engine import RunEngine -from .workflow_run_block_navigation_payload import WorkflowRunBlockNavigationPayload -from .workflow_run_block_data_schema import WorkflowRunBlockDataSchema -from .action import Action import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .action import Action +from .block_type import BlockType +from .run_engine import RunEngine +from .workflow_run_block_data_schema import WorkflowRunBlockDataSchema +from .workflow_run_block_navigation_payload import WorkflowRunBlockNavigationPayload +from .workflow_run_block_output import WorkflowRunBlockOutput class WorkflowRunBlock(UniversalBaseModel): diff --git a/skyvern/client/types/workflow_run_request.py b/skyvern/client/types/workflow_run_request.py index e811042b..5602dcfe 100644 --- a/skyvern/client/types/workflow_run_request.py +++ b/skyvern/client/types/workflow_run_request.py @@ -1,10 +1,10 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .proxy_location import ProxyLocation -from ..core.pydantic_utilities import IS_PYDANTIC_V2 class WorkflowRunRequest(UniversalBaseModel): diff --git a/skyvern/client/types/workflow_run_response.py b/skyvern/client/types/workflow_run_response.py index a112f335..71cd462e 100644 --- a/skyvern/client/types/workflow_run_response.py +++ b/skyvern/client/types/workflow_run_response.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.pydantic_utilities import UniversalBaseModel -import pydantic -from .run_status import RunStatus -import typing -from .workflow_run_response_output import WorkflowRunResponseOutput -from .file_info import FileInfo import datetime as dt +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .file_info import FileInfo +from .run_status import RunStatus from .script_run_response import ScriptRunResponse from .workflow_run_request import WorkflowRunRequest -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from .workflow_run_response_output import WorkflowRunResponseOutput class WorkflowRunResponse(UniversalBaseModel): diff --git a/skyvern/client/types/workflow_run_timeline.py b/skyvern/client/types/workflow_run_timeline.py index 0e09e458..301e3caa 100644 --- a/skyvern/client/types/workflow_run_timeline.py +++ b/skyvern/client/types/workflow_run_timeline.py @@ -1,15 +1,15 @@ # This file was auto-generated by Fern from our API Definition. from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -from .workflow_run_timeline_type import WorkflowRunTimelineType -import typing -from .workflow_run_block import WorkflowRunBlock -from .thought import Thought + import datetime as dt -from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing + import pydantic -from ..core.pydantic_utilities import update_forward_refs +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .thought import Thought +from .workflow_run_block import WorkflowRunBlock +from .workflow_run_timeline_type import WorkflowRunTimelineType class WorkflowRunTimeline(UniversalBaseModel): diff --git a/skyvern/library/skyvern.py b/skyvern/library/skyvern.py index f85e346d..49430236 100644 --- a/skyvern/library/skyvern.py +++ b/skyvern/library/skyvern.py @@ -48,7 +48,6 @@ class Skyvern(AsyncSkyvern): super().__init__( base_url=base_url, api_key=api_key, - x_api_key=api_key, environment=environment, timeout=timeout, follow_redirects=follow_redirects, diff --git a/skyvern/library/skyvern_sdk.py b/skyvern/library/skyvern_sdk.py index 09442f55..ee31e480 100644 --- a/skyvern/library/skyvern_sdk.py +++ b/skyvern/library/skyvern_sdk.py @@ -104,7 +104,6 @@ class SkyvernSdk: environment=environment, base_url=base_url, api_key=self._api_key, - x_api_key=self._api_key, timeout=timeout, follow_redirects=follow_redirects, httpx_client=httpx_client,