From d9610701d367ff69bf57df59a77666a38bab56c2 Mon Sep 17 00:00:00 2001 From: Stanislav Novosad Date: Tue, 2 Dec 2025 20:21:25 -0700 Subject: [PATCH] Release v1.0.2 (#4175) --- pyproject.toml | 2 +- skyvern-ts/client/package-lock.json | 238 ++++---- skyvern-ts/client/package.json | 2 +- skyvern-ts/client/reference.md | 243 -------- skyvern-ts/client/src/Client.ts | 339 ++++++++++- .../requests/CreateBrowserProfileRequest.ts | 0 .../requests/ListBrowserProfilesRequest.ts} | 2 +- .../src/api/client/requests/LoginRequest.ts | 2 + .../client/src/api/client/requests/index.ts | 2 + .../client/src/api/errors/ConflictError.ts | 16 + skyvern-ts/client/src/api/errors/index.ts | 1 + .../browserProfiles/client/Client.ts | 343 ----------- .../resources/browserProfiles/client/index.ts | 1 - .../browserProfiles/client/requests/index.ts | 2 - .../api/resources/browserProfiles/index.ts | 1 - skyvern-ts/client/src/api/resources/index.ts | 2 - .../client/src/api/types/ActionBlock.ts | 4 +- .../client/src/api/types/ActionBlockYaml.ts | 4 +- skyvern-ts/client/src/api/types/BlockType.ts | 1 + .../client/src/api/types/BranchCondition.ts | 13 + .../client/src/api/types/BranchCriteria.ts | 10 + skyvern-ts/client/src/api/types/CodeBlock.ts | 3 + .../client/src/api/types/CodeBlockYaml.ts | 3 + .../client/src/api/types/ConditionalBlock.ts | 18 + .../client/src/api/types/DownloadToS3Block.ts | 3 + .../src/api/types/DownloadToS3BlockYaml.ts | 3 + .../client/src/api/types/ExtractionBlock.ts | 4 +- .../src/api/types/ExtractionBlockYaml.ts | 4 +- .../client/src/api/types/FileDownloadBlock.ts | 4 +- .../src/api/types/FileDownloadBlockYaml.ts | 4 +- .../client/src/api/types/FileParserBlock.ts | 3 + .../src/api/types/FileParserBlockYaml.ts | 3 + .../client/src/api/types/FileUploadBlock.ts | 3 + .../src/api/types/FileUploadBlockYaml.ts | 3 + .../client/src/api/types/ForLoopBlock.ts | 3 + .../api/types/ForLoopBlockLoopBlocksItem.ts | 5 + .../client/src/api/types/ForLoopBlockYaml.ts | 3 + skyvern-ts/client/src/api/types/GeoTarget.ts | 23 + .../client/src/api/types/HttpRequestBlock.ts | 3 + .../src/api/types/HttpRequestBlockYaml.ts | 3 + .../src/api/types/HumanInteractionBlock.ts | 4 +- .../api/types/HumanInteractionBlockYaml.ts | 3 + .../src/api/types/LocateElementAction.ts | 9 + skyvern-ts/client/src/api/types/LoginBlock.ts | 4 +- .../client/src/api/types/LoginBlockYaml.ts | 4 +- .../client/src/api/types/NavigationBlock.ts | 4 +- .../src/api/types/NavigationBlockYaml.ts | 4 +- .../api/types/NonEmptyPasswordCredential.ts | 2 + .../api/types/PasswordCredentialResponse.ts | 2 + .../client/src/api/types/PdfParserBlock.ts | 3 + .../src/api/types/PdfParserBlockYaml.ts | 3 + .../api/types/RunSdkActionRequestAction.ts | 7 +- .../client/src/api/types/SendEmailBlock.ts | 3 + .../src/api/types/SendEmailBlockYaml.ts | 3 + skyvern-ts/client/src/api/types/TaskBlock.ts | 4 +- .../client/src/api/types/TaskBlockYaml.ts | 4 +- .../client/src/api/types/TaskRunRequest.ts | 30 +- .../client/src/api/types/TaskV2Block.ts | 3 + .../client/src/api/types/TaskV2BlockYaml.ts | 3 + .../client/src/api/types/TextPromptBlock.ts | 3 + .../src/api/types/TextPromptBlockYaml.ts | 3 + .../client/src/api/types/UploadToS3Block.ts | 3 + .../src/api/types/UploadToS3BlockYaml.ts | 3 + skyvern-ts/client/src/api/types/UrlBlock.ts | 4 +- .../client/src/api/types/UrlBlockYaml.ts | 3 + .../client/src/api/types/ValidationBlock.ts | 4 +- .../src/api/types/ValidationBlockYaml.ts | 3 + skyvern-ts/client/src/api/types/WaitBlock.ts | 3 + .../client/src/api/types/WaitBlockYaml.ts | 3 + skyvern-ts/client/src/api/types/Workflow.ts | 6 +- .../api/types/WorkflowCreateYamlRequest.ts | 6 +- .../src/api/types/WorkflowDefinition.ts | 1 + .../api/types/WorkflowDefinitionBlocksItem.ts | 5 + .../src/api/types/WorkflowDefinitionYaml.ts | 1 + .../src/api/types/WorkflowRunRequest.ts | 33 +- skyvern-ts/client/src/api/types/index.ts | 5 + skyvern-ts/client/src/version.ts | 2 +- .../client/tests/wire/browserProfiles.test.ts | 236 -------- skyvern-ts/client/tests/wire/main.test.ts | 298 ++++++++- .../client/tests/wire/workflows.test.ts | 2 + skyvern/client/__init__.py | 43 +- skyvern/client/browser_profiles/__init__.py | 4 - skyvern/client/browser_profiles/client.py | 379 ------------ skyvern/client/browser_profiles/raw_client.py | 507 ---------------- skyvern/client/client.py | 401 +++++++++++-- skyvern/client/core/client_wrapper.py | 4 +- skyvern/client/core/pydantic_utilities.py | 9 +- skyvern/client/core/serialization.py | 10 +- skyvern/client/errors/__init__.py | 4 +- skyvern/client/errors/conflict_error.py | 10 + skyvern/client/prompts/__init__.py | 4 - skyvern/client/prompts/client.py | 145 ----- skyvern/client/prompts/raw_client.py | 169 ------ skyvern/client/raw_client.py | 568 +++++++++++++++++- skyvern/client/types/__init__.py | 33 +- skyvern/client/types/action_block.py | 12 +- skyvern/client/types/action_block_yaml.py | 12 +- skyvern/client/types/block_type.py | 1 + skyvern/client/types/branch_condition.py | 27 + ..._prompt_response.py => branch_criteria.py} | 17 +- skyvern/client/types/code_block.py | 11 +- skyvern/client/types/code_block_yaml.py | 11 +- skyvern/client/types/conditional_block.py | 39 ++ skyvern/client/types/download_to_s3block.py | 11 +- .../client/types/download_to_s3block_yaml.py | 11 +- skyvern/client/types/extraction_block.py | 12 +- skyvern/client/types/extraction_block_yaml.py | 12 +- skyvern/client/types/file_download_block.py | 12 +- .../client/types/file_download_block_yaml.py | 12 +- skyvern/client/types/file_parser_block.py | 11 +- .../client/types/file_parser_block_yaml.py | 11 +- skyvern/client/types/file_upload_block.py | 11 +- .../client/types/file_upload_block_yaml.py | 11 +- skyvern/client/types/for_loop_block.py | 11 +- .../types/for_loop_block_loop_blocks_item.py | 52 +- skyvern/client/types/for_loop_block_yaml.py | 11 +- .../for_loop_block_yaml_loop_blocks_item.py | 27 +- skyvern/client/types/geo_target.py | 46 ++ skyvern/client/types/http_request_block.py | 11 +- .../client/types/http_request_block_yaml.py | 11 +- .../client/types/human_interaction_block.py | 12 +- .../types/human_interaction_block_yaml.py | 11 +- skyvern/client/types/login_block.py | 12 +- skyvern/client/types/login_block_yaml.py | 12 +- skyvern/client/types/navigation_block.py | 12 +- skyvern/client/types/navigation_block_yaml.py | 12 +- .../types/non_empty_password_credential.py | 5 + .../types/password_credential_response.py | 5 + skyvern/client/types/pdf_parser_block.py | 11 +- skyvern/client/types/pdf_parser_block_yaml.py | 11 +- skyvern/client/types/send_email_block.py | 11 +- skyvern/client/types/send_email_block_yaml.py | 11 +- skyvern/client/types/task_block.py | 12 +- skyvern/client/types/task_block_yaml.py | 12 +- skyvern/client/types/task_run_request.py | 5 +- .../types/task_run_request_proxy_location.py | 8 + skyvern/client/types/task_v2block.py | 11 +- skyvern/client/types/task_v2block_yaml.py | 11 +- skyvern/client/types/text_prompt_block.py | 11 +- .../client/types/text_prompt_block_yaml.py | 11 +- skyvern/client/types/upload_to_s3block.py | 11 +- .../client/types/upload_to_s3block_yaml.py | 11 +- skyvern/client/types/url_block.py | 12 +- skyvern/client/types/url_block_yaml.py | 11 +- skyvern/client/types/validation_block.py | 12 +- skyvern/client/types/validation_block_yaml.py | 11 +- skyvern/client/types/wait_block.py | 11 +- skyvern/client/types/wait_block_yaml.py | 11 +- skyvern/client/types/workflow.py | 4 +- .../types/workflow_create_yaml_request.py | 4 +- ...flow_create_yaml_request_proxy_location.py | 10 + skyvern/client/types/workflow_definition.py | 1 + .../types/workflow_definition_blocks_item.py | 52 +- .../client/types/workflow_definition_yaml.py | 1 + .../workflow_definition_yaml_blocks_item.py | 27 +- .../client/types/workflow_proxy_location.py | 8 + skyvern/client/types/workflow_run_request.py | 5 +- .../workflow_run_request_proxy_location.py | 8 + uv.lock | 4 +- 159 files changed, 2793 insertions(+), 2382 deletions(-) rename skyvern-ts/client/src/api/{resources/browserProfiles => }/client/requests/CreateBrowserProfileRequest.ts (100%) rename skyvern-ts/client/src/api/{resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.ts => client/requests/ListBrowserProfilesRequest.ts} (76%) create mode 100644 skyvern-ts/client/src/api/errors/ConflictError.ts delete mode 100644 skyvern-ts/client/src/api/resources/browserProfiles/client/Client.ts delete mode 100644 skyvern-ts/client/src/api/resources/browserProfiles/client/index.ts delete mode 100644 skyvern-ts/client/src/api/resources/browserProfiles/client/requests/index.ts delete mode 100644 skyvern-ts/client/src/api/resources/browserProfiles/index.ts create mode 100644 skyvern-ts/client/src/api/types/BranchCondition.ts create mode 100644 skyvern-ts/client/src/api/types/BranchCriteria.ts create mode 100644 skyvern-ts/client/src/api/types/ConditionalBlock.ts create mode 100644 skyvern-ts/client/src/api/types/GeoTarget.ts create mode 100644 skyvern-ts/client/src/api/types/LocateElementAction.ts delete mode 100644 skyvern-ts/client/tests/wire/browserProfiles.test.ts delete mode 100644 skyvern/client/browser_profiles/__init__.py delete mode 100644 skyvern/client/browser_profiles/client.py delete mode 100644 skyvern/client/browser_profiles/raw_client.py create mode 100644 skyvern/client/errors/conflict_error.py delete mode 100644 skyvern/client/prompts/__init__.py delete mode 100644 skyvern/client/prompts/client.py delete mode 100644 skyvern/client/prompts/raw_client.py create mode 100644 skyvern/client/types/branch_condition.py rename skyvern/client/types/{improve_prompt_response.py => branch_criteria.py} (57%) create mode 100644 skyvern/client/types/conditional_block.py create mode 100644 skyvern/client/types/geo_target.py create mode 100644 skyvern/client/types/task_run_request_proxy_location.py create mode 100644 skyvern/client/types/workflow_create_yaml_request_proxy_location.py create mode 100644 skyvern/client/types/workflow_proxy_location.py create mode 100644 skyvern/client/types/workflow_run_request_proxy_location.py diff --git a/pyproject.toml b/pyproject.toml index a62c7391..40f87509 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "skyvern" -version = "1.0.1" +version = "1.0.2" description = "" authors = [{ name = "Skyvern AI", email = "info@skyvern.com" }] requires-python = ">=3.11,<3.14" diff --git a/skyvern-ts/client/package-lock.json b/skyvern-ts/client/package-lock.json index d007f1f6..97ea6ecf 100644 --- a/skyvern-ts/client/package-lock.json +++ b/skyvern-ts/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "@skyvern/client", - "version": "1.0.0", + "version": "1.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@skyvern/client", - "version": "1.0.0", + "version": "1.0.2", "devDependencies": { "@biomejs/biome": "2.2.5", "@types/node": "^18.19.70", @@ -827,9 +827,9 @@ "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.2.tgz", - "integrity": "sha512-yDPzwsgiFO26RJA4nZo8I+xqzh7sJTZIWQOxn+/XOdPE31lAvLIYCKqjV+lNH/vxE2L2iH3plKxDCRK6i+CwhA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.3.tgz", + "integrity": "sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==", "cpu": [ "arm" ], @@ -841,9 +841,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.2.tgz", - "integrity": "sha512-k8FontTxIE7b0/OGKeSN5B6j25EuppBcWM33Z19JoVT7UTXFSo3D9CdU39wGTeb29NO3XxpMNauh09B+Ibw+9g==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.3.tgz", + "integrity": "sha512-CbDGaMpdE9sh7sCmTrTUyllhrg65t6SwhjlMJsLr+J8YjFuPmCEjbBSx4Z/e4SmDyH3aB5hGaJUP2ltV/vcs4w==", "cpu": [ "arm64" ], @@ -855,9 +855,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.2.tgz", - "integrity": "sha512-A6s4gJpomNBtJ2yioj8bflM2oogDwzUiMl2yNJ2v9E7++sHrSrsQ29fOfn5DM/iCzpWcebNYEdXpaK4tr2RhfQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.3.tgz", + "integrity": "sha512-Nr7SlQeqIBpOV6BHHGZgYBuSdanCXuw09hon14MGOLGmXAFYjx1wNvquVPmpZnl0tLjg25dEdr4IQ6GgyToCUA==", "cpu": [ "arm64" ], @@ -869,9 +869,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.2.tgz", - "integrity": "sha512-e6XqVmXlHrBlG56obu9gDRPW3O3hLxpwHpLsBJvuI8qqnsrtSZ9ERoWUXtPOkY8c78WghyPHZdmPhHLWNdAGEw==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.3.tgz", + "integrity": "sha512-DZ8N4CSNfl965CmPktJ8oBnfYr3F8dTTNBQkRlffnUarJ2ohudQD17sZBa097J8xhQ26AwhHJ5mvUyQW8ddTsQ==", "cpu": [ "x64" ], @@ -883,9 +883,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.2.tgz", - "integrity": "sha512-v0E9lJW8VsrwPux5Qe5CwmH/CF/2mQs6xU1MF3nmUxmZUCHazCjLgYvToOk+YuuUqLQBio1qkkREhxhc656ViA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.3.tgz", + "integrity": "sha512-yMTrCrK92aGyi7GuDNtGn2sNW+Gdb4vErx4t3Gv/Tr+1zRb8ax4z8GWVRfr3Jw8zJWvpGHNpss3vVlbF58DZ4w==", "cpu": [ "arm64" ], @@ -897,9 +897,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.2.tgz", - "integrity": "sha512-ClAmAPx3ZCHtp6ysl4XEhWU69GUB1D+s7G9YjHGhIGCSrsg00nEGRRZHmINYxkdoJehde8VIsDC5t9C0gb6yqA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.3.tgz", + "integrity": "sha512-lMfF8X7QhdQzseM6XaX0vbno2m3hlyZFhwcndRMw8fbAGUGL3WFMBdK0hbUBIUYcEcMhVLr1SIamDeuLBnXS+Q==", "cpu": [ "x64" ], @@ -911,9 +911,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.2.tgz", - "integrity": "sha512-EPlb95nUsz6Dd9Qy13fI5kUPXNSljaG9FiJ4YUGU1O/Q77i5DYFW5KR8g1OzTcdZUqQQ1KdDqsTohdFVwCwjqg==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.3.tgz", + "integrity": "sha512-k9oD15soC/Ln6d2Wv/JOFPzZXIAIFLp6B+i14KhxAfnq76ajt0EhYc5YPeX6W1xJkAdItcVT+JhKl1QZh44/qw==", "cpu": [ "arm" ], @@ -925,9 +925,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.2.tgz", - "integrity": "sha512-BOmnVW+khAUX+YZvNfa0tGTEMVVEerOxN0pDk2E6N6DsEIa2Ctj48FOMfNDdrwinocKaC7YXUZ1pHlKpnkja/Q==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.3.tgz", + "integrity": "sha512-vTNlKq+N6CK/8UktsrFuc+/7NlEYVxgaEgRXVUVK258Z5ymho29skzW1sutgYjqNnquGwVUObAaxae8rZ6YMhg==", "cpu": [ "arm" ], @@ -939,9 +939,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.2.tgz", - "integrity": "sha512-Xt2byDZ+6OVNuREgBXr4+CZDJtrVso5woFtpKdGPhpTPHcNG7D8YXeQzpNbFRxzTVqJf7kvPMCub/pcGUWgBjA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.3.tgz", + "integrity": "sha512-RGrFLWgMhSxRs/EWJMIFM1O5Mzuz3Xy3/mnxJp/5cVhZ2XoCAxJnmNsEyeMJtpK+wu0FJFWz+QF4mjCA7AUQ3w==", "cpu": [ "arm64" ], @@ -953,9 +953,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.2.tgz", - "integrity": "sha512-+LdZSldy/I9N8+klim/Y1HsKbJ3BbInHav5qE9Iy77dtHC/pibw1SR/fXlWyAk0ThnpRKoODwnAuSjqxFRDHUQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.3.tgz", + "integrity": "sha512-kASyvfBEWYPEwe0Qv4nfu6pNkITLTb32p4yTgzFCocHnJLAHs+9LjUu9ONIhvfT/5lv4YS5muBHyuV84epBo/A==", "cpu": [ "arm64" ], @@ -967,9 +967,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.2.tgz", - "integrity": "sha512-8ms8sjmyc1jWJS6WdNSA23rEfdjWB30LH8Wqj0Cqvv7qSHnvw6kgMMXRdop6hkmGPlyYBdRPkjJnj3KCUHV/uQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.3.tgz", + "integrity": "sha512-JiuKcp2teLJwQ7vkJ95EwESWkNRFJD7TQgYmCnrPtlu50b4XvT5MOmurWNrCj3IFdyjBQ5p9vnrX4JM6I8OE7g==", "cpu": [ "loong64" ], @@ -981,9 +981,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.2.tgz", - "integrity": "sha512-3HRQLUQbpBDMmzoxPJYd3W6vrVHOo2cVW8RUo87Xz0JPJcBLBr5kZ1pGcQAhdZgX9VV7NbGNipah1omKKe23/g==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.3.tgz", + "integrity": "sha512-EoGSa8nd6d3T7zLuqdojxC20oBfNT8nexBbB/rkxgKj5T5vhpAQKKnD+h3UkoMuTyXkP5jTjK/ccNRmQrPNDuw==", "cpu": [ "ppc64" ], @@ -995,9 +995,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.2.tgz", - "integrity": "sha512-fMjKi+ojnmIvhk34gZP94vjogXNNUKMEYs+EDaB/5TG/wUkoeua7p7VCHnE6T2Tx+iaghAqQX8teQzcvrYpaQA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.3.tgz", + "integrity": "sha512-4s+Wped2IHXHPnAEbIB0YWBv7SDohqxobiiPA1FIWZpX+w9o2i4LezzH/NkFUl8LRci/8udci6cLq+jJQlh+0g==", "cpu": [ "riscv64" ], @@ -1009,9 +1009,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.2.tgz", - "integrity": "sha512-XuGFGU+VwUUV5kLvoAdi0Wz5Xbh2SrjIxCtZj6Wq8MDp4bflb/+ThZsVxokM7n0pcbkEr2h5/pzqzDYI7cCgLQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.3.tgz", + "integrity": "sha512-68k2g7+0vs2u9CxDt5ktXTngsxOQkSEV/xBbwlqYcUrAVh6P9EgMZvFsnHy4SEiUl46Xf0IObWVbMvPrr2gw8A==", "cpu": [ "riscv64" ], @@ -1023,9 +1023,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.2.tgz", - "integrity": "sha512-w6yjZF0P+NGzWR3AXWX9zc0DNEGdtvykB03uhonSHMRa+oWA6novflo2WaJr6JZakG2ucsyb+rvhrKac6NIy+w==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.3.tgz", + "integrity": "sha512-VYsFMpULAz87ZW6BVYw3I6sWesGpsP9OPcyKe8ofdg9LHxSbRMd7zrVrr5xi/3kMZtpWL/wC+UIJWJYVX5uTKg==", "cpu": [ "s390x" ], @@ -1037,9 +1037,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.2.tgz", - "integrity": "sha512-yo8d6tdfdeBArzC7T/PnHd7OypfI9cbuZzPnzLJIyKYFhAQ8SvlkKtKBMbXDxe1h03Rcr7u++nFS7tqXz87Gtw==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.3.tgz", + "integrity": "sha512-3EhFi1FU6YL8HTUJZ51imGJWEX//ajQPfqWLI3BQq4TlvHy4X0MOr5q3D2Zof/ka0d5FNdPwZXm3Yyib/UEd+w==", "cpu": [ "x64" ], @@ -1051,9 +1051,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.2.tgz", - "integrity": "sha512-ah59c1YkCxKExPP8O9PwOvs+XRLKwh/mV+3YdKqQ5AMQ0r4M4ZDuOrpWkUaqO7fzAHdINzV9tEVu8vNw48z0lA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.3.tgz", + "integrity": "sha512-eoROhjcc6HbZCJr+tvVT8X4fW3/5g/WkGvvmwz/88sDtSJzO7r/blvoBDgISDiCjDRZmHpwud7h+6Q9JxFwq1Q==", "cpu": [ "x64" ], @@ -1065,9 +1065,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.2.tgz", - "integrity": "sha512-4VEd19Wmhr+Zy7hbUsFZ6YXEiP48hE//KPLCSVNY5RMGX2/7HZ+QkN55a3atM1C/BZCGIgqN+xrVgtdak2S9+A==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.3.tgz", + "integrity": "sha512-OueLAWgrNSPGAdUdIjSWXw+u/02BRTcnfw9PN41D2vq/JSEPnJnVuBgw18VkN8wcd4fjUs+jFHVM4t9+kBSNLw==", "cpu": [ "arm64" ], @@ -1079,9 +1079,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.2.tgz", - "integrity": "sha512-IlbHFYc/pQCgew/d5fslcy1KEaYVCJ44G8pajugd8VoOEI8ODhtb/j8XMhLpwHCMB3yk2J07ctup10gpw2nyMA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.3.tgz", + "integrity": "sha512-GOFuKpsxR/whszbF/bzydebLiXIHSgsEUp6M0JI8dWvi+fFa1TD6YQa4aSZHtpmh2/uAlj/Dy+nmby3TJ3pkTw==", "cpu": [ "arm64" ], @@ -1093,9 +1093,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.2.tgz", - "integrity": "sha512-lNlPEGgdUfSzdCWU176ku/dQRnA7W+Gp8d+cWv73jYrb8uT7HTVVxq62DUYxjbaByuf1Yk0RIIAbDzp+CnOTFg==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.3.tgz", + "integrity": "sha512-iah+THLcBJdpfZ1TstDFbKNznlzoxa8fmnFYK4V67HvmuNYkVdAywJSoteUszvBQ9/HqN2+9AZghbajMsFT+oA==", "cpu": [ "ia32" ], @@ -1107,9 +1107,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.2.tgz", - "integrity": "sha512-S6YojNVrHybQis2lYov1sd+uj7K0Q05NxHcGktuMMdIQ2VixGwAfbJ23NnlvvVV1bdpR2m5MsNBViHJKcA4ADw==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.3.tgz", + "integrity": "sha512-J9QDiOIZlZLdcot5NXEepDkstocktoVjkaKUtqzgzpt2yWjGlbYiKyp05rWwk4nypbYUNoFAztEgixoLaSETkg==", "cpu": [ "x64" ], @@ -1121,9 +1121,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.2.tgz", - "integrity": "sha512-k+/Rkcyx//P6fetPoLMb8pBeqJBNGx81uuf7iljX9++yNBVRDQgD04L+SVXmXmh5ZP4/WOp4mWF0kmi06PW2tA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.3.tgz", + "integrity": "sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ==", "cpu": [ "x64" ], @@ -1586,9 +1586,9 @@ } }, "node_modules/baseline-browser-mapping": { - "version": "2.8.28", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.28.tgz", - "integrity": "sha512-gYjt7OIqdM0PcttNYP2aVrr2G0bMALkBaoehD4BuRGjAOtipg0b6wHg1yNL+s5zSnLZZrGHOw4IrND8CD+3oIQ==", + "version": "2.8.32", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.32.tgz", + "integrity": "sha512-OPz5aBThlyLFgxyhdwf/s2+8ab3OvT7AdTNvKHBwpXomIYeXqpUUuT8LrdtxZSsWJ4R4CU1un4XGh5Ez3nlTpw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -1660,9 +1660,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001754", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz", - "integrity": "sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg==", + "version": "1.0.30001757", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001757.tgz", + "integrity": "sha512-r0nnL/I28Zi/yjk1el6ilj27tKcdjLsNqAOZr0yVjWPrSQyHgKI2INaEWw21bAQSv2LXRt1XuCS/GomNpWOxsQ==", "dev": true, "funding": [ { @@ -1843,9 +1843,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.253", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.253.tgz", - "integrity": "sha512-O0tpQ/35rrgdiGQ0/OFWhy1itmd9A6TY9uQzlqj3hKSu/aYpe7UIn5d7CU2N9myH6biZiWF3VMZVuup8pw5U9w==", + "version": "1.5.263", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.263.tgz", + "integrity": "sha512-DrqJ11Knd+lo+dv+lltvfMDLU27g14LMdH2b0O3Pio4uk0x+z7OR+JrmyacTPN2M8w3BrZ7/RTwG3R9B7irPlg==", "dev": true, "license": "ISC" }, @@ -2477,9 +2477,9 @@ "license": "MIT" }, "node_modules/rollup": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.2.tgz", - "integrity": "sha512-MHngMYwGJVi6Fmnk6ISmnk7JAHRNF0UkuucA0CUW3N3a4KnONPEZz+vUanQP/ZC/iY1Qkf3bwPWzyY84wEks1g==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.3.tgz", + "integrity": "sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==", "dev": true, "license": "MIT", "dependencies": { @@ -2493,28 +2493,28 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.53.2", - "@rollup/rollup-android-arm64": "4.53.2", - "@rollup/rollup-darwin-arm64": "4.53.2", - "@rollup/rollup-darwin-x64": "4.53.2", - "@rollup/rollup-freebsd-arm64": "4.53.2", - "@rollup/rollup-freebsd-x64": "4.53.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.53.2", - "@rollup/rollup-linux-arm-musleabihf": "4.53.2", - "@rollup/rollup-linux-arm64-gnu": "4.53.2", - "@rollup/rollup-linux-arm64-musl": "4.53.2", - "@rollup/rollup-linux-loong64-gnu": "4.53.2", - "@rollup/rollup-linux-ppc64-gnu": "4.53.2", - "@rollup/rollup-linux-riscv64-gnu": "4.53.2", - "@rollup/rollup-linux-riscv64-musl": "4.53.2", - "@rollup/rollup-linux-s390x-gnu": "4.53.2", - "@rollup/rollup-linux-x64-gnu": "4.53.2", - "@rollup/rollup-linux-x64-musl": "4.53.2", - "@rollup/rollup-openharmony-arm64": "4.53.2", - "@rollup/rollup-win32-arm64-msvc": "4.53.2", - "@rollup/rollup-win32-ia32-msvc": "4.53.2", - "@rollup/rollup-win32-x64-gnu": "4.53.2", - "@rollup/rollup-win32-x64-msvc": "4.53.2", + "@rollup/rollup-android-arm-eabi": "4.53.3", + "@rollup/rollup-android-arm64": "4.53.3", + "@rollup/rollup-darwin-arm64": "4.53.3", + "@rollup/rollup-darwin-x64": "4.53.3", + "@rollup/rollup-freebsd-arm64": "4.53.3", + "@rollup/rollup-freebsd-x64": "4.53.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.53.3", + "@rollup/rollup-linux-arm-musleabihf": "4.53.3", + "@rollup/rollup-linux-arm64-gnu": "4.53.3", + "@rollup/rollup-linux-arm64-musl": "4.53.3", + "@rollup/rollup-linux-loong64-gnu": "4.53.3", + "@rollup/rollup-linux-ppc64-gnu": "4.53.3", + "@rollup/rollup-linux-riscv64-gnu": "4.53.3", + "@rollup/rollup-linux-riscv64-musl": "4.53.3", + "@rollup/rollup-linux-s390x-gnu": "4.53.3", + "@rollup/rollup-linux-x64-gnu": "4.53.3", + "@rollup/rollup-linux-x64-musl": "4.53.3", + "@rollup/rollup-openharmony-arm64": "4.53.3", + "@rollup/rollup-win32-arm64-msvc": "4.53.3", + "@rollup/rollup-win32-ia32-msvc": "4.53.3", + "@rollup/rollup-win32-x64-gnu": "4.53.3", + "@rollup/rollup-win32-x64-msvc": "4.53.3", "fsevents": "~2.3.2" } }, @@ -2889,22 +2889,22 @@ } }, "node_modules/tldts": { - "version": "7.0.17", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.0.17.tgz", - "integrity": "sha512-Y1KQBgDd/NUc+LfOtKS6mNsC9CCaH+m2P1RoIZy7RAPo3C3/t8X45+zgut31cRZtZ3xKPjfn3TkGTrctC2TQIQ==", + "version": "7.0.19", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.0.19.tgz", + "integrity": "sha512-8PWx8tvC4jDB39BQw1m4x8y5MH1BcQ5xHeL2n7UVFulMPH/3Q0uiamahFJ3lXA0zO2SUyRXuVVbWSDmstlt9YA==", "dev": true, "license": "MIT", "dependencies": { - "tldts-core": "^7.0.17" + "tldts-core": "^7.0.19" }, "bin": { "tldts": "bin/cli.js" } }, "node_modules/tldts-core": { - "version": "7.0.17", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.17.tgz", - "integrity": "sha512-DieYoGrP78PWKsrXr8MZwtQ7GLCUeLxihtjC1jZsW1DnvSMdKPitJSe8OSYDM2u5H6g3kWJZpePqkp43TfLh0g==", + "version": "7.0.19", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.19.tgz", + "integrity": "sha512-lJX2dEWx0SGH4O6p+7FPwYmJ/bu1JbcGJ8RLaG9b7liIgZ85itUVEPbMtWRVrde/0fnDPEPHW10ZsKW3kVsE9A==", "dev": true, "license": "MIT" }, @@ -3096,9 +3096,9 @@ "peer": true }, "node_modules/vite-node/node_modules/vite": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.2.2.tgz", - "integrity": "sha512-BxAKBWmIbrDgrokdGZH1IgkIk/5mMHDreLDmCJ0qpyJaAteP8NvMhkwr/ZCQNqNH97bw/dANTE9PDzqwJghfMQ==", + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.2.6.tgz", + "integrity": "sha512-tI2l/nFHC5rLh7+5+o7QjKjSR04ivXDF4jcgV0f/bTQ+OJiITy5S6gaynVsEM+7RqzufMnVbIon6Sr5x1SDYaQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3302,9 +3302,9 @@ } }, "node_modules/vitest/node_modules/vite": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.2.2.tgz", - "integrity": "sha512-BxAKBWmIbrDgrokdGZH1IgkIk/5mMHDreLDmCJ0qpyJaAteP8NvMhkwr/ZCQNqNH97bw/dANTE9PDzqwJghfMQ==", + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.2.6.tgz", + "integrity": "sha512-tI2l/nFHC5rLh7+5+o7QjKjSR04ivXDF4jcgV0f/bTQ+OJiITy5S6gaynVsEM+7RqzufMnVbIon6Sr5x1SDYaQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3391,9 +3391,9 @@ } }, "node_modules/webpack": { - "version": "5.102.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.102.1.tgz", - "integrity": "sha512-7h/weGm9d/ywQ6qzJ+Xy+r9n/3qgp/thalBbpOi5i223dPXKi04IBtqPN9nTd+jBc7QKfvDbaBnFipYp4sJAUQ==", + "version": "5.103.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.103.0.tgz", + "integrity": "sha512-HU1JOuV1OavsZ+mfigY0j8d1TgQgbZ6M+J75zDkpEAwYeXjWSqrGJtgnPblJjd/mAyTNQ7ygw0MiKOn6etz8yw==", "dev": true, "license": "MIT", "dependencies": { @@ -3414,7 +3414,7 @@ "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", + "loader-runner": "^4.3.1", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^4.3.3", diff --git a/skyvern-ts/client/package.json b/skyvern-ts/client/package.json index 78298788..09050a6f 100644 --- a/skyvern-ts/client/package.json +++ b/skyvern-ts/client/package.json @@ -1,6 +1,6 @@ { "name": "@skyvern/client", - "version": "1.0.0", + "version": "1.0.2", "private": false, "repository": { "type": "git", diff --git a/skyvern-ts/client/reference.md b/skyvern-ts/client/reference.md index 8fcc22da..d92184a3 100644 --- a/skyvern-ts/client/reference.md +++ b/skyvern-ts/client/reference.md @@ -475,249 +475,6 @@ await client.workflows.updateWorkflowFolder("wpid_123"); - - - - -## BrowserProfiles -
client.browserProfiles.listBrowserProfiles({ ...params }) -> Skyvern.BrowserProfile[] -
-
- -#### 📝 Description - -
-
- -
-
- -Get all browser profiles for the organization -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.browserProfiles.listBrowserProfiles({ - include_deleted: true -}); - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Skyvern.ListBrowserProfilesV1BrowserProfilesGetRequest` - -
-
- -
-
- -**requestOptions:** `BrowserProfiles.RequestOptions` - -
-
-
-
- - -
-
-
- -
client.browserProfiles.createBrowserProfile({ ...params }) -> Skyvern.BrowserProfile -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.browserProfiles.createBrowserProfile({ - name: "name" -}); - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Skyvern.CreateBrowserProfileRequest` - -
-
- -
-
- -**requestOptions:** `BrowserProfiles.RequestOptions` - -
-
-
-
- - -
-
-
- -
client.browserProfiles.getBrowserProfile(profileId) -> Skyvern.BrowserProfile -
-
- -#### 📝 Description - -
-
- -
-
- -Get a specific browser profile by ID -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.browserProfiles.getBrowserProfile("bp_123456"); - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**profileId:** `string` — The ID of the browser profile. browser_profile_id starts with `bp_` - -
-
- -
-
- -**requestOptions:** `BrowserProfiles.RequestOptions` - -
-
-
-
- - -
-
-
- -
client.browserProfiles.deleteBrowserProfile(profileId) -> void -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a browser profile (soft delete) -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.browserProfiles.deleteBrowserProfile("bp_123456"); - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**profileId:** `string` — The ID of the browser profile to delete. browser_profile_id starts with `bp_` - -
-
- -
-
- -**requestOptions:** `BrowserProfiles.RequestOptions` - -
-
-
-
- -
diff --git a/skyvern-ts/client/src/Client.ts b/skyvern-ts/client/src/Client.ts index 39f59415..5e335983 100644 --- a/skyvern-ts/client/src/Client.ts +++ b/skyvern-ts/client/src/Client.ts @@ -1,7 +1,6 @@ // This file was auto-generated by Fern from our API Definition. import * as Skyvern from "./api/index.js"; -import { BrowserProfiles } from "./api/resources/browserProfiles/client/Client.js"; import { Scripts } from "./api/resources/scripts/client/Client.js"; import { Workflows } from "./api/resources/workflows/client/Client.js"; import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js"; @@ -19,7 +18,6 @@ export declare namespace SkyvernClient { export class SkyvernClient { protected readonly _options: SkyvernClient.Options; protected _workflows: Workflows | undefined; - protected _browserProfiles: BrowserProfiles | undefined; protected _scripts: Scripts | undefined; constructor(_options: SkyvernClient.Options = {}) { @@ -30,8 +28,8 @@ export class SkyvernClient { "x-api-key": _options?.apiKey, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@skyvern/client", - "X-Fern-SDK-Version": "1.0.0", - "User-Agent": "@skyvern/client/1.0.0", + "X-Fern-SDK-Version": "1.0.2", + "User-Agent": "@skyvern/client/1.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -44,10 +42,6 @@ export class SkyvernClient { return (this._workflows ??= new Workflows(this._options)); } - public get browserProfiles(): BrowserProfiles { - return (this._browserProfiles ??= new BrowserProfiles(this._options)); - } - public get scripts(): Scripts { return (this._scripts ??= new Scripts(this._options)); } @@ -1102,6 +1096,335 @@ export class SkyvernClient { } } + /** + * Get all browser profiles for the organization + * + * @param {Skyvern.ListBrowserProfilesRequest} request + * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Skyvern.UnprocessableEntityError} + * + * @example + * await client.listBrowserProfiles({ + * include_deleted: true + * }) + */ + public listBrowserProfiles( + request: Skyvern.ListBrowserProfilesRequest = {}, + requestOptions?: SkyvernClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__listBrowserProfiles(request, requestOptions)); + } + + private async __listBrowserProfiles( + request: Skyvern.ListBrowserProfilesRequest = {}, + requestOptions?: SkyvernClient.RequestOptions, + ): Promise> { + const { include_deleted: includeDeleted } = request; + const _queryParams: Record = {}; + if (includeDeleted != null) { + _queryParams.include_deleted = includeDeleted.toString(); + } + + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SkyvernEnvironment.Cloud, + "v1/browser_profiles", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { data: _response.body as Skyvern.BrowserProfile[], rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse); + default: + throw new errors.SkyvernError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SkyvernError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/browser_profiles."); + case "unknown": + throw new errors.SkyvernError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Create a browser profile from a persistent browser session or workflow run. + * + * @param {Skyvern.CreateBrowserProfileRequest} request + * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Skyvern.BadRequestError} + * @throws {@link Skyvern.ConflictError} + * @throws {@link Skyvern.UnprocessableEntityError} + * + * @example + * await client.createBrowserProfile({ + * name: "name" + * }) + */ + public createBrowserProfile( + request: Skyvern.CreateBrowserProfileRequest, + requestOptions?: SkyvernClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__createBrowserProfile(request, requestOptions)); + } + + private async __createBrowserProfile( + request: Skyvern.CreateBrowserProfileRequest, + requestOptions?: SkyvernClient.RequestOptions, + ): Promise> { + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SkyvernEnvironment.Cloud, + "v1/browser_profiles", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { data: _response.body as Skyvern.BrowserProfile, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Skyvern.BadRequestError(_response.error.body as unknown, _response.rawResponse); + case 409: + throw new Skyvern.ConflictError(_response.error.body as unknown, _response.rawResponse); + case 422: + throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse); + default: + throw new errors.SkyvernError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SkyvernError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/browser_profiles."); + case "unknown": + throw new errors.SkyvernError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Get a specific browser profile by ID + * + * @param {string} profileId - The ID of the browser profile. browser_profile_id starts with `bp_` + * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Skyvern.NotFoundError} + * @throws {@link Skyvern.UnprocessableEntityError} + * + * @example + * await client.getBrowserProfile("bp_123456") + */ + public getBrowserProfile( + profileId: string, + requestOptions?: SkyvernClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__getBrowserProfile(profileId, requestOptions)); + } + + private async __getBrowserProfile( + profileId: string, + requestOptions?: SkyvernClient.RequestOptions, + ): Promise> { + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SkyvernEnvironment.Cloud, + `v1/browser_profiles/${core.url.encodePathParam(profileId)}`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { data: _response.body as Skyvern.BrowserProfile, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 404: + throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse); + case 422: + throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse); + default: + throw new errors.SkyvernError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SkyvernError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.SkyvernTimeoutError( + "Timeout exceeded when calling GET /v1/browser_profiles/{profile_id}.", + ); + case "unknown": + throw new errors.SkyvernError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Delete a browser profile (soft delete) + * + * @param {string} profileId - The ID of the browser profile to delete. browser_profile_id starts with `bp_` + * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Skyvern.NotFoundError} + * @throws {@link Skyvern.UnprocessableEntityError} + * + * @example + * await client.deleteBrowserProfile("bp_123456") + */ + public deleteBrowserProfile( + profileId: string, + requestOptions?: SkyvernClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__deleteBrowserProfile(profileId, requestOptions)); + } + + private async __deleteBrowserProfile( + profileId: string, + requestOptions?: SkyvernClient.RequestOptions, + ): Promise> { + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SkyvernEnvironment.Cloud, + `v1/browser_profiles/${core.url.encodePathParam(profileId)}`, + ), + method: "DELETE", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { data: undefined, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 404: + throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse); + case 422: + throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse); + default: + throw new errors.SkyvernError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SkyvernError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.SkyvernTimeoutError( + "Timeout exceeded when calling DELETE /v1/browser_profiles/{profile_id}.", + ); + case "unknown": + throw new errors.SkyvernError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + /** * Get all active browser sessions for the organization * diff --git a/skyvern-ts/client/src/api/resources/browserProfiles/client/requests/CreateBrowserProfileRequest.ts b/skyvern-ts/client/src/api/client/requests/CreateBrowserProfileRequest.ts similarity index 100% rename from skyvern-ts/client/src/api/resources/browserProfiles/client/requests/CreateBrowserProfileRequest.ts rename to skyvern-ts/client/src/api/client/requests/CreateBrowserProfileRequest.ts diff --git a/skyvern-ts/client/src/api/resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.ts b/skyvern-ts/client/src/api/client/requests/ListBrowserProfilesRequest.ts similarity index 76% rename from skyvern-ts/client/src/api/resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.ts rename to skyvern-ts/client/src/api/client/requests/ListBrowserProfilesRequest.ts index f608e5b5..eede6274 100644 --- a/skyvern-ts/client/src/api/resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.ts +++ b/skyvern-ts/client/src/api/client/requests/ListBrowserProfilesRequest.ts @@ -6,7 +6,7 @@ * include_deleted: true * } */ -export interface ListBrowserProfilesV1BrowserProfilesGetRequest { +export interface ListBrowserProfilesRequest { /** Include deleted browser profiles */ include_deleted?: boolean; } diff --git a/skyvern-ts/client/src/api/client/requests/LoginRequest.ts b/skyvern-ts/client/src/api/client/requests/LoginRequest.ts index 5f5ff48e..567f3931 100644 --- a/skyvern-ts/client/src/api/client/requests/LoginRequest.ts +++ b/skyvern-ts/client/src/api/client/requests/LoginRequest.ts @@ -25,6 +25,8 @@ export interface LoginRequest { totp_url?: string; /** ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456` */ browser_session_id?: string; + /** ID of a browser profile to reuse for this run */ + browser_profile_id?: string; /** The CDP address for the task. */ browser_address?: string; /** Additional HTTP headers to include in requests */ diff --git a/skyvern-ts/client/src/api/client/requests/index.ts b/skyvern-ts/client/src/api/client/requests/index.ts index 9f1a7783..c8065769 100644 --- a/skyvern-ts/client/src/api/client/requests/index.ts +++ b/skyvern-ts/client/src/api/client/requests/index.ts @@ -1,3 +1,4 @@ +export type { CreateBrowserProfileRequest } from "./CreateBrowserProfileRequest.js"; export type { CreateBrowserSessionRequest } from "./CreateBrowserSessionRequest.js"; export type { CreateCredentialRequest } from "./CreateCredentialRequest.js"; export type { CreateScriptRequest } from "./CreateScriptRequest.js"; @@ -7,6 +8,7 @@ export type { GetCredentialsRequest } from "./GetCredentialsRequest.js"; export type { GetRunArtifactsRequest } from "./GetRunArtifactsRequest.js"; export type { GetScriptsRequest } from "./GetScriptsRequest.js"; export type { GetWorkflowsRequest } from "./GetWorkflowsRequest.js"; +export type { ListBrowserProfilesRequest } from "./ListBrowserProfilesRequest.js"; export type { LoginRequest } from "./LoginRequest.js"; export type { RunSdkActionRequest } from "./RunSdkActionRequest.js"; export type { RunTaskRequest } from "./RunTaskRequest.js"; diff --git a/skyvern-ts/client/src/api/errors/ConflictError.ts b/skyvern-ts/client/src/api/errors/ConflictError.ts new file mode 100644 index 00000000..3a473d8d --- /dev/null +++ b/skyvern-ts/client/src/api/errors/ConflictError.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as core from "../../core/index.js"; +import * as errors from "../../errors/index.js"; + +export class ConflictError extends errors.SkyvernError { + constructor(body?: unknown, rawResponse?: core.RawResponse) { + super({ + message: "ConflictError", + statusCode: 409, + body: body, + rawResponse: rawResponse, + }); + Object.setPrototypeOf(this, ConflictError.prototype); + } +} diff --git a/skyvern-ts/client/src/api/errors/index.ts b/skyvern-ts/client/src/api/errors/index.ts index cfbcfd0f..2f175d20 100644 --- a/skyvern-ts/client/src/api/errors/index.ts +++ b/skyvern-ts/client/src/api/errors/index.ts @@ -1,4 +1,5 @@ export * from "./BadRequestError.js"; +export * from "./ConflictError.js"; export * from "./ForbiddenError.js"; export * from "./NotFoundError.js"; export * from "./UnprocessableEntityError.js"; diff --git a/skyvern-ts/client/src/api/resources/browserProfiles/client/Client.ts b/skyvern-ts/client/src/api/resources/browserProfiles/client/Client.ts deleted file mode 100644 index 919b2cdb..00000000 --- a/skyvern-ts/client/src/api/resources/browserProfiles/client/Client.ts +++ /dev/null @@ -1,343 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; -import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; -import * as core from "../../../../core/index.js"; -import * as environments from "../../../../environments.js"; -import * as errors from "../../../../errors/index.js"; -import * as Skyvern from "../../../index.js"; - -export declare namespace BrowserProfiles { - export interface Options extends BaseClientOptions {} - - export interface RequestOptions extends BaseRequestOptions {} -} - -export class BrowserProfiles { - protected readonly _options: BrowserProfiles.Options; - - constructor(_options: BrowserProfiles.Options = {}) { - this._options = _options; - } - - /** - * Get all browser profiles for the organization - * - * @param {Skyvern.ListBrowserProfilesV1BrowserProfilesGetRequest} request - * @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Skyvern.UnprocessableEntityError} - * - * @example - * await client.browserProfiles.listBrowserProfiles({ - * include_deleted: true - * }) - */ - public listBrowserProfiles( - request: Skyvern.ListBrowserProfilesV1BrowserProfilesGetRequest = {}, - requestOptions?: BrowserProfiles.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__listBrowserProfiles(request, requestOptions)); - } - - private async __listBrowserProfiles( - request: Skyvern.ListBrowserProfilesV1BrowserProfilesGetRequest = {}, - requestOptions?: BrowserProfiles.RequestOptions, - ): Promise> { - const { include_deleted: includeDeleted } = request; - const _queryParams: Record = {}; - if (includeDeleted != null) { - _queryParams.include_deleted = includeDeleted.toString(); - } - - const _headers: core.Fetcher.Args["headers"] = mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), - requestOptions?.headers, - ); - const _response = await core.fetcher({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.SkyvernEnvironment.Cloud, - "v1/browser_profiles", - ), - method: "GET", - headers: _headers, - queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return { data: _response.body as Skyvern.BrowserProfile[], rawResponse: _response.rawResponse }; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 422: - throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse); - default: - throw new errors.SkyvernError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.SkyvernError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - rawResponse: _response.rawResponse, - }); - case "timeout": - throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/browser_profiles."); - case "unknown": - throw new errors.SkyvernError({ - message: _response.error.errorMessage, - rawResponse: _response.rawResponse, - }); - } - } - - /** - * @param {Skyvern.CreateBrowserProfileRequest} request - * @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Skyvern.UnprocessableEntityError} - * - * @example - * await client.browserProfiles.createBrowserProfile({ - * name: "name" - * }) - */ - public createBrowserProfile( - request: Skyvern.CreateBrowserProfileRequest, - requestOptions?: BrowserProfiles.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__createBrowserProfile(request, requestOptions)); - } - - private async __createBrowserProfile( - request: Skyvern.CreateBrowserProfileRequest, - requestOptions?: BrowserProfiles.RequestOptions, - ): Promise> { - const _headers: core.Fetcher.Args["headers"] = mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), - requestOptions?.headers, - ); - const _response = await core.fetcher({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.SkyvernEnvironment.Cloud, - "v1/browser_profiles", - ), - method: "POST", - headers: _headers, - contentType: "application/json", - queryParameters: requestOptions?.queryParams, - requestType: "json", - body: request, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return { data: _response.body as Skyvern.BrowserProfile, rawResponse: _response.rawResponse }; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 422: - throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse); - default: - throw new errors.SkyvernError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.SkyvernError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - rawResponse: _response.rawResponse, - }); - case "timeout": - throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/browser_profiles."); - case "unknown": - throw new errors.SkyvernError({ - message: _response.error.errorMessage, - rawResponse: _response.rawResponse, - }); - } - } - - /** - * Get a specific browser profile by ID - * - * @param {string} profileId - The ID of the browser profile. browser_profile_id starts with `bp_` - * @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Skyvern.NotFoundError} - * @throws {@link Skyvern.UnprocessableEntityError} - * - * @example - * await client.browserProfiles.getBrowserProfile("bp_123456") - */ - public getBrowserProfile( - profileId: string, - requestOptions?: BrowserProfiles.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__getBrowserProfile(profileId, requestOptions)); - } - - private async __getBrowserProfile( - profileId: string, - requestOptions?: BrowserProfiles.RequestOptions, - ): Promise> { - const _headers: core.Fetcher.Args["headers"] = mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), - requestOptions?.headers, - ); - const _response = await core.fetcher({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.SkyvernEnvironment.Cloud, - `v1/browser_profiles/${core.url.encodePathParam(profileId)}`, - ), - method: "GET", - headers: _headers, - queryParameters: requestOptions?.queryParams, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return { data: _response.body as Skyvern.BrowserProfile, rawResponse: _response.rawResponse }; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 404: - throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse); - case 422: - throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse); - default: - throw new errors.SkyvernError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.SkyvernError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - rawResponse: _response.rawResponse, - }); - case "timeout": - throw new errors.SkyvernTimeoutError( - "Timeout exceeded when calling GET /v1/browser_profiles/{profile_id}.", - ); - case "unknown": - throw new errors.SkyvernError({ - message: _response.error.errorMessage, - rawResponse: _response.rawResponse, - }); - } - } - - /** - * Delete a browser profile (soft delete) - * - * @param {string} profileId - The ID of the browser profile to delete. browser_profile_id starts with `bp_` - * @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Skyvern.NotFoundError} - * @throws {@link Skyvern.UnprocessableEntityError} - * - * @example - * await client.browserProfiles.deleteBrowserProfile("bp_123456") - */ - public deleteBrowserProfile( - profileId: string, - requestOptions?: BrowserProfiles.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__deleteBrowserProfile(profileId, requestOptions)); - } - - private async __deleteBrowserProfile( - profileId: string, - requestOptions?: BrowserProfiles.RequestOptions, - ): Promise> { - const _headers: core.Fetcher.Args["headers"] = mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), - requestOptions?.headers, - ); - const _response = await core.fetcher({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.SkyvernEnvironment.Cloud, - `v1/browser_profiles/${core.url.encodePathParam(profileId)}`, - ), - method: "DELETE", - headers: _headers, - queryParameters: requestOptions?.queryParams, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return { data: undefined, rawResponse: _response.rawResponse }; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 404: - throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse); - case 422: - throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse); - default: - throw new errors.SkyvernError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.SkyvernError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - rawResponse: _response.rawResponse, - }); - case "timeout": - throw new errors.SkyvernTimeoutError( - "Timeout exceeded when calling DELETE /v1/browser_profiles/{profile_id}.", - ); - case "unknown": - throw new errors.SkyvernError({ - message: _response.error.errorMessage, - rawResponse: _response.rawResponse, - }); - } - } -} diff --git a/skyvern-ts/client/src/api/resources/browserProfiles/client/index.ts b/skyvern-ts/client/src/api/resources/browserProfiles/client/index.ts deleted file mode 100644 index 195f9aa8..00000000 --- a/skyvern-ts/client/src/api/resources/browserProfiles/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests/index.js"; diff --git a/skyvern-ts/client/src/api/resources/browserProfiles/client/requests/index.ts b/skyvern-ts/client/src/api/resources/browserProfiles/client/requests/index.ts deleted file mode 100644 index cf162a87..00000000 --- a/skyvern-ts/client/src/api/resources/browserProfiles/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export type { CreateBrowserProfileRequest } from "./CreateBrowserProfileRequest.js"; -export type { ListBrowserProfilesV1BrowserProfilesGetRequest } from "./ListBrowserProfilesV1BrowserProfilesGetRequest.js"; diff --git a/skyvern-ts/client/src/api/resources/browserProfiles/index.ts b/skyvern-ts/client/src/api/resources/browserProfiles/index.ts deleted file mode 100644 index 914b8c3c..00000000 --- a/skyvern-ts/client/src/api/resources/browserProfiles/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./client/index.js"; diff --git a/skyvern-ts/client/src/api/resources/index.ts b/skyvern-ts/client/src/api/resources/index.ts index 540d813e..9852fa96 100644 --- a/skyvern-ts/client/src/api/resources/index.ts +++ b/skyvern-ts/client/src/api/resources/index.ts @@ -1,5 +1,3 @@ -export * from "./browserProfiles/client/requests/index.js"; -export * as browserProfiles from "./browserProfiles/index.js"; export * as scripts from "./scripts/index.js"; export * from "./workflows/client/requests/index.js"; export * as workflows from "./workflows/index.js"; diff --git a/skyvern-ts/client/src/api/types/ActionBlock.ts b/skyvern-ts/client/src/api/types/ActionBlock.ts index c3c6b5b2..bcfbb3f7 100644 --- a/skyvern-ts/client/src/api/types/ActionBlock.ts +++ b/skyvern-ts/client/src/api/types/ActionBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface ActionBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; @@ -25,7 +28,6 @@ export interface ActionBlock { download_suffix?: string; totp_verification_url?: string; totp_identifier?: string; - cache_actions?: boolean; complete_verification?: boolean; include_action_history_in_verification?: boolean; download_timeout?: number; diff --git a/skyvern-ts/client/src/api/types/ActionBlockYaml.ts b/skyvern-ts/client/src/api/types/ActionBlockYaml.ts index 1ffb4ab1..8b5de314 100644 --- a/skyvern-ts/client/src/api/types/ActionBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/ActionBlockYaml.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface ActionBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; url?: string; @@ -17,6 +20,5 @@ export interface ActionBlockYaml { download_suffix?: string; totp_verification_url?: string; totp_identifier?: string; - cache_actions?: boolean; disable_cache?: boolean; } diff --git a/skyvern-ts/client/src/api/types/BlockType.ts b/skyvern-ts/client/src/api/types/BlockType.ts index 1f4f6b69..bc468d93 100644 --- a/skyvern-ts/client/src/api/types/BlockType.ts +++ b/skyvern-ts/client/src/api/types/BlockType.ts @@ -4,6 +4,7 @@ export const BlockType = { Task: "task", TaskV2: "task_v2", ForLoop: "for_loop", + Conditional: "conditional", Code: "code", TextPrompt: "text_prompt", DownloadToS3: "download_to_s3", diff --git a/skyvern-ts/client/src/api/types/BranchCondition.ts b/skyvern-ts/client/src/api/types/BranchCondition.ts new file mode 100644 index 00000000..2768e265 --- /dev/null +++ b/skyvern-ts/client/src/api/types/BranchCondition.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Skyvern from "../index.js"; + +/** + * Represents a single conditional branch edge within a ConditionalBlock. + */ +export interface BranchCondition { + criteria?: Skyvern.BranchCriteria; + next_block_label?: string; + description?: string; + is_default?: boolean; +} diff --git a/skyvern-ts/client/src/api/types/BranchCriteria.ts b/skyvern-ts/client/src/api/types/BranchCriteria.ts new file mode 100644 index 00000000..c1defcd4 --- /dev/null +++ b/skyvern-ts/client/src/api/types/BranchCriteria.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Abstract interface describing how a branch condition should be evaluated. + */ +export interface BranchCriteria { + criteria_type: string; + expression: string; + description?: string; +} diff --git a/skyvern-ts/client/src/api/types/CodeBlock.ts b/skyvern-ts/client/src/api/types/CodeBlock.ts index 569cfb12..4b65b48f 100644 --- a/skyvern-ts/client/src/api/types/CodeBlock.ts +++ b/skyvern-ts/client/src/api/types/CodeBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface CodeBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; diff --git a/skyvern-ts/client/src/api/types/CodeBlockYaml.ts b/skyvern-ts/client/src/api/types/CodeBlockYaml.ts index 9e699bb2..c35f4993 100644 --- a/skyvern-ts/client/src/api/types/CodeBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/CodeBlockYaml.ts @@ -1,7 +1,10 @@ // This file was auto-generated by Fern from our API Definition. export interface CodeBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; code: string; diff --git a/skyvern-ts/client/src/api/types/ConditionalBlock.ts b/skyvern-ts/client/src/api/types/ConditionalBlock.ts new file mode 100644 index 00000000..1c56e7ea --- /dev/null +++ b/skyvern-ts/client/src/api/types/ConditionalBlock.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Skyvern from "../index.js"; + +/** + * Branching block that selects the next block label based on list-ordered conditions. + */ +export interface ConditionalBlock { + /** Author-facing identifier for a block; unique within a workflow. */ + label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; + output_parameter: Skyvern.OutputParameter; + continue_on_failure?: boolean; + model?: Record; + disable_cache?: boolean; + branch_conditions?: Skyvern.BranchCondition[]; +} diff --git a/skyvern-ts/client/src/api/types/DownloadToS3Block.ts b/skyvern-ts/client/src/api/types/DownloadToS3Block.ts index 8760b67f..c4cf0e52 100644 --- a/skyvern-ts/client/src/api/types/DownloadToS3Block.ts +++ b/skyvern-ts/client/src/api/types/DownloadToS3Block.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface DownloadToS3Block { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; diff --git a/skyvern-ts/client/src/api/types/DownloadToS3BlockYaml.ts b/skyvern-ts/client/src/api/types/DownloadToS3BlockYaml.ts index a2375c32..d1ba0b74 100644 --- a/skyvern-ts/client/src/api/types/DownloadToS3BlockYaml.ts +++ b/skyvern-ts/client/src/api/types/DownloadToS3BlockYaml.ts @@ -1,7 +1,10 @@ // This file was auto-generated by Fern from our API Definition. export interface DownloadToS3BlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; url: string; diff --git a/skyvern-ts/client/src/api/types/ExtractionBlock.ts b/skyvern-ts/client/src/api/types/ExtractionBlock.ts index ec22ae88..fcec4117 100644 --- a/skyvern-ts/client/src/api/types/ExtractionBlock.ts +++ b/skyvern-ts/client/src/api/types/ExtractionBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface ExtractionBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; @@ -25,7 +28,6 @@ export interface ExtractionBlock { download_suffix?: string; totp_verification_url?: string; totp_identifier?: string; - cache_actions?: boolean; complete_verification?: boolean; include_action_history_in_verification?: boolean; download_timeout?: number; diff --git a/skyvern-ts/client/src/api/types/ExtractionBlockYaml.ts b/skyvern-ts/client/src/api/types/ExtractionBlockYaml.ts index 39978da5..6cd21f39 100644 --- a/skyvern-ts/client/src/api/types/ExtractionBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/ExtractionBlockYaml.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface ExtractionBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; data_extraction_goal: string; @@ -14,7 +17,6 @@ export interface ExtractionBlockYaml { max_retries?: number; max_steps_per_run?: number; parameter_keys?: string[]; - cache_actions?: boolean; disable_cache?: boolean; } diff --git a/skyvern-ts/client/src/api/types/FileDownloadBlock.ts b/skyvern-ts/client/src/api/types/FileDownloadBlock.ts index 56f05692..ff523f57 100644 --- a/skyvern-ts/client/src/api/types/FileDownloadBlock.ts +++ b/skyvern-ts/client/src/api/types/FileDownloadBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface FileDownloadBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; @@ -25,7 +28,6 @@ export interface FileDownloadBlock { download_suffix?: string; totp_verification_url?: string; totp_identifier?: string; - cache_actions?: boolean; complete_verification?: boolean; include_action_history_in_verification?: boolean; download_timeout?: number; diff --git a/skyvern-ts/client/src/api/types/FileDownloadBlockYaml.ts b/skyvern-ts/client/src/api/types/FileDownloadBlockYaml.ts index f373d141..4f5c2913 100644 --- a/skyvern-ts/client/src/api/types/FileDownloadBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/FileDownloadBlockYaml.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface FileDownloadBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; navigation_goal: string; @@ -17,7 +20,6 @@ export interface FileDownloadBlockYaml { download_suffix?: string; totp_verification_url?: string; totp_identifier?: string; - cache_actions?: boolean; disable_cache?: boolean; download_timeout?: number; } diff --git a/skyvern-ts/client/src/api/types/FileParserBlock.ts b/skyvern-ts/client/src/api/types/FileParserBlock.ts index bb71c77f..4a75a898 100644 --- a/skyvern-ts/client/src/api/types/FileParserBlock.ts +++ b/skyvern-ts/client/src/api/types/FileParserBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface FileParserBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; diff --git a/skyvern-ts/client/src/api/types/FileParserBlockYaml.ts b/skyvern-ts/client/src/api/types/FileParserBlockYaml.ts index c801fffe..466cec0a 100644 --- a/skyvern-ts/client/src/api/types/FileParserBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/FileParserBlockYaml.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface FileParserBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; file_url: string; diff --git a/skyvern-ts/client/src/api/types/FileUploadBlock.ts b/skyvern-ts/client/src/api/types/FileUploadBlock.ts index 54141577..e2bc91c7 100644 --- a/skyvern-ts/client/src/api/types/FileUploadBlock.ts +++ b/skyvern-ts/client/src/api/types/FileUploadBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface FileUploadBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; diff --git a/skyvern-ts/client/src/api/types/FileUploadBlockYaml.ts b/skyvern-ts/client/src/api/types/FileUploadBlockYaml.ts index ead7990e..2438f503 100644 --- a/skyvern-ts/client/src/api/types/FileUploadBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/FileUploadBlockYaml.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface FileUploadBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; storage_type?: Skyvern.FileStorageType; diff --git a/skyvern-ts/client/src/api/types/ForLoopBlock.ts b/skyvern-ts/client/src/api/types/ForLoopBlock.ts index eda1f037..07480f2c 100644 --- a/skyvern-ts/client/src/api/types/ForLoopBlock.ts +++ b/skyvern-ts/client/src/api/types/ForLoopBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface ForLoopBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; diff --git a/skyvern-ts/client/src/api/types/ForLoopBlockLoopBlocksItem.ts b/skyvern-ts/client/src/api/types/ForLoopBlockLoopBlocksItem.ts index cd6626fa..0fc7d079 100644 --- a/skyvern-ts/client/src/api/types/ForLoopBlockLoopBlocksItem.ts +++ b/skyvern-ts/client/src/api/types/ForLoopBlockLoopBlocksItem.ts @@ -5,6 +5,7 @@ import type * as Skyvern from "../index.js"; export type ForLoopBlockLoopBlocksItem = | Skyvern.ForLoopBlockLoopBlocksItem.Action | Skyvern.ForLoopBlockLoopBlocksItem.Code + | Skyvern.ForLoopBlockLoopBlocksItem.Conditional | Skyvern.ForLoopBlockLoopBlocksItem.DownloadToS3 | Skyvern.ForLoopBlockLoopBlocksItem.Extraction | Skyvern.ForLoopBlockLoopBlocksItem.FileDownload @@ -34,6 +35,10 @@ export namespace ForLoopBlockLoopBlocksItem { block_type: "code"; } + export interface Conditional extends Skyvern.ConditionalBlock { + block_type: "conditional"; + } + export interface DownloadToS3 extends Skyvern.DownloadToS3Block { block_type: "download_to_s3"; } diff --git a/skyvern-ts/client/src/api/types/ForLoopBlockYaml.ts b/skyvern-ts/client/src/api/types/ForLoopBlockYaml.ts index be5f876a..bfcb22f7 100644 --- a/skyvern-ts/client/src/api/types/ForLoopBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/ForLoopBlockYaml.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface ForLoopBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; loop_blocks: Skyvern.ForLoopBlockYamlLoopBlocksItem[]; diff --git a/skyvern-ts/client/src/api/types/GeoTarget.ts b/skyvern-ts/client/src/api/types/GeoTarget.ts new file mode 100644 index 00000000..e30483d5 --- /dev/null +++ b/skyvern-ts/client/src/api/types/GeoTarget.ts @@ -0,0 +1,23 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Granular geographic targeting for proxy selection. + * + * Supports country, subdivision (state/region), and city level targeting. + * Uses ISO 3166-1 alpha-2 for countries, ISO 3166-2 for subdivisions, + * and GeoNames English names for cities. + * + * Examples: + * - {"country": "US"} - United States (same as RESIDENTIAL) + * - {"country": "US", "subdivision": "CA"} - California, US + * - {"country": "US", "subdivision": "NY", "city": "New York"} - New York City + * - {"country": "GB", "city": "London"} - London, UK + */ +export interface GeoTarget { + /** ISO 3166-1 alpha-2 country code (e.g., 'US', 'GB', 'DE') */ + country: string; + /** ISO 3166-2 subdivision code without country prefix (e.g., 'CA' for California, 'NY' for New York) */ + subdivision?: string; + /** City name in English from GeoNames (e.g., 'New York', 'Los Angeles', 'London') */ + city?: string; +} diff --git a/skyvern-ts/client/src/api/types/HttpRequestBlock.ts b/skyvern-ts/client/src/api/types/HttpRequestBlock.ts index 2072cb34..3b97437d 100644 --- a/skyvern-ts/client/src/api/types/HttpRequestBlock.ts +++ b/skyvern-ts/client/src/api/types/HttpRequestBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface HttpRequestBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; diff --git a/skyvern-ts/client/src/api/types/HttpRequestBlockYaml.ts b/skyvern-ts/client/src/api/types/HttpRequestBlockYaml.ts index 5bb06eb2..d2602458 100644 --- a/skyvern-ts/client/src/api/types/HttpRequestBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/HttpRequestBlockYaml.ts @@ -1,7 +1,10 @@ // This file was auto-generated by Fern from our API Definition. export interface HttpRequestBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; method?: string; diff --git a/skyvern-ts/client/src/api/types/HumanInteractionBlock.ts b/skyvern-ts/client/src/api/types/HumanInteractionBlock.ts index 54496d30..7f863a4a 100644 --- a/skyvern-ts/client/src/api/types/HumanInteractionBlock.ts +++ b/skyvern-ts/client/src/api/types/HumanInteractionBlock.ts @@ -14,7 +14,10 @@ import type * as Skyvern from "../index.js"; * - does not respond within the timeout period, the workflow terminates */ export interface HumanInteractionBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; @@ -36,7 +39,6 @@ export interface HumanInteractionBlock { download_suffix?: string; totp_verification_url?: string; totp_identifier?: string; - cache_actions?: boolean; complete_verification?: boolean; include_action_history_in_verification?: boolean; download_timeout?: number; diff --git a/skyvern-ts/client/src/api/types/HumanInteractionBlockYaml.ts b/skyvern-ts/client/src/api/types/HumanInteractionBlockYaml.ts index af6eca2a..03831e49 100644 --- a/skyvern-ts/client/src/api/types/HumanInteractionBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/HumanInteractionBlockYaml.ts @@ -1,7 +1,10 @@ // This file was auto-generated by Fern from our API Definition. export interface HumanInteractionBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; instructions?: string; diff --git a/skyvern-ts/client/src/api/types/LocateElementAction.ts b/skyvern-ts/client/src/api/types/LocateElementAction.ts new file mode 100644 index 00000000..f1d884b5 --- /dev/null +++ b/skyvern-ts/client/src/api/types/LocateElementAction.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Locate element action parameters. + */ +export interface LocateElementAction { + /** Natural language prompt to locate an element */ + prompt?: string; +} diff --git a/skyvern-ts/client/src/api/types/LoginBlock.ts b/skyvern-ts/client/src/api/types/LoginBlock.ts index 849ee707..e199a636 100644 --- a/skyvern-ts/client/src/api/types/LoginBlock.ts +++ b/skyvern-ts/client/src/api/types/LoginBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface LoginBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; @@ -25,7 +28,6 @@ export interface LoginBlock { download_suffix?: string; totp_verification_url?: string; totp_identifier?: string; - cache_actions?: boolean; complete_verification?: boolean; include_action_history_in_verification?: boolean; download_timeout?: number; diff --git a/skyvern-ts/client/src/api/types/LoginBlockYaml.ts b/skyvern-ts/client/src/api/types/LoginBlockYaml.ts index bb05d694..7e416c43 100644 --- a/skyvern-ts/client/src/api/types/LoginBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/LoginBlockYaml.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface LoginBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; url?: string; @@ -16,7 +19,6 @@ export interface LoginBlockYaml { parameter_keys?: string[]; totp_verification_url?: string; totp_identifier?: string; - cache_actions?: boolean; disable_cache?: boolean; complete_criterion?: string; terminate_criterion?: string; diff --git a/skyvern-ts/client/src/api/types/NavigationBlock.ts b/skyvern-ts/client/src/api/types/NavigationBlock.ts index bb89f117..c7853cc3 100644 --- a/skyvern-ts/client/src/api/types/NavigationBlock.ts +++ b/skyvern-ts/client/src/api/types/NavigationBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface NavigationBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; @@ -25,7 +28,6 @@ export interface NavigationBlock { download_suffix?: string; totp_verification_url?: string; totp_identifier?: string; - cache_actions?: boolean; complete_verification?: boolean; include_action_history_in_verification?: boolean; download_timeout?: number; diff --git a/skyvern-ts/client/src/api/types/NavigationBlockYaml.ts b/skyvern-ts/client/src/api/types/NavigationBlockYaml.ts index 5c1b11bc..b478b945 100644 --- a/skyvern-ts/client/src/api/types/NavigationBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/NavigationBlockYaml.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface NavigationBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; navigation_goal: string; @@ -18,7 +21,6 @@ export interface NavigationBlockYaml { download_suffix?: string; totp_verification_url?: string; totp_identifier?: string; - cache_actions?: boolean; disable_cache?: boolean; complete_criterion?: string; terminate_criterion?: string; diff --git a/skyvern-ts/client/src/api/types/NonEmptyPasswordCredential.ts b/skyvern-ts/client/src/api/types/NonEmptyPasswordCredential.ts index 055de72d..d61566cd 100644 --- a/skyvern-ts/client/src/api/types/NonEmptyPasswordCredential.ts +++ b/skyvern-ts/client/src/api/types/NonEmptyPasswordCredential.ts @@ -14,4 +14,6 @@ export interface NonEmptyPasswordCredential { totp?: string; /** Type of 2FA method used for this credential */ totp_type?: Skyvern.TotpType; + /** Identifier (email or phone number) used to fetch TOTP codes */ + totp_identifier?: string; } diff --git a/skyvern-ts/client/src/api/types/PasswordCredentialResponse.ts b/skyvern-ts/client/src/api/types/PasswordCredentialResponse.ts index 717e1f2d..6ea0d085 100644 --- a/skyvern-ts/client/src/api/types/PasswordCredentialResponse.ts +++ b/skyvern-ts/client/src/api/types/PasswordCredentialResponse.ts @@ -10,4 +10,6 @@ export interface PasswordCredentialResponse { username: string; /** Type of 2FA method used for this credential */ totp_type?: Skyvern.TotpType; + /** Identifier (email or phone number) used to fetch TOTP codes */ + totp_identifier?: string; } diff --git a/skyvern-ts/client/src/api/types/PdfParserBlock.ts b/skyvern-ts/client/src/api/types/PdfParserBlock.ts index 956a73e3..890e81fd 100644 --- a/skyvern-ts/client/src/api/types/PdfParserBlock.ts +++ b/skyvern-ts/client/src/api/types/PdfParserBlock.ts @@ -7,7 +7,10 @@ import type * as Skyvern from "../index.js"; * This block will be removed in a future version. */ export interface PdfParserBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; diff --git a/skyvern-ts/client/src/api/types/PdfParserBlockYaml.ts b/skyvern-ts/client/src/api/types/PdfParserBlockYaml.ts index 051ea76e..df65bfb9 100644 --- a/skyvern-ts/client/src/api/types/PdfParserBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/PdfParserBlockYaml.ts @@ -1,7 +1,10 @@ // This file was auto-generated by Fern from our API Definition. export interface PdfParserBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; file_url: string; diff --git a/skyvern-ts/client/src/api/types/RunSdkActionRequestAction.ts b/skyvern-ts/client/src/api/types/RunSdkActionRequestAction.ts index 4c56c27e..8a3a70df 100644 --- a/skyvern-ts/client/src/api/types/RunSdkActionRequestAction.ts +++ b/skyvern-ts/client/src/api/types/RunSdkActionRequestAction.ts @@ -11,7 +11,8 @@ export type RunSdkActionRequestAction = | Skyvern.RunSdkActionRequestAction.AiInputText | Skyvern.RunSdkActionRequestAction.AiSelectOption | Skyvern.RunSdkActionRequestAction.AiUploadFile - | Skyvern.RunSdkActionRequestAction.Extract; + | Skyvern.RunSdkActionRequestAction.Extract + | Skyvern.RunSdkActionRequestAction.LocateElement; export namespace RunSdkActionRequestAction { export interface AiAct extends Skyvern.ActAction { @@ -37,4 +38,8 @@ export namespace RunSdkActionRequestAction { export interface Extract extends Skyvern.ExtractAction { type: "extract"; } + + export interface LocateElement extends Skyvern.LocateElementAction { + type: "locate_element"; + } } diff --git a/skyvern-ts/client/src/api/types/SendEmailBlock.ts b/skyvern-ts/client/src/api/types/SendEmailBlock.ts index be2315cc..856a8b1e 100644 --- a/skyvern-ts/client/src/api/types/SendEmailBlock.ts +++ b/skyvern-ts/client/src/api/types/SendEmailBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface SendEmailBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; diff --git a/skyvern-ts/client/src/api/types/SendEmailBlockYaml.ts b/skyvern-ts/client/src/api/types/SendEmailBlockYaml.ts index d860d20e..486fbc69 100644 --- a/skyvern-ts/client/src/api/types/SendEmailBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/SendEmailBlockYaml.ts @@ -1,7 +1,10 @@ // This file was auto-generated by Fern from our API Definition. export interface SendEmailBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; smtp_host_secret_parameter_key: string; diff --git a/skyvern-ts/client/src/api/types/TaskBlock.ts b/skyvern-ts/client/src/api/types/TaskBlock.ts index 96d49826..93d9a146 100644 --- a/skyvern-ts/client/src/api/types/TaskBlock.ts +++ b/skyvern-ts/client/src/api/types/TaskBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface TaskBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; @@ -25,7 +28,6 @@ export interface TaskBlock { download_suffix?: string; totp_verification_url?: string; totp_identifier?: string; - cache_actions?: boolean; complete_verification?: boolean; include_action_history_in_verification?: boolean; download_timeout?: number; diff --git a/skyvern-ts/client/src/api/types/TaskBlockYaml.ts b/skyvern-ts/client/src/api/types/TaskBlockYaml.ts index b3a8e916..144ccfe1 100644 --- a/skyvern-ts/client/src/api/types/TaskBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/TaskBlockYaml.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface TaskBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; url?: string; @@ -20,7 +23,6 @@ export interface TaskBlockYaml { download_suffix?: string; totp_verification_url?: string; totp_identifier?: string; - cache_actions?: boolean; disable_cache?: boolean; complete_criterion?: string; terminate_criterion?: string; diff --git a/skyvern-ts/client/src/api/types/TaskRunRequest.ts b/skyvern-ts/client/src/api/types/TaskRunRequest.ts index db238e2f..d2d481ba 100644 --- a/skyvern-ts/client/src/api/types/TaskRunRequest.ts +++ b/skyvern-ts/client/src/api/types/TaskRunRequest.ts @@ -40,8 +40,9 @@ export interface TaskRunRequest { * - US-FL: Florida * - US-WA: Washington * - NONE: No proxy + * Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"} */ - proxy_location?: Skyvern.ProxyLocation; + proxy_location?: TaskRunRequest.ProxyLocation; /** * 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/. */ @@ -87,6 +88,33 @@ export interface TaskRunRequest { } export namespace TaskRunRequest { + /** + * + * 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 + * Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"} + */ + export type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record; /** * * 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/. diff --git a/skyvern-ts/client/src/api/types/TaskV2Block.ts b/skyvern-ts/client/src/api/types/TaskV2Block.ts index ab8b8272..61ef8942 100644 --- a/skyvern-ts/client/src/api/types/TaskV2Block.ts +++ b/skyvern-ts/client/src/api/types/TaskV2Block.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface TaskV2Block { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; diff --git a/skyvern-ts/client/src/api/types/TaskV2BlockYaml.ts b/skyvern-ts/client/src/api/types/TaskV2BlockYaml.ts index 88ff13f5..3f295627 100644 --- a/skyvern-ts/client/src/api/types/TaskV2BlockYaml.ts +++ b/skyvern-ts/client/src/api/types/TaskV2BlockYaml.ts @@ -1,7 +1,10 @@ // This file was auto-generated by Fern from our API Definition. export interface TaskV2BlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; prompt: string; diff --git a/skyvern-ts/client/src/api/types/TextPromptBlock.ts b/skyvern-ts/client/src/api/types/TextPromptBlock.ts index d986229d..f2e5221e 100644 --- a/skyvern-ts/client/src/api/types/TextPromptBlock.ts +++ b/skyvern-ts/client/src/api/types/TextPromptBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface TextPromptBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; diff --git a/skyvern-ts/client/src/api/types/TextPromptBlockYaml.ts b/skyvern-ts/client/src/api/types/TextPromptBlockYaml.ts index cead5374..2a4b65e9 100644 --- a/skyvern-ts/client/src/api/types/TextPromptBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/TextPromptBlockYaml.ts @@ -1,7 +1,10 @@ // This file was auto-generated by Fern from our API Definition. export interface TextPromptBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; llm_key?: string; diff --git a/skyvern-ts/client/src/api/types/UploadToS3Block.ts b/skyvern-ts/client/src/api/types/UploadToS3Block.ts index b3f3b775..f28280c8 100644 --- a/skyvern-ts/client/src/api/types/UploadToS3Block.ts +++ b/skyvern-ts/client/src/api/types/UploadToS3Block.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface UploadToS3Block { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; diff --git a/skyvern-ts/client/src/api/types/UploadToS3BlockYaml.ts b/skyvern-ts/client/src/api/types/UploadToS3BlockYaml.ts index 387f81a8..e7b9e2ce 100644 --- a/skyvern-ts/client/src/api/types/UploadToS3BlockYaml.ts +++ b/skyvern-ts/client/src/api/types/UploadToS3BlockYaml.ts @@ -1,7 +1,10 @@ // This file was auto-generated by Fern from our API Definition. export interface UploadToS3BlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; path?: string; diff --git a/skyvern-ts/client/src/api/types/UrlBlock.ts b/skyvern-ts/client/src/api/types/UrlBlock.ts index 83b90d49..565ea507 100644 --- a/skyvern-ts/client/src/api/types/UrlBlock.ts +++ b/skyvern-ts/client/src/api/types/UrlBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface UrlBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; @@ -25,7 +28,6 @@ export interface UrlBlock { download_suffix?: string; totp_verification_url?: string; totp_identifier?: string; - cache_actions?: boolean; complete_verification?: boolean; include_action_history_in_verification?: boolean; download_timeout?: number; diff --git a/skyvern-ts/client/src/api/types/UrlBlockYaml.ts b/skyvern-ts/client/src/api/types/UrlBlockYaml.ts index cbc47204..db435e80 100644 --- a/skyvern-ts/client/src/api/types/UrlBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/UrlBlockYaml.ts @@ -1,7 +1,10 @@ // This file was auto-generated by Fern from our API Definition. export interface UrlBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; url: string; diff --git a/skyvern-ts/client/src/api/types/ValidationBlock.ts b/skyvern-ts/client/src/api/types/ValidationBlock.ts index 602c5f46..d1fe96b1 100644 --- a/skyvern-ts/client/src/api/types/ValidationBlock.ts +++ b/skyvern-ts/client/src/api/types/ValidationBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface ValidationBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; @@ -25,7 +28,6 @@ export interface ValidationBlock { download_suffix?: string; totp_verification_url?: string; totp_identifier?: string; - cache_actions?: boolean; complete_verification?: boolean; include_action_history_in_verification?: boolean; download_timeout?: number; diff --git a/skyvern-ts/client/src/api/types/ValidationBlockYaml.ts b/skyvern-ts/client/src/api/types/ValidationBlockYaml.ts index bf20f1ee..588f0ac9 100644 --- a/skyvern-ts/client/src/api/types/ValidationBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/ValidationBlockYaml.ts @@ -1,7 +1,10 @@ // This file was auto-generated by Fern from our API Definition. export interface ValidationBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; complete_criterion?: string; diff --git a/skyvern-ts/client/src/api/types/WaitBlock.ts b/skyvern-ts/client/src/api/types/WaitBlock.ts index f7343f72..c0bd33f3 100644 --- a/skyvern-ts/client/src/api/types/WaitBlock.ts +++ b/skyvern-ts/client/src/api/types/WaitBlock.ts @@ -3,7 +3,10 @@ import type * as Skyvern from "../index.js"; export interface WaitBlock { + /** Author-facing identifier for a block; unique within a workflow. */ label: string; + /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */ + next_block_label?: string; output_parameter: Skyvern.OutputParameter; continue_on_failure?: boolean; model?: Record; diff --git a/skyvern-ts/client/src/api/types/WaitBlockYaml.ts b/skyvern-ts/client/src/api/types/WaitBlockYaml.ts index 5a6ffd12..677176ed 100644 --- a/skyvern-ts/client/src/api/types/WaitBlockYaml.ts +++ b/skyvern-ts/client/src/api/types/WaitBlockYaml.ts @@ -1,7 +1,10 @@ // This file was auto-generated by Fern from our API Definition. export interface WaitBlockYaml { + /** Author-facing identifier; must be unique per workflow. */ label: string; + /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */ + next_block_label?: string; continue_on_failure?: boolean; model?: Record; wait_sec?: number; diff --git a/skyvern-ts/client/src/api/types/Workflow.ts b/skyvern-ts/client/src/api/types/Workflow.ts index 9a04ff95..f46534b7 100644 --- a/skyvern-ts/client/src/api/types/Workflow.ts +++ b/skyvern-ts/client/src/api/types/Workflow.ts @@ -11,7 +11,7 @@ export interface Workflow { is_saved_task: boolean; description?: string; workflow_definition: Skyvern.WorkflowDefinition; - proxy_location?: Skyvern.ProxyLocation; + proxy_location?: Workflow.ProxyLocation; webhook_callback_url?: string; totp_verification_url?: string; totp_identifier?: string; @@ -31,3 +31,7 @@ export interface Workflow { modified_at: string; deleted_at?: string; } + +export namespace Workflow { + export type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record; +} diff --git a/skyvern-ts/client/src/api/types/WorkflowCreateYamlRequest.ts b/skyvern-ts/client/src/api/types/WorkflowCreateYamlRequest.ts index 4deec6e6..d6dbc5fd 100644 --- a/skyvern-ts/client/src/api/types/WorkflowCreateYamlRequest.ts +++ b/skyvern-ts/client/src/api/types/WorkflowCreateYamlRequest.ts @@ -5,7 +5,7 @@ import type * as Skyvern from "../index.js"; export interface WorkflowCreateYamlRequest { title: string; description?: string; - proxy_location?: Skyvern.ProxyLocation; + proxy_location?: WorkflowCreateYamlRequest.ProxyLocation; webhook_callback_url?: string; totp_verification_url?: string; totp_identifier?: string; @@ -23,3 +23,7 @@ export interface WorkflowCreateYamlRequest { sequential_key?: string; folder_id?: string; } + +export namespace WorkflowCreateYamlRequest { + export type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record; +} diff --git a/skyvern-ts/client/src/api/types/WorkflowDefinition.ts b/skyvern-ts/client/src/api/types/WorkflowDefinition.ts index da5dfa41..c31961cc 100644 --- a/skyvern-ts/client/src/api/types/WorkflowDefinition.ts +++ b/skyvern-ts/client/src/api/types/WorkflowDefinition.ts @@ -3,6 +3,7 @@ import type * as Skyvern from "../index.js"; export interface WorkflowDefinition { + version?: number; parameters: Skyvern.WorkflowDefinitionParametersItem[]; blocks: Skyvern.WorkflowDefinitionBlocksItem[]; } diff --git a/skyvern-ts/client/src/api/types/WorkflowDefinitionBlocksItem.ts b/skyvern-ts/client/src/api/types/WorkflowDefinitionBlocksItem.ts index 38ee85e4..6a68b87f 100644 --- a/skyvern-ts/client/src/api/types/WorkflowDefinitionBlocksItem.ts +++ b/skyvern-ts/client/src/api/types/WorkflowDefinitionBlocksItem.ts @@ -5,6 +5,7 @@ import type * as Skyvern from "../index.js"; export type WorkflowDefinitionBlocksItem = | Skyvern.WorkflowDefinitionBlocksItem.Action | Skyvern.WorkflowDefinitionBlocksItem.Code + | Skyvern.WorkflowDefinitionBlocksItem.Conditional | Skyvern.WorkflowDefinitionBlocksItem.DownloadToS3 | Skyvern.WorkflowDefinitionBlocksItem.Extraction | Skyvern.WorkflowDefinitionBlocksItem.FileDownload @@ -34,6 +35,10 @@ export namespace WorkflowDefinitionBlocksItem { block_type: "code"; } + export interface Conditional extends Skyvern.ConditionalBlock { + block_type: "conditional"; + } + export interface DownloadToS3 extends Skyvern.DownloadToS3Block { block_type: "download_to_s3"; } diff --git a/skyvern-ts/client/src/api/types/WorkflowDefinitionYaml.ts b/skyvern-ts/client/src/api/types/WorkflowDefinitionYaml.ts index 4796c5d2..fda743a6 100644 --- a/skyvern-ts/client/src/api/types/WorkflowDefinitionYaml.ts +++ b/skyvern-ts/client/src/api/types/WorkflowDefinitionYaml.ts @@ -3,6 +3,7 @@ import type * as Skyvern from "../index.js"; export interface WorkflowDefinitionYaml { + version?: number; parameters: Skyvern.WorkflowDefinitionYamlParametersItem[]; blocks: Skyvern.WorkflowDefinitionYamlBlocksItem[]; } diff --git a/skyvern-ts/client/src/api/types/WorkflowRunRequest.ts b/skyvern-ts/client/src/api/types/WorkflowRunRequest.ts index cf024b50..ab7a7a86 100644 --- a/skyvern-ts/client/src/api/types/WorkflowRunRequest.ts +++ b/skyvern-ts/client/src/api/types/WorkflowRunRequest.ts @@ -32,8 +32,9 @@ export interface WorkflowRunRequest { * - US-FL: Florida * - US-WA: Washington * - NONE: No proxy + * Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"} */ - proxy_location?: Skyvern.ProxyLocation; + proxy_location?: WorkflowRunRequest.ProxyLocation; /** 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. */ webhook_url?: string; /** @@ -59,3 +60,33 @@ export interface WorkflowRunRequest { /** Whether to run the workflow with agent or code. */ run_with?: string; } + +export namespace WorkflowRunRequest { + /** + * + * 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 + * Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"} + */ + export type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record; +} diff --git a/skyvern-ts/client/src/api/types/index.ts b/skyvern-ts/client/src/api/types/index.ts index 020d0f29..3cce6808 100644 --- a/skyvern-ts/client/src/api/types/index.ts +++ b/skyvern-ts/client/src/api/types/index.ts @@ -19,6 +19,8 @@ export * from "./BitwardenLoginCredentialParameterYaml.js"; export * from "./BitwardenSensitiveInformationParameter.js"; export * from "./BitwardenSensitiveInformationParameterYaml.js"; export * from "./BlockType.js"; +export * from "./BranchCondition.js"; +export * from "./BranchCriteria.js"; export * from "./BrowserProfile.js"; export * from "./BrowserSessionResponse.js"; export * from "./ClickAction.js"; @@ -26,6 +28,7 @@ export * from "./ClickContext.js"; export * from "./CodeBlock.js"; export * from "./CodeBlockParametersItem.js"; export * from "./CodeBlockYaml.js"; +export * from "./ConditionalBlock.js"; export * from "./ContextParameter.js"; export * from "./ContextParameterSource.js"; export * from "./ContextParameterYaml.js"; @@ -59,6 +62,7 @@ export * from "./ForLoopBlockLoopBlocksItem.js"; export * from "./ForLoopBlockLoopOver.js"; export * from "./ForLoopBlockYaml.js"; export * from "./ForLoopBlockYamlLoopBlocksItem.js"; +export * from "./GeoTarget.js"; export * from "./GetRunResponse.js"; export * from "./HttpRequestBlock.js"; export * from "./HttpRequestBlockParametersItem.js"; @@ -69,6 +73,7 @@ export * from "./HumanInteractionBlockParametersItem.js"; export * from "./HumanInteractionBlockYaml.js"; export * from "./InputOrSelectContext.js"; export * from "./InputTextAction.js"; +export * from "./LocateElementAction.js"; export * from "./LoginBlock.js"; export * from "./LoginBlockParametersItem.js"; export * from "./LoginBlockYaml.js"; diff --git a/skyvern-ts/client/src/version.ts b/skyvern-ts/client/src/version.ts index 867cd296..8c6c1420 100644 --- a/skyvern-ts/client/src/version.ts +++ b/skyvern-ts/client/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "1.0.0"; +export const SDK_VERSION = "1.0.2"; diff --git a/skyvern-ts/client/tests/wire/browserProfiles.test.ts b/skyvern-ts/client/tests/wire/browserProfiles.test.ts deleted file mode 100644 index 794c60ea..00000000 --- a/skyvern-ts/client/tests/wire/browserProfiles.test.ts +++ /dev/null @@ -1,236 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import * as Skyvern from "../../src/api/index"; -import { SkyvernClient } from "../../src/Client"; -import { mockServerPool } from "../mock-server/MockServerPool"; - -describe("BrowserProfiles", () => { - test("listBrowserProfiles (1)", async () => { - const server = mockServerPool.createServer(); - const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = [ - { - browser_profile_id: "browser_profile_id", - organization_id: "organization_id", - name: "name", - description: "description", - created_at: "2024-01-15T09:30:00Z", - modified_at: "2024-01-15T09:30:00Z", - deleted_at: "2024-01-15T09:30:00Z", - }, - ]; - server - .mockEndpoint() - .get("/v1/browser_profiles") - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const response = await client.browserProfiles.listBrowserProfiles({ - include_deleted: true, - }); - expect(response).toEqual([ - { - browser_profile_id: "browser_profile_id", - organization_id: "organization_id", - name: "name", - description: "description", - created_at: "2024-01-15T09:30:00Z", - modified_at: "2024-01-15T09:30:00Z", - deleted_at: "2024-01-15T09:30:00Z", - }, - ]); - }); - - test("listBrowserProfiles (2)", async () => { - const server = mockServerPool.createServer(); - const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .get("/v1/browser_profiles") - .respondWith() - .statusCode(422) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.browserProfiles.listBrowserProfiles(); - }).rejects.toThrow(Skyvern.UnprocessableEntityError); - }); - - test("createBrowserProfile (1)", async () => { - const server = mockServerPool.createServer(); - const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name" }; - const rawResponseBody = { - browser_profile_id: "browser_profile_id", - organization_id: "organization_id", - name: "name", - description: "description", - created_at: "2024-01-15T09:30:00Z", - modified_at: "2024-01-15T09:30:00Z", - deleted_at: "2024-01-15T09:30:00Z", - }; - server - .mockEndpoint() - .post("/v1/browser_profiles") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const response = await client.browserProfiles.createBrowserProfile({ - name: "name", - }); - expect(response).toEqual({ - browser_profile_id: "browser_profile_id", - organization_id: "organization_id", - name: "name", - description: "description", - created_at: "2024-01-15T09:30:00Z", - modified_at: "2024-01-15T09:30:00Z", - deleted_at: "2024-01-15T09:30:00Z", - }); - }); - - test("createBrowserProfile (2)", async () => { - const server = mockServerPool.createServer(); - const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name" }; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .post("/v1/browser_profiles") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(422) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.browserProfiles.createBrowserProfile({ - name: "name", - }); - }).rejects.toThrow(Skyvern.UnprocessableEntityError); - }); - - test("getBrowserProfile (1)", async () => { - const server = mockServerPool.createServer(); - const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { - browser_profile_id: "browser_profile_id", - organization_id: "organization_id", - name: "name", - description: "description", - created_at: "2024-01-15T09:30:00Z", - modified_at: "2024-01-15T09:30:00Z", - deleted_at: "2024-01-15T09:30:00Z", - }; - server - .mockEndpoint() - .get("/v1/browser_profiles/bp_123456") - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const response = await client.browserProfiles.getBrowserProfile("bp_123456"); - expect(response).toEqual({ - browser_profile_id: "browser_profile_id", - organization_id: "organization_id", - name: "name", - description: "description", - created_at: "2024-01-15T09:30:00Z", - modified_at: "2024-01-15T09:30:00Z", - deleted_at: "2024-01-15T09:30:00Z", - }); - }); - - test("getBrowserProfile (2)", async () => { - const server = mockServerPool.createServer(); - const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .get("/v1/browser_profiles/profile_id") - .respondWith() - .statusCode(404) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.browserProfiles.getBrowserProfile("profile_id"); - }).rejects.toThrow(Skyvern.NotFoundError); - }); - - test("getBrowserProfile (3)", async () => { - const server = mockServerPool.createServer(); - const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .get("/v1/browser_profiles/profile_id") - .respondWith() - .statusCode(422) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.browserProfiles.getBrowserProfile("profile_id"); - }).rejects.toThrow(Skyvern.UnprocessableEntityError); - }); - - test("deleteBrowserProfile (1)", async () => { - const server = mockServerPool.createServer(); - const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); - - server.mockEndpoint().delete("/v1/browser_profiles/bp_123456").respondWith().statusCode(200).build(); - - const response = await client.browserProfiles.deleteBrowserProfile("bp_123456"); - expect(response).toEqual(undefined); - }); - - test("deleteBrowserProfile (2)", async () => { - const server = mockServerPool.createServer(); - const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .delete("/v1/browser_profiles/profile_id") - .respondWith() - .statusCode(404) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.browserProfiles.deleteBrowserProfile("profile_id"); - }).rejects.toThrow(Skyvern.NotFoundError); - }); - - test("deleteBrowserProfile (3)", async () => { - const server = mockServerPool.createServer(); - const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .delete("/v1/browser_profiles/profile_id") - .respondWith() - .statusCode(422) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.browserProfiles.deleteBrowserProfile("profile_id"); - }).rejects.toThrow(Skyvern.UnprocessableEntityError); - }); -}); diff --git a/skyvern-ts/client/tests/wire/main.test.ts b/skyvern-ts/client/tests/wire/main.test.ts index 5f5dcdee..20e3eb07 100644 --- a/skyvern-ts/client/tests/wire/main.test.ts +++ b/skyvern-ts/client/tests/wire/main.test.ts @@ -537,6 +537,7 @@ describe("SkyvernClient", () => { is_saved_task: true, description: "description", workflow_definition: { + version: 1, parameters: [ { parameter_type: "aws_secret", @@ -605,6 +606,7 @@ describe("SkyvernClient", () => { is_saved_task: true, description: "description", workflow_definition: { + version: 1, parameters: [ { parameter_type: "aws_secret", @@ -682,6 +684,7 @@ describe("SkyvernClient", () => { is_saved_task: true, description: "description", workflow_definition: { + version: 1, parameters: [ { parameter_type: "aws_secret", @@ -749,6 +752,7 @@ describe("SkyvernClient", () => { is_saved_task: true, description: "description", workflow_definition: { + version: 1, parameters: [ { parameter_type: "aws_secret", @@ -834,6 +838,7 @@ describe("SkyvernClient", () => { is_saved_task: true, description: "description", workflow_definition: { + version: 1, parameters: [ { parameter_type: "aws_secret", @@ -898,6 +903,7 @@ describe("SkyvernClient", () => { is_saved_task: true, description: "description", workflow_definition: { + version: 1, parameters: [ { parameter_type: "aws_secret", @@ -1411,6 +1417,277 @@ describe("SkyvernClient", () => { }).rejects.toThrow(Skyvern.UnprocessableEntityError); }); + test("list_browser_profiles (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = [ + { + browser_profile_id: "browser_profile_id", + organization_id: "organization_id", + name: "name", + description: "description", + created_at: "2024-01-15T09:30:00Z", + modified_at: "2024-01-15T09:30:00Z", + deleted_at: "2024-01-15T09:30:00Z", + }, + ]; + server + .mockEndpoint() + .get("/v1/browser_profiles") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.listBrowserProfiles({ + include_deleted: true, + }); + expect(response).toEqual([ + { + browser_profile_id: "browser_profile_id", + organization_id: "organization_id", + name: "name", + description: "description", + created_at: "2024-01-15T09:30:00Z", + modified_at: "2024-01-15T09:30:00Z", + deleted_at: "2024-01-15T09:30:00Z", + }, + ]); + }); + + test("list_browser_profiles (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/v1/browser_profiles") + .respondWith() + .statusCode(422) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.listBrowserProfiles(); + }).rejects.toThrow(Skyvern.UnprocessableEntityError); + }); + + test("create_browser_profile (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { name: "name" }; + const rawResponseBody = { + browser_profile_id: "browser_profile_id", + organization_id: "organization_id", + name: "name", + description: "description", + created_at: "2024-01-15T09:30:00Z", + modified_at: "2024-01-15T09:30:00Z", + deleted_at: "2024-01-15T09:30:00Z", + }; + server + .mockEndpoint() + .post("/v1/browser_profiles") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.createBrowserProfile({ + name: "name", + }); + expect(response).toEqual({ + browser_profile_id: "browser_profile_id", + organization_id: "organization_id", + name: "name", + description: "description", + created_at: "2024-01-15T09:30:00Z", + modified_at: "2024-01-15T09:30:00Z", + deleted_at: "2024-01-15T09:30:00Z", + }); + }); + + test("create_browser_profile (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { name: "name" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/v1/browser_profiles") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.createBrowserProfile({ + name: "name", + }); + }).rejects.toThrow(Skyvern.BadRequestError); + }); + + test("create_browser_profile (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { name: "name" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/v1/browser_profiles") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(409) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.createBrowserProfile({ + name: "name", + }); + }).rejects.toThrow(Skyvern.ConflictError); + }); + + test("create_browser_profile (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { name: "name" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/v1/browser_profiles") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(422) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.createBrowserProfile({ + name: "name", + }); + }).rejects.toThrow(Skyvern.UnprocessableEntityError); + }); + + test("get_browser_profile (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + browser_profile_id: "browser_profile_id", + organization_id: "organization_id", + name: "name", + description: "description", + created_at: "2024-01-15T09:30:00Z", + modified_at: "2024-01-15T09:30:00Z", + deleted_at: "2024-01-15T09:30:00Z", + }; + server + .mockEndpoint() + .get("/v1/browser_profiles/bp_123456") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.getBrowserProfile("bp_123456"); + expect(response).toEqual({ + browser_profile_id: "browser_profile_id", + organization_id: "organization_id", + name: "name", + description: "description", + created_at: "2024-01-15T09:30:00Z", + modified_at: "2024-01-15T09:30:00Z", + deleted_at: "2024-01-15T09:30:00Z", + }); + }); + + test("get_browser_profile (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/v1/browser_profiles/profile_id") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.getBrowserProfile("profile_id"); + }).rejects.toThrow(Skyvern.NotFoundError); + }); + + test("get_browser_profile (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/v1/browser_profiles/profile_id") + .respondWith() + .statusCode(422) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.getBrowserProfile("profile_id"); + }).rejects.toThrow(Skyvern.UnprocessableEntityError); + }); + + test("delete_browser_profile (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); + + server.mockEndpoint().delete("/v1/browser_profiles/bp_123456").respondWith().statusCode(200).build(); + + const response = await client.deleteBrowserProfile("bp_123456"); + expect(response).toEqual(undefined); + }); + + test("delete_browser_profile (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/v1/browser_profiles/profile_id") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.deleteBrowserProfile("profile_id"); + }).rejects.toThrow(Skyvern.NotFoundError); + }); + + test("delete_browser_profile (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/v1/browser_profiles/profile_id") + .respondWith() + .statusCode(422) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.deleteBrowserProfile("profile_id"); + }).rejects.toThrow(Skyvern.UnprocessableEntityError); + }); + test("get_browser_sessions (1)", async () => { const server = mockServerPool.createServer(); const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl }); @@ -1877,7 +2154,11 @@ describe("SkyvernClient", () => { const rawResponseBody = [ { credential_id: "cred_1234567890", - credential: { username: "user@example.com", totp_type: "authenticator" }, + credential: { + username: "user@example.com", + totp_type: "authenticator", + totp_identifier: "totp_identifier", + }, credential_type: "password", name: "Amazon Login", }, @@ -1894,6 +2175,7 @@ describe("SkyvernClient", () => { credential: { username: "user@example.com", totp_type: "authenticator", + totp_identifier: "totp_identifier", }, credential_type: "password", name: "Amazon Login", @@ -1923,7 +2205,11 @@ describe("SkyvernClient", () => { }; const rawResponseBody = { credential_id: "cred_1234567890", - credential: { username: "user@example.com", totp_type: "authenticator" }, + credential: { + username: "user@example.com", + totp_type: "authenticator", + totp_identifier: "totp_identifier", + }, credential_type: "password", name: "Amazon Login", }; @@ -1950,6 +2236,7 @@ describe("SkyvernClient", () => { credential: { username: "user@example.com", totp_type: "authenticator", + totp_identifier: "totp_identifier", }, credential_type: "password", name: "Amazon Login", @@ -2020,7 +2307,11 @@ describe("SkyvernClient", () => { const rawResponseBody = { credential_id: "cred_1234567890", - credential: { username: "user@example.com", totp_type: "authenticator" }, + credential: { + username: "user@example.com", + totp_type: "authenticator", + totp_identifier: "totp_identifier", + }, credential_type: "password", name: "Amazon Login", }; @@ -2038,6 +2329,7 @@ describe("SkyvernClient", () => { credential: { username: "user@example.com", totp_type: "authenticator", + totp_identifier: "totp_identifier", }, credential_type: "password", name: "Amazon Login", diff --git a/skyvern-ts/client/tests/wire/workflows.test.ts b/skyvern-ts/client/tests/wire/workflows.test.ts index b548d701..4f9dbd7c 100644 --- a/skyvern-ts/client/tests/wire/workflows.test.ts +++ b/skyvern-ts/client/tests/wire/workflows.test.ts @@ -341,6 +341,7 @@ describe("Workflows", () => { is_saved_task: true, description: "description", workflow_definition: { + version: 1, parameters: [ { parameter_type: "aws_secret", @@ -405,6 +406,7 @@ describe("Workflows", () => { is_saved_task: true, description: "description", workflow_definition: { + version: 1, parameters: [ { parameter_type: "aws_secret", diff --git a/skyvern/client/__init__.py b/skyvern/client/__init__.py index 919047a6..2ca8c695 100644 --- a/skyvern/client/__init__.py +++ b/skyvern/client/__init__.py @@ -41,6 +41,8 @@ if typing.TYPE_CHECKING: BitwardenSensitiveInformationParameter, BitwardenSensitiveInformationParameterYaml, BlockType, + BranchCondition, + BranchCriteria, BrowserProfile, BrowserSessionResponse, ClickAction, @@ -60,6 +62,7 @@ if typing.TYPE_CHECKING: CodeBlockParametersItem_Output, CodeBlockParametersItem_Workflow, CodeBlockYaml, + ConditionalBlock, ContextParameter, ContextParameterSource, ContextParameterSource_AwsSecret, @@ -133,6 +136,7 @@ if typing.TYPE_CHECKING: ForLoopBlockLoopBlocksItem, ForLoopBlockLoopBlocksItem_Action, ForLoopBlockLoopBlocksItem_Code, + ForLoopBlockLoopBlocksItem_Conditional, ForLoopBlockLoopBlocksItem_DownloadToS3, ForLoopBlockLoopBlocksItem_Extraction, ForLoopBlockLoopBlocksItem_FileDownload, @@ -187,6 +191,7 @@ if typing.TYPE_CHECKING: ForLoopBlockYamlLoopBlocksItem_UploadToS3, ForLoopBlockYamlLoopBlocksItem_Validation, ForLoopBlockYamlLoopBlocksItem_Wait, + GeoTarget, GetRunResponse, GetRunResponse_AnthropicCua, GetRunResponse_OpenaiCua, @@ -224,7 +229,6 @@ if typing.TYPE_CHECKING: HumanInteractionBlockParametersItem_Output, HumanInteractionBlockParametersItem_Workflow, HumanInteractionBlockYaml, - ImprovePromptResponse, InputOrSelectContext, InputTextAction, InputTextActionData, @@ -309,6 +313,7 @@ if typing.TYPE_CHECKING: TaskBlockYamlDataSchema, TaskRunRequest, TaskRunRequestDataExtractionSchema, + TaskRunRequestProxyLocation, TaskRunResponse, TaskRunResponseOutput, TaskV2Block, @@ -385,10 +390,12 @@ if typing.TYPE_CHECKING: WaitBlockYaml, Workflow, WorkflowCreateYamlRequest, + WorkflowCreateYamlRequestProxyLocation, WorkflowDefinition, WorkflowDefinitionBlocksItem, WorkflowDefinitionBlocksItem_Action, WorkflowDefinitionBlocksItem_Code, + WorkflowDefinitionBlocksItem_Conditional, WorkflowDefinitionBlocksItem_DownloadToS3, WorkflowDefinitionBlocksItem_Extraction, WorkflowDefinitionBlocksItem_FileDownload, @@ -459,20 +466,22 @@ if typing.TYPE_CHECKING: WorkflowParameterType, WorkflowParameterYaml, WorkflowParameterYamlDefaultValue, + WorkflowProxyLocation, WorkflowRequest, WorkflowRunBlock, WorkflowRunBlockDataSchema, WorkflowRunBlockNavigationPayload, WorkflowRunBlockOutput, WorkflowRunRequest, + WorkflowRunRequestProxyLocation, WorkflowRunResponse, WorkflowRunResponseOutput, WorkflowRunTimeline, WorkflowRunTimelineType, WorkflowStatus, ) - from .errors import BadRequestError, ForbiddenError, NotFoundError, UnprocessableEntityError - from . import browser_profiles, prompts, scripts, workflows + from .errors import BadRequestError, ConflictError, ForbiddenError, NotFoundError, UnprocessableEntityError + from . import scripts, workflows from .client import AsyncSkyvern, Skyvern from .environment import SkyvernEnvironment from .version import __version__ @@ -513,6 +522,8 @@ _dynamic_imports: typing.Dict[str, str] = { "BitwardenSensitiveInformationParameter": ".types", "BitwardenSensitiveInformationParameterYaml": ".types", "BlockType": ".types", + "BranchCondition": ".types", + "BranchCriteria": ".types", "BrowserProfile": ".types", "BrowserSessionResponse": ".types", "ClickAction": ".types", @@ -532,6 +543,8 @@ _dynamic_imports: typing.Dict[str, str] = { "CodeBlockParametersItem_Output": ".types", "CodeBlockParametersItem_Workflow": ".types", "CodeBlockYaml": ".types", + "ConditionalBlock": ".types", + "ConflictError": ".errors", "ContextParameter": ".types", "ContextParameterSource": ".types", "ContextParameterSource_AwsSecret": ".types", @@ -605,6 +618,7 @@ _dynamic_imports: typing.Dict[str, str] = { "ForLoopBlockLoopBlocksItem": ".types", "ForLoopBlockLoopBlocksItem_Action": ".types", "ForLoopBlockLoopBlocksItem_Code": ".types", + "ForLoopBlockLoopBlocksItem_Conditional": ".types", "ForLoopBlockLoopBlocksItem_DownloadToS3": ".types", "ForLoopBlockLoopBlocksItem_Extraction": ".types", "ForLoopBlockLoopBlocksItem_FileDownload": ".types", @@ -660,6 +674,7 @@ _dynamic_imports: typing.Dict[str, str] = { "ForLoopBlockYamlLoopBlocksItem_Validation": ".types", "ForLoopBlockYamlLoopBlocksItem_Wait": ".types", "ForbiddenError": ".errors", + "GeoTarget": ".types", "GetRunResponse": ".types", "GetRunResponse_AnthropicCua": ".types", "GetRunResponse_OpenaiCua": ".types", @@ -697,7 +712,6 @@ _dynamic_imports: typing.Dict[str, str] = { "HumanInteractionBlockParametersItem_Output": ".types", "HumanInteractionBlockParametersItem_Workflow": ".types", "HumanInteractionBlockYaml": ".types", - "ImprovePromptResponse": ".types", "InputOrSelectContext": ".types", "InputTextAction": ".types", "InputTextActionData": ".types", @@ -785,6 +799,7 @@ _dynamic_imports: typing.Dict[str, str] = { "TaskBlockYamlDataSchema": ".types", "TaskRunRequest": ".types", "TaskRunRequestDataExtractionSchema": ".types", + "TaskRunRequestProxyLocation": ".types", "TaskRunResponse": ".types", "TaskRunResponseOutput": ".types", "TaskV2Block": ".types", @@ -862,10 +877,12 @@ _dynamic_imports: typing.Dict[str, str] = { "WaitBlockYaml": ".types", "Workflow": ".types", "WorkflowCreateYamlRequest": ".types", + "WorkflowCreateYamlRequestProxyLocation": ".types", "WorkflowDefinition": ".types", "WorkflowDefinitionBlocksItem": ".types", "WorkflowDefinitionBlocksItem_Action": ".types", "WorkflowDefinitionBlocksItem_Code": ".types", + "WorkflowDefinitionBlocksItem_Conditional": ".types", "WorkflowDefinitionBlocksItem_DownloadToS3": ".types", "WorkflowDefinitionBlocksItem_Extraction": ".types", "WorkflowDefinitionBlocksItem_FileDownload": ".types", @@ -936,20 +953,20 @@ _dynamic_imports: typing.Dict[str, str] = { "WorkflowParameterType": ".types", "WorkflowParameterYaml": ".types", "WorkflowParameterYamlDefaultValue": ".types", + "WorkflowProxyLocation": ".types", "WorkflowRequest": ".types", "WorkflowRunBlock": ".types", "WorkflowRunBlockDataSchema": ".types", "WorkflowRunBlockNavigationPayload": ".types", "WorkflowRunBlockOutput": ".types", "WorkflowRunRequest": ".types", + "WorkflowRunRequestProxyLocation": ".types", "WorkflowRunResponse": ".types", "WorkflowRunResponseOutput": ".types", "WorkflowRunTimeline": ".types", "WorkflowRunTimelineType": ".types", "WorkflowStatus": ".types", "__version__": ".version", - "browser_profiles": ".browser_profiles", - "prompts": ".prompts", "scripts": ".scripts", "workflows": ".workflows", } @@ -1013,6 +1030,8 @@ __all__ = [ "BitwardenSensitiveInformationParameter", "BitwardenSensitiveInformationParameterYaml", "BlockType", + "BranchCondition", + "BranchCriteria", "BrowserProfile", "BrowserSessionResponse", "ClickAction", @@ -1032,6 +1051,8 @@ __all__ = [ "CodeBlockParametersItem_Output", "CodeBlockParametersItem_Workflow", "CodeBlockYaml", + "ConditionalBlock", + "ConflictError", "ContextParameter", "ContextParameterSource", "ContextParameterSource_AwsSecret", @@ -1105,6 +1126,7 @@ __all__ = [ "ForLoopBlockLoopBlocksItem", "ForLoopBlockLoopBlocksItem_Action", "ForLoopBlockLoopBlocksItem_Code", + "ForLoopBlockLoopBlocksItem_Conditional", "ForLoopBlockLoopBlocksItem_DownloadToS3", "ForLoopBlockLoopBlocksItem_Extraction", "ForLoopBlockLoopBlocksItem_FileDownload", @@ -1160,6 +1182,7 @@ __all__ = [ "ForLoopBlockYamlLoopBlocksItem_Validation", "ForLoopBlockYamlLoopBlocksItem_Wait", "ForbiddenError", + "GeoTarget", "GetRunResponse", "GetRunResponse_AnthropicCua", "GetRunResponse_OpenaiCua", @@ -1197,7 +1220,6 @@ __all__ = [ "HumanInteractionBlockParametersItem_Output", "HumanInteractionBlockParametersItem_Workflow", "HumanInteractionBlockYaml", - "ImprovePromptResponse", "InputOrSelectContext", "InputTextAction", "InputTextActionData", @@ -1285,6 +1307,7 @@ __all__ = [ "TaskBlockYamlDataSchema", "TaskRunRequest", "TaskRunRequestDataExtractionSchema", + "TaskRunRequestProxyLocation", "TaskRunResponse", "TaskRunResponseOutput", "TaskV2Block", @@ -1362,10 +1385,12 @@ __all__ = [ "WaitBlockYaml", "Workflow", "WorkflowCreateYamlRequest", + "WorkflowCreateYamlRequestProxyLocation", "WorkflowDefinition", "WorkflowDefinitionBlocksItem", "WorkflowDefinitionBlocksItem_Action", "WorkflowDefinitionBlocksItem_Code", + "WorkflowDefinitionBlocksItem_Conditional", "WorkflowDefinitionBlocksItem_DownloadToS3", "WorkflowDefinitionBlocksItem_Extraction", "WorkflowDefinitionBlocksItem_FileDownload", @@ -1436,20 +1461,20 @@ __all__ = [ "WorkflowParameterType", "WorkflowParameterYaml", "WorkflowParameterYamlDefaultValue", + "WorkflowProxyLocation", "WorkflowRequest", "WorkflowRunBlock", "WorkflowRunBlockDataSchema", "WorkflowRunBlockNavigationPayload", "WorkflowRunBlockOutput", "WorkflowRunRequest", + "WorkflowRunRequestProxyLocation", "WorkflowRunResponse", "WorkflowRunResponseOutput", "WorkflowRunTimeline", "WorkflowRunTimelineType", "WorkflowStatus", "__version__", - "browser_profiles", - "prompts", "scripts", "workflows", ] diff --git a/skyvern/client/browser_profiles/__init__.py b/skyvern/client/browser_profiles/__init__.py deleted file mode 100644 index 5cde0202..00000000 --- a/skyvern/client/browser_profiles/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# isort: skip_file - diff --git a/skyvern/client/browser_profiles/client.py b/skyvern/client/browser_profiles/client.py deleted file mode 100644 index 6f05b290..00000000 --- a/skyvern/client/browser_profiles/client.py +++ /dev/null @@ -1,379 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.request_options import RequestOptions -from ..types.browser_profile import BrowserProfile -from .raw_client import AsyncRawBrowserProfilesClient, RawBrowserProfilesClient - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class BrowserProfilesClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawBrowserProfilesClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawBrowserProfilesClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawBrowserProfilesClient - """ - return self._raw_client - - def list_browser_profiles( - self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[BrowserProfile]: - """ - Get all browser profiles for the organization - - Parameters - ---------- - include_deleted : typing.Optional[bool] - Include deleted browser profiles - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.List[BrowserProfile] - Successful Response - - Examples - -------- - from skyvern import Skyvern - - client = Skyvern( - api_key="YOUR_API_KEY", - ) - client.browser_profiles.list_browser_profiles( - include_deleted=True, - ) - """ - _response = self._raw_client.list_browser_profiles( - include_deleted=include_deleted, request_options=request_options - ) - return _response.data - - def create_browser_profile( - self, - *, - name: str, - description: typing.Optional[str] = OMIT, - browser_session_id: typing.Optional[str] = OMIT, - workflow_run_id: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> BrowserProfile: - """ - Parameters - ---------- - name : str - Name for the browser profile - - description : typing.Optional[str] - Optional profile description - - browser_session_id : typing.Optional[str] - Persistent browser session to convert into a profile - - workflow_run_id : typing.Optional[str] - Workflow run whose persisted session should be captured - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - BrowserProfile - Successful Response - - Examples - -------- - from skyvern import Skyvern - - client = Skyvern( - api_key="YOUR_API_KEY", - ) - client.browser_profiles.create_browser_profile( - name="name", - ) - """ - _response = self._raw_client.create_browser_profile( - name=name, - description=description, - browser_session_id=browser_session_id, - workflow_run_id=workflow_run_id, - request_options=request_options, - ) - return _response.data - - def get_browser_profile( - self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> BrowserProfile: - """ - Get a specific browser profile by ID - - Parameters - ---------- - profile_id : str - The ID of the browser profile. browser_profile_id starts with `bp_` - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - BrowserProfile - Successfully retrieved browser profile - - Examples - -------- - from skyvern import Skyvern - - client = Skyvern( - api_key="YOUR_API_KEY", - ) - client.browser_profiles.get_browser_profile( - profile_id="bp_123456", - ) - """ - _response = self._raw_client.get_browser_profile(profile_id, request_options=request_options) - return _response.data - - def delete_browser_profile( - self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> None: - """ - Delete a browser profile (soft delete) - - Parameters - ---------- - profile_id : str - The ID of the browser profile to delete. browser_profile_id starts with `bp_` - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - None - - Examples - -------- - from skyvern import Skyvern - - client = Skyvern( - api_key="YOUR_API_KEY", - ) - client.browser_profiles.delete_browser_profile( - profile_id="bp_123456", - ) - """ - _response = self._raw_client.delete_browser_profile(profile_id, request_options=request_options) - return _response.data - - -class AsyncBrowserProfilesClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawBrowserProfilesClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawBrowserProfilesClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawBrowserProfilesClient - """ - return self._raw_client - - async def list_browser_profiles( - self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None - ) -> typing.List[BrowserProfile]: - """ - Get all browser profiles for the organization - - Parameters - ---------- - include_deleted : typing.Optional[bool] - Include deleted browser profiles - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - typing.List[BrowserProfile] - Successful Response - - Examples - -------- - import asyncio - - from skyvern import AsyncSkyvern - - client = AsyncSkyvern( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.browser_profiles.list_browser_profiles( - include_deleted=True, - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.list_browser_profiles( - include_deleted=include_deleted, request_options=request_options - ) - return _response.data - - async def create_browser_profile( - self, - *, - name: str, - description: typing.Optional[str] = OMIT, - browser_session_id: typing.Optional[str] = OMIT, - workflow_run_id: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> BrowserProfile: - """ - Parameters - ---------- - name : str - Name for the browser profile - - description : typing.Optional[str] - Optional profile description - - browser_session_id : typing.Optional[str] - Persistent browser session to convert into a profile - - workflow_run_id : typing.Optional[str] - Workflow run whose persisted session should be captured - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - BrowserProfile - Successful Response - - Examples - -------- - import asyncio - - from skyvern import AsyncSkyvern - - client = AsyncSkyvern( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.browser_profiles.create_browser_profile( - name="name", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.create_browser_profile( - name=name, - description=description, - browser_session_id=browser_session_id, - workflow_run_id=workflow_run_id, - request_options=request_options, - ) - return _response.data - - async def get_browser_profile( - self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> BrowserProfile: - """ - Get a specific browser profile by ID - - Parameters - ---------- - profile_id : str - The ID of the browser profile. browser_profile_id starts with `bp_` - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - BrowserProfile - Successfully retrieved browser profile - - Examples - -------- - import asyncio - - from skyvern import AsyncSkyvern - - client = AsyncSkyvern( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.browser_profiles.get_browser_profile( - profile_id="bp_123456", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.get_browser_profile(profile_id, request_options=request_options) - return _response.data - - async def delete_browser_profile( - self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> None: - """ - Delete a browser profile (soft delete) - - Parameters - ---------- - profile_id : str - The ID of the browser profile to delete. browser_profile_id starts with `bp_` - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - None - - Examples - -------- - import asyncio - - from skyvern import AsyncSkyvern - - client = AsyncSkyvern( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.browser_profiles.delete_browser_profile( - profile_id="bp_123456", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.delete_browser_profile(profile_id, request_options=request_options) - return _response.data diff --git a/skyvern/client/browser_profiles/raw_client.py b/skyvern/client/browser_profiles/raw_client.py deleted file mode 100644 index 57536bc3..00000000 --- a/skyvern/client/browser_profiles/raw_client.py +++ /dev/null @@ -1,507 +0,0 @@ -# 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.not_found_error import NotFoundError -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.browser_profile import BrowserProfile - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawBrowserProfilesClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def list_browser_profiles( - self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[typing.List[BrowserProfile]]: - """ - Get all browser profiles for the organization - - Parameters - ---------- - include_deleted : typing.Optional[bool] - Include deleted browser profiles - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[typing.List[BrowserProfile]] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "v1/browser_profiles", - method="GET", - params={ - "include_deleted": include_deleted, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[BrowserProfile], - parse_obj_as( - type_=typing.List[BrowserProfile], # 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_browser_profile( - self, - *, - name: str, - description: typing.Optional[str] = OMIT, - browser_session_id: typing.Optional[str] = OMIT, - workflow_run_id: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[BrowserProfile]: - """ - Parameters - ---------- - name : str - Name for the browser profile - - description : typing.Optional[str] - Optional profile description - - browser_session_id : typing.Optional[str] - Persistent browser session to convert into a profile - - workflow_run_id : typing.Optional[str] - Workflow run whose persisted session should be captured - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[BrowserProfile] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "v1/browser_profiles", - method="POST", - json={ - "name": name, - "description": description, - "browser_session_id": browser_session_id, - "workflow_run_id": workflow_run_id, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - BrowserProfile, - parse_obj_as( - type_=BrowserProfile, # 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_browser_profile( - self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[BrowserProfile]: - """ - Get a specific browser profile by ID - - Parameters - ---------- - profile_id : str - The ID of the browser profile. browser_profile_id starts with `bp_` - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[BrowserProfile] - Successfully retrieved browser profile - """ - _response = self._client_wrapper.httpx_client.request( - f"v1/browser_profiles/{jsonable_encoder(profile_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - BrowserProfile, - parse_obj_as( - type_=BrowserProfile, # 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 delete_browser_profile( - self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> HttpResponse[None]: - """ - Delete a browser profile (soft delete) - - Parameters - ---------- - profile_id : str - The ID of the browser profile to delete. browser_profile_id starts with `bp_` - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[None] - """ - _response = self._client_wrapper.httpx_client.request( - f"v1/browser_profiles/{jsonable_encoder(profile_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return HttpResponse(response=_response, data=None) - 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) - - -class AsyncRawBrowserProfilesClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list_browser_profiles( - self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[typing.List[BrowserProfile]]: - """ - Get all browser profiles for the organization - - Parameters - ---------- - include_deleted : typing.Optional[bool] - Include deleted browser profiles - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[typing.List[BrowserProfile]] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "v1/browser_profiles", - method="GET", - params={ - "include_deleted": include_deleted, - }, - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - typing.List[BrowserProfile], - parse_obj_as( - type_=typing.List[BrowserProfile], # 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_browser_profile( - self, - *, - name: str, - description: typing.Optional[str] = OMIT, - browser_session_id: typing.Optional[str] = OMIT, - workflow_run_id: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[BrowserProfile]: - """ - Parameters - ---------- - name : str - Name for the browser profile - - description : typing.Optional[str] - Optional profile description - - browser_session_id : typing.Optional[str] - Persistent browser session to convert into a profile - - workflow_run_id : typing.Optional[str] - Workflow run whose persisted session should be captured - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[BrowserProfile] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "v1/browser_profiles", - method="POST", - json={ - "name": name, - "description": description, - "browser_session_id": browser_session_id, - "workflow_run_id": workflow_run_id, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - BrowserProfile, - parse_obj_as( - type_=BrowserProfile, # 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_browser_profile( - self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[BrowserProfile]: - """ - Get a specific browser profile by ID - - Parameters - ---------- - profile_id : str - The ID of the browser profile. browser_profile_id starts with `bp_` - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[BrowserProfile] - Successfully retrieved browser profile - """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/browser_profiles/{jsonable_encoder(profile_id)}", - method="GET", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - BrowserProfile, - parse_obj_as( - type_=BrowserProfile, # 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 delete_browser_profile( - self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[None]: - """ - Delete a browser profile (soft delete) - - Parameters - ---------- - profile_id : str - The ID of the browser profile to delete. browser_profile_id starts with `bp_` - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[None] - """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/browser_profiles/{jsonable_encoder(profile_id)}", - method="DELETE", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return AsyncHttpResponse(response=_response, data=None) - 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) diff --git a/skyvern/client/client.py b/skyvern/client/client.py index 21f50118..b1a6df48 100644 --- a/skyvern/client/client.py +++ b/skyvern/client/client.py @@ -12,6 +12,7 @@ from .environment import SkyvernEnvironment from .raw_client import AsyncRawSkyvern, RawSkyvern from .types.artifact import Artifact from .types.artifact_type import ArtifactType +from .types.browser_profile import BrowserProfile from .types.browser_session_response import BrowserSessionResponse from .types.create_credential_request_credential import CreateCredentialRequestCredential from .types.create_script_response import CreateScriptResponse @@ -26,17 +27,17 @@ 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_request_proxy_location import TaskRunRequestProxyLocation 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_request_proxy_location import WorkflowRunRequestProxyLocation from .types.workflow_run_response import WorkflowRunResponse from .types.workflow_run_timeline import WorkflowRunTimeline from .types.workflow_status import WorkflowStatus if typing.TYPE_CHECKING: - from .browser_profiles.client import AsyncBrowserProfilesClient, BrowserProfilesClient - from .prompts.client import AsyncPromptsClient, PromptsClient from .scripts.client import AsyncScriptsClient, ScriptsClient from .workflows.client import AsyncWorkflowsClient, WorkflowsClient # this is used as the default value for optional parameters @@ -110,8 +111,6 @@ class Skyvern: ) self._raw_client = RawSkyvern(client_wrapper=self._client_wrapper) self._workflows: typing.Optional[WorkflowsClient] = None - self._browser_profiles: typing.Optional[BrowserProfilesClient] = None - self._prompts: typing.Optional[PromptsClient] = None self._scripts: typing.Optional[ScriptsClient] = None @property @@ -133,7 +132,7 @@ class Skyvern: url: typing.Optional[str] = OMIT, engine: typing.Optional[RunEngine] = OMIT, title: typing.Optional[str] = OMIT, - proxy_location: typing.Optional[ProxyLocation] = OMIT, + proxy_location: typing.Optional[TaskRunRequestProxyLocation] = 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, @@ -171,7 +170,7 @@ class Skyvern: title : typing.Optional[str] The title for the task - proxy_location : typing.Optional[ProxyLocation] + proxy_location : typing.Optional[TaskRunRequestProxyLocation] Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. @@ -195,6 +194,7 @@ class Skyvern: - US-FL: Florida - US-WA: Washington - NONE: No proxy + Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"} data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema] @@ -296,7 +296,7 @@ class Skyvern: 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, + proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = OMIT, webhook_url: typing.Optional[str] = OMIT, totp_url: typing.Optional[str] = OMIT, totp_identifier: typing.Optional[str] = OMIT, @@ -329,7 +329,7 @@ class Skyvern: title : typing.Optional[str] The title for this workflow run - proxy_location : typing.Optional[ProxyLocation] + proxy_location : typing.Optional[WorkflowRunRequestProxyLocation] Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. @@ -353,6 +353,7 @@ class Skyvern: - US-FL: Florida - US-WA: Washington - NONE: No proxy + Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"} 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. @@ -849,6 +850,160 @@ class Skyvern: _response = self._raw_client.get_run_timeline(run_id, request_options=request_options) return _response.data + def list_browser_profiles( + self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None + ) -> typing.List[BrowserProfile]: + """ + Get all browser profiles for the organization + + Parameters + ---------- + include_deleted : typing.Optional[bool] + Include deleted browser profiles + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[BrowserProfile] + Successfully retrieved browser profiles + + Examples + -------- + from skyvern import Skyvern + + client = Skyvern( + api_key="YOUR_API_KEY", + ) + client.list_browser_profiles( + include_deleted=True, + ) + """ + _response = self._raw_client.list_browser_profiles( + include_deleted=include_deleted, request_options=request_options + ) + return _response.data + + def create_browser_profile( + self, + *, + name: str, + description: typing.Optional[str] = OMIT, + browser_session_id: typing.Optional[str] = OMIT, + workflow_run_id: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> BrowserProfile: + """ + Create a browser profile from a persistent browser session or workflow run. + + Parameters + ---------- + name : str + Name for the browser profile + + description : typing.Optional[str] + Optional profile description + + browser_session_id : typing.Optional[str] + Persistent browser session to convert into a profile + + workflow_run_id : typing.Optional[str] + Workflow run whose persisted session should be captured + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + BrowserProfile + Successfully created browser profile + + Examples + -------- + from skyvern import Skyvern + + client = Skyvern( + api_key="YOUR_API_KEY", + ) + client.create_browser_profile( + name="name", + ) + """ + _response = self._raw_client.create_browser_profile( + name=name, + description=description, + browser_session_id=browser_session_id, + workflow_run_id=workflow_run_id, + request_options=request_options, + ) + return _response.data + + def get_browser_profile( + self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> BrowserProfile: + """ + Get a specific browser profile by ID + + Parameters + ---------- + profile_id : str + The ID of the browser profile. browser_profile_id starts with `bp_` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + BrowserProfile + Successfully retrieved browser profile + + Examples + -------- + from skyvern import Skyvern + + client = Skyvern( + api_key="YOUR_API_KEY", + ) + client.get_browser_profile( + profile_id="bp_123456", + ) + """ + _response = self._raw_client.get_browser_profile(profile_id, request_options=request_options) + return _response.data + + def delete_browser_profile( + self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> None: + """ + Delete a browser profile (soft delete) + + Parameters + ---------- + profile_id : str + The ID of the browser profile to delete. browser_profile_id starts with `bp_` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from skyvern import Skyvern + + client = Skyvern( + api_key="YOUR_API_KEY", + ) + client.delete_browser_profile( + profile_id="bp_123456", + ) + """ + _response = self._raw_client.delete_browser_profile(profile_id, request_options=request_options) + return _response.data + def get_browser_sessions( self, *, request_options: typing.Optional[RequestOptions] = None ) -> typing.List[BrowserSessionResponse]: @@ -1600,22 +1755,6 @@ class Skyvern: self._workflows = WorkflowsClient(client_wrapper=self._client_wrapper) return self._workflows - @property - def browser_profiles(self): - if self._browser_profiles is None: - from .browser_profiles.client import BrowserProfilesClient # noqa: E402 - - self._browser_profiles = BrowserProfilesClient(client_wrapper=self._client_wrapper) - return self._browser_profiles - - @property - def prompts(self): - if self._prompts is None: - from .prompts.client import PromptsClient # noqa: E402 - - self._prompts = PromptsClient(client_wrapper=self._client_wrapper) - return self._prompts - @property def scripts(self): if self._scripts is None: @@ -1692,8 +1831,6 @@ class AsyncSkyvern: ) self._raw_client = AsyncRawSkyvern(client_wrapper=self._client_wrapper) self._workflows: typing.Optional[AsyncWorkflowsClient] = None - self._browser_profiles: typing.Optional[AsyncBrowserProfilesClient] = None - self._prompts: typing.Optional[AsyncPromptsClient] = None self._scripts: typing.Optional[AsyncScriptsClient] = None @property @@ -1715,7 +1852,7 @@ class AsyncSkyvern: url: typing.Optional[str] = OMIT, engine: typing.Optional[RunEngine] = OMIT, title: typing.Optional[str] = OMIT, - proxy_location: typing.Optional[ProxyLocation] = OMIT, + proxy_location: typing.Optional[TaskRunRequestProxyLocation] = 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, @@ -1753,7 +1890,7 @@ class AsyncSkyvern: title : typing.Optional[str] The title for the task - proxy_location : typing.Optional[ProxyLocation] + proxy_location : typing.Optional[TaskRunRequestProxyLocation] Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. @@ -1777,6 +1914,7 @@ class AsyncSkyvern: - US-FL: Florida - US-WA: Washington - NONE: No proxy + Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"} data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema] @@ -1886,7 +2024,7 @@ class AsyncSkyvern: 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, + proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = OMIT, webhook_url: typing.Optional[str] = OMIT, totp_url: typing.Optional[str] = OMIT, totp_identifier: typing.Optional[str] = OMIT, @@ -1919,7 +2057,7 @@ class AsyncSkyvern: title : typing.Optional[str] The title for this workflow run - proxy_location : typing.Optional[ProxyLocation] + proxy_location : typing.Optional[WorkflowRunRequestProxyLocation] Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. @@ -1943,6 +2081,7 @@ class AsyncSkyvern: - US-FL: Florida - US-WA: Washington - NONE: No proxy + Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"} 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. @@ -2529,6 +2668,192 @@ class AsyncSkyvern: _response = await self._raw_client.get_run_timeline(run_id, request_options=request_options) return _response.data + async def list_browser_profiles( + self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None + ) -> typing.List[BrowserProfile]: + """ + Get all browser profiles for the organization + + Parameters + ---------- + include_deleted : typing.Optional[bool] + Include deleted browser profiles + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[BrowserProfile] + Successfully retrieved browser profiles + + Examples + -------- + import asyncio + + from skyvern import AsyncSkyvern + + client = AsyncSkyvern( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.list_browser_profiles( + include_deleted=True, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.list_browser_profiles( + include_deleted=include_deleted, request_options=request_options + ) + return _response.data + + async def create_browser_profile( + self, + *, + name: str, + description: typing.Optional[str] = OMIT, + browser_session_id: typing.Optional[str] = OMIT, + workflow_run_id: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> BrowserProfile: + """ + Create a browser profile from a persistent browser session or workflow run. + + Parameters + ---------- + name : str + Name for the browser profile + + description : typing.Optional[str] + Optional profile description + + browser_session_id : typing.Optional[str] + Persistent browser session to convert into a profile + + workflow_run_id : typing.Optional[str] + Workflow run whose persisted session should be captured + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + BrowserProfile + Successfully created browser profile + + Examples + -------- + import asyncio + + from skyvern import AsyncSkyvern + + client = AsyncSkyvern( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.create_browser_profile( + name="name", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create_browser_profile( + name=name, + description=description, + browser_session_id=browser_session_id, + workflow_run_id=workflow_run_id, + request_options=request_options, + ) + return _response.data + + async def get_browser_profile( + self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> BrowserProfile: + """ + Get a specific browser profile by ID + + Parameters + ---------- + profile_id : str + The ID of the browser profile. browser_profile_id starts with `bp_` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + BrowserProfile + Successfully retrieved browser profile + + Examples + -------- + import asyncio + + from skyvern import AsyncSkyvern + + client = AsyncSkyvern( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.get_browser_profile( + profile_id="bp_123456", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_browser_profile(profile_id, request_options=request_options) + return _response.data + + async def delete_browser_profile( + self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> None: + """ + Delete a browser profile (soft delete) + + Parameters + ---------- + profile_id : str + The ID of the browser profile to delete. browser_profile_id starts with `bp_` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from skyvern import AsyncSkyvern + + client = AsyncSkyvern( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.delete_browser_profile( + profile_id="bp_123456", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.delete_browser_profile(profile_id, request_options=request_options) + return _response.data + async def get_browser_sessions( self, *, request_options: typing.Optional[RequestOptions] = None ) -> typing.List[BrowserSessionResponse]: @@ -3404,22 +3729,6 @@ class AsyncSkyvern: self._workflows = AsyncWorkflowsClient(client_wrapper=self._client_wrapper) return self._workflows - @property - def browser_profiles(self): - if self._browser_profiles is None: - from .browser_profiles.client import AsyncBrowserProfilesClient # noqa: E402 - - self._browser_profiles = AsyncBrowserProfilesClient(client_wrapper=self._client_wrapper) - return self._browser_profiles - - @property - def prompts(self): - if self._prompts is None: - from .prompts.client import AsyncPromptsClient # noqa: E402 - - self._prompts = AsyncPromptsClient(client_wrapper=self._client_wrapper) - return self._prompts - @property def scripts(self): if self._scripts is None: diff --git a/skyvern/client/core/client_wrapper.py b/skyvern/client/core/client_wrapper.py index 032db33b..250076cb 100644 --- a/skyvern/client/core/client_wrapper.py +++ b/skyvern/client/core/client_wrapper.py @@ -22,10 +22,10 @@ class BaseClientWrapper: def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "skyvern/1.0.0", + "User-Agent": "skyvern/1.0.2", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "skyvern", - "X-Fern-SDK-Version": "1.0.0", + "X-Fern-SDK-Version": "1.0.2", **(self.get_custom_headers() or {}), } if self._api_key is not None: diff --git a/skyvern/client/core/pydantic_utilities.py b/skyvern/client/core/pydantic_utilities.py index 3c9f525e..8906cdfa 100644 --- a/skyvern/client/core/pydantic_utilities.py +++ b/skyvern/client/core/pydantic_utilities.py @@ -7,10 +7,6 @@ from typing import Any, Callable, ClassVar, Dict, List, Mapping, Optional, Set, import pydantic -from .datetime_utils import serialize_datetime -from .serialization import convert_and_respect_annotation_metadata -from typing_extensions import TypeAlias - IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.") if IS_PYDANTIC_V2: @@ -32,6 +28,9 @@ else: 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] +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) @@ -248,7 +247,7 @@ def _get_model_fields(model: Type["Model"]) -> Mapping[str, PydanticField]: def _get_field_default(field: PydanticField) -> Any: try: value = field.get_default() # type: ignore[union-attr] - except Exception: + except: value = field.default if IS_PYDANTIC_V2: from pydantic_core import PydanticUndefined diff --git a/skyvern/client/core/serialization.py b/skyvern/client/core/serialization.py index c898c34f..c36e865c 100644 --- a/skyvern/client/core/serialization.py +++ b/skyvern/client/core/serialization.py @@ -72,7 +72,7 @@ def convert_and_respect_annotation_metadata( if ( typing_extensions.get_origin(clean_type) == typing.Dict - or typing_extensions.get_origin(clean_type) is dict + or typing_extensions.get_origin(clean_type) == dict or clean_type == typing.Dict ) and isinstance(object_, typing.Dict): key_type = typing_extensions.get_args(clean_type)[0] @@ -92,7 +92,7 @@ def convert_and_respect_annotation_metadata( if not isinstance(object_, str): if ( typing_extensions.get_origin(clean_type) == typing.Set - or typing_extensions.get_origin(clean_type) is set + or typing_extensions.get_origin(clean_type) == set or clean_type == typing.Set ) and isinstance(object_, typing.Set): inner_type = typing_extensions.get_args(clean_type)[0] @@ -108,14 +108,14 @@ def convert_and_respect_annotation_metadata( elif ( ( typing_extensions.get_origin(clean_type) == typing.List - or typing_extensions.get_origin(clean_type) is list + or typing_extensions.get_origin(clean_type) == list or clean_type == typing.List ) and isinstance(object_, typing.List) ) or ( ( typing_extensions.get_origin(clean_type) == typing.Sequence - or typing_extensions.get_origin(clean_type) is collections.abc.Sequence + or typing_extensions.get_origin(clean_type) == collections.abc.Sequence or clean_type == typing.Sequence ) and isinstance(object_, typing.Sequence) @@ -131,7 +131,7 @@ def convert_and_respect_annotation_metadata( for item in object_ ] - if typing_extensions.get_origin(clean_type) is typing.Union: + if typing_extensions.get_origin(clean_type) == typing.Union: # We should be able to ~relatively~ safely try to convert keys against all # member types in the union, the edge case here is if one member aliases a field # of the same name to a different name from another member diff --git a/skyvern/client/errors/__init__.py b/skyvern/client/errors/__init__.py index ccd00f5f..40b20591 100644 --- a/skyvern/client/errors/__init__.py +++ b/skyvern/client/errors/__init__.py @@ -7,11 +7,13 @@ from importlib import import_module if typing.TYPE_CHECKING: from .bad_request_error import BadRequestError + from .conflict_error import ConflictError 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", + "ConflictError": ".conflict_error", "ForbiddenError": ".forbidden_error", "NotFoundError": ".not_found_error", "UnprocessableEntityError": ".unprocessable_entity_error", @@ -39,4 +41,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["BadRequestError", "ForbiddenError", "NotFoundError", "UnprocessableEntityError"] +__all__ = ["BadRequestError", "ConflictError", "ForbiddenError", "NotFoundError", "UnprocessableEntityError"] diff --git a/skyvern/client/errors/conflict_error.py b/skyvern/client/errors/conflict_error.py new file mode 100644 index 00000000..d340b91c --- /dev/null +++ b/skyvern/client/errors/conflict_error.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ..core.api_error import ApiError + + +class ConflictError(ApiError): + def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None): + super().__init__(status_code=409, headers=headers, body=body) diff --git a/skyvern/client/prompts/__init__.py b/skyvern/client/prompts/__init__.py deleted file mode 100644 index 5cde0202..00000000 --- a/skyvern/client/prompts/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# isort: skip_file - diff --git a/skyvern/client/prompts/client.py b/skyvern/client/prompts/client.py deleted file mode 100644 index 333a06a1..00000000 --- a/skyvern/client/prompts/client.py +++ /dev/null @@ -1,145 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ..core.request_options import RequestOptions -from ..types.improve_prompt_response import ImprovePromptResponse -from .raw_client import AsyncRawPromptsClient, RawPromptsClient - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class PromptsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawPromptsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> RawPromptsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - RawPromptsClient - """ - return self._raw_client - - def improve_prompt( - self, - *, - use_case: str, - prompt: str, - context: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> ImprovePromptResponse: - """ - Improve a prompt based on a specific use-case - - Parameters - ---------- - use_case : str - The use-case for prompt improvement - - prompt : str - The original prompt to improve - - context : typing.Optional[str] - Additional context about the user's needs - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - ImprovePromptResponse - Successful Response - - Examples - -------- - from skyvern import Skyvern - - client = Skyvern( - api_key="YOUR_API_KEY", - ) - client.prompts.improve_prompt( - use_case="use-case", - prompt="prompt", - ) - """ - _response = self._raw_client.improve_prompt( - use_case=use_case, prompt=prompt, context=context, request_options=request_options - ) - return _response.data - - -class AsyncPromptsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawPromptsClient(client_wrapper=client_wrapper) - - @property - def with_raw_response(self) -> AsyncRawPromptsClient: - """ - Retrieves a raw implementation of this client that returns raw responses. - - Returns - ------- - AsyncRawPromptsClient - """ - return self._raw_client - - async def improve_prompt( - self, - *, - use_case: str, - prompt: str, - context: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> ImprovePromptResponse: - """ - Improve a prompt based on a specific use-case - - Parameters - ---------- - use_case : str - The use-case for prompt improvement - - prompt : str - The original prompt to improve - - context : typing.Optional[str] - Additional context about the user's needs - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - ImprovePromptResponse - Successful Response - - Examples - -------- - import asyncio - - from skyvern import AsyncSkyvern - - client = AsyncSkyvern( - api_key="YOUR_API_KEY", - ) - - - async def main() -> None: - await client.prompts.improve_prompt( - use_case="use-case", - prompt="prompt", - ) - - - asyncio.run(main()) - """ - _response = await self._raw_client.improve_prompt( - use_case=use_case, prompt=prompt, context=context, request_options=request_options - ) - return _response.data diff --git a/skyvern/client/prompts/raw_client.py b/skyvern/client/prompts/raw_client.py deleted file mode 100644 index 0eda599b..00000000 --- a/skyvern/client/prompts/raw_client.py +++ /dev/null @@ -1,169 +0,0 @@ -# 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.pydantic_utilities import parse_obj_as -from ..core.request_options import RequestOptions -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.improve_prompt_response import ImprovePromptResponse - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class RawPromptsClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def improve_prompt( - self, - *, - use_case: str, - prompt: str, - context: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[ImprovePromptResponse]: - """ - Improve a prompt based on a specific use-case - - Parameters - ---------- - use_case : str - The use-case for prompt improvement - - prompt : str - The original prompt to improve - - context : typing.Optional[str] - Additional context about the user's needs - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - HttpResponse[ImprovePromptResponse] - Successful Response - """ - _response = self._client_wrapper.httpx_client.request( - "v1/prompts/improve", - method="POST", - params={ - "use-case": use_case, - }, - json={ - "context": context, - "prompt": prompt, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - ImprovePromptResponse, - parse_obj_as( - type_=ImprovePromptResponse, # 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 AsyncRawPromptsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def improve_prompt( - self, - *, - use_case: str, - prompt: str, - context: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[ImprovePromptResponse]: - """ - Improve a prompt based on a specific use-case - - Parameters - ---------- - use_case : str - The use-case for prompt improvement - - prompt : str - The original prompt to improve - - context : typing.Optional[str] - Additional context about the user's needs - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - AsyncHttpResponse[ImprovePromptResponse] - Successful Response - """ - _response = await self._client_wrapper.httpx_client.request( - "v1/prompts/improve", - method="POST", - params={ - "use-case": use_case, - }, - json={ - "context": context, - "prompt": prompt, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - _data = typing.cast( - ImprovePromptResponse, - parse_obj_as( - type_=ImprovePromptResponse, # 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/raw_client.py b/skyvern/client/raw_client.py index f8a197a6..ddf11c77 100644 --- a/skyvern/client/raw_client.py +++ b/skyvern/client/raw_client.py @@ -12,11 +12,13 @@ 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.conflict_error import ConflictError 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_profile import BrowserProfile from .types.browser_session_response import BrowserSessionResponse from .types.create_credential_request_credential import CreateCredentialRequestCredential from .types.create_script_response import CreateScriptResponse @@ -31,10 +33,12 @@ 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_request_proxy_location import TaskRunRequestProxyLocation 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_request_proxy_location import WorkflowRunRequestProxyLocation from .types.workflow_run_response import WorkflowRunResponse from .types.workflow_run_timeline import WorkflowRunTimeline from .types.workflow_status import WorkflowStatus @@ -55,7 +59,7 @@ class RawSkyvern: url: typing.Optional[str] = OMIT, engine: typing.Optional[RunEngine] = OMIT, title: typing.Optional[str] = OMIT, - proxy_location: typing.Optional[ProxyLocation] = OMIT, + proxy_location: typing.Optional[TaskRunRequestProxyLocation] = 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, @@ -93,7 +97,7 @@ class RawSkyvern: title : typing.Optional[str] The title for the task - proxy_location : typing.Optional[ProxyLocation] + proxy_location : typing.Optional[TaskRunRequestProxyLocation] Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. @@ -117,6 +121,7 @@ class RawSkyvern: - US-FL: Florida - US-WA: Washington - NONE: No proxy + Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"} data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema] @@ -181,7 +186,9 @@ class RawSkyvern: "url": url, "engine": engine, "title": title, - "proxy_location": proxy_location, + "proxy_location": convert_and_respect_annotation_metadata( + object_=proxy_location, annotation=TaskRunRequestProxyLocation, direction="write" + ), "data_extraction_schema": convert_and_respect_annotation_metadata( object_=data_extraction_schema, annotation=TaskRunRequestDataExtractionSchema, direction="write" ), @@ -251,7 +258,7 @@ class RawSkyvern: 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, + proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = OMIT, webhook_url: typing.Optional[str] = OMIT, totp_url: typing.Optional[str] = OMIT, totp_identifier: typing.Optional[str] = OMIT, @@ -284,7 +291,7 @@ class RawSkyvern: title : typing.Optional[str] The title for this workflow run - proxy_location : typing.Optional[ProxyLocation] + proxy_location : typing.Optional[WorkflowRunRequestProxyLocation] Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. @@ -308,6 +315,7 @@ class RawSkyvern: - US-FL: Florida - US-WA: Washington - NONE: No proxy + Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"} 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. @@ -359,7 +367,9 @@ class RawSkyvern: "workflow_id": workflow_id, "parameters": parameters, "title": title, - "proxy_location": proxy_location, + "proxy_location": convert_and_respect_annotation_metadata( + object_=proxy_location, annotation=WorkflowRunRequestProxyLocation, direction="write" + ), "webhook_url": webhook_url, "totp_url": totp_url, "totp_identifier": totp_identifier, @@ -1066,6 +1076,270 @@ class RawSkyvern: 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 list_browser_profiles( + self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[typing.List[BrowserProfile]]: + """ + Get all browser profiles for the organization + + Parameters + ---------- + include_deleted : typing.Optional[bool] + Include deleted browser profiles + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[typing.List[BrowserProfile]] + Successfully retrieved browser profiles + """ + _response = self._client_wrapper.httpx_client.request( + "v1/browser_profiles", + method="GET", + params={ + "include_deleted": include_deleted, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[BrowserProfile], + parse_obj_as( + type_=typing.List[BrowserProfile], # 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_browser_profile( + self, + *, + name: str, + description: typing.Optional[str] = OMIT, + browser_session_id: typing.Optional[str] = OMIT, + workflow_run_id: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[BrowserProfile]: + """ + Create a browser profile from a persistent browser session or workflow run. + + Parameters + ---------- + name : str + Name for the browser profile + + description : typing.Optional[str] + Optional profile description + + browser_session_id : typing.Optional[str] + Persistent browser session to convert into a profile + + workflow_run_id : typing.Optional[str] + Workflow run whose persisted session should be captured + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[BrowserProfile] + Successfully created browser profile + """ + _response = self._client_wrapper.httpx_client.request( + "v1/browser_profiles", + method="POST", + json={ + "name": name, + "description": description, + "browser_session_id": browser_session_id, + "workflow_run_id": workflow_run_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + BrowserProfile, + parse_obj_as( + type_=BrowserProfile, # 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 == 409: + raise ConflictError( + 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_profile( + self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[BrowserProfile]: + """ + Get a specific browser profile by ID + + Parameters + ---------- + profile_id : str + The ID of the browser profile. browser_profile_id starts with `bp_` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[BrowserProfile] + Successfully retrieved browser profile + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/browser_profiles/{jsonable_encoder(profile_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + BrowserProfile, + parse_obj_as( + type_=BrowserProfile, # 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 delete_browser_profile( + self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[None]: + """ + Delete a browser profile (soft delete) + + Parameters + ---------- + profile_id : str + The ID of the browser profile to delete. browser_profile_id starts with `bp_` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[None] + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/browser_profiles/{jsonable_encoder(profile_id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return HttpResponse(response=_response, data=None) + 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]]: @@ -2176,7 +2450,7 @@ class AsyncRawSkyvern: url: typing.Optional[str] = OMIT, engine: typing.Optional[RunEngine] = OMIT, title: typing.Optional[str] = OMIT, - proxy_location: typing.Optional[ProxyLocation] = OMIT, + proxy_location: typing.Optional[TaskRunRequestProxyLocation] = 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, @@ -2214,7 +2488,7 @@ class AsyncRawSkyvern: title : typing.Optional[str] The title for the task - proxy_location : typing.Optional[ProxyLocation] + proxy_location : typing.Optional[TaskRunRequestProxyLocation] Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. @@ -2238,6 +2512,7 @@ class AsyncRawSkyvern: - US-FL: Florida - US-WA: Washington - NONE: No proxy + Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"} data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema] @@ -2302,7 +2577,9 @@ class AsyncRawSkyvern: "url": url, "engine": engine, "title": title, - "proxy_location": proxy_location, + "proxy_location": convert_and_respect_annotation_metadata( + object_=proxy_location, annotation=TaskRunRequestProxyLocation, direction="write" + ), "data_extraction_schema": convert_and_respect_annotation_metadata( object_=data_extraction_schema, annotation=TaskRunRequestDataExtractionSchema, direction="write" ), @@ -2372,7 +2649,7 @@ class AsyncRawSkyvern: 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, + proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = OMIT, webhook_url: typing.Optional[str] = OMIT, totp_url: typing.Optional[str] = OMIT, totp_identifier: typing.Optional[str] = OMIT, @@ -2405,7 +2682,7 @@ class AsyncRawSkyvern: title : typing.Optional[str] The title for this workflow run - proxy_location : typing.Optional[ProxyLocation] + proxy_location : typing.Optional[WorkflowRunRequestProxyLocation] Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. @@ -2429,6 +2706,7 @@ class AsyncRawSkyvern: - US-FL: Florida - US-WA: Washington - NONE: No proxy + Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"} 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. @@ -2480,7 +2758,9 @@ class AsyncRawSkyvern: "workflow_id": workflow_id, "parameters": parameters, "title": title, - "proxy_location": proxy_location, + "proxy_location": convert_and_respect_annotation_metadata( + object_=proxy_location, annotation=WorkflowRunRequestProxyLocation, direction="write" + ), "webhook_url": webhook_url, "totp_url": totp_url, "totp_identifier": totp_identifier, @@ -3187,6 +3467,270 @@ class AsyncRawSkyvern: 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 list_browser_profiles( + self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[typing.List[BrowserProfile]]: + """ + Get all browser profiles for the organization + + Parameters + ---------- + include_deleted : typing.Optional[bool] + Include deleted browser profiles + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[typing.List[BrowserProfile]] + Successfully retrieved browser profiles + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/browser_profiles", + method="GET", + params={ + "include_deleted": include_deleted, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + typing.List[BrowserProfile], + parse_obj_as( + type_=typing.List[BrowserProfile], # 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_browser_profile( + self, + *, + name: str, + description: typing.Optional[str] = OMIT, + browser_session_id: typing.Optional[str] = OMIT, + workflow_run_id: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[BrowserProfile]: + """ + Create a browser profile from a persistent browser session or workflow run. + + Parameters + ---------- + name : str + Name for the browser profile + + description : typing.Optional[str] + Optional profile description + + browser_session_id : typing.Optional[str] + Persistent browser session to convert into a profile + + workflow_run_id : typing.Optional[str] + Workflow run whose persisted session should be captured + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[BrowserProfile] + Successfully created browser profile + """ + _response = await self._client_wrapper.httpx_client.request( + "v1/browser_profiles", + method="POST", + json={ + "name": name, + "description": description, + "browser_session_id": browser_session_id, + "workflow_run_id": workflow_run_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + BrowserProfile, + parse_obj_as( + type_=BrowserProfile, # 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 == 409: + raise ConflictError( + 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_profile( + self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[BrowserProfile]: + """ + Get a specific browser profile by ID + + Parameters + ---------- + profile_id : str + The ID of the browser profile. browser_profile_id starts with `bp_` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[BrowserProfile] + Successfully retrieved browser profile + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/browser_profiles/{jsonable_encoder(profile_id)}", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + BrowserProfile, + parse_obj_as( + type_=BrowserProfile, # 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 delete_browser_profile( + self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[None]: + """ + Delete a browser profile (soft delete) + + Parameters + ---------- + profile_id : str + The ID of the browser profile to delete. browser_profile_id starts with `bp_` + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[None] + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/browser_profiles/{jsonable_encoder(profile_id)}", + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return AsyncHttpResponse(response=_response, data=None) + 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]]: diff --git a/skyvern/client/types/__init__.py b/skyvern/client/types/__init__.py index d8c37c62..d82e0f68 100644 --- a/skyvern/client/types/__init__.py +++ b/skyvern/client/types/__init__.py @@ -42,6 +42,8 @@ if typing.TYPE_CHECKING: from .bitwarden_sensitive_information_parameter import BitwardenSensitiveInformationParameter from .bitwarden_sensitive_information_parameter_yaml import BitwardenSensitiveInformationParameterYaml from .block_type import BlockType + from .branch_condition import BranchCondition + from .branch_criteria import BranchCriteria from .browser_profile import BrowserProfile from .browser_session_response import BrowserSessionResponse from .click_action import ClickAction @@ -63,6 +65,7 @@ if typing.TYPE_CHECKING: CodeBlockParametersItem_Workflow, ) from .code_block_yaml import CodeBlockYaml + from .conditional_block import ConditionalBlock from .context_parameter import ContextParameter from .context_parameter_source import ( ContextParameterSource, @@ -143,6 +146,7 @@ if typing.TYPE_CHECKING: ForLoopBlockLoopBlocksItem, ForLoopBlockLoopBlocksItem_Action, ForLoopBlockLoopBlocksItem_Code, + ForLoopBlockLoopBlocksItem_Conditional, ForLoopBlockLoopBlocksItem_DownloadToS3, ForLoopBlockLoopBlocksItem_Extraction, ForLoopBlockLoopBlocksItem_FileDownload, @@ -202,6 +206,7 @@ if typing.TYPE_CHECKING: ForLoopBlockYamlLoopBlocksItem_Validation, ForLoopBlockYamlLoopBlocksItem_Wait, ) + from .geo_target import GeoTarget from .get_run_response import ( GetRunResponse, GetRunResponse_AnthropicCua, @@ -245,7 +250,6 @@ if typing.TYPE_CHECKING: HumanInteractionBlockParametersItem_Workflow, ) from .human_interaction_block_yaml import HumanInteractionBlockYaml - from .improve_prompt_response import ImprovePromptResponse from .input_or_select_context import InputOrSelectContext from .input_text_action import InputTextAction from .input_text_action_data import InputTextActionData @@ -338,6 +342,7 @@ if typing.TYPE_CHECKING: 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_request_proxy_location import TaskRunRequestProxyLocation from .task_run_response import TaskRunResponse from .task_run_response_output import TaskRunResponseOutput from .task_v2block import TaskV2Block @@ -422,11 +427,13 @@ if typing.TYPE_CHECKING: from .wait_block_yaml import WaitBlockYaml from .workflow import Workflow from .workflow_create_yaml_request import WorkflowCreateYamlRequest + from .workflow_create_yaml_request_proxy_location import WorkflowCreateYamlRequestProxyLocation from .workflow_definition import WorkflowDefinition from .workflow_definition_blocks_item import ( WorkflowDefinitionBlocksItem, WorkflowDefinitionBlocksItem_Action, WorkflowDefinitionBlocksItem_Code, + WorkflowDefinitionBlocksItem_Conditional, WorkflowDefinitionBlocksItem_DownloadToS3, WorkflowDefinitionBlocksItem_Extraction, WorkflowDefinitionBlocksItem_FileDownload, @@ -504,12 +511,14 @@ if typing.TYPE_CHECKING: from .workflow_parameter_type import WorkflowParameterType from .workflow_parameter_yaml import WorkflowParameterYaml from .workflow_parameter_yaml_default_value import WorkflowParameterYamlDefaultValue + from .workflow_proxy_location import WorkflowProxyLocation 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_request_proxy_location import WorkflowRunRequestProxyLocation from .workflow_run_response import WorkflowRunResponse from .workflow_run_response_output import WorkflowRunResponseOutput from .workflow_run_timeline import WorkflowRunTimeline @@ -550,6 +559,8 @@ _dynamic_imports: typing.Dict[str, str] = { "BitwardenSensitiveInformationParameter": ".bitwarden_sensitive_information_parameter", "BitwardenSensitiveInformationParameterYaml": ".bitwarden_sensitive_information_parameter_yaml", "BlockType": ".block_type", + "BranchCondition": ".branch_condition", + "BranchCriteria": ".branch_criteria", "BrowserProfile": ".browser_profile", "BrowserSessionResponse": ".browser_session_response", "ClickAction": ".click_action", @@ -569,6 +580,7 @@ _dynamic_imports: typing.Dict[str, str] = { "CodeBlockParametersItem_Output": ".code_block_parameters_item", "CodeBlockParametersItem_Workflow": ".code_block_parameters_item", "CodeBlockYaml": ".code_block_yaml", + "ConditionalBlock": ".conditional_block", "ContextParameter": ".context_parameter", "ContextParameterSource": ".context_parameter_source", "ContextParameterSource_AwsSecret": ".context_parameter_source", @@ -642,6 +654,7 @@ _dynamic_imports: typing.Dict[str, str] = { "ForLoopBlockLoopBlocksItem": ".for_loop_block_loop_blocks_item", "ForLoopBlockLoopBlocksItem_Action": ".for_loop_block_loop_blocks_item", "ForLoopBlockLoopBlocksItem_Code": ".for_loop_block_loop_blocks_item", + "ForLoopBlockLoopBlocksItem_Conditional": ".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", @@ -696,6 +709,7 @@ _dynamic_imports: typing.Dict[str, str] = { "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", + "GeoTarget": ".geo_target", "GetRunResponse": ".get_run_response", "GetRunResponse_AnthropicCua": ".get_run_response", "GetRunResponse_OpenaiCua": ".get_run_response", @@ -733,7 +747,6 @@ _dynamic_imports: typing.Dict[str, str] = { "HumanInteractionBlockParametersItem_Output": ".human_interaction_block_parameters_item", "HumanInteractionBlockParametersItem_Workflow": ".human_interaction_block_parameters_item", "HumanInteractionBlockYaml": ".human_interaction_block_yaml", - "ImprovePromptResponse": ".improve_prompt_response", "InputOrSelectContext": ".input_or_select_context", "InputTextAction": ".input_text_action", "InputTextActionData": ".input_text_action_data", @@ -818,6 +831,7 @@ _dynamic_imports: typing.Dict[str, str] = { "TaskBlockYamlDataSchema": ".task_block_yaml_data_schema", "TaskRunRequest": ".task_run_request", "TaskRunRequestDataExtractionSchema": ".task_run_request_data_extraction_schema", + "TaskRunRequestProxyLocation": ".task_run_request_proxy_location", "TaskRunResponse": ".task_run_response", "TaskRunResponseOutput": ".task_run_response_output", "TaskV2Block": ".task_v2block", @@ -894,10 +908,12 @@ _dynamic_imports: typing.Dict[str, str] = { "WaitBlockYaml": ".wait_block_yaml", "Workflow": ".workflow", "WorkflowCreateYamlRequest": ".workflow_create_yaml_request", + "WorkflowCreateYamlRequestProxyLocation": ".workflow_create_yaml_request_proxy_location", "WorkflowDefinition": ".workflow_definition", "WorkflowDefinitionBlocksItem": ".workflow_definition_blocks_item", "WorkflowDefinitionBlocksItem_Action": ".workflow_definition_blocks_item", "WorkflowDefinitionBlocksItem_Code": ".workflow_definition_blocks_item", + "WorkflowDefinitionBlocksItem_Conditional": ".workflow_definition_blocks_item", "WorkflowDefinitionBlocksItem_DownloadToS3": ".workflow_definition_blocks_item", "WorkflowDefinitionBlocksItem_Extraction": ".workflow_definition_blocks_item", "WorkflowDefinitionBlocksItem_FileDownload": ".workflow_definition_blocks_item", @@ -968,12 +984,14 @@ _dynamic_imports: typing.Dict[str, str] = { "WorkflowParameterType": ".workflow_parameter_type", "WorkflowParameterYaml": ".workflow_parameter_yaml", "WorkflowParameterYamlDefaultValue": ".workflow_parameter_yaml_default_value", + "WorkflowProxyLocation": ".workflow_proxy_location", "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", + "WorkflowRunRequestProxyLocation": ".workflow_run_request_proxy_location", "WorkflowRunResponse": ".workflow_run_response", "WorkflowRunResponseOutput": ".workflow_run_response_output", "WorkflowRunTimeline": ".workflow_run_timeline", @@ -1038,6 +1056,8 @@ __all__ = [ "BitwardenSensitiveInformationParameter", "BitwardenSensitiveInformationParameterYaml", "BlockType", + "BranchCondition", + "BranchCriteria", "BrowserProfile", "BrowserSessionResponse", "ClickAction", @@ -1057,6 +1077,7 @@ __all__ = [ "CodeBlockParametersItem_Output", "CodeBlockParametersItem_Workflow", "CodeBlockYaml", + "ConditionalBlock", "ContextParameter", "ContextParameterSource", "ContextParameterSource_AwsSecret", @@ -1130,6 +1151,7 @@ __all__ = [ "ForLoopBlockLoopBlocksItem", "ForLoopBlockLoopBlocksItem_Action", "ForLoopBlockLoopBlocksItem_Code", + "ForLoopBlockLoopBlocksItem_Conditional", "ForLoopBlockLoopBlocksItem_DownloadToS3", "ForLoopBlockLoopBlocksItem_Extraction", "ForLoopBlockLoopBlocksItem_FileDownload", @@ -1184,6 +1206,7 @@ __all__ = [ "ForLoopBlockYamlLoopBlocksItem_UploadToS3", "ForLoopBlockYamlLoopBlocksItem_Validation", "ForLoopBlockYamlLoopBlocksItem_Wait", + "GeoTarget", "GetRunResponse", "GetRunResponse_AnthropicCua", "GetRunResponse_OpenaiCua", @@ -1221,7 +1244,6 @@ __all__ = [ "HumanInteractionBlockParametersItem_Output", "HumanInteractionBlockParametersItem_Workflow", "HumanInteractionBlockYaml", - "ImprovePromptResponse", "InputOrSelectContext", "InputTextAction", "InputTextActionData", @@ -1306,6 +1328,7 @@ __all__ = [ "TaskBlockYamlDataSchema", "TaskRunRequest", "TaskRunRequestDataExtractionSchema", + "TaskRunRequestProxyLocation", "TaskRunResponse", "TaskRunResponseOutput", "TaskV2Block", @@ -1382,10 +1405,12 @@ __all__ = [ "WaitBlockYaml", "Workflow", "WorkflowCreateYamlRequest", + "WorkflowCreateYamlRequestProxyLocation", "WorkflowDefinition", "WorkflowDefinitionBlocksItem", "WorkflowDefinitionBlocksItem_Action", "WorkflowDefinitionBlocksItem_Code", + "WorkflowDefinitionBlocksItem_Conditional", "WorkflowDefinitionBlocksItem_DownloadToS3", "WorkflowDefinitionBlocksItem_Extraction", "WorkflowDefinitionBlocksItem_FileDownload", @@ -1456,12 +1481,14 @@ __all__ = [ "WorkflowParameterType", "WorkflowParameterYaml", "WorkflowParameterYamlDefaultValue", + "WorkflowProxyLocation", "WorkflowRequest", "WorkflowRunBlock", "WorkflowRunBlockDataSchema", "WorkflowRunBlockNavigationPayload", "WorkflowRunBlockOutput", "WorkflowRunRequest", + "WorkflowRunRequestProxyLocation", "WorkflowRunResponse", "WorkflowRunResponseOutput", "WorkflowRunTimeline", diff --git a/skyvern/client/types/action_block.py b/skyvern/client/types/action_block.py index d134460b..70abe42b 100644 --- a/skyvern/client/types/action_block.py +++ b/skyvern/client/types/action_block.py @@ -13,7 +13,16 @@ from .run_engine import RunEngine class ActionBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -35,7 +44,6 @@ class ActionBlock(UniversalBaseModel): 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 diff --git a/skyvern/client/types/action_block_yaml.py b/skyvern/client/types/action_block_yaml.py index 6319eb0d..e637b990 100644 --- a/skyvern/client/types/action_block_yaml.py +++ b/skyvern/client/types/action_block_yaml.py @@ -8,7 +8,16 @@ from .run_engine import RunEngine class ActionBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: typing.Optional[str] = None @@ -22,7 +31,6 @@ class ActionBlockYaml(UniversalBaseModel): 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 disable_cache: typing.Optional[bool] = None if IS_PYDANTIC_V2: diff --git a/skyvern/client/types/block_type.py b/skyvern/client/types/block_type.py index 8aca5226..7aa23bfb 100644 --- a/skyvern/client/types/block_type.py +++ b/skyvern/client/types/block_type.py @@ -7,6 +7,7 @@ BlockType = typing.Union[ "task", "task_v2", "for_loop", + "conditional", "code", "text_prompt", "download_to_s3", diff --git a/skyvern/client/types/branch_condition.py b/skyvern/client/types/branch_condition.py new file mode 100644 index 00000000..a40e98b9 --- /dev/null +++ b/skyvern/client/types/branch_condition.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .branch_criteria import BranchCriteria + + +class BranchCondition(UniversalBaseModel): + """ + Represents a single conditional branch edge within a ConditionalBlock. + """ + + criteria: typing.Optional[BranchCriteria] = None + next_block_label: typing.Optional[str] = None + description: typing.Optional[str] = None + is_default: typing.Optional[bool] = 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 diff --git a/skyvern/client/types/improve_prompt_response.py b/skyvern/client/types/branch_criteria.py similarity index 57% rename from skyvern/client/types/improve_prompt_response.py rename to skyvern/client/types/branch_criteria.py index 546094a5..89c5e59e 100644 --- a/skyvern/client/types/improve_prompt_response.py +++ b/skyvern/client/types/branch_criteria.py @@ -6,21 +6,14 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -class ImprovePromptResponse(UniversalBaseModel): - error: typing.Optional[str] = pydantic.Field(default=None) +class BranchCriteria(UniversalBaseModel): """ - Error message if prompt improvement failed + Abstract interface describing how a branch condition should be evaluated. """ - improved: str = pydantic.Field() - """ - The improved version of the prompt - """ - - original: str = pydantic.Field() - """ - The original prompt provided for improvement - """ + criteria_type: str + expression: str + description: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/skyvern/client/types/code_block.py b/skyvern/client/types/code_block.py index a04b29d6..9b8a131f 100644 --- a/skyvern/client/types/code_block.py +++ b/skyvern/client/types/code_block.py @@ -11,7 +11,16 @@ from .output_parameter import OutputParameter class CodeBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None diff --git a/skyvern/client/types/code_block_yaml.py b/skyvern/client/types/code_block_yaml.py index fbf4ca1b..59ec1c25 100644 --- a/skyvern/client/types/code_block_yaml.py +++ b/skyvern/client/types/code_block_yaml.py @@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class CodeBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None code: str diff --git a/skyvern/client/types/conditional_block.py b/skyvern/client/types/conditional_block.py new file mode 100644 index 00000000..52d790fa --- /dev/null +++ b/skyvern/client/types/conditional_block.py @@ -0,0 +1,39 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .branch_condition import BranchCondition +from .output_parameter import OutputParameter + + +class ConditionalBlock(UniversalBaseModel): + """ + Branching block that selects the next block label based on list-ordered conditions. + """ + + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + + 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 + branch_conditions: typing.Optional[typing.List[BranchCondition]] = 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 diff --git a/skyvern/client/types/download_to_s3block.py b/skyvern/client/types/download_to_s3block.py index ea4d2fba..3dd75bf8 100644 --- a/skyvern/client/types/download_to_s3block.py +++ b/skyvern/client/types/download_to_s3block.py @@ -8,7 +8,16 @@ from .output_parameter import OutputParameter class DownloadToS3Block(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None diff --git a/skyvern/client/types/download_to_s3block_yaml.py b/skyvern/client/types/download_to_s3block_yaml.py index ad916888..ae150416 100644 --- a/skyvern/client/types/download_to_s3block_yaml.py +++ b/skyvern/client/types/download_to_s3block_yaml.py @@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class DownloadToS3BlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: str diff --git a/skyvern/client/types/extraction_block.py b/skyvern/client/types/extraction_block.py index 9b234424..74426711 100644 --- a/skyvern/client/types/extraction_block.py +++ b/skyvern/client/types/extraction_block.py @@ -13,7 +13,16 @@ from .run_engine import RunEngine class ExtractionBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -35,7 +44,6 @@ class ExtractionBlock(UniversalBaseModel): 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 diff --git a/skyvern/client/types/extraction_block_yaml.py b/skyvern/client/types/extraction_block_yaml.py index 57a64bd3..787765f6 100644 --- a/skyvern/client/types/extraction_block_yaml.py +++ b/skyvern/client/types/extraction_block_yaml.py @@ -9,7 +9,16 @@ from .run_engine import RunEngine class ExtractionBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None data_extraction_goal: str @@ -20,7 +29,6 @@ class ExtractionBlockYaml(UniversalBaseModel): max_retries: typing.Optional[int] = None max_steps_per_run: typing.Optional[int] = None parameter_keys: typing.Optional[typing.List[str]] = None - cache_actions: typing.Optional[bool] = None disable_cache: typing.Optional[bool] = None if IS_PYDANTIC_V2: diff --git a/skyvern/client/types/file_download_block.py b/skyvern/client/types/file_download_block.py index d1952cda..c20c05bc 100644 --- a/skyvern/client/types/file_download_block.py +++ b/skyvern/client/types/file_download_block.py @@ -13,7 +13,16 @@ from .run_engine import RunEngine class FileDownloadBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -35,7 +44,6 @@ class FileDownloadBlock(UniversalBaseModel): 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 diff --git a/skyvern/client/types/file_download_block_yaml.py b/skyvern/client/types/file_download_block_yaml.py index 3b8d6c9d..c0882fda 100644 --- a/skyvern/client/types/file_download_block_yaml.py +++ b/skyvern/client/types/file_download_block_yaml.py @@ -8,7 +8,16 @@ from .run_engine import RunEngine class FileDownloadBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None navigation_goal: str @@ -22,7 +31,6 @@ class FileDownloadBlockYaml(UniversalBaseModel): 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 disable_cache: typing.Optional[bool] = None download_timeout: typing.Optional[float] = None diff --git a/skyvern/client/types/file_parser_block.py b/skyvern/client/types/file_parser_block.py index 114af4fd..21ad7e72 100644 --- a/skyvern/client/types/file_parser_block.py +++ b/skyvern/client/types/file_parser_block.py @@ -9,7 +9,16 @@ from .output_parameter import OutputParameter class FileParserBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None diff --git a/skyvern/client/types/file_parser_block_yaml.py b/skyvern/client/types/file_parser_block_yaml.py index 87c11ea3..473f539a 100644 --- a/skyvern/client/types/file_parser_block_yaml.py +++ b/skyvern/client/types/file_parser_block_yaml.py @@ -8,7 +8,16 @@ from .file_type import FileType class FileParserBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None file_url: str diff --git a/skyvern/client/types/file_upload_block.py b/skyvern/client/types/file_upload_block.py index 0b85c6d6..12bafd65 100644 --- a/skyvern/client/types/file_upload_block.py +++ b/skyvern/client/types/file_upload_block.py @@ -11,7 +11,16 @@ from .output_parameter import OutputParameter class FileUploadBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None diff --git a/skyvern/client/types/file_upload_block_yaml.py b/skyvern/client/types/file_upload_block_yaml.py index 6813c56e..f6ba19bf 100644 --- a/skyvern/client/types/file_upload_block_yaml.py +++ b/skyvern/client/types/file_upload_block_yaml.py @@ -10,7 +10,16 @@ from .file_storage_type import FileStorageType class FileUploadBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None storage_type: typing.Optional[FileStorageType] = None diff --git a/skyvern/client/types/for_loop_block.py b/skyvern/client/types/for_loop_block.py index af9853a4..0b5c733a 100644 --- a/skyvern/client/types/for_loop_block.py +++ b/skyvern/client/types/for_loop_block.py @@ -11,7 +11,16 @@ from .output_parameter import OutputParameter class ForLoopBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None 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 1ad899d1..22aeadb1 100644 --- a/skyvern/client/types/for_loop_block_loop_blocks_item.py +++ b/skyvern/client/types/for_loop_block_loop_blocks_item.py @@ -11,6 +11,7 @@ from ..core.serialization import FieldMetadata from .action_block_data_schema import ActionBlockDataSchema from .action_block_parameters_item import ActionBlockParametersItem from .aws_secret_parameter import AwsSecretParameter +from .branch_condition import BranchCondition from .code_block_parameters_item import CodeBlockParametersItem from .extraction_block_data_schema import ExtractionBlockDataSchema from .extraction_block_parameters_item import ExtractionBlockParametersItem @@ -41,6 +42,7 @@ from .wait_block_parameters_item import WaitBlockParametersItem class ForLoopBlockLoopBlocksItem_Action(UniversalBaseModel): block_type: typing.Literal["action"] = "action" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -62,7 +64,6 @@ class ForLoopBlockLoopBlocksItem_Action(UniversalBaseModel): 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 @@ -80,6 +81,7 @@ class ForLoopBlockLoopBlocksItem_Action(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_Code(UniversalBaseModel): block_type: typing.Literal["code"] = "code" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -97,9 +99,30 @@ class ForLoopBlockLoopBlocksItem_Code(UniversalBaseModel): extra = pydantic.Extra.allow +class ForLoopBlockLoopBlocksItem_Conditional(UniversalBaseModel): + block_type: typing.Literal["conditional"] = "conditional" + label: str + next_block_label: typing.Optional[str] = None + 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 + branch_conditions: typing.Optional[typing.List[BranchCondition]] = 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_DownloadToS3(UniversalBaseModel): block_type: typing.Literal["download_to_s3"] = "download_to_s3" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -119,6 +142,7 @@ class ForLoopBlockLoopBlocksItem_DownloadToS3(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_Extraction(UniversalBaseModel): block_type: typing.Literal["extraction"] = "extraction" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -140,7 +164,6 @@ class ForLoopBlockLoopBlocksItem_Extraction(UniversalBaseModel): 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 @@ -158,6 +181,7 @@ class ForLoopBlockLoopBlocksItem_Extraction(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_FileDownload(UniversalBaseModel): block_type: typing.Literal["file_download"] = "file_download" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -179,7 +203,6 @@ class ForLoopBlockLoopBlocksItem_FileDownload(UniversalBaseModel): 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 @@ -197,6 +220,7 @@ class ForLoopBlockLoopBlocksItem_FileDownload(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_FileUpload(UniversalBaseModel): block_type: typing.Literal["file_upload"] = "file_upload" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -224,6 +248,7 @@ class ForLoopBlockLoopBlocksItem_FileUpload(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_FileUrlParser(UniversalBaseModel): block_type: typing.Literal["file_url_parser"] = "file_url_parser" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -245,6 +270,7 @@ class ForLoopBlockLoopBlocksItem_FileUrlParser(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_ForLoop(UniversalBaseModel): block_type: typing.Literal["for_loop"] = "for_loop" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -270,6 +296,7 @@ from .for_loop_block import ForLoopBlock # noqa: E402, F401, I001 class ForLoopBlockLoopBlocksItem_GotoUrl(UniversalBaseModel): block_type: typing.Literal["goto_url"] = "goto_url" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -291,7 +318,6 @@ class ForLoopBlockLoopBlocksItem_GotoUrl(UniversalBaseModel): 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 @@ -309,6 +335,7 @@ class ForLoopBlockLoopBlocksItem_GotoUrl(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_HttpRequest(UniversalBaseModel): block_type: typing.Literal["http_request"] = "http_request" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -334,6 +361,7 @@ class ForLoopBlockLoopBlocksItem_HttpRequest(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_HumanInteraction(UniversalBaseModel): block_type: typing.Literal["human_interaction"] = "human_interaction" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -355,7 +383,6 @@ class ForLoopBlockLoopBlocksItem_HumanInteraction(UniversalBaseModel): 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 @@ -381,6 +408,7 @@ class ForLoopBlockLoopBlocksItem_HumanInteraction(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_Login(UniversalBaseModel): block_type: typing.Literal["login"] = "login" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -402,7 +430,6 @@ class ForLoopBlockLoopBlocksItem_Login(UniversalBaseModel): 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 @@ -420,6 +447,7 @@ class ForLoopBlockLoopBlocksItem_Login(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_Navigation(UniversalBaseModel): block_type: typing.Literal["navigation"] = "navigation" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -441,7 +469,6 @@ class ForLoopBlockLoopBlocksItem_Navigation(UniversalBaseModel): 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 @@ -459,6 +486,7 @@ class ForLoopBlockLoopBlocksItem_Navigation(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_PdfParser(UniversalBaseModel): block_type: typing.Literal["pdf_parser"] = "pdf_parser" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -479,6 +507,7 @@ class ForLoopBlockLoopBlocksItem_PdfParser(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_SendEmail(UniversalBaseModel): block_type: typing.Literal["send_email"] = "send_email" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -506,6 +535,7 @@ class ForLoopBlockLoopBlocksItem_SendEmail(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_Task(UniversalBaseModel): block_type: typing.Literal["task"] = "task" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -527,7 +557,6 @@ class ForLoopBlockLoopBlocksItem_Task(UniversalBaseModel): 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 @@ -545,6 +574,7 @@ class ForLoopBlockLoopBlocksItem_Task(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_TaskV2(UniversalBaseModel): block_type: typing.Literal["task_v2"] = "task_v2" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -569,6 +599,7 @@ class ForLoopBlockLoopBlocksItem_TaskV2(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_TextPrompt(UniversalBaseModel): block_type: typing.Literal["text_prompt"] = "text_prompt" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -591,6 +622,7 @@ class ForLoopBlockLoopBlocksItem_TextPrompt(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_UploadToS3(UniversalBaseModel): block_type: typing.Literal["upload_to_s3"] = "upload_to_s3" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -610,6 +642,7 @@ class ForLoopBlockLoopBlocksItem_UploadToS3(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_Validation(UniversalBaseModel): block_type: typing.Literal["validation"] = "validation" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -631,7 +664,6 @@ class ForLoopBlockLoopBlocksItem_Validation(UniversalBaseModel): 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 @@ -649,6 +681,7 @@ class ForLoopBlockLoopBlocksItem_Validation(UniversalBaseModel): class ForLoopBlockLoopBlocksItem_Wait(UniversalBaseModel): block_type: typing.Literal["wait"] = "wait" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -671,6 +704,7 @@ from .context_parameter import ContextParameter # noqa: E402, F401, I001 ForLoopBlockLoopBlocksItem = typing.Union[ ForLoopBlockLoopBlocksItem_Action, ForLoopBlockLoopBlocksItem_Code, + ForLoopBlockLoopBlocksItem_Conditional, ForLoopBlockLoopBlocksItem_DownloadToS3, ForLoopBlockLoopBlocksItem_Extraction, ForLoopBlockLoopBlocksItem_FileDownload, diff --git a/skyvern/client/types/for_loop_block_yaml.py b/skyvern/client/types/for_loop_block_yaml.py index 341862d7..fc9949b9 100644 --- a/skyvern/client/types/for_loop_block_yaml.py +++ b/skyvern/client/types/for_loop_block_yaml.py @@ -9,7 +9,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update class ForLoopBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None loop_blocks: typing.List["ForLoopBlockYamlLoopBlocksItem"] 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 4cf9e6e4..4ac61204 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 @@ -18,6 +18,7 @@ from .task_block_yaml_data_schema import TaskBlockYamlDataSchema class ForLoopBlockYamlLoopBlocksItem_Task(UniversalBaseModel): block_type: typing.Literal["task"] = "task" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: typing.Optional[str] = None @@ -34,7 +35,6 @@ class ForLoopBlockYamlLoopBlocksItem_Task(UniversalBaseModel): 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 disable_cache: typing.Optional[bool] = None complete_criterion: typing.Optional[str] = None terminate_criterion: typing.Optional[str] = None @@ -54,6 +54,7 @@ class ForLoopBlockYamlLoopBlocksItem_Task(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_ForLoop(UniversalBaseModel): block_type: typing.Literal["for_loop"] = "for_loop" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None loop_blocks: typing.List["ForLoopBlockYamlLoopBlocksItem"] @@ -77,6 +78,7 @@ from .for_loop_block_yaml import ForLoopBlockYaml # noqa: E402, F401, I001 class ForLoopBlockYamlLoopBlocksItem_Code(UniversalBaseModel): block_type: typing.Literal["code"] = "code" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None code: str @@ -95,6 +97,7 @@ class ForLoopBlockYamlLoopBlocksItem_Code(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_TextPrompt(UniversalBaseModel): block_type: typing.Literal["text_prompt"] = "text_prompt" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None llm_key: typing.Optional[str] = None @@ -115,6 +118,7 @@ class ForLoopBlockYamlLoopBlocksItem_TextPrompt(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_DownloadToS3(UniversalBaseModel): block_type: typing.Literal["download_to_s3"] = "download_to_s3" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: str @@ -132,6 +136,7 @@ class ForLoopBlockYamlLoopBlocksItem_DownloadToS3(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_UploadToS3(UniversalBaseModel): block_type: typing.Literal["upload_to_s3"] = "upload_to_s3" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None path: typing.Optional[str] = None @@ -149,6 +154,7 @@ class ForLoopBlockYamlLoopBlocksItem_UploadToS3(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_FileUpload(UniversalBaseModel): block_type: typing.Literal["file_upload"] = "file_upload" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None storage_type: typing.Optional[FileStorageType] = None @@ -175,6 +181,7 @@ class ForLoopBlockYamlLoopBlocksItem_FileUpload(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_SendEmail(UniversalBaseModel): block_type: typing.Literal["send_email"] = "send_email" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None smtp_host_secret_parameter_key: str @@ -200,6 +207,7 @@ class ForLoopBlockYamlLoopBlocksItem_SendEmail(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_FileUrlParser(UniversalBaseModel): block_type: typing.Literal["file_url_parser"] = "file_url_parser" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None file_url: str @@ -219,6 +227,7 @@ class ForLoopBlockYamlLoopBlocksItem_FileUrlParser(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_Validation(UniversalBaseModel): block_type: typing.Literal["validation"] = "validation" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None complete_criterion: typing.Optional[str] = None @@ -240,6 +249,7 @@ class ForLoopBlockYamlLoopBlocksItem_Validation(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_Action(UniversalBaseModel): block_type: typing.Literal["action"] = "action" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: typing.Optional[str] = None @@ -253,7 +263,6 @@ class ForLoopBlockYamlLoopBlocksItem_Action(UniversalBaseModel): 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 disable_cache: typing.Optional[bool] = None if IS_PYDANTIC_V2: @@ -269,6 +278,7 @@ class ForLoopBlockYamlLoopBlocksItem_Action(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_Navigation(UniversalBaseModel): block_type: typing.Literal["navigation"] = "navigation" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None navigation_goal: str @@ -283,7 +293,6 @@ class ForLoopBlockYamlLoopBlocksItem_Navigation(UniversalBaseModel): 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 disable_cache: typing.Optional[bool] = None complete_criterion: typing.Optional[str] = None terminate_criterion: typing.Optional[str] = None @@ -303,6 +312,7 @@ class ForLoopBlockYamlLoopBlocksItem_Navigation(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_Extraction(UniversalBaseModel): block_type: typing.Literal["extraction"] = "extraction" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None data_extraction_goal: str @@ -313,7 +323,6 @@ class ForLoopBlockYamlLoopBlocksItem_Extraction(UniversalBaseModel): max_retries: typing.Optional[int] = None max_steps_per_run: typing.Optional[int] = None parameter_keys: typing.Optional[typing.List[str]] = None - cache_actions: typing.Optional[bool] = None disable_cache: typing.Optional[bool] = None if IS_PYDANTIC_V2: @@ -329,6 +338,7 @@ class ForLoopBlockYamlLoopBlocksItem_Extraction(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_Login(UniversalBaseModel): block_type: typing.Literal["login"] = "login" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: typing.Optional[str] = None @@ -341,7 +351,6 @@ class ForLoopBlockYamlLoopBlocksItem_Login(UniversalBaseModel): parameter_keys: typing.Optional[typing.List[str]] = None totp_verification_url: typing.Optional[str] = None totp_identifier: typing.Optional[str] = None - cache_actions: typing.Optional[bool] = None disable_cache: typing.Optional[bool] = None complete_criterion: typing.Optional[str] = None terminate_criterion: typing.Optional[str] = None @@ -360,6 +369,7 @@ class ForLoopBlockYamlLoopBlocksItem_Login(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_Wait(UniversalBaseModel): block_type: typing.Literal["wait"] = "wait" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None wait_sec: typing.Optional[int] = None @@ -377,6 +387,7 @@ class ForLoopBlockYamlLoopBlocksItem_Wait(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_HumanInteraction(UniversalBaseModel): block_type: typing.Literal["human_interaction"] = "human_interaction" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None instructions: typing.Optional[str] = None @@ -401,6 +412,7 @@ class ForLoopBlockYamlLoopBlocksItem_HumanInteraction(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_FileDownload(UniversalBaseModel): block_type: typing.Literal["file_download"] = "file_download" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None navigation_goal: str @@ -414,7 +426,6 @@ class ForLoopBlockYamlLoopBlocksItem_FileDownload(UniversalBaseModel): 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 disable_cache: typing.Optional[bool] = None download_timeout: typing.Optional[float] = None @@ -431,6 +442,7 @@ class ForLoopBlockYamlLoopBlocksItem_FileDownload(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_GotoUrl(UniversalBaseModel): block_type: typing.Literal["goto_url"] = "goto_url" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: str @@ -448,6 +460,7 @@ class ForLoopBlockYamlLoopBlocksItem_GotoUrl(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_PdfParser(UniversalBaseModel): block_type: typing.Literal["pdf_parser"] = "pdf_parser" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None file_url: str @@ -466,6 +479,7 @@ class ForLoopBlockYamlLoopBlocksItem_PdfParser(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_TaskV2(UniversalBaseModel): block_type: typing.Literal["task_v2"] = "task_v2" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None prompt: str @@ -489,6 +503,7 @@ class ForLoopBlockYamlLoopBlocksItem_TaskV2(UniversalBaseModel): class ForLoopBlockYamlLoopBlocksItem_HttpRequest(UniversalBaseModel): block_type: typing.Literal["http_request"] = "http_request" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None method: typing.Optional[str] = None diff --git a/skyvern/client/types/geo_target.py b/skyvern/client/types/geo_target.py new file mode 100644 index 00000000..592cc76d --- /dev/null +++ b/skyvern/client/types/geo_target.py @@ -0,0 +1,46 @@ +# 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 GeoTarget(UniversalBaseModel): + """ + Granular geographic targeting for proxy selection. + + Supports country, subdivision (state/region), and city level targeting. + Uses ISO 3166-1 alpha-2 for countries, ISO 3166-2 for subdivisions, + and GeoNames English names for cities. + + Examples: + - {"country": "US"} - United States (same as RESIDENTIAL) + - {"country": "US", "subdivision": "CA"} - California, US + - {"country": "US", "subdivision": "NY", "city": "New York"} - New York City + - {"country": "GB", "city": "London"} - London, UK + """ + + country: str = pydantic.Field() + """ + ISO 3166-1 alpha-2 country code (e.g., 'US', 'GB', 'DE') + """ + + subdivision: typing.Optional[str] = pydantic.Field(default=None) + """ + ISO 3166-2 subdivision code without country prefix (e.g., 'CA' for California, 'NY' for New York) + """ + + city: typing.Optional[str] = pydantic.Field(default=None) + """ + City name in English from GeoNames (e.g., 'New York', 'Los Angeles', 'London') + """ + + 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/http_request_block.py b/skyvern/client/types/http_request_block.py index aed2423a..1d4f17bf 100644 --- a/skyvern/client/types/http_request_block.py +++ b/skyvern/client/types/http_request_block.py @@ -11,7 +11,16 @@ from .output_parameter import OutputParameter class HttpRequestBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None diff --git a/skyvern/client/types/http_request_block_yaml.py b/skyvern/client/types/http_request_block_yaml.py index 691a085d..c11e2cc2 100644 --- a/skyvern/client/types/http_request_block_yaml.py +++ b/skyvern/client/types/http_request_block_yaml.py @@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class HttpRequestBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None method: typing.Optional[str] = None diff --git a/skyvern/client/types/human_interaction_block.py b/skyvern/client/types/human_interaction_block.py index 71493fad..dcb52ed7 100644 --- a/skyvern/client/types/human_interaction_block.py +++ b/skyvern/client/types/human_interaction_block.py @@ -25,7 +25,16 @@ class HumanInteractionBlock(UniversalBaseModel): - does not respond within the timeout period, the workflow terminates """ - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -47,7 +56,6 @@ class HumanInteractionBlock(UniversalBaseModel): 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 diff --git a/skyvern/client/types/human_interaction_block_yaml.py b/skyvern/client/types/human_interaction_block_yaml.py index 71cbda80..24851a06 100644 --- a/skyvern/client/types/human_interaction_block_yaml.py +++ b/skyvern/client/types/human_interaction_block_yaml.py @@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class HumanInteractionBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None instructions: typing.Optional[str] = None diff --git a/skyvern/client/types/login_block.py b/skyvern/client/types/login_block.py index a5d26f8e..ac95a3bd 100644 --- a/skyvern/client/types/login_block.py +++ b/skyvern/client/types/login_block.py @@ -13,7 +13,16 @@ from .run_engine import RunEngine class LoginBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -35,7 +44,6 @@ class LoginBlock(UniversalBaseModel): 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 diff --git a/skyvern/client/types/login_block_yaml.py b/skyvern/client/types/login_block_yaml.py index 0ae5df79..fdec8346 100644 --- a/skyvern/client/types/login_block_yaml.py +++ b/skyvern/client/types/login_block_yaml.py @@ -8,7 +8,16 @@ from .run_engine import RunEngine class LoginBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: typing.Optional[str] = None @@ -21,7 +30,6 @@ class LoginBlockYaml(UniversalBaseModel): parameter_keys: typing.Optional[typing.List[str]] = None totp_verification_url: typing.Optional[str] = None totp_identifier: typing.Optional[str] = None - cache_actions: typing.Optional[bool] = None disable_cache: typing.Optional[bool] = None complete_criterion: typing.Optional[str] = None terminate_criterion: typing.Optional[str] = None diff --git a/skyvern/client/types/navigation_block.py b/skyvern/client/types/navigation_block.py index 08bc1c12..f8537102 100644 --- a/skyvern/client/types/navigation_block.py +++ b/skyvern/client/types/navigation_block.py @@ -13,7 +13,16 @@ from .run_engine import RunEngine class NavigationBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -35,7 +44,6 @@ class NavigationBlock(UniversalBaseModel): 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 diff --git a/skyvern/client/types/navigation_block_yaml.py b/skyvern/client/types/navigation_block_yaml.py index 1cbb4fd1..05bb32d7 100644 --- a/skyvern/client/types/navigation_block_yaml.py +++ b/skyvern/client/types/navigation_block_yaml.py @@ -8,7 +8,16 @@ from .run_engine import RunEngine class NavigationBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None navigation_goal: str @@ -23,7 +32,6 @@ class NavigationBlockYaml(UniversalBaseModel): 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 disable_cache: typing.Optional[bool] = None complete_criterion: typing.Optional[str] = None terminate_criterion: typing.Optional[str] = None diff --git a/skyvern/client/types/non_empty_password_credential.py b/skyvern/client/types/non_empty_password_credential.py index 7d4fccf1..beef40a5 100644 --- a/skyvern/client/types/non_empty_password_credential.py +++ b/skyvern/client/types/non_empty_password_credential.py @@ -32,6 +32,11 @@ class NonEmptyPasswordCredential(UniversalBaseModel): Type of 2FA method used for this credential """ + totp_identifier: typing.Optional[str] = pydantic.Field(default=None) + """ + Identifier (email or phone number) used to fetch TOTP codes + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/skyvern/client/types/password_credential_response.py b/skyvern/client/types/password_credential_response.py index c984ed81..1ec1a80c 100644 --- a/skyvern/client/types/password_credential_response.py +++ b/skyvern/client/types/password_credential_response.py @@ -22,6 +22,11 @@ class PasswordCredentialResponse(UniversalBaseModel): Type of 2FA method used for this credential """ + totp_identifier: typing.Optional[str] = pydantic.Field(default=None) + """ + Identifier (email or phone number) used to fetch TOTP codes + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/skyvern/client/types/pdf_parser_block.py b/skyvern/client/types/pdf_parser_block.py index a9ea452a..399df519 100644 --- a/skyvern/client/types/pdf_parser_block.py +++ b/skyvern/client/types/pdf_parser_block.py @@ -13,7 +13,16 @@ class PdfParserBlock(UniversalBaseModel): This block will be removed in a future version. """ - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None diff --git a/skyvern/client/types/pdf_parser_block_yaml.py b/skyvern/client/types/pdf_parser_block_yaml.py index 315d089f..18dbfb16 100644 --- a/skyvern/client/types/pdf_parser_block_yaml.py +++ b/skyvern/client/types/pdf_parser_block_yaml.py @@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class PdfParserBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None file_url: str diff --git a/skyvern/client/types/send_email_block.py b/skyvern/client/types/send_email_block.py index 084a9786..f548b5b2 100644 --- a/skyvern/client/types/send_email_block.py +++ b/skyvern/client/types/send_email_block.py @@ -9,7 +9,16 @@ from .output_parameter import OutputParameter class SendEmailBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None diff --git a/skyvern/client/types/send_email_block_yaml.py b/skyvern/client/types/send_email_block_yaml.py index 527aafda..70219e39 100644 --- a/skyvern/client/types/send_email_block_yaml.py +++ b/skyvern/client/types/send_email_block_yaml.py @@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class SendEmailBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None smtp_host_secret_parameter_key: str diff --git a/skyvern/client/types/task_block.py b/skyvern/client/types/task_block.py index c9b9aa49..96f0ed98 100644 --- a/skyvern/client/types/task_block.py +++ b/skyvern/client/types/task_block.py @@ -13,7 +13,16 @@ from .task_block_parameters_item import TaskBlockParametersItem class TaskBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -35,7 +44,6 @@ class TaskBlock(UniversalBaseModel): 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 diff --git a/skyvern/client/types/task_block_yaml.py b/skyvern/client/types/task_block_yaml.py index 39d42146..1e4aa18c 100644 --- a/skyvern/client/types/task_block_yaml.py +++ b/skyvern/client/types/task_block_yaml.py @@ -9,7 +9,16 @@ from .task_block_yaml_data_schema import TaskBlockYamlDataSchema class TaskBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: typing.Optional[str] = None @@ -26,7 +35,6 @@ class TaskBlockYaml(UniversalBaseModel): 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 disable_cache: typing.Optional[bool] = None complete_criterion: typing.Optional[str] = None terminate_criterion: typing.Optional[str] = None diff --git a/skyvern/client/types/task_run_request.py b/skyvern/client/types/task_run_request.py index b8a131b4..84a213dd 100644 --- a/skyvern/client/types/task_run_request.py +++ b/skyvern/client/types/task_run_request.py @@ -4,9 +4,9 @@ import typing 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 .task_run_request_proxy_location import TaskRunRequestProxyLocation class TaskRunRequest(UniversalBaseModel): @@ -33,7 +33,7 @@ class TaskRunRequest(UniversalBaseModel): The title for the task """ - proxy_location: typing.Optional[ProxyLocation] = pydantic.Field(default=None) + proxy_location: typing.Optional[TaskRunRequestProxyLocation] = pydantic.Field(default=None) """ Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. @@ -58,6 +58,7 @@ class TaskRunRequest(UniversalBaseModel): - US-FL: Florida - US-WA: Washington - NONE: No proxy + Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"} """ data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = pydantic.Field(default=None) diff --git a/skyvern/client/types/task_run_request_proxy_location.py b/skyvern/client/types/task_run_request_proxy_location.py new file mode 100644 index 00000000..7f67743a --- /dev/null +++ b/skyvern/client/types/task_run_request_proxy_location.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .geo_target import GeoTarget +from .proxy_location import ProxyLocation + +TaskRunRequestProxyLocation = typing.Union[ProxyLocation, GeoTarget, typing.Dict[str, typing.Optional[typing.Any]]] diff --git a/skyvern/client/types/task_v2block.py b/skyvern/client/types/task_v2block.py index 8ece1478..3be1adcb 100644 --- a/skyvern/client/types/task_v2block.py +++ b/skyvern/client/types/task_v2block.py @@ -8,7 +8,16 @@ from .output_parameter import OutputParameter class TaskV2Block(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None diff --git a/skyvern/client/types/task_v2block_yaml.py b/skyvern/client/types/task_v2block_yaml.py index 80b062bd..a1000a10 100644 --- a/skyvern/client/types/task_v2block_yaml.py +++ b/skyvern/client/types/task_v2block_yaml.py @@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class TaskV2BlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None prompt: str diff --git a/skyvern/client/types/text_prompt_block.py b/skyvern/client/types/text_prompt_block.py index e472e941..042beb5e 100644 --- a/skyvern/client/types/text_prompt_block.py +++ b/skyvern/client/types/text_prompt_block.py @@ -11,7 +11,16 @@ from .text_prompt_block_parameters_item import TextPromptBlockParametersItem class TextPromptBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None diff --git a/skyvern/client/types/text_prompt_block_yaml.py b/skyvern/client/types/text_prompt_block_yaml.py index b8f6a1b5..a77d4e28 100644 --- a/skyvern/client/types/text_prompt_block_yaml.py +++ b/skyvern/client/types/text_prompt_block_yaml.py @@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class TextPromptBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None llm_key: typing.Optional[str] = None diff --git a/skyvern/client/types/upload_to_s3block.py b/skyvern/client/types/upload_to_s3block.py index 3ffd7253..730a9fd6 100644 --- a/skyvern/client/types/upload_to_s3block.py +++ b/skyvern/client/types/upload_to_s3block.py @@ -8,7 +8,16 @@ from .output_parameter import OutputParameter class UploadToS3Block(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None diff --git a/skyvern/client/types/upload_to_s3block_yaml.py b/skyvern/client/types/upload_to_s3block_yaml.py index ee3ee9fc..bdf825b7 100644 --- a/skyvern/client/types/upload_to_s3block_yaml.py +++ b/skyvern/client/types/upload_to_s3block_yaml.py @@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class UploadToS3BlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None path: typing.Optional[str] = None diff --git a/skyvern/client/types/url_block.py b/skyvern/client/types/url_block.py index 4de1e729..0f69ed33 100644 --- a/skyvern/client/types/url_block.py +++ b/skyvern/client/types/url_block.py @@ -13,7 +13,16 @@ from .url_block_parameters_item import UrlBlockParametersItem class UrlBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -35,7 +44,6 @@ class UrlBlock(UniversalBaseModel): 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 diff --git a/skyvern/client/types/url_block_yaml.py b/skyvern/client/types/url_block_yaml.py index 5b956265..c11444e9 100644 --- a/skyvern/client/types/url_block_yaml.py +++ b/skyvern/client/types/url_block_yaml.py @@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class UrlBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: str diff --git a/skyvern/client/types/validation_block.py b/skyvern/client/types/validation_block.py index 0acffdb3..f6e53e1c 100644 --- a/skyvern/client/types/validation_block.py +++ b/skyvern/client/types/validation_block.py @@ -13,7 +13,16 @@ from .validation_block_parameters_item import ValidationBlockParametersItem class ValidationBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -35,7 +44,6 @@ class ValidationBlock(UniversalBaseModel): 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 diff --git a/skyvern/client/types/validation_block_yaml.py b/skyvern/client/types/validation_block_yaml.py index e5579e6d..7b92ecd1 100644 --- a/skyvern/client/types/validation_block_yaml.py +++ b/skyvern/client/types/validation_block_yaml.py @@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class ValidationBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None complete_criterion: typing.Optional[str] = None diff --git a/skyvern/client/types/wait_block.py b/skyvern/client/types/wait_block.py index 870f4110..ccb84423 100644 --- a/skyvern/client/types/wait_block.py +++ b/skyvern/client/types/wait_block.py @@ -11,7 +11,16 @@ from .wait_block_parameters_item import WaitBlockParametersItem class WaitBlock(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier for a block; unique within a workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. + """ + output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None diff --git a/skyvern/client/types/wait_block_yaml.py b/skyvern/client/types/wait_block_yaml.py index 59805637..9bfd2929 100644 --- a/skyvern/client/types/wait_block_yaml.py +++ b/skyvern/client/types/wait_block_yaml.py @@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel class WaitBlockYaml(UniversalBaseModel): - label: str + label: str = pydantic.Field() + """ + Author-facing identifier; must be unique per workflow. + """ + + next_block_label: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. + """ + continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None wait_sec: typing.Optional[int] = None diff --git a/skyvern/client/types/workflow.py b/skyvern/client/types/workflow.py index 4030f29d..c3a61acf 100644 --- a/skyvern/client/types/workflow.py +++ b/skyvern/client/types/workflow.py @@ -7,8 +7,8 @@ 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_proxy_location import WorkflowProxyLocation from .workflow_status import WorkflowStatus @@ -21,7 +21,7 @@ class Workflow(UniversalBaseModel): is_saved_task: bool description: typing.Optional[str] = None workflow_definition: WorkflowDefinition - proxy_location: typing.Optional[ProxyLocation] = None + proxy_location: typing.Optional[WorkflowProxyLocation] = None webhook_callback_url: typing.Optional[str] = None totp_verification_url: typing.Optional[str] = None totp_identifier: typing.Optional[str] = None diff --git a/skyvern/client/types/workflow_create_yaml_request.py b/skyvern/client/types/workflow_create_yaml_request.py index 08bca456..d9594e71 100644 --- a/skyvern/client/types/workflow_create_yaml_request.py +++ b/skyvern/client/types/workflow_create_yaml_request.py @@ -6,7 +6,7 @@ import typing import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs -from .proxy_location import ProxyLocation +from .workflow_create_yaml_request_proxy_location import WorkflowCreateYamlRequestProxyLocation from .workflow_definition_yaml import WorkflowDefinitionYaml from .workflow_status import WorkflowStatus @@ -14,7 +14,7 @@ from .workflow_status import WorkflowStatus class WorkflowCreateYamlRequest(UniversalBaseModel): title: str description: typing.Optional[str] = None - proxy_location: typing.Optional[ProxyLocation] = None + proxy_location: typing.Optional[WorkflowCreateYamlRequestProxyLocation] = None webhook_callback_url: typing.Optional[str] = None totp_verification_url: typing.Optional[str] = None totp_identifier: typing.Optional[str] = None diff --git a/skyvern/client/types/workflow_create_yaml_request_proxy_location.py b/skyvern/client/types/workflow_create_yaml_request_proxy_location.py new file mode 100644 index 00000000..b2b8b776 --- /dev/null +++ b/skyvern/client/types/workflow_create_yaml_request_proxy_location.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .geo_target import GeoTarget +from .proxy_location import ProxyLocation + +WorkflowCreateYamlRequestProxyLocation = typing.Union[ + ProxyLocation, GeoTarget, typing.Dict[str, typing.Optional[typing.Any]] +] diff --git a/skyvern/client/types/workflow_definition.py b/skyvern/client/types/workflow_definition.py index 0fcdee45..60abf11f 100644 --- a/skyvern/client/types/workflow_definition.py +++ b/skyvern/client/types/workflow_definition.py @@ -11,6 +11,7 @@ from .workflow_definition_parameters_item import WorkflowDefinitionParametersIte class WorkflowDefinition(UniversalBaseModel): + version: typing.Optional[int] = None parameters: typing.List[WorkflowDefinitionParametersItem] blocks: typing.List[WorkflowDefinitionBlocksItem] diff --git a/skyvern/client/types/workflow_definition_blocks_item.py b/skyvern/client/types/workflow_definition_blocks_item.py index 062ecc96..f264a6d0 100644 --- a/skyvern/client/types/workflow_definition_blocks_item.py +++ b/skyvern/client/types/workflow_definition_blocks_item.py @@ -11,6 +11,7 @@ from ..core.serialization import FieldMetadata from .action_block_data_schema import ActionBlockDataSchema from .action_block_parameters_item import ActionBlockParametersItem from .aws_secret_parameter import AwsSecretParameter +from .branch_condition import BranchCondition from .code_block_parameters_item import CodeBlockParametersItem from .extraction_block_data_schema import ExtractionBlockDataSchema from .extraction_block_parameters_item import ExtractionBlockParametersItem @@ -41,6 +42,7 @@ from .wait_block_parameters_item import WaitBlockParametersItem class WorkflowDefinitionBlocksItem_Action(UniversalBaseModel): block_type: typing.Literal["action"] = "action" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -62,7 +64,6 @@ class WorkflowDefinitionBlocksItem_Action(UniversalBaseModel): 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 @@ -80,6 +81,7 @@ class WorkflowDefinitionBlocksItem_Action(UniversalBaseModel): class WorkflowDefinitionBlocksItem_Code(UniversalBaseModel): block_type: typing.Literal["code"] = "code" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -97,9 +99,30 @@ class WorkflowDefinitionBlocksItem_Code(UniversalBaseModel): extra = pydantic.Extra.allow +class WorkflowDefinitionBlocksItem_Conditional(UniversalBaseModel): + block_type: typing.Literal["conditional"] = "conditional" + label: str + next_block_label: typing.Optional[str] = None + 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 + branch_conditions: typing.Optional[typing.List[BranchCondition]] = 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_DownloadToS3(UniversalBaseModel): block_type: typing.Literal["download_to_s3"] = "download_to_s3" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -119,6 +142,7 @@ class WorkflowDefinitionBlocksItem_DownloadToS3(UniversalBaseModel): class WorkflowDefinitionBlocksItem_Extraction(UniversalBaseModel): block_type: typing.Literal["extraction"] = "extraction" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -140,7 +164,6 @@ class WorkflowDefinitionBlocksItem_Extraction(UniversalBaseModel): 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 @@ -158,6 +181,7 @@ class WorkflowDefinitionBlocksItem_Extraction(UniversalBaseModel): class WorkflowDefinitionBlocksItem_FileDownload(UniversalBaseModel): block_type: typing.Literal["file_download"] = "file_download" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -179,7 +203,6 @@ class WorkflowDefinitionBlocksItem_FileDownload(UniversalBaseModel): 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 @@ -197,6 +220,7 @@ class WorkflowDefinitionBlocksItem_FileDownload(UniversalBaseModel): class WorkflowDefinitionBlocksItem_FileUpload(UniversalBaseModel): block_type: typing.Literal["file_upload"] = "file_upload" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -224,6 +248,7 @@ class WorkflowDefinitionBlocksItem_FileUpload(UniversalBaseModel): class WorkflowDefinitionBlocksItem_FileUrlParser(UniversalBaseModel): block_type: typing.Literal["file_url_parser"] = "file_url_parser" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -245,6 +270,7 @@ class WorkflowDefinitionBlocksItem_FileUrlParser(UniversalBaseModel): class WorkflowDefinitionBlocksItem_ForLoop(UniversalBaseModel): block_type: typing.Literal["for_loop"] = "for_loop" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -271,6 +297,7 @@ from .for_loop_block_loop_blocks_item import ForLoopBlockLoopBlocksItem # noqa: class WorkflowDefinitionBlocksItem_GotoUrl(UniversalBaseModel): block_type: typing.Literal["goto_url"] = "goto_url" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -292,7 +319,6 @@ class WorkflowDefinitionBlocksItem_GotoUrl(UniversalBaseModel): 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 @@ -310,6 +336,7 @@ class WorkflowDefinitionBlocksItem_GotoUrl(UniversalBaseModel): class WorkflowDefinitionBlocksItem_HttpRequest(UniversalBaseModel): block_type: typing.Literal["http_request"] = "http_request" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -335,6 +362,7 @@ class WorkflowDefinitionBlocksItem_HttpRequest(UniversalBaseModel): class WorkflowDefinitionBlocksItem_HumanInteraction(UniversalBaseModel): block_type: typing.Literal["human_interaction"] = "human_interaction" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -356,7 +384,6 @@ class WorkflowDefinitionBlocksItem_HumanInteraction(UniversalBaseModel): 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 @@ -382,6 +409,7 @@ class WorkflowDefinitionBlocksItem_HumanInteraction(UniversalBaseModel): class WorkflowDefinitionBlocksItem_Login(UniversalBaseModel): block_type: typing.Literal["login"] = "login" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -403,7 +431,6 @@ class WorkflowDefinitionBlocksItem_Login(UniversalBaseModel): 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 @@ -421,6 +448,7 @@ class WorkflowDefinitionBlocksItem_Login(UniversalBaseModel): class WorkflowDefinitionBlocksItem_Navigation(UniversalBaseModel): block_type: typing.Literal["navigation"] = "navigation" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -442,7 +470,6 @@ class WorkflowDefinitionBlocksItem_Navigation(UniversalBaseModel): 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 @@ -460,6 +487,7 @@ class WorkflowDefinitionBlocksItem_Navigation(UniversalBaseModel): class WorkflowDefinitionBlocksItem_PdfParser(UniversalBaseModel): block_type: typing.Literal["pdf_parser"] = "pdf_parser" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -480,6 +508,7 @@ class WorkflowDefinitionBlocksItem_PdfParser(UniversalBaseModel): class WorkflowDefinitionBlocksItem_SendEmail(UniversalBaseModel): block_type: typing.Literal["send_email"] = "send_email" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -507,6 +536,7 @@ class WorkflowDefinitionBlocksItem_SendEmail(UniversalBaseModel): class WorkflowDefinitionBlocksItem_Task(UniversalBaseModel): block_type: typing.Literal["task"] = "task" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -528,7 +558,6 @@ class WorkflowDefinitionBlocksItem_Task(UniversalBaseModel): 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 @@ -546,6 +575,7 @@ class WorkflowDefinitionBlocksItem_Task(UniversalBaseModel): class WorkflowDefinitionBlocksItem_TaskV2(UniversalBaseModel): block_type: typing.Literal["task_v2"] = "task_v2" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -570,6 +600,7 @@ class WorkflowDefinitionBlocksItem_TaskV2(UniversalBaseModel): class WorkflowDefinitionBlocksItem_TextPrompt(UniversalBaseModel): block_type: typing.Literal["text_prompt"] = "text_prompt" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -592,6 +623,7 @@ class WorkflowDefinitionBlocksItem_TextPrompt(UniversalBaseModel): class WorkflowDefinitionBlocksItem_UploadToS3(UniversalBaseModel): block_type: typing.Literal["upload_to_s3"] = "upload_to_s3" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -611,6 +643,7 @@ class WorkflowDefinitionBlocksItem_UploadToS3(UniversalBaseModel): class WorkflowDefinitionBlocksItem_Validation(UniversalBaseModel): block_type: typing.Literal["validation"] = "validation" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -632,7 +665,6 @@ class WorkflowDefinitionBlocksItem_Validation(UniversalBaseModel): 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 @@ -650,6 +682,7 @@ class WorkflowDefinitionBlocksItem_Validation(UniversalBaseModel): class WorkflowDefinitionBlocksItem_Wait(UniversalBaseModel): block_type: typing.Literal["wait"] = "wait" label: str + next_block_label: typing.Optional[str] = None output_parameter: OutputParameter continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None @@ -672,6 +705,7 @@ from .context_parameter import ContextParameter # noqa: E402, F401, I001 WorkflowDefinitionBlocksItem = typing.Union[ WorkflowDefinitionBlocksItem_Action, WorkflowDefinitionBlocksItem_Code, + WorkflowDefinitionBlocksItem_Conditional, WorkflowDefinitionBlocksItem_DownloadToS3, WorkflowDefinitionBlocksItem_Extraction, WorkflowDefinitionBlocksItem_FileDownload, diff --git a/skyvern/client/types/workflow_definition_yaml.py b/skyvern/client/types/workflow_definition_yaml.py index a5024903..2a73c5e1 100644 --- a/skyvern/client/types/workflow_definition_yaml.py +++ b/skyvern/client/types/workflow_definition_yaml.py @@ -11,6 +11,7 @@ from .workflow_definition_yaml_parameters_item import WorkflowDefinitionYamlPara class WorkflowDefinitionYaml(UniversalBaseModel): + version: typing.Optional[int] = None parameters: typing.List[WorkflowDefinitionYamlParametersItem] blocks: typing.List[WorkflowDefinitionYamlBlocksItem] diff --git a/skyvern/client/types/workflow_definition_yaml_blocks_item.py b/skyvern/client/types/workflow_definition_yaml_blocks_item.py index 3d46db39..2b0b5b8b 100644 --- a/skyvern/client/types/workflow_definition_yaml_blocks_item.py +++ b/skyvern/client/types/workflow_definition_yaml_blocks_item.py @@ -18,6 +18,7 @@ from .task_block_yaml_data_schema import TaskBlockYamlDataSchema class WorkflowDefinitionYamlBlocksItem_Action(UniversalBaseModel): block_type: typing.Literal["action"] = "action" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: typing.Optional[str] = None @@ -31,7 +32,6 @@ class WorkflowDefinitionYamlBlocksItem_Action(UniversalBaseModel): 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 disable_cache: typing.Optional[bool] = None if IS_PYDANTIC_V2: @@ -47,6 +47,7 @@ class WorkflowDefinitionYamlBlocksItem_Action(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_Code(UniversalBaseModel): block_type: typing.Literal["code"] = "code" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None code: str @@ -65,6 +66,7 @@ class WorkflowDefinitionYamlBlocksItem_Code(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_DownloadToS3(UniversalBaseModel): block_type: typing.Literal["download_to_s3"] = "download_to_s3" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: str @@ -82,6 +84,7 @@ class WorkflowDefinitionYamlBlocksItem_DownloadToS3(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_Extraction(UniversalBaseModel): block_type: typing.Literal["extraction"] = "extraction" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None data_extraction_goal: str @@ -92,7 +95,6 @@ class WorkflowDefinitionYamlBlocksItem_Extraction(UniversalBaseModel): max_retries: typing.Optional[int] = None max_steps_per_run: typing.Optional[int] = None parameter_keys: typing.Optional[typing.List[str]] = None - cache_actions: typing.Optional[bool] = None disable_cache: typing.Optional[bool] = None if IS_PYDANTIC_V2: @@ -108,6 +110,7 @@ class WorkflowDefinitionYamlBlocksItem_Extraction(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_FileDownload(UniversalBaseModel): block_type: typing.Literal["file_download"] = "file_download" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None navigation_goal: str @@ -121,7 +124,6 @@ class WorkflowDefinitionYamlBlocksItem_FileDownload(UniversalBaseModel): 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 disable_cache: typing.Optional[bool] = None download_timeout: typing.Optional[float] = None @@ -138,6 +140,7 @@ class WorkflowDefinitionYamlBlocksItem_FileDownload(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_FileUpload(UniversalBaseModel): block_type: typing.Literal["file_upload"] = "file_upload" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None storage_type: typing.Optional[FileStorageType] = None @@ -164,6 +167,7 @@ class WorkflowDefinitionYamlBlocksItem_FileUpload(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_FileUrlParser(UniversalBaseModel): block_type: typing.Literal["file_url_parser"] = "file_url_parser" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None file_url: str @@ -183,6 +187,7 @@ class WorkflowDefinitionYamlBlocksItem_FileUrlParser(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_ForLoop(UniversalBaseModel): block_type: typing.Literal["for_loop"] = "for_loop" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None loop_blocks: typing.List["ForLoopBlockYamlLoopBlocksItem"] @@ -207,6 +212,7 @@ from .for_loop_block_yaml_loop_blocks_item import ForLoopBlockYamlLoopBlocksItem class WorkflowDefinitionYamlBlocksItem_GotoUrl(UniversalBaseModel): block_type: typing.Literal["goto_url"] = "goto_url" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: str @@ -224,6 +230,7 @@ class WorkflowDefinitionYamlBlocksItem_GotoUrl(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_HttpRequest(UniversalBaseModel): block_type: typing.Literal["http_request"] = "http_request" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None method: typing.Optional[str] = None @@ -247,6 +254,7 @@ class WorkflowDefinitionYamlBlocksItem_HttpRequest(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_HumanInteraction(UniversalBaseModel): block_type: typing.Literal["human_interaction"] = "human_interaction" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None instructions: typing.Optional[str] = None @@ -271,6 +279,7 @@ class WorkflowDefinitionYamlBlocksItem_HumanInteraction(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_Login(UniversalBaseModel): block_type: typing.Literal["login"] = "login" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: typing.Optional[str] = None @@ -283,7 +292,6 @@ class WorkflowDefinitionYamlBlocksItem_Login(UniversalBaseModel): parameter_keys: typing.Optional[typing.List[str]] = None totp_verification_url: typing.Optional[str] = None totp_identifier: typing.Optional[str] = None - cache_actions: typing.Optional[bool] = None disable_cache: typing.Optional[bool] = None complete_criterion: typing.Optional[str] = None terminate_criterion: typing.Optional[str] = None @@ -302,6 +310,7 @@ class WorkflowDefinitionYamlBlocksItem_Login(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_Navigation(UniversalBaseModel): block_type: typing.Literal["navigation"] = "navigation" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None navigation_goal: str @@ -316,7 +325,6 @@ class WorkflowDefinitionYamlBlocksItem_Navigation(UniversalBaseModel): 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 disable_cache: typing.Optional[bool] = None complete_criterion: typing.Optional[str] = None terminate_criterion: typing.Optional[str] = None @@ -336,6 +344,7 @@ class WorkflowDefinitionYamlBlocksItem_Navigation(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_PdfParser(UniversalBaseModel): block_type: typing.Literal["pdf_parser"] = "pdf_parser" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None file_url: str @@ -354,6 +363,7 @@ class WorkflowDefinitionYamlBlocksItem_PdfParser(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_SendEmail(UniversalBaseModel): block_type: typing.Literal["send_email"] = "send_email" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None smtp_host_secret_parameter_key: str @@ -379,6 +389,7 @@ class WorkflowDefinitionYamlBlocksItem_SendEmail(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_Task(UniversalBaseModel): block_type: typing.Literal["task"] = "task" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None url: typing.Optional[str] = None @@ -395,7 +406,6 @@ class WorkflowDefinitionYamlBlocksItem_Task(UniversalBaseModel): 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 disable_cache: typing.Optional[bool] = None complete_criterion: typing.Optional[str] = None terminate_criterion: typing.Optional[str] = None @@ -415,6 +425,7 @@ class WorkflowDefinitionYamlBlocksItem_Task(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_TaskV2(UniversalBaseModel): block_type: typing.Literal["task_v2"] = "task_v2" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None prompt: str @@ -438,6 +449,7 @@ class WorkflowDefinitionYamlBlocksItem_TaskV2(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_TextPrompt(UniversalBaseModel): block_type: typing.Literal["text_prompt"] = "text_prompt" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None llm_key: typing.Optional[str] = None @@ -458,6 +470,7 @@ class WorkflowDefinitionYamlBlocksItem_TextPrompt(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_UploadToS3(UniversalBaseModel): block_type: typing.Literal["upload_to_s3"] = "upload_to_s3" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None path: typing.Optional[str] = None @@ -475,6 +488,7 @@ class WorkflowDefinitionYamlBlocksItem_UploadToS3(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_Validation(UniversalBaseModel): block_type: typing.Literal["validation"] = "validation" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None complete_criterion: typing.Optional[str] = None @@ -496,6 +510,7 @@ class WorkflowDefinitionYamlBlocksItem_Validation(UniversalBaseModel): class WorkflowDefinitionYamlBlocksItem_Wait(UniversalBaseModel): block_type: typing.Literal["wait"] = "wait" label: str + next_block_label: typing.Optional[str] = None continue_on_failure: typing.Optional[bool] = None model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None wait_sec: typing.Optional[int] = None diff --git a/skyvern/client/types/workflow_proxy_location.py b/skyvern/client/types/workflow_proxy_location.py new file mode 100644 index 00000000..3a33815f --- /dev/null +++ b/skyvern/client/types/workflow_proxy_location.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .geo_target import GeoTarget +from .proxy_location import ProxyLocation + +WorkflowProxyLocation = typing.Union[ProxyLocation, GeoTarget, typing.Dict[str, typing.Optional[typing.Any]]] diff --git a/skyvern/client/types/workflow_run_request.py b/skyvern/client/types/workflow_run_request.py index 46f75e8e..1431dce2 100644 --- a/skyvern/client/types/workflow_run_request.py +++ b/skyvern/client/types/workflow_run_request.py @@ -4,7 +4,7 @@ import typing import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .proxy_location import ProxyLocation +from .workflow_run_request_proxy_location import WorkflowRunRequestProxyLocation class WorkflowRunRequest(UniversalBaseModel): @@ -23,7 +23,7 @@ class WorkflowRunRequest(UniversalBaseModel): The title for this workflow run """ - proxy_location: typing.Optional[ProxyLocation] = pydantic.Field(default=None) + proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = pydantic.Field(default=None) """ Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud. @@ -48,6 +48,7 @@ class WorkflowRunRequest(UniversalBaseModel): - US-FL: Florida - US-WA: Washington - NONE: No proxy + Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"} """ webhook_url: typing.Optional[str] = pydantic.Field(default=None) diff --git a/skyvern/client/types/workflow_run_request_proxy_location.py b/skyvern/client/types/workflow_run_request_proxy_location.py new file mode 100644 index 00000000..b1218e39 --- /dev/null +++ b/skyvern/client/types/workflow_run_request_proxy_location.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .geo_target import GeoTarget +from .proxy_location import ProxyLocation + +WorkflowRunRequestProxyLocation = typing.Union[ProxyLocation, GeoTarget, typing.Dict[str, typing.Optional[typing.Any]]] diff --git a/uv.lock b/uv.lock index 582effea..24888f1f 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 2 +revision = 3 requires-python = ">=3.11, <3.14" resolution-markers = [ "python_full_version >= '3.13'", @@ -4881,7 +4881,7 @@ wheels = [ [[package]] name = "skyvern" -version = "1.0.1" +version = "1.0.2" source = { editable = "." } dependencies = [ { name = "aioboto3" },