diff --git a/fern/openapi/skyvern_openapi.json b/fern/openapi/skyvern_openapi.json index 9655ef84..9447cce6 100644 --- a/fern/openapi/skyvern_openapi.json +++ b/fern/openapi/skyvern_openapi.json @@ -455,8 +455,8 @@ "tags": [ "Workflows" ], - "summary": "Create a new workflow", - "description": "Create a new workflow", + "summary": "Create a new workflow definition", + "description": "Create a new workflow definition", "operationId": "create_workflow_v1_workflows_post", "parameters": [ { @@ -492,6 +492,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRequest" + } + } + } + }, "responses": { "200": { "description": "Successfully created workflow", @@ -514,7 +524,11 @@ "code-samples": [ { "sdk": "curl", - "code": "curl -X POST https://api.skyvern.com/v1/workflows --header 'x-api-key: {{x-api-key}}' --header 'Content-Type: application/x-yaml' --data-raw 'title: Invoice Downloading Demo (Jun 13)\ndescription: \u003E-\n Login to the website, download all the invoices after a date, email the\n invoices\nworkflow_definition:\n parameters:\n - key: website_url\n parameter_type: workflow\n workflow_parameter_type: string\n - key: credentials\n parameter_type: bitwarden_login_credential\n bitwarden_client_id_aws_secret_key: SECRET\n bitwarden_client_secret_aws_secret_key: SECRET\n bitwarden_master_password_aws_secret_key: SECRET\n bitwarden_collection_id: SECRET\n url_parameter_key: website_url\n - key: invoice_retrieval_start_date\n parameter_type: workflow\n workflow_parameter_type: string\n - key: smtp_host\n parameter_type: aws_secret\n aws_key: SKYVERN_SMTP_HOST_AWS_SES\n - key: smtp_port\n parameter_type: aws_secret\n aws_key: SKYVERN_SMTP_PORT_AWS_SES\n - key: smtp_username\n parameter_type: aws_secret\n aws_key: SKYVERN_SMTP_USERNAME_SES\n - key: smtp_password\n parameter_type: aws_secret\n aws_key: SKYVERN_SMTP_PASSWORD_SES\n - parameter_type: context\n key: order_history_url\n source_parameter_key: get_order_history_page_url_and_qualifying_order_ids_output\n - parameter_type: context\n key: order_ids\n source_parameter_key: get_order_history_page_url_and_qualifying_order_ids_output\n - parameter_type: context\n key: order_id\n source_parameter_key: order_ids\n blocks:\n - block_type: task\n label: login\n parameter_keys:\n - credentials\n url: website_url\n navigation_goal: \u003E-\n If you're not on the login page, navigate to login page and login using the credentials given, and then navigate to the personal account page. First, take actions on promotional popups or cookie prompts that could prevent taking other action on the web page. Then, try to login and navigate to the personal account page. If you fail to login to find the login page or can't login after several trials, terminate. If you're on the personal account page, consider the goal is completed.\n error_code_mapping:\n stuck_with_popups: terminate and return this error if you can't close popups after several tries and can't take the necessary actions on the website because there is a blocking popup on the page\n failed_to_login: terminate and return this error if you fail logging in to the page\n - block_type: task\n label: get_order_history_page_url_and_qualifying_order_ids\n parameter_keys:\n - invoice_retrieval_start_date\n navigation_goal: Find the order history page. If there is no orders after given start date, terminate.\n data_extraction_goal: \u003E-\n You need to extract the order history page url by looking at the current\n page you're on. You need to extract contact emails you see on the page. You also need to extract the order ids for orders that\n happened on or after invoice_retrieval_start_date. Make sure to filter\n only the orders that happened on or after invoice_retrieval_start_date. You need to compare each order's date with the invoice_download_start_date. You can only include an order in the output if the order's date is after or the same as the invoice_download_start_date.\n While comparing dates, first compare year, then month, then day. invoice_retrieval_start_date\n is in YYYY-MM-DD format. The dates on the websites may be in different formats, compare accordingly and compare year, date, and month.\n error_code_mapping:\n failed_to_find_order_history_page: return this error if you can't find the order history page on the website\n no_orders_found_after_start_date: return this error if there are no orders after the specified invoice_download_start_date\n data_schema:\n type: object\n properties:\n order_history_url:\n type: url\n description: \u003E-\n The exact URL of the order history page. Do not make any\n assumptions. Return the URL that's passed along in this context.\n contact_emails:\n type: array\n items:\n type: string\n description: Contact email for the ecommerce website you're on. If you can't find any return null\n date_comparison_scratchpad:\n type: string\n description: \u003E-\n You are supposed to filter the orders that happened on or after the invoice_download_start_date. Think through how you will approach this task step-by-step here. Consider these before starting the comparison:\n - What format is the order date in? How can you parse it into a structured format?\n - What is the correct way to compare two dates?\n - How will you compare the order dates to the invoice_download_start_date? \n \n Write out your thought process before filling out the order_ids field below. Remember, the original date may be in any format, so parse it carefully! The invoice_download_start_date will be an exact date you can directly compare against in the format YYYY-MM-DD.\n order_ids:\n type: array\n items:\n type: object\n properties:\n order_date:\n type: iso-8601-date-string\n order_id:\n type: string\n description: \u003E-\n Return a list of order id strings. Do not return order ids of\n orders that happened before the specified\n invoice_retrieval_start_date\n - block_type: for_loop\n label: iterate_over_order_ids\n loop_over_parameter_key: order_ids\n continue_on_failure: true\n loop_blocks:\n - block_type: task\n label: download_invoice_for_order\n complete_on_download: true\n continue_on_failure: true\n parameter_keys:\n - order_id\n url: order_history_url\n navigation_goal: Download the invoice of the order with the given order ID. Make sure to download the invoice for the given order id. If the element tree doesn't have a matching order id, check the screenshots. Complete if you have successfully downloaded the invoice according to action history, if you were able to download it, you'll see download_triggered=True for the last step. If you don't see a way to download an invoice, navigate to the order page if possible. If there's no way to download an invoice terminate. If the text suggests printing, you can assume you can download it. Return click action with download=True if you want to trigger a download.\n error_code_mapping:\n not_possible_to_download_invoice: return this error if the website doesn't allow downloading/viewing invoices\n cant_solve_captcha: return this error if captcha isn't solved after multiple retries\n - block_type: upload_to_s3\n label: upload_downloaded_files_to_s3\n path: SKYVERN_DOWNLOAD_DIRECTORY\n - block_type: send_email\n label: send_email\n smtp_host_secret_parameter_key: smtp_host\n smtp_port_secret_parameter_key: smtp_port\n smtp_username_secret_parameter_key: smtp_username\n smtp_password_secret_parameter_key: smtp_password\n sender: hello@skyvern.com\n recipients:\n - founders@skyvern.com\n subject: Skyvern - Downloaded Invoices Demo\n body: website_url\n file_attachments:\n - SKYVERN_DOWNLOAD_DIRECTORY\n'\n" + "code": "curl -X POST https://api.skyvern.com/v1/workflows --header 'x-api-key: {{x-api-key}}' --header 'Content-Type: text/plain' --data-raw 'title: Contact Forms\ndescription: Fill the contact form on the website\nproxy_location: RESIDENTIAL\nwebhook_callback_url: https://example.com/webhook\ntotp_verification_url: https://example.com/totp\npersist_browser_session: false\nworkflow_definition:\n parameters:\n - key: website_url\n description: null\n parameter_type: workflow\n workflow_parameter_type: string\n default_value: null\n - key: name\n description: null\n parameter_type: workflow\n workflow_parameter_type: string\n default_value: null\n - key: additional_information\n description: null\n parameter_type: workflow\n workflow_parameter_type: string\n default_value: |-\n Message: I'd love to learn more about your...\n Phone: 123-456-7890\n Inquiry type: sales\n Optional Subject: Hello from [Company Here]\n - key: email\n description: null\n parameter_type: workflow\n workflow_parameter_type: string\n default_value: null\n blocks:\n - label: Fill_Out_Contact_Form\n continue_on_failure: true\n block_type: navigation\n url: \"{{website_url}}\"\n title: Fill_Out_Contact_Form\n engine: skyvern-1.0\n navigation_goal: \u003E-\n Find the contact form. Fill out the contact us form and submit it. Your\n goal is complete when the page says your message has been sent. In the\n case you can't find a contact us form, terminate.\n\n\n Fill out required fields as best you can using the following\n information:\n\n {{name}}\n\n {{email}}\n\n {{additional_information}}\n error_code_mapping: null\n max_retries: 0\n max_steps_per_run: null\n complete_on_download: false\n download_suffix: null\n parameter_keys: []\n totp_identifier: null\n totp_verification_url: null\n cache_actions: false\n complete_criterion: \"\"\n terminate_criterion: \"\"\n include_action_history_in_verification: false\n - label: Extract_Email\n continue_on_failure: false\n block_type: extraction\n url: \"\"\n title: Extract_Email\n data_extraction_goal: \"Extract a company email if available \"\n data_schema: null\n max_retries: 0\n max_steps_per_run: null\n parameter_keys: []\n cache_actions: false\n'\n" + }, + { + "sdk": "python", + "code": "\nfrom skyvern import Skyvern\n\n# Create a workflow in JSON format\nworkflow_definition = {\n \"title\": \"Contact Forms Workflow\",\n \"description\": \"Fill the contact form on the website\",\n \"proxy_location\": \"RESIDENTIAL\",\n \"webhook_callback_url\": \"https://example.com/webhook\",\n \"totp_verification_url\": \"https://example.com/totp\",\n \"totp_identifier\": \"4155555555\",\n \"workflow_definition\": {\n \"parameters\": [\n {\n \"key\": \"website_url\",\n \"description\": None,\n \"parameter_type\": \"workflow\",\n \"workflow_parameter_type\": \"string\",\n \"default_value\": None,\n },\n {\n \"key\": \"name\",\n \"description\": None,\n \"parameter_type\": \"workflow\",\n \"workflow_parameter_type\": \"string\",\n \"default_value\": None,\n },\n {\n \"key\": \"additional_information\",\n \"description\": None,\n \"parameter_type\": \"workflow\",\n \"workflow_parameter_type\": \"string\",\n \"default_value\": \"Message: I'd love to learn more about your...\nPhone: 123-456-7890\nInquiry type: sales\nOptional Subject: Hello from [Company Here]\",\n },\n {\n \"key\": \"email\",\n \"description\": None,\n \"parameter_type\": \"workflow\",\n \"workflow_parameter_type\": \"string\",\n \"default_value\": None,\n },\n ],\n \"blocks\": [\n {\n \"label\": \"Fill_Out_Contact_Form\",\n \"continue_on_failure\": True,\n \"block_type\": \"navigation\",\n \"url\": \"{{website_url}}\",\n \"title\": \"Fill_Out_Contact_Form\",\n \"engine\": \"skyvern-1.0\",\n \"navigation_goal\": \"Find the contact form. Fill out the contact us form and submit it. Your goal is complete when the page says your message has been sent. In the case you can't find a contact us form, terminate.\n\nFill out required fields as best you can using the following information:\n{{name}}\n{{email}}\n{{additional_information}}\",\n \"error_code_mapping\": None,\n \"max_retries\": 0,\n \"max_steps_per_run\": None,\n \"complete_on_download\": False,\n \"download_suffix\": None,\n \"parameter_keys\": [],\n \"totp_identifier\": None,\n \"totp_verification_url\": None,\n \"cache_actions\": False,\n \"complete_criterion\": \"\",\n \"terminate_criterion\": \"\",\n \"include_action_history_in_verification\": False,\n },\n {\n \"label\": \"Extract_Email\",\n \"continue_on_failure\": False,\n \"block_type\": \"extraction\",\n \"url\": \"\",\n \"title\": \"Extract_Email\",\n \"data_extraction_goal\": \"Extract a company email if available \",\n \"data_schema\": None,\n \"max_retries\": 0,\n \"max_steps_per_run\": None,\n \"parameter_keys\": [],\n \"cache_actions\": False,\n },\n ],\n },\n}\nskyvern = Skyvern(api_key=\"your_api_key\")\nworkflow = await skyvern.workflows.create_workflow(json_definition=workflow_definition)\nprint(workflow)\n" } ] } @@ -577,6 +591,16 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowRequest" + } + } + } + }, "responses": { "200": { "description": "Successfully updated workflow", @@ -592,2297 +616,6 @@ "description": "Invalid workflow definition" } }, - "requestBody": { - "content": { - "application/x-yaml": { - "schema": { - "$defs": { - "AWSSecretParameterYAML": { - "properties": { - "parameter_type": { - "const": "aws_secret", - "default": "aws_secret", - "title": "Parameter Type", - "type": "string" - }, - "key": { - "title": "Key", - "type": "string" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "aws_key": { - "title": "Aws Key", - "type": "string" - } - }, - "required": [ - "key", - "aws_key" - ], - "title": "AWSSecretParameterYAML", - "type": "object" - }, - "ActionBlockYAML": { - "properties": { - "block_type": { - "const": "action", - "default": "action", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Url" - }, - "title": { - "default": "", - "title": "Title", - "type": "string" - }, - "navigation_goal": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Navigation Goal" - }, - "error_code_mapping": { - "anyOf": [ - { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Error Code Mapping" - }, - "max_retries": { - "default": 0, - "title": "Max Retries", - "type": "integer" - }, - "parameter_keys": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Parameter Keys" - }, - "complete_on_download": { - "default": false, - "title": "Complete On Download", - "type": "boolean" - }, - "download_suffix": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Download Suffix" - }, - "totp_verification_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Totp Verification Url" - }, - "totp_identifier": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Totp Identifier" - }, - "cache_actions": { - "default": false, - "title": "Cache Actions", - "type": "boolean" - } - }, - "required": [ - "label" - ], - "title": "ActionBlockYAML", - "type": "object" - }, - "BitwardenCreditCardDataParameterYAML": { - "properties": { - "parameter_type": { - "const": "bitwarden_credit_card_data", - "default": "bitwarden_credit_card_data", - "title": "Parameter Type", - "type": "string" - }, - "key": { - "title": "Key", - "type": "string" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "bitwarden_client_id_aws_secret_key": { - "title": "Bitwarden Client Id Aws Secret Key", - "type": "string" - }, - "bitwarden_client_secret_aws_secret_key": { - "title": "Bitwarden Client Secret Aws Secret Key", - "type": "string" - }, - "bitwarden_master_password_aws_secret_key": { - "title": "Bitwarden Master Password Aws Secret Key", - "type": "string" - }, - "bitwarden_collection_id": { - "title": "Bitwarden Collection Id", - "type": "string" - }, - "bitwarden_item_id": { - "title": "Bitwarden Item Id", - "type": "string" - } - }, - "required": [ - "key", - "bitwarden_client_id_aws_secret_key", - "bitwarden_client_secret_aws_secret_key", - "bitwarden_master_password_aws_secret_key", - "bitwarden_collection_id", - "bitwarden_item_id" - ], - "title": "BitwardenCreditCardDataParameterYAML", - "type": "object" - }, - "BitwardenLoginCredentialParameterYAML": { - "properties": { - "parameter_type": { - "const": "bitwarden_login_credential", - "default": "bitwarden_login_credential", - "title": "Parameter Type", - "type": "string" - }, - "key": { - "title": "Key", - "type": "string" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "bitwarden_client_id_aws_secret_key": { - "title": "Bitwarden Client Id Aws Secret Key", - "type": "string" - }, - "bitwarden_client_secret_aws_secret_key": { - "title": "Bitwarden Client Secret Aws Secret Key", - "type": "string" - }, - "bitwarden_master_password_aws_secret_key": { - "title": "Bitwarden Master Password Aws Secret Key", - "type": "string" - }, - "url_parameter_key": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Url Parameter Key" - }, - "bitwarden_collection_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Bitwarden Collection Id" - }, - "bitwarden_item_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Bitwarden Item Id" - } - }, - "required": [ - "key", - "bitwarden_client_id_aws_secret_key", - "bitwarden_client_secret_aws_secret_key", - "bitwarden_master_password_aws_secret_key" - ], - "title": "BitwardenLoginCredentialParameterYAML", - "type": "object" - }, - "BitwardenSensitiveInformationParameterYAML": { - "properties": { - "parameter_type": { - "const": "bitwarden_sensitive_information", - "default": "bitwarden_sensitive_information", - "title": "Parameter Type", - "type": "string" - }, - "key": { - "title": "Key", - "type": "string" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "bitwarden_client_id_aws_secret_key": { - "title": "Bitwarden Client Id Aws Secret Key", - "type": "string" - }, - "bitwarden_client_secret_aws_secret_key": { - "title": "Bitwarden Client Secret Aws Secret Key", - "type": "string" - }, - "bitwarden_master_password_aws_secret_key": { - "title": "Bitwarden Master Password Aws Secret Key", - "type": "string" - }, - "bitwarden_collection_id": { - "title": "Bitwarden Collection Id", - "type": "string" - }, - "bitwarden_identity_key": { - "title": "Bitwarden Identity Key", - "type": "string" - }, - "bitwarden_identity_fields": { - "items": { - "type": "string" - }, - "title": "Bitwarden Identity Fields", - "type": "array" - } - }, - "required": [ - "key", - "bitwarden_client_id_aws_secret_key", - "bitwarden_client_secret_aws_secret_key", - "bitwarden_master_password_aws_secret_key", - "bitwarden_collection_id", - "bitwarden_identity_key", - "bitwarden_identity_fields" - ], - "title": "BitwardenSensitiveInformationParameterYAML", - "type": "object" - }, - "CodeBlockYAML": { - "properties": { - "block_type": { - "const": "code", - "default": "code", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "code": { - "title": "Code", - "type": "string" - }, - "parameter_keys": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Parameter Keys" - } - }, - "required": [ - "label", - "code" - ], - "title": "CodeBlockYAML", - "type": "object" - }, - "ContextParameterYAML": { - "properties": { - "parameter_type": { - "const": "context", - "default": "context", - "title": "Parameter Type", - "type": "string" - }, - "key": { - "title": "Key", - "type": "string" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "source_parameter_key": { - "title": "Source Parameter Key", - "type": "string" - } - }, - "required": [ - "key", - "source_parameter_key" - ], - "title": "ContextParameterYAML", - "type": "object" - }, - "CredentialParameterYAML": { - "properties": { - "parameter_type": { - "const": "credential", - "default": "credential", - "title": "Parameter Type", - "type": "string" - }, - "key": { - "title": "Key", - "type": "string" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "credential_id": { - "title": "Credential Id", - "type": "string" - } - }, - "required": [ - "key", - "credential_id" - ], - "title": "CredentialParameterYAML", - "type": "object" - }, - "DownloadToS3BlockYAML": { - "properties": { - "block_type": { - "const": "download_to_s3", - "default": "download_to_s3", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "url": { - "title": "Url", - "type": "string" - } - }, - "required": [ - "label", - "url" - ], - "title": "DownloadToS3BlockYAML", - "type": "object" - }, - "ExtractionBlockYAML": { - "properties": { - "block_type": { - "const": "extraction", - "default": "extraction", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "data_extraction_goal": { - "title": "Data Extraction Goal", - "type": "string" - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Url" - }, - "title": { - "default": "", - "title": "Title", - "type": "string" - }, - "data_schema": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "items": { - - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Data Schema" - }, - "max_retries": { - "default": 0, - "title": "Max Retries", - "type": "integer" - }, - "max_steps_per_run": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Steps Per Run" - }, - "parameter_keys": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Parameter Keys" - }, - "cache_actions": { - "default": false, - "title": "Cache Actions", - "type": "boolean" - } - }, - "required": [ - "label", - "data_extraction_goal" - ], - "title": "ExtractionBlockYAML", - "type": "object" - }, - "FileDownloadBlockYAML": { - "properties": { - "block_type": { - "const": "file_download", - "default": "file_download", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "navigation_goal": { - "title": "Navigation Goal", - "type": "string" - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Url" - }, - "title": { - "default": "", - "title": "Title", - "type": "string" - }, - "error_code_mapping": { - "anyOf": [ - { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Error Code Mapping" - }, - "max_retries": { - "default": 0, - "title": "Max Retries", - "type": "integer" - }, - "max_steps_per_run": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Steps Per Run" - }, - "parameter_keys": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Parameter Keys" - }, - "download_suffix": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Download Suffix" - }, - "totp_verification_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Totp Verification Url" - }, - "totp_identifier": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Totp Identifier" - }, - "cache_actions": { - "default": false, - "title": "Cache Actions", - "type": "boolean" - } - }, - "required": [ - "label", - "navigation_goal" - ], - "title": "FileDownloadBlockYAML", - "type": "object" - }, - "FileParserBlockYAML": { - "properties": { - "block_type": { - "const": "file_url_parser", - "default": "file_url_parser", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "file_url": { - "title": "File Url", - "type": "string" - }, - "file_type": { - "$ref": "#/$defs/FileType" - } - }, - "required": [ - "label", - "file_url", - "file_type" - ], - "title": "FileParserBlockYAML", - "type": "object" - }, - "FileStorageType": { - "enum": [ - "s3" - ], - "title": "FileStorageType", - "type": "string" - }, - "FileType": { - "enum": [ - "csv" - ], - "title": "FileType", - "type": "string" - }, - "FileUploadBlockYAML": { - "properties": { - "block_type": { - "const": "file_upload", - "default": "file_upload", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "storage_type": { - "$ref": "#/$defs/FileStorageType", - "default": "s3" - }, - "s3_bucket": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "S3 Bucket" - }, - "aws_access_key_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Aws Access Key Id" - }, - "aws_secret_access_key": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Aws Secret Access Key" - }, - "region_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Region Name" - }, - "path": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Path" - } - }, - "required": [ - "label" - ], - "title": "FileUploadBlockYAML", - "type": "object" - }, - "ForLoopBlockYAML": { - "properties": { - "block_type": { - "const": "for_loop", - "default": "for_loop", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "loop_blocks": { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/TaskBlockYAML" - }, - { - "$ref": "#/$defs/ForLoopBlockYAML" - }, - { - "$ref": "#/$defs/CodeBlockYAML" - }, - { - "$ref": "#/$defs/TextPromptBlockYAML" - }, - { - "$ref": "#/$defs/DownloadToS3BlockYAML" - }, - { - "$ref": "#/$defs/UploadToS3BlockYAML" - }, - { - "$ref": "#/$defs/FileUploadBlockYAML" - }, - { - "$ref": "#/$defs/SendEmailBlockYAML" - }, - { - "$ref": "#/$defs/FileParserBlockYAML" - }, - { - "$ref": "#/$defs/ValidationBlockYAML" - }, - { - "$ref": "#/$defs/ActionBlockYAML" - }, - { - "$ref": "#/$defs/NavigationBlockYAML" - }, - { - "$ref": "#/$defs/ExtractionBlockYAML" - }, - { - "$ref": "#/$defs/LoginBlockYAML" - }, - { - "$ref": "#/$defs/WaitBlockYAML" - }, - { - "$ref": "#/$defs/FileDownloadBlockYAML" - }, - { - "$ref": "#/$defs/UrlBlockYAML" - }, - { - "$ref": "#/$defs/PDFParserBlockYAML" - }, - { - "$ref": "#/$defs/TaskV2BlockYAML" - } - ] - }, - "title": "Loop Blocks", - "type": "array" - }, - "loop_over_parameter_key": { - "default": "", - "title": "Loop Over Parameter Key", - "type": "string" - }, - "loop_variable_reference": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Loop Variable Reference" - }, - "complete_if_empty": { - "default": false, - "title": "Complete If Empty", - "type": "boolean" - } - }, - "required": [ - "label", - "loop_blocks" - ], - "title": "ForLoopBlockYAML", - "type": "object" - }, - "LoginBlockYAML": { - "properties": { - "block_type": { - "const": "login", - "default": "login", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Url" - }, - "title": { - "default": "", - "title": "Title", - "type": "string" - }, - "navigation_goal": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Navigation Goal" - }, - "error_code_mapping": { - "anyOf": [ - { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Error Code Mapping" - }, - "max_retries": { - "default": 0, - "title": "Max Retries", - "type": "integer" - }, - "max_steps_per_run": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Steps Per Run" - }, - "parameter_keys": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Parameter Keys" - }, - "totp_verification_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Totp Verification Url" - }, - "totp_identifier": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Totp Identifier" - }, - "cache_actions": { - "default": false, - "title": "Cache Actions", - "type": "boolean" - }, - "complete_criterion": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Complete Criterion" - }, - "terminate_criterion": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Terminate Criterion" - }, - "complete_verification": { - "default": true, - "title": "Complete Verification", - "type": "boolean" - } - }, - "required": [ - "label" - ], - "title": "LoginBlockYAML", - "type": "object" - }, - "NavigationBlockYAML": { - "properties": { - "block_type": { - "const": "navigation", - "default": "navigation", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "navigation_goal": { - "title": "Navigation Goal", - "type": "string" - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Url" - }, - "title": { - "default": "", - "title": "Title", - "type": "string" - }, - "engine": { - "$ref": "#/$defs/RunEngine", - "default": "skyvern-1.0" - }, - "error_code_mapping": { - "anyOf": [ - { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Error Code Mapping" - }, - "max_retries": { - "default": 0, - "title": "Max Retries", - "type": "integer" - }, - "max_steps_per_run": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Steps Per Run" - }, - "parameter_keys": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Parameter Keys" - }, - "complete_on_download": { - "default": false, - "title": "Complete On Download", - "type": "boolean" - }, - "download_suffix": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Download Suffix" - }, - "totp_verification_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Totp Verification Url" - }, - "totp_identifier": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Totp Identifier" - }, - "cache_actions": { - "default": false, - "title": "Cache Actions", - "type": "boolean" - }, - "complete_criterion": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Complete Criterion" - }, - "terminate_criterion": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Terminate Criterion" - }, - "complete_verification": { - "default": true, - "title": "Complete Verification", - "type": "boolean" - }, - "include_action_history_in_verification": { - "default": false, - "title": "Include Action History In Verification", - "type": "boolean" - } - }, - "required": [ - "label", - "navigation_goal" - ], - "title": "NavigationBlockYAML", - "type": "object" - }, - "OutputParameterYAML": { - "properties": { - "parameter_type": { - "const": "output", - "default": "output", - "title": "Parameter Type", - "type": "string" - }, - "key": { - "title": "Key", - "type": "string" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - } - }, - "required": [ - "key" - ], - "title": "OutputParameterYAML", - "type": "object" - }, - "PDFParserBlockYAML": { - "properties": { - "block_type": { - "const": "pdf_parser", - "default": "pdf_parser", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "file_url": { - "title": "File Url", - "type": "string" - }, - "json_schema": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Json Schema" - } - }, - "required": [ - "label", - "file_url" - ], - "title": "PDFParserBlockYAML", - "type": "object" - }, - "ProxyLocation": { - "enum": [ - "RESIDENTIAL", - "US-CA", - "US-NY", - "US-TX", - "US-FL", - "US-WA", - "RESIDENTIAL_ES", - "RESIDENTIAL_IE", - "RESIDENTIAL_GB", - "RESIDENTIAL_IN", - "RESIDENTIAL_JP", - "RESIDENTIAL_FR", - "RESIDENTIAL_DE", - "RESIDENTIAL_NZ", - "RESIDENTIAL_ZA", - "RESIDENTIAL_AR", - "RESIDENTIAL_ISP", - "NONE" - ], - "title": "ProxyLocation", - "type": "string" - }, - "RunEngine": { - "enum": [ - "skyvern-1.0", - "skyvern-2.0", - "openai-cua", - "anthropic-cua" - ], - "title": "RunEngine", - "type": "string" - }, - "SendEmailBlockYAML": { - "properties": { - "block_type": { - "const": "send_email", - "default": "send_email", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "smtp_host_secret_parameter_key": { - "title": "Smtp Host Secret Parameter Key", - "type": "string" - }, - "smtp_port_secret_parameter_key": { - "title": "Smtp Port Secret Parameter Key", - "type": "string" - }, - "smtp_username_secret_parameter_key": { - "title": "Smtp Username Secret Parameter Key", - "type": "string" - }, - "smtp_password_secret_parameter_key": { - "title": "Smtp Password Secret Parameter Key", - "type": "string" - }, - "sender": { - "title": "Sender", - "type": "string" - }, - "recipients": { - "items": { - "type": "string" - }, - "title": "Recipients", - "type": "array" - }, - "subject": { - "title": "Subject", - "type": "string" - }, - "body": { - "title": "Body", - "type": "string" - }, - "file_attachments": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "File Attachments" - } - }, - "required": [ - "label", - "smtp_host_secret_parameter_key", - "smtp_port_secret_parameter_key", - "smtp_username_secret_parameter_key", - "smtp_password_secret_parameter_key", - "sender", - "recipients", - "subject", - "body" - ], - "title": "SendEmailBlockYAML", - "type": "object" - }, - "TaskBlockYAML": { - "properties": { - "block_type": { - "const": "task", - "default": "task", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Url" - }, - "title": { - "default": "", - "title": "Title", - "type": "string" - }, - "navigation_goal": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Navigation Goal" - }, - "data_extraction_goal": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Data Extraction Goal" - }, - "data_schema": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "items": { - - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Data Schema" - }, - "error_code_mapping": { - "anyOf": [ - { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Error Code Mapping" - }, - "max_retries": { - "default": 0, - "title": "Max Retries", - "type": "integer" - }, - "max_steps_per_run": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Max Steps Per Run" - }, - "parameter_keys": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Parameter Keys" - }, - "complete_on_download": { - "default": false, - "title": "Complete On Download", - "type": "boolean" - }, - "download_suffix": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Download Suffix" - }, - "totp_verification_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Totp Verification Url" - }, - "totp_identifier": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Totp Identifier" - }, - "cache_actions": { - "default": false, - "title": "Cache Actions", - "type": "boolean" - }, - "complete_criterion": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Complete Criterion" - }, - "terminate_criterion": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Terminate Criterion" - }, - "complete_verification": { - "default": true, - "title": "Complete Verification", - "type": "boolean" - }, - "include_action_history_in_verification": { - "default": false, - "title": "Include Action History In Verification", - "type": "boolean" - } - }, - "required": [ - "label" - ], - "title": "TaskBlockYAML", - "type": "object" - }, - "TaskV2BlockYAML": { - "properties": { - "block_type": { - "const": "task_v2", - "default": "task_v2", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "prompt": { - "title": "Prompt", - "type": "string" - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Url" - }, - "totp_verification_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Totp Verification Url" - }, - "totp_identifier": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Totp Identifier" - }, - "max_iterations": { - "default": 10, - "title": "Max Iterations", - "type": "integer" - }, - "max_steps": { - "default": 25, - "title": "Max Steps", - "type": "integer" - } - }, - "required": [ - "label", - "prompt" - ], - "title": "TaskV2BlockYAML", - "type": "object" - }, - "TextPromptBlockYAML": { - "properties": { - "block_type": { - "const": "text_prompt", - "default": "text_prompt", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "llm_key": { - "default": "OPENAI_GPT4O_MINI", - "title": "Llm Key", - "type": "string" - }, - "prompt": { - "title": "Prompt", - "type": "string" - }, - "parameter_keys": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Parameter Keys" - }, - "json_schema": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Json Schema" - } - }, - "required": [ - "label", - "prompt" - ], - "title": "TextPromptBlockYAML", - "type": "object" - }, - "UploadToS3BlockYAML": { - "properties": { - "block_type": { - "const": "upload_to_s3", - "default": "upload_to_s3", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "path": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Path" - } - }, - "required": [ - "label" - ], - "title": "UploadToS3BlockYAML", - "type": "object" - }, - "UrlBlockYAML": { - "properties": { - "block_type": { - "const": "goto_url", - "default": "goto_url", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "url": { - "title": "Url", - "type": "string" - } - }, - "required": [ - "label", - "url" - ], - "title": "UrlBlockYAML", - "type": "object" - }, - "ValidationBlockYAML": { - "properties": { - "block_type": { - "const": "validation", - "default": "validation", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "complete_criterion": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Complete Criterion" - }, - "terminate_criterion": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Terminate Criterion" - }, - "error_code_mapping": { - "anyOf": [ - { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Error Code Mapping" - }, - "parameter_keys": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Parameter Keys" - } - }, - "required": [ - "label" - ], - "title": "ValidationBlockYAML", - "type": "object" - }, - "WaitBlockYAML": { - "properties": { - "block_type": { - "const": "wait", - "default": "wait", - "title": "Block Type", - "type": "string" - }, - "label": { - "title": "Label", - "type": "string" - }, - "continue_on_failure": { - "default": false, - "title": "Continue On Failure", - "type": "boolean" - }, - "wait_sec": { - "default": 0, - "title": "Wait Sec", - "type": "integer" - } - }, - "required": [ - "label" - ], - "title": "WaitBlockYAML", - "type": "object" - }, - "WorkflowDefinitionYAML": { - "properties": { - "parameters": { - "items": { - "discriminator": { - "mapping": { - "aws_secret": "#/$defs/AWSSecretParameterYAML", - "bitwarden_credit_card_data": "#/$defs/BitwardenCreditCardDataParameterYAML", - "bitwarden_login_credential": "#/$defs/BitwardenLoginCredentialParameterYAML", - "bitwarden_sensitive_information": "#/$defs/BitwardenSensitiveInformationParameterYAML", - "context": "#/$defs/ContextParameterYAML", - "credential": "#/$defs/CredentialParameterYAML", - "output": "#/$defs/OutputParameterYAML", - "workflow": "#/$defs/WorkflowParameterYAML" - }, - "propertyName": "parameter_type" - }, - "oneOf": [ - { - "$ref": "#/$defs/AWSSecretParameterYAML" - }, - { - "$ref": "#/$defs/BitwardenLoginCredentialParameterYAML" - }, - { - "$ref": "#/$defs/BitwardenSensitiveInformationParameterYAML" - }, - { - "$ref": "#/$defs/BitwardenCreditCardDataParameterYAML" - }, - { - "$ref": "#/$defs/WorkflowParameterYAML" - }, - { - "$ref": "#/$defs/ContextParameterYAML" - }, - { - "$ref": "#/$defs/OutputParameterYAML" - }, - { - "$ref": "#/$defs/CredentialParameterYAML" - } - ] - }, - "title": "Parameters", - "type": "array" - }, - "blocks": { - "items": { - "discriminator": { - "mapping": { - "action": "#/$defs/ActionBlockYAML", - "code": "#/$defs/CodeBlockYAML", - "download_to_s3": "#/$defs/DownloadToS3BlockYAML", - "extraction": "#/$defs/ExtractionBlockYAML", - "file_download": "#/$defs/FileDownloadBlockYAML", - "file_upload": "#/$defs/FileUploadBlockYAML", - "file_url_parser": "#/$defs/FileParserBlockYAML", - "for_loop": "#/$defs/ForLoopBlockYAML", - "goto_url": "#/$defs/UrlBlockYAML", - "login": "#/$defs/LoginBlockYAML", - "navigation": "#/$defs/NavigationBlockYAML", - "pdf_parser": "#/$defs/PDFParserBlockYAML", - "send_email": "#/$defs/SendEmailBlockYAML", - "task": "#/$defs/TaskBlockYAML", - "task_v2": "#/$defs/TaskV2BlockYAML", - "text_prompt": "#/$defs/TextPromptBlockYAML", - "upload_to_s3": "#/$defs/UploadToS3BlockYAML", - "validation": "#/$defs/ValidationBlockYAML", - "wait": "#/$defs/WaitBlockYAML" - }, - "propertyName": "block_type" - }, - "oneOf": [ - { - "$ref": "#/$defs/TaskBlockYAML" - }, - { - "$ref": "#/$defs/ForLoopBlockYAML" - }, - { - "$ref": "#/$defs/CodeBlockYAML" - }, - { - "$ref": "#/$defs/TextPromptBlockYAML" - }, - { - "$ref": "#/$defs/DownloadToS3BlockYAML" - }, - { - "$ref": "#/$defs/UploadToS3BlockYAML" - }, - { - "$ref": "#/$defs/FileUploadBlockYAML" - }, - { - "$ref": "#/$defs/SendEmailBlockYAML" - }, - { - "$ref": "#/$defs/FileParserBlockYAML" - }, - { - "$ref": "#/$defs/ValidationBlockYAML" - }, - { - "$ref": "#/$defs/ActionBlockYAML" - }, - { - "$ref": "#/$defs/NavigationBlockYAML" - }, - { - "$ref": "#/$defs/ExtractionBlockYAML" - }, - { - "$ref": "#/$defs/LoginBlockYAML" - }, - { - "$ref": "#/$defs/WaitBlockYAML" - }, - { - "$ref": "#/$defs/FileDownloadBlockYAML" - }, - { - "$ref": "#/$defs/UrlBlockYAML" - }, - { - "$ref": "#/$defs/PDFParserBlockYAML" - }, - { - "$ref": "#/$defs/TaskV2BlockYAML" - } - ] - }, - "title": "Blocks", - "type": "array" - } - }, - "required": [ - "parameters", - "blocks" - ], - "title": "WorkflowDefinitionYAML", - "type": "object" - }, - "WorkflowParameterType": { - "enum": [ - "string", - "integer", - "float", - "boolean", - "json", - "file_url", - "credential_id" - ], - "title": "WorkflowParameterType", - "type": "string" - }, - "WorkflowParameterYAML": { - "properties": { - "parameter_type": { - "const": "workflow", - "default": "workflow", - "title": "Parameter Type", - "type": "string" - }, - "key": { - "title": "Key", - "type": "string" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "workflow_parameter_type": { - "$ref": "#/$defs/WorkflowParameterType" - }, - "default_value": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "additionalProperties": true, - "type": "object" - }, - { - "items": { - - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Default Value" - } - }, - "required": [ - "key", - "workflow_parameter_type" - ], - "title": "WorkflowParameterYAML", - "type": "object" - }, - "WorkflowStatus": { - "enum": [ - "published", - "draft", - "auto_generated" - ], - "title": "WorkflowStatus", - "type": "string" - } - }, - "properties": { - "title": { - "title": "Title", - "type": "string" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "proxy_location": { - "anyOf": [ - { - "$ref": "#/$defs/ProxyLocation" - }, - { - "type": "null" - } - ] - }, - "webhook_callback_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Webhook Callback Url" - }, - "totp_verification_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Totp Verification Url" - }, - "totp_identifier": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Totp Identifier" - }, - "persist_browser_session": { - "default": false, - "title": "Persist Browser Session", - "type": "boolean" - }, - "workflow_definition": { - "$ref": "#/$defs/WorkflowDefinitionYAML" - }, - "is_saved_task": { - "default": false, - "title": "Is Saved Task", - "type": "boolean" - }, - "status": { - "$ref": "#/$defs/WorkflowStatus", - "default": "published" - } - }, - "required": [ - "title", - "workflow_definition" - ], - "title": "WorkflowCreateYAMLRequest", - "type": "object" - } - } - }, - "required": true - }, "x-fern-sdk-group-name": "workflows", "x-fern-sdk-method-name": "update_workflow", "x-fern-examples": [ @@ -2890,7 +623,11 @@ "code-samples": [ { "sdk": "curl", - "code": "curl -X POST https://api.skyvern.com/v1/workflows/wpid_123 --header 'x-api-key: {{x-api-key}}' --header 'Content-Type: application/x-yaml' --data-raw 'title: Invoice Downloading Demo (Jun 13)\ndescription: \u003E-\n Login to the website, download all the invoices after a date, email the\n invoices\nworkflow_definition:\n parameters:\n - key: website_url\n parameter_type: workflow\n workflow_parameter_type: string\n - key: credentials\n parameter_type: bitwarden_login_credential\n bitwarden_client_id_aws_secret_key: SECRET\n bitwarden_client_secret_aws_secret_key: SECRET\n bitwarden_master_password_aws_secret_key: SECRET\n bitwarden_collection_id: SECRET\n url_parameter_key: website_url\n - key: invoice_retrieval_start_date\n parameter_type: workflow\n workflow_parameter_type: string\n - key: smtp_host\n parameter_type: aws_secret\n aws_key: SKYVERN_SMTP_HOST_AWS_SES\n - key: smtp_port\n parameter_type: aws_secret\n aws_key: SKYVERN_SMTP_PORT_AWS_SES\n - key: smtp_username\n parameter_type: aws_secret\n aws_key: SKYVERN_SMTP_USERNAME_SES\n - key: smtp_password\n parameter_type: aws_secret\n aws_key: SKYVERN_SMTP_PASSWORD_SES\n - parameter_type: context\n key: order_history_url\n source_parameter_key: get_order_history_page_url_and_qualifying_order_ids_output\n - parameter_type: context\n key: order_ids\n source_parameter_key: get_order_history_page_url_and_qualifying_order_ids_output\n - parameter_type: context\n key: order_id\n source_parameter_key: order_ids\n blocks:\n - block_type: task\n label: login\n parameter_keys:\n - credentials\n url: website_url\n navigation_goal: \u003E-\n If you're not on the login page, navigate to login page and login using the credentials given, and then navigate to the personal account page. First, take actions on promotional popups or cookie prompts that could prevent taking other action on the web page. Then, try to login and navigate to the personal account page. If you fail to login to find the login page or can't login after several trials, terminate. If you're on the personal account page, consider the goal is completed.\n error_code_mapping:\n stuck_with_popups: terminate and return this error if you can't close popups after several tries and can't take the necessary actions on the website because there is a blocking popup on the page\n failed_to_login: terminate and return this error if you fail logging in to the page\n - block_type: task\n label: get_order_history_page_url_and_qualifying_order_ids\n parameter_keys:\n - invoice_retrieval_start_date\n navigation_goal: Find the order history page. If there is no orders after given start date, terminate.\n data_extraction_goal: \u003E-\n You need to extract the order history page url by looking at the current\n page you're on. You need to extract contact emails you see on the page. You also need to extract the order ids for orders that\n happened on or after invoice_retrieval_start_date. Make sure to filter\n only the orders that happened on or after invoice_retrieval_start_date. You need to compare each order's date with the invoice_download_start_date. You can only include an order in the output if the order's date is after or the same as the invoice_download_start_date.\n While comparing dates, first compare year, then month, then day. invoice_retrieval_start_date\n is in YYYY-MM-DD format. The dates on the websites may be in different formats, compare accordingly and compare year, date, and month.\n error_code_mapping:\n failed_to_find_order_history_page: return this error if you can't find the order history page on the website\n no_orders_found_after_start_date: return this error if there are no orders after the specified invoice_download_start_date\n data_schema:\n type: object\n properties:\n order_history_url:\n type: url\n description: \u003E-\n The exact URL of the order history page. Do not make any\n assumptions. Return the URL that's passed along in this context.\n contact_emails:\n type: array\n items:\n type: string\n description: Contact email for the ecommerce website you're on. If you can't find any return null\n date_comparison_scratchpad:\n type: string\n description: \u003E-\n You are supposed to filter the orders that happened on or after the invoice_download_start_date. Think through how you will approach this task step-by-step here. Consider these before starting the comparison:\n - What format is the order date in? How can you parse it into a structured format?\n - What is the correct way to compare two dates?\n - How will you compare the order dates to the invoice_download_start_date? \n \n Write out your thought process before filling out the order_ids field below. Remember, the original date may be in any format, so parse it carefully! The invoice_download_start_date will be an exact date you can directly compare against in the format YYYY-MM-DD.\n order_ids:\n type: array\n items:\n type: object\n properties:\n order_date:\n type: iso-8601-date-string\n order_id:\n type: string\n description: \u003E-\n Return a list of order id strings. Do not return order ids of\n orders that happened before the specified\n invoice_retrieval_start_date\n - block_type: for_loop\n label: iterate_over_order_ids\n loop_over_parameter_key: order_ids\n continue_on_failure: true\n loop_blocks:\n - block_type: task\n label: download_invoice_for_order\n complete_on_download: true\n continue_on_failure: true\n parameter_keys:\n - order_id\n url: order_history_url\n navigation_goal: Download the invoice of the order with the given order ID. Make sure to download the invoice for the given order id. If the element tree doesn't have a matching order id, check the screenshots. Complete if you have successfully downloaded the invoice according to action history, if you were able to download it, you'll see download_triggered=True for the last step. If you don't see a way to download an invoice, navigate to the order page if possible. If there's no way to download an invoice terminate. If the text suggests printing, you can assume you can download it. Return click action with download=True if you want to trigger a download.\n error_code_mapping:\n not_possible_to_download_invoice: return this error if the website doesn't allow downloading/viewing invoices\n cant_solve_captcha: return this error if captcha isn't solved after multiple retries\n - block_type: upload_to_s3\n label: upload_downloaded_files_to_s3\n path: SKYVERN_DOWNLOAD_DIRECTORY\n - block_type: send_email\n label: send_email\n smtp_host_secret_parameter_key: smtp_host\n smtp_port_secret_parameter_key: smtp_port\n smtp_username_secret_parameter_key: smtp_username\n smtp_password_secret_parameter_key: smtp_password\n sender: hello@skyvern.com\n recipients:\n - founders@skyvern.com\n subject: Skyvern - Downloaded Invoices Demo\n body: website_url\n file_attachments:\n - SKYVERN_DOWNLOAD_DIRECTORY\n'\n" + "code": "curl -X POST https://api.skyvern.com/v1/workflows/wpid_123 --header 'x-api-key: {{x-api-key}}' --header 'Content-Type: text/plain' --data-raw 'title: Contact Forms\ndescription: Fill the contact form on the website\nproxy_location: RESIDENTIAL\nwebhook_callback_url: https://example.com/webhook\ntotp_verification_url: https://example.com/totp\npersist_browser_session: false\nworkflow_definition:\n parameters:\n - key: website_url\n description: null\n parameter_type: workflow\n workflow_parameter_type: string\n default_value: null\n - key: name\n description: null\n parameter_type: workflow\n workflow_parameter_type: string\n default_value: null\n - key: additional_information\n description: null\n parameter_type: workflow\n workflow_parameter_type: string\n default_value: |-\n Message: I'd love to learn more about your...\n Phone: 123-456-7890\n Inquiry type: sales\n Optional Subject: Hello from [Company Here]\n - key: email\n description: null\n parameter_type: workflow\n workflow_parameter_type: string\n default_value: null\n blocks:\n - label: Fill_Out_Contact_Form\n continue_on_failure: true\n block_type: navigation\n url: \"{{website_url}}\"\n title: Fill_Out_Contact_Form\n engine: skyvern-1.0\n navigation_goal: \u003E-\n Find the contact form. Fill out the contact us form and submit it. Your\n goal is complete when the page says your message has been sent. In the\n case you can't find a contact us form, terminate.\n\n\n Fill out required fields as best you can using the following\n information:\n\n {{name}}\n\n {{email}}\n\n {{additional_information}}\n error_code_mapping: null\n max_retries: 0\n max_steps_per_run: null\n complete_on_download: false\n download_suffix: null\n parameter_keys: []\n totp_identifier: null\n totp_verification_url: null\n cache_actions: false\n complete_criterion: \"\"\n terminate_criterion: \"\"\n include_action_history_in_verification: false\n - label: Extract_Email\n continue_on_failure: false\n block_type: extraction\n url: \"\"\n title: Extract_Email\n data_extraction_goal: \"Extract a company email if available \"\n data_schema: null\n max_retries: 0\n max_steps_per_run: null\n parameter_keys: []\n cache_actions: false\n'\n" + }, + { + "sdk": "python", + "code": "\nfrom skyvern import Skyvern\n\nupdated_workflow_definition = {\n \"title\": \"Updated Contact Forms Workflow\",\n \"description\": \"Fill the contact form on the website\",\n \"proxy_location\": \"RESIDENTIAL\",\n \"webhook_callback_url\": \"https://example.com/webhook\",\n \"totp_verification_url\": \"https://example.com/totp\",\n \"totp_identifier\": \"4155555555\",\n \"workflow_definition\": {\n \"parameters\": [\n {\n \"key\": \"website_url\",\n \"description\": None,\n \"parameter_type\": \"workflow\",\n \"workflow_parameter_type\": \"string\",\n \"default_value\": None,\n },\n {\n \"key\": \"name\",\n \"description\": None,\n \"parameter_type\": \"workflow\",\n \"workflow_parameter_type\": \"string\",\n \"default_value\": None,\n },\n {\n \"key\": \"additional_information\",\n \"description\": None,\n \"parameter_type\": \"workflow\",\n \"workflow_parameter_type\": \"string\",\n \"default_value\": \"Message: I'd love to learn more about your...\nPhone: 123-456-7890\nInquiry type: sales\nOptional Subject: Hello from [Company Here]\",\n },\n {\n \"key\": \"email\",\n \"description\": None,\n \"parameter_type\": \"workflow\",\n \"workflow_parameter_type\": \"string\",\n \"default_value\": None,\n },\n ],\n \"blocks\": [\n {\n \"label\": \"Fill_Out_Contact_Form\",\n \"continue_on_failure\": True,\n \"block_type\": \"navigation\",\n \"url\": \"{{website_url}}\",\n \"title\": \"Fill_Out_Contact_Form\",\n \"engine\": \"skyvern-1.0\",\n \"navigation_goal\": \"Find the contact form. Fill out the contact us form and submit it. Your goal is complete when the page says your message has been sent. In the case you can't find a contact us form, terminate.\n\nFill out required fields as best you can using the following information:\n{{name}}\n{{email}}\n{{additional_information}}\",\n \"error_code_mapping\": None,\n \"max_retries\": 0,\n \"max_steps_per_run\": None,\n \"complete_on_download\": False,\n \"download_suffix\": None,\n \"parameter_keys\": [],\n \"totp_identifier\": None,\n \"totp_verification_url\": None,\n \"cache_actions\": False,\n \"complete_criterion\": \"\",\n \"terminate_criterion\": \"\",\n \"include_action_history_in_verification\": False,\n },\n {\n \"label\": \"Extract_Email\",\n \"continue_on_failure\": False,\n \"block_type\": \"extraction\",\n \"url\": \"\",\n \"title\": \"Extract_Email\",\n \"data_extraction_goal\": \"Extract a company email if available \",\n \"data_schema\": None,\n \"max_retries\": 0,\n \"max_steps_per_run\": None,\n \"parameter_keys\": [],\n \"cache_actions\": False,\n },\n ],\n },\n}\nskyvern = Skyvern(api_key=\"your_api_key\")\nworkflow = await skyvern.workflows.update_workflow(workflow_id=\"wpid_123\", json_definition=updated_workflow_definition)\nprint(workflow)\n" } ] } @@ -3904,6 +1641,41 @@ ], "title": "AWSSecretParameter" }, + "AWSSecretParameterYAML": { + "properties": { + "parameter_type": { + "type": "string", + "const": "aws_secret", + "title": "Parameter Type", + "default": "aws_secret" + }, + "key": { + "type": "string", + "title": "Key" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "aws_key": { + "type": "string", + "title": "Aws Key" + } + }, + "type": "object", + "required": [ + "key", + "aws_key" + ], + "title": "AWSSecretParameterYAML" + }, "ActionBlock": { "properties": { "label": { @@ -4148,6 +1920,133 @@ ], "title": "ActionBlock" }, + "ActionBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "action", + "title": "Block Type", + "default": "action" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "title": { + "type": "string", + "title": "Title", + "default": "" + }, + "navigation_goal": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Navigation Goal" + }, + "error_code_mapping": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Error Code Mapping" + }, + "max_retries": { + "type": "integer", + "title": "Max Retries", + "default": 0 + }, + "parameter_keys": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Parameter Keys" + }, + "complete_on_download": { + "type": "boolean", + "title": "Complete On Download", + "default": false + }, + "download_suffix": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Download Suffix" + }, + "totp_verification_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Totp Verification Url" + }, + "totp_identifier": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Totp Identifier" + }, + "cache_actions": { + "type": "boolean", + "title": "Cache Actions", + "default": false + } + }, + "type": "object", + "required": [ + "label" + ], + "title": "ActionBlockYAML" + }, "BitwardenCreditCardDataParameter": { "properties": { "parameter_type": { @@ -4237,6 +2136,61 @@ ], "title": "BitwardenCreditCardDataParameter" }, + "BitwardenCreditCardDataParameterYAML": { + "properties": { + "parameter_type": { + "type": "string", + "const": "bitwarden_credit_card_data", + "title": "Parameter Type", + "default": "bitwarden_credit_card_data" + }, + "key": { + "type": "string", + "title": "Key" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "bitwarden_client_id_aws_secret_key": { + "type": "string", + "title": "Bitwarden Client Id Aws Secret Key" + }, + "bitwarden_client_secret_aws_secret_key": { + "type": "string", + "title": "Bitwarden Client Secret Aws Secret Key" + }, + "bitwarden_master_password_aws_secret_key": { + "type": "string", + "title": "Bitwarden Master Password Aws Secret Key" + }, + "bitwarden_collection_id": { + "type": "string", + "title": "Bitwarden Collection Id" + }, + "bitwarden_item_id": { + "type": "string", + "title": "Bitwarden Item Id" + } + }, + "type": "object", + "required": [ + "key", + "bitwarden_client_id_aws_secret_key", + "bitwarden_client_secret_aws_secret_key", + "bitwarden_master_password_aws_secret_key", + "bitwarden_collection_id", + "bitwarden_item_id" + ], + "title": "BitwardenCreditCardDataParameterYAML" + }, "BitwardenLoginCredentialParameter": { "properties": { "parameter_type": { @@ -4349,6 +2303,84 @@ ], "title": "BitwardenLoginCredentialParameter" }, + "BitwardenLoginCredentialParameterYAML": { + "properties": { + "parameter_type": { + "type": "string", + "const": "bitwarden_login_credential", + "title": "Parameter Type", + "default": "bitwarden_login_credential" + }, + "key": { + "type": "string", + "title": "Key" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "bitwarden_client_id_aws_secret_key": { + "type": "string", + "title": "Bitwarden Client Id Aws Secret Key" + }, + "bitwarden_client_secret_aws_secret_key": { + "type": "string", + "title": "Bitwarden Client Secret Aws Secret Key" + }, + "bitwarden_master_password_aws_secret_key": { + "type": "string", + "title": "Bitwarden Master Password Aws Secret Key" + }, + "url_parameter_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url Parameter Key" + }, + "bitwarden_collection_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Bitwarden Collection Id" + }, + "bitwarden_item_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Bitwarden Item Id" + } + }, + "type": "object", + "required": [ + "key", + "bitwarden_client_id_aws_secret_key", + "bitwarden_client_secret_aws_secret_key", + "bitwarden_master_password_aws_secret_key" + ], + "title": "BitwardenLoginCredentialParameterYAML" + }, "BitwardenSensitiveInformationParameter": { "properties": { "parameter_type": { @@ -4446,6 +2478,69 @@ ], "title": "BitwardenSensitiveInformationParameter" }, + "BitwardenSensitiveInformationParameterYAML": { + "properties": { + "parameter_type": { + "type": "string", + "const": "bitwarden_sensitive_information", + "title": "Parameter Type", + "default": "bitwarden_sensitive_information" + }, + "key": { + "type": "string", + "title": "Key" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "bitwarden_client_id_aws_secret_key": { + "type": "string", + "title": "Bitwarden Client Id Aws Secret Key" + }, + "bitwarden_client_secret_aws_secret_key": { + "type": "string", + "title": "Bitwarden Client Secret Aws Secret Key" + }, + "bitwarden_master_password_aws_secret_key": { + "type": "string", + "title": "Bitwarden Master Password Aws Secret Key" + }, + "bitwarden_collection_id": { + "type": "string", + "title": "Bitwarden Collection Id" + }, + "bitwarden_identity_key": { + "type": "string", + "title": "Bitwarden Identity Key" + }, + "bitwarden_identity_fields": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Bitwarden Identity Fields" + } + }, + "type": "object", + "required": [ + "key", + "bitwarden_client_id_aws_secret_key", + "bitwarden_client_secret_aws_secret_key", + "bitwarden_master_password_aws_secret_key", + "bitwarden_collection_id", + "bitwarden_identity_key", + "bitwarden_identity_fields" + ], + "title": "BitwardenSensitiveInformationParameterYAML" + }, "BrowserSessionResponse": { "properties": { "browser_session_id": { @@ -4647,6 +2742,49 @@ ], "title": "CodeBlock" }, + "CodeBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "code", + "title": "Block Type", + "default": "code" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "code": { + "type": "string", + "title": "Code" + }, + "parameter_keys": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Parameter Keys" + } + }, + "type": "object", + "required": [ + "label", + "code" + ], + "title": "CodeBlockYAML" + }, "ContextParameter": { "properties": { "parameter_type": { @@ -4737,6 +2875,41 @@ ], "title": "ContextParameter" }, + "ContextParameterYAML": { + "properties": { + "parameter_type": { + "type": "string", + "const": "context", + "title": "Parameter Type", + "default": "context" + }, + "key": { + "type": "string", + "title": "Key" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "source_parameter_key": { + "type": "string", + "title": "Source Parameter Key" + } + }, + "type": "object", + "required": [ + "key", + "source_parameter_key" + ], + "title": "ContextParameterYAML" + }, "CreateBrowserSessionRequest": { "properties": { "timeout": { @@ -4869,6 +3042,41 @@ ], "title": "CredentialParameter" }, + "CredentialParameterYAML": { + "properties": { + "parameter_type": { + "type": "string", + "const": "credential", + "title": "Parameter Type", + "default": "credential" + }, + "key": { + "type": "string", + "title": "Key" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "credential_id": { + "type": "string", + "title": "Credential Id" + } + }, + "type": "object", + "required": [ + "key", + "credential_id" + ], + "title": "CredentialParameterYAML" + }, "CredentialResponse": { "properties": { "credential_id": { @@ -4983,6 +3191,35 @@ ], "title": "DownloadToS3Block" }, + "DownloadToS3BlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "download_to_s3", + "title": "Block Type", + "default": "download_to_s3" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "type": "object", + "required": [ + "label", + "url" + ], + "title": "DownloadToS3BlockYAML" + }, "ExtractionBlock": { "properties": { "label": { @@ -5221,6 +3458,104 @@ ], "title": "ExtractionBlock" }, + "ExtractionBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "extraction", + "title": "Block Type", + "default": "extraction" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "data_extraction_goal": { + "type": "string", + "title": "Data Extraction Goal" + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "title": { + "type": "string", + "title": "Title", + "default": "" + }, + "data_schema": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "items": { + + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Data Schema" + }, + "max_retries": { + "type": "integer", + "title": "Max Retries", + "default": 0 + }, + "max_steps_per_run": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Steps Per Run" + }, + "parameter_keys": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Parameter Keys" + }, + "cache_actions": { + "type": "boolean", + "title": "Cache Actions", + "default": false + } + }, + "type": "object", + "required": [ + "label", + "data_extraction_goal" + ], + "title": "ExtractionBlockYAML" + }, "FileDownloadBlock": { "properties": { "label": { @@ -5465,6 +3800,133 @@ ], "title": "FileDownloadBlock" }, + "FileDownloadBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "file_download", + "title": "Block Type", + "default": "file_download" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "navigation_goal": { + "type": "string", + "title": "Navigation Goal" + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "title": { + "type": "string", + "title": "Title", + "default": "" + }, + "error_code_mapping": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Error Code Mapping" + }, + "max_retries": { + "type": "integer", + "title": "Max Retries", + "default": 0 + }, + "max_steps_per_run": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Steps Per Run" + }, + "parameter_keys": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Parameter Keys" + }, + "download_suffix": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Download Suffix" + }, + "totp_verification_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Totp Verification Url" + }, + "totp_identifier": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Totp Identifier" + }, + "cache_actions": { + "type": "boolean", + "title": "Cache Actions", + "default": false + } + }, + "type": "object", + "required": [ + "label", + "navigation_goal" + ], + "title": "FileDownloadBlockYAML" + }, "FileInfo": { "properties": { "url": { @@ -5541,6 +4003,39 @@ ], "title": "FileParserBlock" }, + "FileParserBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "file_url_parser", + "title": "Block Type", + "default": "file_url_parser" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "file_url": { + "type": "string", + "title": "File Url" + }, + "file_type": { + "$ref": "#/components/schemas/FileType" + } + }, + "type": "object", + "required": [ + "label", + "file_url", + "file_type" + ], + "title": "FileParserBlockYAML" + }, "FileStorageType": { "type": "string", "enum": [ @@ -5642,6 +4137,89 @@ ], "title": "FileUploadBlock" }, + "FileUploadBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "file_upload", + "title": "Block Type", + "default": "file_upload" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "storage_type": { + "$ref": "#/components/schemas/FileStorageType", + "default": "s3" + }, + "s3_bucket": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "S3 Bucket" + }, + "aws_access_key_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Aws Access Key Id" + }, + "aws_secret_access_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Aws Secret Access Key" + }, + "region_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Region Name" + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path" + } + }, + "type": "object", + "required": [ + "label" + ], + "title": "FileUploadBlockYAML" + }, "ForLoopBlock": { "properties": { "label": { @@ -5825,6 +4403,117 @@ ], "title": "ForLoopBlock" }, + "ForLoopBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "for_loop", + "title": "Block Type", + "default": "for_loop" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "loop_blocks": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TaskBlockYAML" + }, + { + "$ref": "#/components/schemas/ForLoopBlockYAML" + }, + { + "$ref": "#/components/schemas/CodeBlockYAML" + }, + { + "$ref": "#/components/schemas/TextPromptBlockYAML" + }, + { + "$ref": "#/components/schemas/DownloadToS3BlockYAML" + }, + { + "$ref": "#/components/schemas/UploadToS3BlockYAML" + }, + { + "$ref": "#/components/schemas/FileUploadBlockYAML" + }, + { + "$ref": "#/components/schemas/SendEmailBlockYAML" + }, + { + "$ref": "#/components/schemas/FileParserBlockYAML" + }, + { + "$ref": "#/components/schemas/ValidationBlockYAML" + }, + { + "$ref": "#/components/schemas/ActionBlockYAML" + }, + { + "$ref": "#/components/schemas/NavigationBlockYAML" + }, + { + "$ref": "#/components/schemas/ExtractionBlockYAML" + }, + { + "$ref": "#/components/schemas/LoginBlockYAML" + }, + { + "$ref": "#/components/schemas/WaitBlockYAML" + }, + { + "$ref": "#/components/schemas/FileDownloadBlockYAML" + }, + { + "$ref": "#/components/schemas/UrlBlockYAML" + }, + { + "$ref": "#/components/schemas/PDFParserBlockYAML" + }, + { + "$ref": "#/components/schemas/TaskV2BlockYAML" + } + ] + }, + "type": "array", + "title": "Loop Blocks" + }, + "loop_over_parameter_key": { + "type": "string", + "title": "Loop Over Parameter Key", + "default": "" + }, + "loop_variable_reference": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Loop Variable Reference" + }, + "complete_if_empty": { + "type": "boolean", + "title": "Complete If Empty", + "default": false + } + }, + "type": "object", + "required": [ + "label", + "loop_blocks" + ], + "title": "ForLoopBlockYAML" + }, "HTTPValidationError": { "properties": { "detail": { @@ -6082,6 +4771,155 @@ ], "title": "LoginBlock" }, + "LoginBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "login", + "title": "Block Type", + "default": "login" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "title": { + "type": "string", + "title": "Title", + "default": "" + }, + "navigation_goal": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Navigation Goal" + }, + "error_code_mapping": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Error Code Mapping" + }, + "max_retries": { + "type": "integer", + "title": "Max Retries", + "default": 0 + }, + "max_steps_per_run": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Steps Per Run" + }, + "parameter_keys": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Parameter Keys" + }, + "totp_verification_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Totp Verification Url" + }, + "totp_identifier": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Totp Identifier" + }, + "cache_actions": { + "type": "boolean", + "title": "Cache Actions", + "default": false + }, + "complete_criterion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Complete Criterion" + }, + "terminate_criterion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terminate Criterion" + }, + "complete_verification": { + "type": "boolean", + "title": "Complete Verification", + "default": true + } + }, + "type": "object", + "required": [ + "label" + ], + "title": "LoginBlockYAML" + }, "NavigationBlock": { "properties": { "label": { @@ -6320,6 +5158,174 @@ ], "title": "NavigationBlock" }, + "NavigationBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "navigation", + "title": "Block Type", + "default": "navigation" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "navigation_goal": { + "type": "string", + "title": "Navigation Goal" + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "title": { + "type": "string", + "title": "Title", + "default": "" + }, + "engine": { + "$ref": "#/components/schemas/RunEngine", + "default": "skyvern-1.0" + }, + "error_code_mapping": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Error Code Mapping" + }, + "max_retries": { + "type": "integer", + "title": "Max Retries", + "default": 0 + }, + "max_steps_per_run": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Steps Per Run" + }, + "parameter_keys": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Parameter Keys" + }, + "complete_on_download": { + "type": "boolean", + "title": "Complete On Download", + "default": false + }, + "download_suffix": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Download Suffix" + }, + "totp_verification_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Totp Verification Url" + }, + "totp_identifier": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Totp Identifier" + }, + "cache_actions": { + "type": "boolean", + "title": "Cache Actions", + "default": false + }, + "complete_criterion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Complete Criterion" + }, + "terminate_criterion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terminate Criterion" + }, + "complete_verification": { + "type": "boolean", + "title": "Complete Verification", + "default": true + }, + "include_action_history_in_verification": { + "type": "boolean", + "title": "Include Action History In Verification", + "default": false + } + }, + "type": "object", + "required": [ + "label", + "navigation_goal" + ], + "title": "NavigationBlockYAML" + }, "NonEmptyCreditCardCredential": { "properties": { "card_number": { @@ -6497,6 +5503,36 @@ ], "title": "OutputParameter" }, + "OutputParameterYAML": { + "properties": { + "parameter_type": { + "type": "string", + "const": "output", + "title": "Parameter Type", + "default": "output" + }, + "key": { + "type": "string", + "title": "Key" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + } + }, + "type": "object", + "required": [ + "key" + ], + "title": "OutputParameterYAML" + }, "PDFParserBlock": { "properties": { "label": { @@ -6542,6 +5578,47 @@ ], "title": "PDFParserBlock" }, + "PDFParserBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "pdf_parser", + "title": "Block Type", + "default": "pdf_parser" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "file_url": { + "type": "string", + "title": "File Url" + }, + "json_schema": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Json Schema" + } + }, + "type": "object", + "required": [ + "label", + "file_url" + ], + "title": "PDFParserBlockYAML" + }, "PasswordCredentialResponse": { "properties": { "username": { @@ -6683,6 +5760,87 @@ ], "title": "SendEmailBlock" }, + "SendEmailBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "send_email", + "title": "Block Type", + "default": "send_email" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "smtp_host_secret_parameter_key": { + "type": "string", + "title": "Smtp Host Secret Parameter Key" + }, + "smtp_port_secret_parameter_key": { + "type": "string", + "title": "Smtp Port Secret Parameter Key" + }, + "smtp_username_secret_parameter_key": { + "type": "string", + "title": "Smtp Username Secret Parameter Key" + }, + "smtp_password_secret_parameter_key": { + "type": "string", + "title": "Smtp Password Secret Parameter Key" + }, + "sender": { + "type": "string", + "title": "Sender" + }, + "recipients": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Recipients" + }, + "subject": { + "type": "string", + "title": "Subject" + }, + "body": { + "type": "string", + "title": "Body" + }, + "file_attachments": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "File Attachments" + } + }, + "type": "object", + "required": [ + "label", + "smtp_host_secret_parameter_key", + "smtp_port_secret_parameter_key", + "smtp_username_secret_parameter_key", + "smtp_password_secret_parameter_key", + "sender", + "recipients", + "subject", + "body" + ], + "title": "SendEmailBlockYAML" + }, "TOTPCode": { "properties": { "totp_identifier": { @@ -7171,6 +6329,205 @@ ], "title": "TaskBlock" }, + "TaskBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "task", + "title": "Block Type", + "default": "task" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "title": { + "type": "string", + "title": "Title", + "default": "" + }, + "navigation_goal": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Navigation Goal" + }, + "data_extraction_goal": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Data Extraction Goal" + }, + "data_schema": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "items": { + + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Data Schema" + }, + "error_code_mapping": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Error Code Mapping" + }, + "max_retries": { + "type": "integer", + "title": "Max Retries", + "default": 0 + }, + "max_steps_per_run": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Steps Per Run" + }, + "parameter_keys": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Parameter Keys" + }, + "complete_on_download": { + "type": "boolean", + "title": "Complete On Download", + "default": false + }, + "download_suffix": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Download Suffix" + }, + "totp_verification_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Totp Verification Url" + }, + "totp_identifier": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Totp Identifier" + }, + "cache_actions": { + "type": "boolean", + "title": "Cache Actions", + "default": false + }, + "complete_criterion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Complete Criterion" + }, + "terminate_criterion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terminate Criterion" + }, + "complete_verification": { + "type": "boolean", + "title": "Complete Verification", + "default": true + }, + "include_action_history_in_verification": { + "type": "boolean", + "title": "Include Action History In Verification", + "default": false + } + }, + "type": "object", + "required": [ + "label" + ], + "title": "TaskBlockYAML" + }, "TaskRunRequest": { "properties": { "prompt": { @@ -7572,6 +6929,78 @@ ], "title": "TaskV2Block" }, + "TaskV2BlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "task_v2", + "title": "Block Type", + "default": "task_v2" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "prompt": { + "type": "string", + "title": "Prompt" + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "totp_verification_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Totp Verification Url" + }, + "totp_identifier": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Totp Identifier" + }, + "max_iterations": { + "type": "integer", + "title": "Max Iterations", + "default": 10 + }, + "max_steps": { + "type": "integer", + "title": "Max Steps", + "default": 25 + } + }, + "type": "object", + "required": [ + "label", + "prompt" + ], + "title": "TaskV2BlockYAML" + }, "TextPromptBlock": { "properties": { "label": { @@ -7668,6 +7097,66 @@ ], "title": "TextPromptBlock" }, + "TextPromptBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "text_prompt", + "title": "Block Type", + "default": "text_prompt" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "llm_key": { + "type": "string", + "title": "Llm Key", + "default": "OPENAI_GPT4O_MINI" + }, + "prompt": { + "type": "string", + "title": "Prompt" + }, + "parameter_keys": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Parameter Keys" + }, + "json_schema": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Json Schema" + } + }, + "type": "object", + "required": [ + "label", + "prompt" + ], + "title": "TextPromptBlockYAML" + }, "UploadToS3Block": { "properties": { "label": { @@ -7707,6 +7196,41 @@ ], "title": "UploadToS3Block" }, + "UploadToS3BlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "upload_to_s3", + "title": "Block Type", + "default": "upload_to_s3" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path" + } + }, + "type": "object", + "required": [ + "label" + ], + "title": "UploadToS3BlockYAML" + }, "UrlBlock": { "properties": { "label": { @@ -7945,6 +7469,35 @@ ], "title": "UrlBlock" }, + "UrlBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "goto_url", + "title": "Block Type", + "default": "goto_url" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "url": { + "type": "string", + "title": "Url" + } + }, + "type": "object", + "required": [ + "label", + "url" + ], + "title": "UrlBlockYAML" + }, "ValidationBlock": { "properties": { "label": { @@ -8189,6 +7742,80 @@ ], "title": "ValidationBlock" }, + "ValidationBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "validation", + "title": "Block Type", + "default": "validation" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "complete_criterion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Complete Criterion" + }, + "terminate_criterion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Terminate Criterion" + }, + "error_code_mapping": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Error Code Mapping" + }, + "parameter_keys": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Parameter Keys" + } + }, + "type": "object", + "required": [ + "label" + ], + "title": "ValidationBlockYAML" + }, "ValidationError": { "properties": { "loc": { @@ -8301,6 +7928,35 @@ ], "title": "WaitBlock" }, + "WaitBlockYAML": { + "properties": { + "block_type": { + "type": "string", + "const": "wait", + "title": "Block Type", + "default": "wait" + }, + "label": { + "type": "string", + "title": "Label" + }, + "continue_on_failure": { + "type": "boolean", + "title": "Continue On Failure", + "default": false + }, + "wait_sec": { + "type": "integer", + "title": "Wait Sec", + "default": 0 + } + }, + "type": "object", + "required": [ + "label" + ], + "title": "WaitBlockYAML" + }, "Workflow": { "properties": { "workflow_id": { @@ -8430,6 +8086,91 @@ ], "title": "Workflow" }, + "WorkflowCreateYAMLRequest": { + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "proxy_location": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProxyLocation" + }, + { + "type": "null" + } + ] + }, + "webhook_callback_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Webhook Callback Url" + }, + "totp_verification_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Totp Verification Url" + }, + "totp_identifier": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Totp Identifier" + }, + "persist_browser_session": { + "type": "boolean", + "title": "Persist Browser Session", + "default": false + }, + "workflow_definition": { + "$ref": "#/components/schemas/WorkflowDefinitionYAML" + }, + "is_saved_task": { + "type": "boolean", + "title": "Is Saved Task", + "default": false + }, + "status": { + "$ref": "#/components/schemas/WorkflowStatus", + "default": "published" + } + }, + "type": "object", + "required": [ + "title", + "workflow_definition" + ], + "title": "WorkflowCreateYAMLRequest" + }, "WorkflowDefinition": { "properties": { "parameters": { @@ -8574,6 +8315,150 @@ ], "title": "WorkflowDefinition" }, + "WorkflowDefinitionYAML": { + "properties": { + "parameters": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AWSSecretParameterYAML" + }, + { + "$ref": "#/components/schemas/BitwardenLoginCredentialParameterYAML" + }, + { + "$ref": "#/components/schemas/BitwardenSensitiveInformationParameterYAML" + }, + { + "$ref": "#/components/schemas/BitwardenCreditCardDataParameterYAML" + }, + { + "$ref": "#/components/schemas/WorkflowParameterYAML" + }, + { + "$ref": "#/components/schemas/ContextParameterYAML" + }, + { + "$ref": "#/components/schemas/OutputParameterYAML" + }, + { + "$ref": "#/components/schemas/CredentialParameterYAML" + } + ], + "discriminator": { + "propertyName": "parameter_type", + "mapping": { + "aws_secret": "#/components/schemas/AWSSecretParameterYAML", + "bitwarden_credit_card_data": "#/components/schemas/BitwardenCreditCardDataParameterYAML", + "bitwarden_login_credential": "#/components/schemas/BitwardenLoginCredentialParameterYAML", + "bitwarden_sensitive_information": "#/components/schemas/BitwardenSensitiveInformationParameterYAML", + "context": "#/components/schemas/ContextParameterYAML", + "credential": "#/components/schemas/CredentialParameterYAML", + "output": "#/components/schemas/OutputParameterYAML", + "workflow": "#/components/schemas/WorkflowParameterYAML" + } + } + }, + "type": "array", + "title": "Parameters" + }, + "blocks": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TaskBlockYAML" + }, + { + "$ref": "#/components/schemas/ForLoopBlockYAML" + }, + { + "$ref": "#/components/schemas/CodeBlockYAML" + }, + { + "$ref": "#/components/schemas/TextPromptBlockYAML" + }, + { + "$ref": "#/components/schemas/DownloadToS3BlockYAML" + }, + { + "$ref": "#/components/schemas/UploadToS3BlockYAML" + }, + { + "$ref": "#/components/schemas/FileUploadBlockYAML" + }, + { + "$ref": "#/components/schemas/SendEmailBlockYAML" + }, + { + "$ref": "#/components/schemas/FileParserBlockYAML" + }, + { + "$ref": "#/components/schemas/ValidationBlockYAML" + }, + { + "$ref": "#/components/schemas/ActionBlockYAML" + }, + { + "$ref": "#/components/schemas/NavigationBlockYAML" + }, + { + "$ref": "#/components/schemas/ExtractionBlockYAML" + }, + { + "$ref": "#/components/schemas/LoginBlockYAML" + }, + { + "$ref": "#/components/schemas/WaitBlockYAML" + }, + { + "$ref": "#/components/schemas/FileDownloadBlockYAML" + }, + { + "$ref": "#/components/schemas/UrlBlockYAML" + }, + { + "$ref": "#/components/schemas/PDFParserBlockYAML" + }, + { + "$ref": "#/components/schemas/TaskV2BlockYAML" + } + ], + "discriminator": { + "propertyName": "block_type", + "mapping": { + "action": "#/components/schemas/ActionBlockYAML", + "code": "#/components/schemas/CodeBlockYAML", + "download_to_s3": "#/components/schemas/DownloadToS3BlockYAML", + "extraction": "#/components/schemas/ExtractionBlockYAML", + "file_download": "#/components/schemas/FileDownloadBlockYAML", + "file_upload": "#/components/schemas/FileUploadBlockYAML", + "file_url_parser": "#/components/schemas/FileParserBlockYAML", + "for_loop": "#/components/schemas/ForLoopBlockYAML", + "goto_url": "#/components/schemas/UrlBlockYAML", + "login": "#/components/schemas/LoginBlockYAML", + "navigation": "#/components/schemas/NavigationBlockYAML", + "pdf_parser": "#/components/schemas/PDFParserBlockYAML", + "send_email": "#/components/schemas/SendEmailBlockYAML", + "task": "#/components/schemas/TaskBlockYAML", + "task_v2": "#/components/schemas/TaskV2BlockYAML", + "text_prompt": "#/components/schemas/TextPromptBlockYAML", + "upload_to_s3": "#/components/schemas/UploadToS3BlockYAML", + "validation": "#/components/schemas/ValidationBlockYAML", + "wait": "#/components/schemas/WaitBlockYAML" + } + } + }, + "type": "array", + "title": "Blocks" + } + }, + "type": "object", + "required": [ + "parameters", + "blocks" + ], + "title": "WorkflowDefinitionYAML" + }, "WorkflowParameter": { "properties": { "parameter_type": { @@ -8685,6 +8570,99 @@ ], "title": "WorkflowParameterType" }, + "WorkflowParameterYAML": { + "properties": { + "parameter_type": { + "type": "string", + "const": "workflow", + "title": "Parameter Type", + "default": "workflow" + }, + "key": { + "type": "string", + "title": "Key" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "workflow_parameter_type": { + "$ref": "#/components/schemas/WorkflowParameterType" + }, + "default_value": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "additionalProperties": true, + "type": "object" + }, + { + "items": { + + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Default Value" + } + }, + "type": "object", + "required": [ + "key", + "workflow_parameter_type" + ], + "title": "WorkflowParameterYAML" + }, + "WorkflowRequest": { + "properties": { + "json_definition": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkflowCreateYAMLRequest" + }, + { + "type": "null" + } + ], + "description": "Workflow definition in JSON format" + }, + "yaml_definition": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Yaml Definition", + "description": "Workflow definition in YAML format" + } + }, + "type": "object", + "title": "WorkflowRequest" + }, "WorkflowRunRequest": { "properties": { "workflow_id": { diff --git a/skyvern/client/__init__.py b/skyvern/client/__init__.py index e4070770..c8b48727 100644 --- a/skyvern/client/__init__.py +++ b/skyvern/client/__init__.py @@ -12,10 +12,15 @@ from .types import ( ActionBlockParametersItem_Credential, ActionBlockParametersItem_Output, ActionBlockParametersItem_Workflow, + ActionBlockYaml, AwsSecretParameter, + AwsSecretParameterYaml, BitwardenCreditCardDataParameter, + BitwardenCreditCardDataParameterYaml, BitwardenLoginCredentialParameter, + BitwardenLoginCredentialParameterYaml, BitwardenSensitiveInformationParameter, + BitwardenSensitiveInformationParameterYaml, BrowserSessionResponse, CodeBlock, CodeBlockParametersItem, @@ -27,6 +32,7 @@ from .types import ( CodeBlockParametersItem_Credential, CodeBlockParametersItem_Output, CodeBlockParametersItem_Workflow, + CodeBlockYaml, ContextParameter, ContextParameterSource, ContextParameterSource_AwsSecret, @@ -38,12 +44,15 @@ from .types import ( ContextParameterSource_Output, ContextParameterSource_Workflow, ContextParameterValue, + ContextParameterYaml, CredentialParameter, + CredentialParameterYaml, CredentialResponse, CredentialResponseCredential, CredentialType, CreditCardCredentialResponse, DownloadToS3Block, + DownloadToS3BlockYaml, ExtractionBlock, ExtractionBlockDataSchema, ExtractionBlockParametersItem, @@ -55,6 +64,8 @@ from .types import ( ExtractionBlockParametersItem_Credential, ExtractionBlockParametersItem_Output, ExtractionBlockParametersItem_Workflow, + ExtractionBlockYaml, + ExtractionBlockYamlDataSchema, FileDownloadBlock, FileDownloadBlockDataSchema, FileDownloadBlockParametersItem, @@ -66,11 +77,14 @@ from .types import ( FileDownloadBlockParametersItem_Credential, FileDownloadBlockParametersItem_Output, FileDownloadBlockParametersItem_Workflow, + FileDownloadBlockYaml, FileInfo, FileParserBlock, + FileParserBlockYaml, FileStorageType, FileType, FileUploadBlock, + FileUploadBlockYaml, ForLoopBlock, ForLoopBlockLoopBlocksItem, ForLoopBlockLoopBlocksItem_Action, @@ -101,6 +115,27 @@ from .types import ( ForLoopBlockLoopOver_Credential, ForLoopBlockLoopOver_Output, ForLoopBlockLoopOver_Workflow, + ForLoopBlockYaml, + ForLoopBlockYamlLoopBlocksItem, + ForLoopBlockYamlLoopBlocksItem_Action, + ForLoopBlockYamlLoopBlocksItem_Code, + ForLoopBlockYamlLoopBlocksItem_DownloadToS3, + ForLoopBlockYamlLoopBlocksItem_Extraction, + ForLoopBlockYamlLoopBlocksItem_FileDownload, + ForLoopBlockYamlLoopBlocksItem_FileUpload, + ForLoopBlockYamlLoopBlocksItem_FileUrlParser, + ForLoopBlockYamlLoopBlocksItem_ForLoop, + ForLoopBlockYamlLoopBlocksItem_GotoUrl, + ForLoopBlockYamlLoopBlocksItem_Login, + ForLoopBlockYamlLoopBlocksItem_Navigation, + ForLoopBlockYamlLoopBlocksItem_PdfParser, + ForLoopBlockYamlLoopBlocksItem_SendEmail, + ForLoopBlockYamlLoopBlocksItem_Task, + ForLoopBlockYamlLoopBlocksItem_TaskV2, + ForLoopBlockYamlLoopBlocksItem_TextPrompt, + ForLoopBlockYamlLoopBlocksItem_UploadToS3, + ForLoopBlockYamlLoopBlocksItem_Validation, + ForLoopBlockYamlLoopBlocksItem_Wait, HttpValidationError, LoginBlock, LoginBlockDataSchema, @@ -113,6 +148,7 @@ from .types import ( LoginBlockParametersItem_Credential, LoginBlockParametersItem_Output, LoginBlockParametersItem_Workflow, + LoginBlockYaml, NavigationBlock, NavigationBlockDataSchema, NavigationBlockParametersItem, @@ -124,15 +160,19 @@ from .types import ( NavigationBlockParametersItem_Credential, NavigationBlockParametersItem_Output, NavigationBlockParametersItem_Workflow, + NavigationBlockYaml, NonEmptyCreditCardCredential, NonEmptyPasswordCredential, OutputParameter, + OutputParameterYaml, PasswordCredentialResponse, PdfParserBlock, + PdfParserBlockYaml, ProxyLocation, RunEngine, RunStatus, SendEmailBlock, + SendEmailBlockYaml, TaskBlock, TaskBlockDataSchema, TaskBlockParametersItem, @@ -144,11 +184,14 @@ from .types import ( TaskBlockParametersItem_Credential, TaskBlockParametersItem_Output, TaskBlockParametersItem_Workflow, + TaskBlockYaml, + TaskBlockYamlDataSchema, TaskRunRequest, TaskRunRequestDataExtractionSchema, TaskRunResponse, TaskRunResponseOutput, TaskV2Block, + TaskV2BlockYaml, TextPromptBlock, TextPromptBlockParametersItem, TextPromptBlockParametersItem_AwsSecret, @@ -159,8 +202,10 @@ from .types import ( TextPromptBlockParametersItem_Credential, TextPromptBlockParametersItem_Output, TextPromptBlockParametersItem_Workflow, + TextPromptBlockYaml, TotpCode, UploadToS3Block, + UploadToS3BlockYaml, UrlBlock, UrlBlockDataSchema, UrlBlockParametersItem, @@ -172,6 +217,7 @@ from .types import ( UrlBlockParametersItem_Credential, UrlBlockParametersItem_Output, UrlBlockParametersItem_Workflow, + UrlBlockYaml, ValidationBlock, ValidationBlockDataSchema, ValidationBlockParametersItem, @@ -183,6 +229,7 @@ from .types import ( ValidationBlockParametersItem_Credential, ValidationBlockParametersItem_Output, ValidationBlockParametersItem_Workflow, + ValidationBlockYaml, ValidationError, ValidationErrorLocItem, WaitBlock, @@ -195,7 +242,9 @@ from .types import ( WaitBlockParametersItem_Credential, WaitBlockParametersItem_Output, WaitBlockParametersItem_Workflow, + WaitBlockYaml, Workflow, + WorkflowCreateYamlRequest, WorkflowDefinition, WorkflowDefinitionBlocksItem, WorkflowDefinitionBlocksItem_Action, @@ -226,9 +275,42 @@ from .types import ( WorkflowDefinitionParametersItem_Credential, WorkflowDefinitionParametersItem_Output, WorkflowDefinitionParametersItem_Workflow, + WorkflowDefinitionYaml, + WorkflowDefinitionYamlBlocksItem, + WorkflowDefinitionYamlBlocksItem_Action, + WorkflowDefinitionYamlBlocksItem_Code, + WorkflowDefinitionYamlBlocksItem_DownloadToS3, + WorkflowDefinitionYamlBlocksItem_Extraction, + WorkflowDefinitionYamlBlocksItem_FileDownload, + WorkflowDefinitionYamlBlocksItem_FileUpload, + WorkflowDefinitionYamlBlocksItem_FileUrlParser, + WorkflowDefinitionYamlBlocksItem_ForLoop, + WorkflowDefinitionYamlBlocksItem_GotoUrl, + WorkflowDefinitionYamlBlocksItem_Login, + WorkflowDefinitionYamlBlocksItem_Navigation, + WorkflowDefinitionYamlBlocksItem_PdfParser, + WorkflowDefinitionYamlBlocksItem_SendEmail, + WorkflowDefinitionYamlBlocksItem_Task, + WorkflowDefinitionYamlBlocksItem_TaskV2, + WorkflowDefinitionYamlBlocksItem_TextPrompt, + WorkflowDefinitionYamlBlocksItem_UploadToS3, + WorkflowDefinitionYamlBlocksItem_Validation, + WorkflowDefinitionYamlBlocksItem_Wait, + WorkflowDefinitionYamlParametersItem, + WorkflowDefinitionYamlParametersItem_AwsSecret, + WorkflowDefinitionYamlParametersItem_BitwardenCreditCardData, + WorkflowDefinitionYamlParametersItem_BitwardenLoginCredential, + WorkflowDefinitionYamlParametersItem_BitwardenSensitiveInformation, + WorkflowDefinitionYamlParametersItem_Context, + WorkflowDefinitionYamlParametersItem_Credential, + WorkflowDefinitionYamlParametersItem_Output, + WorkflowDefinitionYamlParametersItem_Workflow, WorkflowParameter, WorkflowParameterDefaultValue, WorkflowParameterType, + WorkflowParameterYaml, + WorkflowParameterYamlDefaultValue, + WorkflowRequest, WorkflowRunRequest, WorkflowRunResponse, WorkflowRunResponseOutput, @@ -261,6 +343,7 @@ __all__ = [ "ActionBlockParametersItem_Credential", "ActionBlockParametersItem_Output", "ActionBlockParametersItem_Workflow", + "ActionBlockYaml", "AgentGetRunResponse", "AgentGetRunResponse_AnthropicCua", "AgentGetRunResponse_OpenaiCua", @@ -269,10 +352,14 @@ __all__ = [ "AgentGetRunResponse_WorkflowRun", "AsyncSkyvern", "AwsSecretParameter", + "AwsSecretParameterYaml", "BadRequestError", "BitwardenCreditCardDataParameter", + "BitwardenCreditCardDataParameterYaml", "BitwardenLoginCredentialParameter", + "BitwardenLoginCredentialParameterYaml", "BitwardenSensitiveInformationParameter", + "BitwardenSensitiveInformationParameterYaml", "BrowserSessionResponse", "CodeBlock", "CodeBlockParametersItem", @@ -284,6 +371,7 @@ __all__ = [ "CodeBlockParametersItem_Credential", "CodeBlockParametersItem_Output", "CodeBlockParametersItem_Workflow", + "CodeBlockYaml", "ContextParameter", "ContextParameterSource", "ContextParameterSource_AwsSecret", @@ -295,13 +383,16 @@ __all__ = [ "ContextParameterSource_Output", "ContextParameterSource_Workflow", "ContextParameterValue", + "ContextParameterYaml", "CreateCredentialRequestCredential", "CredentialParameter", + "CredentialParameterYaml", "CredentialResponse", "CredentialResponseCredential", "CredentialType", "CreditCardCredentialResponse", "DownloadToS3Block", + "DownloadToS3BlockYaml", "ExtractionBlock", "ExtractionBlockDataSchema", "ExtractionBlockParametersItem", @@ -313,6 +404,8 @@ __all__ = [ "ExtractionBlockParametersItem_Credential", "ExtractionBlockParametersItem_Output", "ExtractionBlockParametersItem_Workflow", + "ExtractionBlockYaml", + "ExtractionBlockYamlDataSchema", "FileDownloadBlock", "FileDownloadBlockDataSchema", "FileDownloadBlockParametersItem", @@ -324,11 +417,14 @@ __all__ = [ "FileDownloadBlockParametersItem_Credential", "FileDownloadBlockParametersItem_Output", "FileDownloadBlockParametersItem_Workflow", + "FileDownloadBlockYaml", "FileInfo", "FileParserBlock", + "FileParserBlockYaml", "FileStorageType", "FileType", "FileUploadBlock", + "FileUploadBlockYaml", "ForLoopBlock", "ForLoopBlockLoopBlocksItem", "ForLoopBlockLoopBlocksItem_Action", @@ -359,6 +455,27 @@ __all__ = [ "ForLoopBlockLoopOver_Credential", "ForLoopBlockLoopOver_Output", "ForLoopBlockLoopOver_Workflow", + "ForLoopBlockYaml", + "ForLoopBlockYamlLoopBlocksItem", + "ForLoopBlockYamlLoopBlocksItem_Action", + "ForLoopBlockYamlLoopBlocksItem_Code", + "ForLoopBlockYamlLoopBlocksItem_DownloadToS3", + "ForLoopBlockYamlLoopBlocksItem_Extraction", + "ForLoopBlockYamlLoopBlocksItem_FileDownload", + "ForLoopBlockYamlLoopBlocksItem_FileUpload", + "ForLoopBlockYamlLoopBlocksItem_FileUrlParser", + "ForLoopBlockYamlLoopBlocksItem_ForLoop", + "ForLoopBlockYamlLoopBlocksItem_GotoUrl", + "ForLoopBlockYamlLoopBlocksItem_Login", + "ForLoopBlockYamlLoopBlocksItem_Navigation", + "ForLoopBlockYamlLoopBlocksItem_PdfParser", + "ForLoopBlockYamlLoopBlocksItem_SendEmail", + "ForLoopBlockYamlLoopBlocksItem_Task", + "ForLoopBlockYamlLoopBlocksItem_TaskV2", + "ForLoopBlockYamlLoopBlocksItem_TextPrompt", + "ForLoopBlockYamlLoopBlocksItem_UploadToS3", + "ForLoopBlockYamlLoopBlocksItem_Validation", + "ForLoopBlockYamlLoopBlocksItem_Wait", "ForbiddenError", "HttpValidationError", "LoginBlock", @@ -372,6 +489,7 @@ __all__ = [ "LoginBlockParametersItem_Credential", "LoginBlockParametersItem_Output", "LoginBlockParametersItem_Workflow", + "LoginBlockYaml", "NavigationBlock", "NavigationBlockDataSchema", "NavigationBlockParametersItem", @@ -383,16 +501,20 @@ __all__ = [ "NavigationBlockParametersItem_Credential", "NavigationBlockParametersItem_Output", "NavigationBlockParametersItem_Workflow", + "NavigationBlockYaml", "NonEmptyCreditCardCredential", "NonEmptyPasswordCredential", "NotFoundError", "OutputParameter", + "OutputParameterYaml", "PasswordCredentialResponse", "PdfParserBlock", + "PdfParserBlockYaml", "ProxyLocation", "RunEngine", "RunStatus", "SendEmailBlock", + "SendEmailBlockYaml", "Skyvern", "SkyvernEnvironment", "TaskBlock", @@ -406,11 +528,14 @@ __all__ = [ "TaskBlockParametersItem_Credential", "TaskBlockParametersItem_Output", "TaskBlockParametersItem_Workflow", + "TaskBlockYaml", + "TaskBlockYamlDataSchema", "TaskRunRequest", "TaskRunRequestDataExtractionSchema", "TaskRunResponse", "TaskRunResponseOutput", "TaskV2Block", + "TaskV2BlockYaml", "TextPromptBlock", "TextPromptBlockParametersItem", "TextPromptBlockParametersItem_AwsSecret", @@ -421,9 +546,11 @@ __all__ = [ "TextPromptBlockParametersItem_Credential", "TextPromptBlockParametersItem_Output", "TextPromptBlockParametersItem_Workflow", + "TextPromptBlockYaml", "TotpCode", "UnprocessableEntityError", "UploadToS3Block", + "UploadToS3BlockYaml", "UrlBlock", "UrlBlockDataSchema", "UrlBlockParametersItem", @@ -435,6 +562,7 @@ __all__ = [ "UrlBlockParametersItem_Credential", "UrlBlockParametersItem_Output", "UrlBlockParametersItem_Workflow", + "UrlBlockYaml", "ValidationBlock", "ValidationBlockDataSchema", "ValidationBlockParametersItem", @@ -446,6 +574,7 @@ __all__ = [ "ValidationBlockParametersItem_Credential", "ValidationBlockParametersItem_Output", "ValidationBlockParametersItem_Workflow", + "ValidationBlockYaml", "ValidationError", "ValidationErrorLocItem", "WaitBlock", @@ -458,7 +587,9 @@ __all__ = [ "WaitBlockParametersItem_Credential", "WaitBlockParametersItem_Output", "WaitBlockParametersItem_Workflow", + "WaitBlockYaml", "Workflow", + "WorkflowCreateYamlRequest", "WorkflowDefinition", "WorkflowDefinitionBlocksItem", "WorkflowDefinitionBlocksItem_Action", @@ -489,9 +620,42 @@ __all__ = [ "WorkflowDefinitionParametersItem_Credential", "WorkflowDefinitionParametersItem_Output", "WorkflowDefinitionParametersItem_Workflow", + "WorkflowDefinitionYaml", + "WorkflowDefinitionYamlBlocksItem", + "WorkflowDefinitionYamlBlocksItem_Action", + "WorkflowDefinitionYamlBlocksItem_Code", + "WorkflowDefinitionYamlBlocksItem_DownloadToS3", + "WorkflowDefinitionYamlBlocksItem_Extraction", + "WorkflowDefinitionYamlBlocksItem_FileDownload", + "WorkflowDefinitionYamlBlocksItem_FileUpload", + "WorkflowDefinitionYamlBlocksItem_FileUrlParser", + "WorkflowDefinitionYamlBlocksItem_ForLoop", + "WorkflowDefinitionYamlBlocksItem_GotoUrl", + "WorkflowDefinitionYamlBlocksItem_Login", + "WorkflowDefinitionYamlBlocksItem_Navigation", + "WorkflowDefinitionYamlBlocksItem_PdfParser", + "WorkflowDefinitionYamlBlocksItem_SendEmail", + "WorkflowDefinitionYamlBlocksItem_Task", + "WorkflowDefinitionYamlBlocksItem_TaskV2", + "WorkflowDefinitionYamlBlocksItem_TextPrompt", + "WorkflowDefinitionYamlBlocksItem_UploadToS3", + "WorkflowDefinitionYamlBlocksItem_Validation", + "WorkflowDefinitionYamlBlocksItem_Wait", + "WorkflowDefinitionYamlParametersItem", + "WorkflowDefinitionYamlParametersItem_AwsSecret", + "WorkflowDefinitionYamlParametersItem_BitwardenCreditCardData", + "WorkflowDefinitionYamlParametersItem_BitwardenLoginCredential", + "WorkflowDefinitionYamlParametersItem_BitwardenSensitiveInformation", + "WorkflowDefinitionYamlParametersItem_Context", + "WorkflowDefinitionYamlParametersItem_Credential", + "WorkflowDefinitionYamlParametersItem_Output", + "WorkflowDefinitionYamlParametersItem_Workflow", "WorkflowParameter", "WorkflowParameterDefaultValue", "WorkflowParameterType", + "WorkflowParameterYaml", + "WorkflowParameterYamlDefaultValue", + "WorkflowRequest", "WorkflowRunRequest", "WorkflowRunResponse", "WorkflowRunResponseOutput", diff --git a/skyvern/client/agent/client.py b/skyvern/client/agent/client.py index 8965c575..4b644671 100644 --- a/skyvern/client/agent/client.py +++ b/skyvern/client/agent/client.py @@ -17,7 +17,6 @@ from ..types.workflow_run_response import WorkflowRunResponse from .types.agent_get_run_response import AgentGetRunResponse from ..core.jsonable_encoder import jsonable_encoder from ..errors.not_found_error import NotFoundError -from ..types.workflow import Workflow from ..core.client_wrapper import AsyncClientWrapper # this is used as the default value for optional parameters @@ -434,64 +433,6 @@ class AgentClient: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def update_workflow(self, workflow_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Workflow: - """ - Update a workflow definition - - Parameters - ---------- - workflow_id : str - The ID of the workflow to update. Workflow ID starts with `wpid_`. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - Workflow - Successfully updated workflow - - Examples - -------- - from skyvern import Skyvern - - client = Skyvern( - api_key="YOUR_API_KEY", - authorization="YOUR_AUTHORIZATION", - ) - client.agent.update_workflow( - workflow_id="wpid_123", - ) - """ - _response = self._client_wrapper.httpx_client.request( - f"v1/workflows/{jsonable_encoder(workflow_id)}", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Workflow, - parse_obj_as( - type_=Workflow, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - class AsyncAgentClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): @@ -936,71 +877,3 @@ class AsyncAgentClient: except JSONDecodeError: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - - async def update_workflow( - self, workflow_id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> Workflow: - """ - Update a workflow definition - - Parameters - ---------- - workflow_id : str - The ID of the workflow to update. Workflow ID starts with `wpid_`. - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - Workflow - Successfully updated workflow - - Examples - -------- - import asyncio - - from skyvern import AsyncSkyvern - - client = AsyncSkyvern( - api_key="YOUR_API_KEY", - authorization="YOUR_AUTHORIZATION", - ) - - - async def main() -> None: - await client.agent.update_workflow( - workflow_id="wpid_123", - ) - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - f"v1/workflows/{jsonable_encoder(workflow_id)}", - method="POST", - request_options=request_options, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - Workflow, - parse_obj_as( - type_=Workflow, # type: ignore - object_=_response.json(), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - typing.cast( - typing.Optional[typing.Any], - parse_obj_as( - type_=typing.Optional[typing.Any], # type: ignore - object_=_response.json(), - ), - ) - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/skyvern/client/types/__init__.py b/skyvern/client/types/__init__.py index 3239bf68..c6ef0a21 100644 --- a/skyvern/client/types/__init__.py +++ b/skyvern/client/types/__init__.py @@ -13,10 +13,15 @@ from .action_block_parameters_item import ( ActionBlockParametersItem_Output, ActionBlockParametersItem_Workflow, ) +from .action_block_yaml import ActionBlockYaml from .aws_secret_parameter import AwsSecretParameter +from .aws_secret_parameter_yaml import AwsSecretParameterYaml from .bitwarden_credit_card_data_parameter import BitwardenCreditCardDataParameter +from .bitwarden_credit_card_data_parameter_yaml import BitwardenCreditCardDataParameterYaml from .bitwarden_login_credential_parameter import BitwardenLoginCredentialParameter +from .bitwarden_login_credential_parameter_yaml import BitwardenLoginCredentialParameterYaml from .bitwarden_sensitive_information_parameter import BitwardenSensitiveInformationParameter +from .bitwarden_sensitive_information_parameter_yaml import BitwardenSensitiveInformationParameterYaml from .browser_session_response import BrowserSessionResponse from .code_block import CodeBlock from .code_block_parameters_item import ( @@ -30,6 +35,7 @@ from .code_block_parameters_item import ( CodeBlockParametersItem_Output, CodeBlockParametersItem_Workflow, ) +from .code_block_yaml import CodeBlockYaml from .context_parameter import ContextParameter from .context_parameter_source import ( ContextParameterSource, @@ -43,12 +49,15 @@ from .context_parameter_source import ( ContextParameterSource_Workflow, ) from .context_parameter_value import ContextParameterValue +from .context_parameter_yaml import ContextParameterYaml from .credential_parameter import CredentialParameter +from .credential_parameter_yaml import CredentialParameterYaml from .credential_response import CredentialResponse from .credential_response_credential import CredentialResponseCredential from .credential_type import CredentialType from .credit_card_credential_response import CreditCardCredentialResponse from .download_to_s3block import DownloadToS3Block +from .download_to_s3block_yaml import DownloadToS3BlockYaml from .extraction_block import ExtractionBlock from .extraction_block_data_schema import ExtractionBlockDataSchema from .extraction_block_parameters_item import ( @@ -62,6 +71,8 @@ from .extraction_block_parameters_item import ( ExtractionBlockParametersItem_Output, ExtractionBlockParametersItem_Workflow, ) +from .extraction_block_yaml import ExtractionBlockYaml +from .extraction_block_yaml_data_schema import ExtractionBlockYamlDataSchema from .file_download_block import FileDownloadBlock from .file_download_block_data_schema import FileDownloadBlockDataSchema from .file_download_block_parameters_item import ( @@ -75,11 +86,14 @@ from .file_download_block_parameters_item import ( FileDownloadBlockParametersItem_Output, FileDownloadBlockParametersItem_Workflow, ) +from .file_download_block_yaml import FileDownloadBlockYaml from .file_info import FileInfo from .file_parser_block import FileParserBlock +from .file_parser_block_yaml import FileParserBlockYaml from .file_storage_type import FileStorageType from .file_type import FileType from .file_upload_block import FileUploadBlock +from .file_upload_block_yaml import FileUploadBlockYaml from .for_loop_block import ForLoopBlock from .for_loop_block_loop_blocks_item import ( ForLoopBlockLoopBlocksItem, @@ -114,6 +128,29 @@ from .for_loop_block_loop_over import ( ForLoopBlockLoopOver_Output, ForLoopBlockLoopOver_Workflow, ) +from .for_loop_block_yaml import ForLoopBlockYaml +from .for_loop_block_yaml_loop_blocks_item import ( + ForLoopBlockYamlLoopBlocksItem, + ForLoopBlockYamlLoopBlocksItem_Action, + ForLoopBlockYamlLoopBlocksItem_Code, + ForLoopBlockYamlLoopBlocksItem_DownloadToS3, + ForLoopBlockYamlLoopBlocksItem_Extraction, + ForLoopBlockYamlLoopBlocksItem_FileDownload, + ForLoopBlockYamlLoopBlocksItem_FileUpload, + ForLoopBlockYamlLoopBlocksItem_FileUrlParser, + ForLoopBlockYamlLoopBlocksItem_ForLoop, + ForLoopBlockYamlLoopBlocksItem_GotoUrl, + ForLoopBlockYamlLoopBlocksItem_Login, + ForLoopBlockYamlLoopBlocksItem_Navigation, + ForLoopBlockYamlLoopBlocksItem_PdfParser, + ForLoopBlockYamlLoopBlocksItem_SendEmail, + ForLoopBlockYamlLoopBlocksItem_Task, + ForLoopBlockYamlLoopBlocksItem_TaskV2, + ForLoopBlockYamlLoopBlocksItem_TextPrompt, + ForLoopBlockYamlLoopBlocksItem_UploadToS3, + ForLoopBlockYamlLoopBlocksItem_Validation, + ForLoopBlockYamlLoopBlocksItem_Wait, +) from .http_validation_error import HttpValidationError from .login_block import LoginBlock from .login_block_data_schema import LoginBlockDataSchema @@ -128,6 +165,7 @@ from .login_block_parameters_item import ( LoginBlockParametersItem_Output, LoginBlockParametersItem_Workflow, ) +from .login_block_yaml import LoginBlockYaml from .navigation_block import NavigationBlock from .navigation_block_data_schema import NavigationBlockDataSchema from .navigation_block_parameters_item import ( @@ -141,15 +179,19 @@ from .navigation_block_parameters_item import ( NavigationBlockParametersItem_Output, NavigationBlockParametersItem_Workflow, ) +from .navigation_block_yaml import NavigationBlockYaml from .non_empty_credit_card_credential import NonEmptyCreditCardCredential from .non_empty_password_credential import NonEmptyPasswordCredential from .output_parameter import OutputParameter +from .output_parameter_yaml import OutputParameterYaml from .password_credential_response import PasswordCredentialResponse from .pdf_parser_block import PdfParserBlock +from .pdf_parser_block_yaml import PdfParserBlockYaml from .proxy_location import ProxyLocation from .run_engine import RunEngine from .run_status import RunStatus from .send_email_block import SendEmailBlock +from .send_email_block_yaml import SendEmailBlockYaml from .task_block import TaskBlock from .task_block_data_schema import TaskBlockDataSchema from .task_block_parameters_item import ( @@ -163,11 +205,14 @@ from .task_block_parameters_item import ( TaskBlockParametersItem_Output, TaskBlockParametersItem_Workflow, ) +from .task_block_yaml import TaskBlockYaml +from .task_block_yaml_data_schema import TaskBlockYamlDataSchema from .task_run_request import TaskRunRequest from .task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema from .task_run_response import TaskRunResponse from .task_run_response_output import TaskRunResponseOutput from .task_v2block import TaskV2Block +from .task_v2block_yaml import TaskV2BlockYaml from .text_prompt_block import TextPromptBlock from .text_prompt_block_parameters_item import ( TextPromptBlockParametersItem, @@ -180,8 +225,10 @@ from .text_prompt_block_parameters_item import ( TextPromptBlockParametersItem_Output, TextPromptBlockParametersItem_Workflow, ) +from .text_prompt_block_yaml import TextPromptBlockYaml from .totp_code import TotpCode from .upload_to_s3block import UploadToS3Block +from .upload_to_s3block_yaml import UploadToS3BlockYaml from .url_block import UrlBlock from .url_block_data_schema import UrlBlockDataSchema from .url_block_parameters_item import ( @@ -195,6 +242,7 @@ from .url_block_parameters_item import ( UrlBlockParametersItem_Output, UrlBlockParametersItem_Workflow, ) +from .url_block_yaml import UrlBlockYaml from .validation_block import ValidationBlock from .validation_block_data_schema import ValidationBlockDataSchema from .validation_block_parameters_item import ( @@ -208,6 +256,7 @@ from .validation_block_parameters_item import ( ValidationBlockParametersItem_Output, ValidationBlockParametersItem_Workflow, ) +from .validation_block_yaml import ValidationBlockYaml from .validation_error import ValidationError from .validation_error_loc_item import ValidationErrorLocItem from .wait_block import WaitBlock @@ -222,7 +271,9 @@ from .wait_block_parameters_item import ( WaitBlockParametersItem_Output, WaitBlockParametersItem_Workflow, ) +from .wait_block_yaml import WaitBlockYaml from .workflow import Workflow +from .workflow_create_yaml_request import WorkflowCreateYamlRequest from .workflow_definition import WorkflowDefinition from .workflow_definition_blocks_item import ( WorkflowDefinitionBlocksItem, @@ -257,9 +308,46 @@ from .workflow_definition_parameters_item import ( WorkflowDefinitionParametersItem_Output, WorkflowDefinitionParametersItem_Workflow, ) +from .workflow_definition_yaml import WorkflowDefinitionYaml +from .workflow_definition_yaml_blocks_item import ( + WorkflowDefinitionYamlBlocksItem, + WorkflowDefinitionYamlBlocksItem_Action, + WorkflowDefinitionYamlBlocksItem_Code, + WorkflowDefinitionYamlBlocksItem_DownloadToS3, + WorkflowDefinitionYamlBlocksItem_Extraction, + WorkflowDefinitionYamlBlocksItem_FileDownload, + WorkflowDefinitionYamlBlocksItem_FileUpload, + WorkflowDefinitionYamlBlocksItem_FileUrlParser, + WorkflowDefinitionYamlBlocksItem_ForLoop, + WorkflowDefinitionYamlBlocksItem_GotoUrl, + WorkflowDefinitionYamlBlocksItem_Login, + WorkflowDefinitionYamlBlocksItem_Navigation, + WorkflowDefinitionYamlBlocksItem_PdfParser, + WorkflowDefinitionYamlBlocksItem_SendEmail, + WorkflowDefinitionYamlBlocksItem_Task, + WorkflowDefinitionYamlBlocksItem_TaskV2, + WorkflowDefinitionYamlBlocksItem_TextPrompt, + WorkflowDefinitionYamlBlocksItem_UploadToS3, + WorkflowDefinitionYamlBlocksItem_Validation, + WorkflowDefinitionYamlBlocksItem_Wait, +) +from .workflow_definition_yaml_parameters_item import ( + WorkflowDefinitionYamlParametersItem, + WorkflowDefinitionYamlParametersItem_AwsSecret, + WorkflowDefinitionYamlParametersItem_BitwardenCreditCardData, + WorkflowDefinitionYamlParametersItem_BitwardenLoginCredential, + WorkflowDefinitionYamlParametersItem_BitwardenSensitiveInformation, + WorkflowDefinitionYamlParametersItem_Context, + WorkflowDefinitionYamlParametersItem_Credential, + WorkflowDefinitionYamlParametersItem_Output, + WorkflowDefinitionYamlParametersItem_Workflow, +) from .workflow_parameter import WorkflowParameter from .workflow_parameter_default_value import WorkflowParameterDefaultValue from .workflow_parameter_type import WorkflowParameterType +from .workflow_parameter_yaml import WorkflowParameterYaml +from .workflow_parameter_yaml_default_value import WorkflowParameterYamlDefaultValue +from .workflow_request import WorkflowRequest from .workflow_run_request import WorkflowRunRequest from .workflow_run_response import WorkflowRunResponse from .workflow_run_response_output import WorkflowRunResponseOutput @@ -277,10 +365,15 @@ __all__ = [ "ActionBlockParametersItem_Credential", "ActionBlockParametersItem_Output", "ActionBlockParametersItem_Workflow", + "ActionBlockYaml", "AwsSecretParameter", + "AwsSecretParameterYaml", "BitwardenCreditCardDataParameter", + "BitwardenCreditCardDataParameterYaml", "BitwardenLoginCredentialParameter", + "BitwardenLoginCredentialParameterYaml", "BitwardenSensitiveInformationParameter", + "BitwardenSensitiveInformationParameterYaml", "BrowserSessionResponse", "CodeBlock", "CodeBlockParametersItem", @@ -292,6 +385,7 @@ __all__ = [ "CodeBlockParametersItem_Credential", "CodeBlockParametersItem_Output", "CodeBlockParametersItem_Workflow", + "CodeBlockYaml", "ContextParameter", "ContextParameterSource", "ContextParameterSource_AwsSecret", @@ -303,12 +397,15 @@ __all__ = [ "ContextParameterSource_Output", "ContextParameterSource_Workflow", "ContextParameterValue", + "ContextParameterYaml", "CredentialParameter", + "CredentialParameterYaml", "CredentialResponse", "CredentialResponseCredential", "CredentialType", "CreditCardCredentialResponse", "DownloadToS3Block", + "DownloadToS3BlockYaml", "ExtractionBlock", "ExtractionBlockDataSchema", "ExtractionBlockParametersItem", @@ -320,6 +417,8 @@ __all__ = [ "ExtractionBlockParametersItem_Credential", "ExtractionBlockParametersItem_Output", "ExtractionBlockParametersItem_Workflow", + "ExtractionBlockYaml", + "ExtractionBlockYamlDataSchema", "FileDownloadBlock", "FileDownloadBlockDataSchema", "FileDownloadBlockParametersItem", @@ -331,11 +430,14 @@ __all__ = [ "FileDownloadBlockParametersItem_Credential", "FileDownloadBlockParametersItem_Output", "FileDownloadBlockParametersItem_Workflow", + "FileDownloadBlockYaml", "FileInfo", "FileParserBlock", + "FileParserBlockYaml", "FileStorageType", "FileType", "FileUploadBlock", + "FileUploadBlockYaml", "ForLoopBlock", "ForLoopBlockLoopBlocksItem", "ForLoopBlockLoopBlocksItem_Action", @@ -366,6 +468,27 @@ __all__ = [ "ForLoopBlockLoopOver_Credential", "ForLoopBlockLoopOver_Output", "ForLoopBlockLoopOver_Workflow", + "ForLoopBlockYaml", + "ForLoopBlockYamlLoopBlocksItem", + "ForLoopBlockYamlLoopBlocksItem_Action", + "ForLoopBlockYamlLoopBlocksItem_Code", + "ForLoopBlockYamlLoopBlocksItem_DownloadToS3", + "ForLoopBlockYamlLoopBlocksItem_Extraction", + "ForLoopBlockYamlLoopBlocksItem_FileDownload", + "ForLoopBlockYamlLoopBlocksItem_FileUpload", + "ForLoopBlockYamlLoopBlocksItem_FileUrlParser", + "ForLoopBlockYamlLoopBlocksItem_ForLoop", + "ForLoopBlockYamlLoopBlocksItem_GotoUrl", + "ForLoopBlockYamlLoopBlocksItem_Login", + "ForLoopBlockYamlLoopBlocksItem_Navigation", + "ForLoopBlockYamlLoopBlocksItem_PdfParser", + "ForLoopBlockYamlLoopBlocksItem_SendEmail", + "ForLoopBlockYamlLoopBlocksItem_Task", + "ForLoopBlockYamlLoopBlocksItem_TaskV2", + "ForLoopBlockYamlLoopBlocksItem_TextPrompt", + "ForLoopBlockYamlLoopBlocksItem_UploadToS3", + "ForLoopBlockYamlLoopBlocksItem_Validation", + "ForLoopBlockYamlLoopBlocksItem_Wait", "HttpValidationError", "LoginBlock", "LoginBlockDataSchema", @@ -378,6 +501,7 @@ __all__ = [ "LoginBlockParametersItem_Credential", "LoginBlockParametersItem_Output", "LoginBlockParametersItem_Workflow", + "LoginBlockYaml", "NavigationBlock", "NavigationBlockDataSchema", "NavigationBlockParametersItem", @@ -389,15 +513,19 @@ __all__ = [ "NavigationBlockParametersItem_Credential", "NavigationBlockParametersItem_Output", "NavigationBlockParametersItem_Workflow", + "NavigationBlockYaml", "NonEmptyCreditCardCredential", "NonEmptyPasswordCredential", "OutputParameter", + "OutputParameterYaml", "PasswordCredentialResponse", "PdfParserBlock", + "PdfParserBlockYaml", "ProxyLocation", "RunEngine", "RunStatus", "SendEmailBlock", + "SendEmailBlockYaml", "TaskBlock", "TaskBlockDataSchema", "TaskBlockParametersItem", @@ -409,11 +537,14 @@ __all__ = [ "TaskBlockParametersItem_Credential", "TaskBlockParametersItem_Output", "TaskBlockParametersItem_Workflow", + "TaskBlockYaml", + "TaskBlockYamlDataSchema", "TaskRunRequest", "TaskRunRequestDataExtractionSchema", "TaskRunResponse", "TaskRunResponseOutput", "TaskV2Block", + "TaskV2BlockYaml", "TextPromptBlock", "TextPromptBlockParametersItem", "TextPromptBlockParametersItem_AwsSecret", @@ -424,8 +555,10 @@ __all__ = [ "TextPromptBlockParametersItem_Credential", "TextPromptBlockParametersItem_Output", "TextPromptBlockParametersItem_Workflow", + "TextPromptBlockYaml", "TotpCode", "UploadToS3Block", + "UploadToS3BlockYaml", "UrlBlock", "UrlBlockDataSchema", "UrlBlockParametersItem", @@ -437,6 +570,7 @@ __all__ = [ "UrlBlockParametersItem_Credential", "UrlBlockParametersItem_Output", "UrlBlockParametersItem_Workflow", + "UrlBlockYaml", "ValidationBlock", "ValidationBlockDataSchema", "ValidationBlockParametersItem", @@ -448,6 +582,7 @@ __all__ = [ "ValidationBlockParametersItem_Credential", "ValidationBlockParametersItem_Output", "ValidationBlockParametersItem_Workflow", + "ValidationBlockYaml", "ValidationError", "ValidationErrorLocItem", "WaitBlock", @@ -460,7 +595,9 @@ __all__ = [ "WaitBlockParametersItem_Credential", "WaitBlockParametersItem_Output", "WaitBlockParametersItem_Workflow", + "WaitBlockYaml", "Workflow", + "WorkflowCreateYamlRequest", "WorkflowDefinition", "WorkflowDefinitionBlocksItem", "WorkflowDefinitionBlocksItem_Action", @@ -491,9 +628,42 @@ __all__ = [ "WorkflowDefinitionParametersItem_Credential", "WorkflowDefinitionParametersItem_Output", "WorkflowDefinitionParametersItem_Workflow", + "WorkflowDefinitionYaml", + "WorkflowDefinitionYamlBlocksItem", + "WorkflowDefinitionYamlBlocksItem_Action", + "WorkflowDefinitionYamlBlocksItem_Code", + "WorkflowDefinitionYamlBlocksItem_DownloadToS3", + "WorkflowDefinitionYamlBlocksItem_Extraction", + "WorkflowDefinitionYamlBlocksItem_FileDownload", + "WorkflowDefinitionYamlBlocksItem_FileUpload", + "WorkflowDefinitionYamlBlocksItem_FileUrlParser", + "WorkflowDefinitionYamlBlocksItem_ForLoop", + "WorkflowDefinitionYamlBlocksItem_GotoUrl", + "WorkflowDefinitionYamlBlocksItem_Login", + "WorkflowDefinitionYamlBlocksItem_Navigation", + "WorkflowDefinitionYamlBlocksItem_PdfParser", + "WorkflowDefinitionYamlBlocksItem_SendEmail", + "WorkflowDefinitionYamlBlocksItem_Task", + "WorkflowDefinitionYamlBlocksItem_TaskV2", + "WorkflowDefinitionYamlBlocksItem_TextPrompt", + "WorkflowDefinitionYamlBlocksItem_UploadToS3", + "WorkflowDefinitionYamlBlocksItem_Validation", + "WorkflowDefinitionYamlBlocksItem_Wait", + "WorkflowDefinitionYamlParametersItem", + "WorkflowDefinitionYamlParametersItem_AwsSecret", + "WorkflowDefinitionYamlParametersItem_BitwardenCreditCardData", + "WorkflowDefinitionYamlParametersItem_BitwardenLoginCredential", + "WorkflowDefinitionYamlParametersItem_BitwardenSensitiveInformation", + "WorkflowDefinitionYamlParametersItem_Context", + "WorkflowDefinitionYamlParametersItem_Credential", + "WorkflowDefinitionYamlParametersItem_Output", + "WorkflowDefinitionYamlParametersItem_Workflow", "WorkflowParameter", "WorkflowParameterDefaultValue", "WorkflowParameterType", + "WorkflowParameterYaml", + "WorkflowParameterYamlDefaultValue", + "WorkflowRequest", "WorkflowRunRequest", "WorkflowRunResponse", "WorkflowRunResponseOutput", diff --git a/skyvern/client/types/action_block_yaml.py b/skyvern/client/types/action_block_yaml.py new file mode 100644 index 00000000..c15010a6 --- /dev/null +++ b/skyvern/client/types/action_block_yaml.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class ActionBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + url: typing.Optional[str] = None + title: typing.Optional[str] = None + navigation_goal: typing.Optional[str] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + parameter_keys: typing.Optional[typing.List[str]] = None + complete_on_download: typing.Optional[bool] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + + 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/aws_secret_parameter_yaml.py b/skyvern/client/types/aws_secret_parameter_yaml.py new file mode 100644 index 00000000..b448c861 --- /dev/null +++ b/skyvern/client/types/aws_secret_parameter_yaml.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class AwsSecretParameterYaml(UniversalBaseModel): + key: str + description: typing.Optional[str] = None + aws_key: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/skyvern/client/types/bitwarden_credit_card_data_parameter_yaml.py b/skyvern/client/types/bitwarden_credit_card_data_parameter_yaml.py new file mode 100644 index 00000000..d2c5e646 --- /dev/null +++ b/skyvern/client/types/bitwarden_credit_card_data_parameter_yaml.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class BitwardenCreditCardDataParameterYaml(UniversalBaseModel): + key: str + description: typing.Optional[str] = None + bitwarden_client_id_aws_secret_key: str + bitwarden_client_secret_aws_secret_key: str + bitwarden_master_password_aws_secret_key: str + bitwarden_collection_id: str + bitwarden_item_id: str + + 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/bitwarden_login_credential_parameter_yaml.py b/skyvern/client/types/bitwarden_login_credential_parameter_yaml.py new file mode 100644 index 00000000..dc375b9c --- /dev/null +++ b/skyvern/client/types/bitwarden_login_credential_parameter_yaml.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class BitwardenLoginCredentialParameterYaml(UniversalBaseModel): + key: str + description: typing.Optional[str] = None + bitwarden_client_id_aws_secret_key: str + bitwarden_client_secret_aws_secret_key: str + bitwarden_master_password_aws_secret_key: str + url_parameter_key: typing.Optional[str] = None + bitwarden_collection_id: typing.Optional[str] = None + bitwarden_item_id: typing.Optional[str] = None + + 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/bitwarden_sensitive_information_parameter_yaml.py b/skyvern/client/types/bitwarden_sensitive_information_parameter_yaml.py new file mode 100644 index 00000000..58d9a27f --- /dev/null +++ b/skyvern/client/types/bitwarden_sensitive_information_parameter_yaml.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class BitwardenSensitiveInformationParameterYaml(UniversalBaseModel): + key: str + description: typing.Optional[str] = None + bitwarden_client_id_aws_secret_key: str + bitwarden_client_secret_aws_secret_key: str + bitwarden_master_password_aws_secret_key: str + bitwarden_collection_id: str + bitwarden_identity_key: str + bitwarden_identity_fields: typing.List[str] + + 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/code_block_yaml.py b/skyvern/client/types/code_block_yaml.py new file mode 100644 index 00000000..a75ca06d --- /dev/null +++ b/skyvern/client/types/code_block_yaml.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class CodeBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + code: str + parameter_keys: typing.Optional[typing.List[str]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/skyvern/client/types/context_parameter_yaml.py b/skyvern/client/types/context_parameter_yaml.py new file mode 100644 index 00000000..bdf2d6ae --- /dev/null +++ b/skyvern/client/types/context_parameter_yaml.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class ContextParameterYaml(UniversalBaseModel): + key: str + description: typing.Optional[str] = None + source_parameter_key: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/skyvern/client/types/credential_parameter_yaml.py b/skyvern/client/types/credential_parameter_yaml.py new file mode 100644 index 00000000..9a2f8bfd --- /dev/null +++ b/skyvern/client/types/credential_parameter_yaml.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class CredentialParameterYaml(UniversalBaseModel): + key: str + description: typing.Optional[str] = None + credential_id: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/skyvern/client/types/download_to_s3block_yaml.py b/skyvern/client/types/download_to_s3block_yaml.py new file mode 100644 index 00000000..c9010dae --- /dev/null +++ b/skyvern/client/types/download_to_s3block_yaml.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class DownloadToS3BlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + url: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/skyvern/client/types/extraction_block_yaml.py b/skyvern/client/types/extraction_block_yaml.py new file mode 100644 index 00000000..50e424f1 --- /dev/null +++ b/skyvern/client/types/extraction_block_yaml.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .extraction_block_yaml_data_schema import ExtractionBlockYamlDataSchema +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class ExtractionBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + data_extraction_goal: str + url: typing.Optional[str] = None + title: typing.Optional[str] = None + data_schema: typing.Optional[ExtractionBlockYamlDataSchema] = None + 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 + + 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/extraction_block_yaml_data_schema.py b/skyvern/client/types/extraction_block_yaml_data_schema.py new file mode 100644 index 00000000..0b6373c0 --- /dev/null +++ b/skyvern/client/types/extraction_block_yaml_data_schema.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ExtractionBlockYamlDataSchema = typing.Union[ + typing.Dict[str, typing.Optional[typing.Any]], typing.List[typing.Optional[typing.Any]] +] diff --git a/skyvern/client/types/file_download_block_yaml.py b/skyvern/client/types/file_download_block_yaml.py new file mode 100644 index 00000000..ab860113 --- /dev/null +++ b/skyvern/client/types/file_download_block_yaml.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class FileDownloadBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + navigation_goal: str + url: typing.Optional[str] = None + title: typing.Optional[str] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + parameter_keys: typing.Optional[typing.List[str]] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + + 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/file_parser_block_yaml.py b/skyvern/client/types/file_parser_block_yaml.py new file mode 100644 index 00000000..d08c09bf --- /dev/null +++ b/skyvern/client/types/file_parser_block_yaml.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .file_type import FileType +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class FileParserBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + file_url: str + file_type: FileType = "csv" + + 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/file_upload_block_yaml.py b/skyvern/client/types/file_upload_block_yaml.py new file mode 100644 index 00000000..16b3f50c --- /dev/null +++ b/skyvern/client/types/file_upload_block_yaml.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .file_storage_type import FileStorageType +import typing_extensions +from ..core.serialization import FieldMetadata +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class FileUploadBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + storage_type: typing.Optional[FileStorageType] = None + s3bucket: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="s3_bucket")] = None + aws_access_key_id: typing.Optional[str] = None + aws_secret_access_key: typing.Optional[str] = None + region_name: typing.Optional[str] = None + path: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/skyvern/client/types/for_loop_block_yaml.py b/skyvern/client/types/for_loop_block_yaml.py new file mode 100644 index 00000000..2beecd3a --- /dev/null +++ b/skyvern/client/types/for_loop_block_yaml.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic +from ..core.pydantic_utilities import update_forward_refs + + +class ForLoopBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + loop_blocks: typing.List["ForLoopBlockYamlLoopBlocksItem"] + loop_over_parameter_key: typing.Optional[str] = None + loop_variable_reference: typing.Optional[str] = None + complete_if_empty: 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 + + +from .for_loop_block_yaml_loop_blocks_item import ForLoopBlockYamlLoopBlocksItem # noqa: E402 + +update_forward_refs(ForLoopBlockYaml) diff --git a/skyvern/client/types/for_loop_block_yaml_loop_blocks_item.py b/skyvern/client/types/for_loop_block_yaml_loop_blocks_item.py new file mode 100644 index 00000000..3a7149cb --- /dev/null +++ b/skyvern/client/types/for_loop_block_yaml_loop_blocks_item.py @@ -0,0 +1,448 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .task_block_yaml_data_schema import TaskBlockYamlDataSchema +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic +from .file_storage_type import FileStorageType +import typing_extensions +from ..core.serialization import FieldMetadata +from .file_type import FileType +from .run_engine import RunEngine +from .extraction_block_yaml_data_schema import ExtractionBlockYamlDataSchema +from ..core.pydantic_utilities import update_forward_refs + + +class ForLoopBlockYamlLoopBlocksItem_Task(UniversalBaseModel): + block_type: typing.Literal["task"] = "task" + label: str + continue_on_failure: typing.Optional[bool] = None + url: typing.Optional[str] = None + title: typing.Optional[str] = None + navigation_goal: typing.Optional[str] = None + data_extraction_goal: typing.Optional[str] = None + data_schema: typing.Optional[TaskBlockYamlDataSchema] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + parameter_keys: typing.Optional[typing.List[str]] = None + complete_on_download: typing.Optional[bool] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + complete_verification: typing.Optional[bool] = None + include_action_history_in_verification: 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 + + +class ForLoopBlockYamlLoopBlocksItem_ForLoop(UniversalBaseModel): + block_type: typing.Literal["for_loop"] = "for_loop" + label: str + continue_on_failure: typing.Optional[bool] = None + loop_blocks: typing.List["ForLoopBlockYamlLoopBlocksItem"] + loop_over_parameter_key: typing.Optional[str] = None + loop_variable_reference: typing.Optional[str] = None + complete_if_empty: 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 + + +from .for_loop_block_yaml import ForLoopBlockYaml # noqa: E402 + + +class ForLoopBlockYamlLoopBlocksItem_Code(UniversalBaseModel): + block_type: typing.Literal["code"] = "code" + label: str + continue_on_failure: typing.Optional[bool] = None + code: str + parameter_keys: typing.Optional[typing.List[str]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ForLoopBlockYamlLoopBlocksItem_TextPrompt(UniversalBaseModel): + block_type: typing.Literal["text_prompt"] = "text_prompt" + label: str + continue_on_failure: typing.Optional[bool] = None + llm_key: typing.Optional[str] = None + prompt: str + parameter_keys: typing.Optional[typing.List[str]] = None + json_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = 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 ForLoopBlockYamlLoopBlocksItem_DownloadToS3(UniversalBaseModel): + block_type: typing.Literal["download_to_s3"] = "download_to_s3" + label: str + continue_on_failure: typing.Optional[bool] = None + url: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ForLoopBlockYamlLoopBlocksItem_UploadToS3(UniversalBaseModel): + block_type: typing.Literal["upload_to_s3"] = "upload_to_s3" + label: str + continue_on_failure: typing.Optional[bool] = None + path: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ForLoopBlockYamlLoopBlocksItem_FileUpload(UniversalBaseModel): + block_type: typing.Literal["file_upload"] = "file_upload" + label: str + continue_on_failure: typing.Optional[bool] = None + storage_type: typing.Optional[FileStorageType] = None + s3bucket: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="s3_bucket")] = None + aws_access_key_id: typing.Optional[str] = None + aws_secret_access_key: typing.Optional[str] = None + region_name: typing.Optional[str] = None + path: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ForLoopBlockYamlLoopBlocksItem_SendEmail(UniversalBaseModel): + block_type: typing.Literal["send_email"] = "send_email" + label: str + continue_on_failure: typing.Optional[bool] = None + smtp_host_secret_parameter_key: str + smtp_port_secret_parameter_key: str + smtp_username_secret_parameter_key: str + smtp_password_secret_parameter_key: str + sender: str + recipients: typing.List[str] + subject: str + body: str + file_attachments: typing.Optional[typing.List[str]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ForLoopBlockYamlLoopBlocksItem_FileUrlParser(UniversalBaseModel): + block_type: typing.Literal["file_url_parser"] = "file_url_parser" + label: str + continue_on_failure: typing.Optional[bool] = None + file_url: str + file_type: FileType = "csv" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ForLoopBlockYamlLoopBlocksItem_Validation(UniversalBaseModel): + block_type: typing.Literal["validation"] = "validation" + label: str + continue_on_failure: typing.Optional[bool] = None + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + parameter_keys: typing.Optional[typing.List[str]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ForLoopBlockYamlLoopBlocksItem_Action(UniversalBaseModel): + block_type: typing.Literal["action"] = "action" + label: str + continue_on_failure: typing.Optional[bool] = None + url: typing.Optional[str] = None + title: typing.Optional[str] = None + navigation_goal: typing.Optional[str] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + parameter_keys: typing.Optional[typing.List[str]] = None + complete_on_download: typing.Optional[bool] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ForLoopBlockYamlLoopBlocksItem_Navigation(UniversalBaseModel): + block_type: typing.Literal["navigation"] = "navigation" + label: str + continue_on_failure: typing.Optional[bool] = None + navigation_goal: str + url: typing.Optional[str] = None + title: typing.Optional[str] = None + engine: typing.Optional[RunEngine] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + parameter_keys: typing.Optional[typing.List[str]] = None + complete_on_download: typing.Optional[bool] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + complete_verification: typing.Optional[bool] = None + include_action_history_in_verification: 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 + + +class ForLoopBlockYamlLoopBlocksItem_Extraction(UniversalBaseModel): + block_type: typing.Literal["extraction"] = "extraction" + label: str + continue_on_failure: typing.Optional[bool] = None + data_extraction_goal: str + url: typing.Optional[str] = None + title: typing.Optional[str] = None + data_schema: typing.Optional[ExtractionBlockYamlDataSchema] = None + 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 + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ForLoopBlockYamlLoopBlocksItem_Login(UniversalBaseModel): + block_type: typing.Literal["login"] = "login" + label: str + continue_on_failure: typing.Optional[bool] = None + url: typing.Optional[str] = None + title: typing.Optional[str] = None + navigation_goal: typing.Optional[str] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + 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 + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + complete_verification: 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 + + +class ForLoopBlockYamlLoopBlocksItem_Wait(UniversalBaseModel): + block_type: typing.Literal["wait"] = "wait" + label: str + continue_on_failure: typing.Optional[bool] = None + wait_sec: typing.Optional[int] = 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 ForLoopBlockYamlLoopBlocksItem_FileDownload(UniversalBaseModel): + block_type: typing.Literal["file_download"] = "file_download" + label: str + continue_on_failure: typing.Optional[bool] = None + navigation_goal: str + url: typing.Optional[str] = None + title: typing.Optional[str] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + parameter_keys: typing.Optional[typing.List[str]] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ForLoopBlockYamlLoopBlocksItem_GotoUrl(UniversalBaseModel): + block_type: typing.Literal["goto_url"] = "goto_url" + label: str + continue_on_failure: typing.Optional[bool] = None + url: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class ForLoopBlockYamlLoopBlocksItem_PdfParser(UniversalBaseModel): + block_type: typing.Literal["pdf_parser"] = "pdf_parser" + label: str + continue_on_failure: typing.Optional[bool] = None + file_url: str + json_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = 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 ForLoopBlockYamlLoopBlocksItem_TaskV2(UniversalBaseModel): + block_type: typing.Literal["task_v2"] = "task_v2" + label: str + continue_on_failure: typing.Optional[bool] = None + prompt: str + url: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + max_iterations: typing.Optional[int] = None + max_steps: typing.Optional[int] = 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 + + +ForLoopBlockYamlLoopBlocksItem = typing.Union[ + ForLoopBlockYamlLoopBlocksItem_Task, + ForLoopBlockYamlLoopBlocksItem_ForLoop, + ForLoopBlockYamlLoopBlocksItem_Code, + ForLoopBlockYamlLoopBlocksItem_TextPrompt, + ForLoopBlockYamlLoopBlocksItem_DownloadToS3, + ForLoopBlockYamlLoopBlocksItem_UploadToS3, + ForLoopBlockYamlLoopBlocksItem_FileUpload, + ForLoopBlockYamlLoopBlocksItem_SendEmail, + ForLoopBlockYamlLoopBlocksItem_FileUrlParser, + ForLoopBlockYamlLoopBlocksItem_Validation, + ForLoopBlockYamlLoopBlocksItem_Action, + ForLoopBlockYamlLoopBlocksItem_Navigation, + ForLoopBlockYamlLoopBlocksItem_Extraction, + ForLoopBlockYamlLoopBlocksItem_Login, + ForLoopBlockYamlLoopBlocksItem_Wait, + ForLoopBlockYamlLoopBlocksItem_FileDownload, + ForLoopBlockYamlLoopBlocksItem_GotoUrl, + ForLoopBlockYamlLoopBlocksItem_PdfParser, + ForLoopBlockYamlLoopBlocksItem_TaskV2, +] +update_forward_refs(ForLoopBlockYamlLoopBlocksItem_ForLoop) diff --git a/skyvern/client/types/login_block_yaml.py b/skyvern/client/types/login_block_yaml.py new file mode 100644 index 00000000..e3406366 --- /dev/null +++ b/skyvern/client/types/login_block_yaml.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class LoginBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + url: typing.Optional[str] = None + title: typing.Optional[str] = None + navigation_goal: typing.Optional[str] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + 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 + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + complete_verification: 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/navigation_block_yaml.py b/skyvern/client/types/navigation_block_yaml.py new file mode 100644 index 00000000..05215f43 --- /dev/null +++ b/skyvern/client/types/navigation_block_yaml.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .run_engine import RunEngine +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class NavigationBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + navigation_goal: str + url: typing.Optional[str] = None + title: typing.Optional[str] = None + engine: typing.Optional[RunEngine] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + parameter_keys: typing.Optional[typing.List[str]] = None + complete_on_download: typing.Optional[bool] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + complete_verification: typing.Optional[bool] = None + include_action_history_in_verification: 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/output_parameter_yaml.py b/skyvern/client/types/output_parameter_yaml.py new file mode 100644 index 00000000..15f041d2 --- /dev/null +++ b/skyvern/client/types/output_parameter_yaml.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class OutputParameterYaml(UniversalBaseModel): + key: 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 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/skyvern/client/types/pdf_parser_block_yaml.py b/skyvern/client/types/pdf_parser_block_yaml.py new file mode 100644 index 00000000..9b44bb5c --- /dev/null +++ b/skyvern/client/types/pdf_parser_block_yaml.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class PdfParserBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + file_url: str + json_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = 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/send_email_block_yaml.py b/skyvern/client/types/send_email_block_yaml.py new file mode 100644 index 00000000..48c30354 --- /dev/null +++ b/skyvern/client/types/send_email_block_yaml.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class SendEmailBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + smtp_host_secret_parameter_key: str + smtp_port_secret_parameter_key: str + smtp_username_secret_parameter_key: str + smtp_password_secret_parameter_key: str + sender: str + recipients: typing.List[str] + subject: str + body: str + file_attachments: typing.Optional[typing.List[str]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/skyvern/client/types/task_block_yaml.py b/skyvern/client/types/task_block_yaml.py new file mode 100644 index 00000000..3ca6523e --- /dev/null +++ b/skyvern/client/types/task_block_yaml.py @@ -0,0 +1,39 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .task_block_yaml_data_schema import TaskBlockYamlDataSchema +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class TaskBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + url: typing.Optional[str] = None + title: typing.Optional[str] = None + navigation_goal: typing.Optional[str] = None + data_extraction_goal: typing.Optional[str] = None + data_schema: typing.Optional[TaskBlockYamlDataSchema] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + parameter_keys: typing.Optional[typing.List[str]] = None + complete_on_download: typing.Optional[bool] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + complete_verification: typing.Optional[bool] = None + include_action_history_in_verification: 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/task_block_yaml_data_schema.py b/skyvern/client/types/task_block_yaml_data_schema.py new file mode 100644 index 00000000..4a4720f4 --- /dev/null +++ b/skyvern/client/types/task_block_yaml_data_schema.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TaskBlockYamlDataSchema = typing.Union[ + typing.Dict[str, typing.Optional[typing.Any]], typing.List[typing.Optional[typing.Any]] +] diff --git a/skyvern/client/types/task_v2block_yaml.py b/skyvern/client/types/task_v2block_yaml.py new file mode 100644 index 00000000..251d500a --- /dev/null +++ b/skyvern/client/types/task_v2block_yaml.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class TaskV2BlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + prompt: str + url: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + max_iterations: typing.Optional[int] = None + max_steps: typing.Optional[int] = 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/text_prompt_block_yaml.py b/skyvern/client/types/text_prompt_block_yaml.py new file mode 100644 index 00000000..2b56fbb9 --- /dev/null +++ b/skyvern/client/types/text_prompt_block_yaml.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class TextPromptBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + llm_key: typing.Optional[str] = None + prompt: str + parameter_keys: typing.Optional[typing.List[str]] = None + json_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = 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/upload_to_s3block_yaml.py b/skyvern/client/types/upload_to_s3block_yaml.py new file mode 100644 index 00000000..5c139d33 --- /dev/null +++ b/skyvern/client/types/upload_to_s3block_yaml.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class UploadToS3BlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + path: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/skyvern/client/types/url_block_yaml.py b/skyvern/client/types/url_block_yaml.py new file mode 100644 index 00000000..63630e76 --- /dev/null +++ b/skyvern/client/types/url_block_yaml.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class UrlBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + url: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/skyvern/client/types/validation_block_yaml.py b/skyvern/client/types/validation_block_yaml.py new file mode 100644 index 00000000..fe7a71f2 --- /dev/null +++ b/skyvern/client/types/validation_block_yaml.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class ValidationBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + parameter_keys: typing.Optional[typing.List[str]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/skyvern/client/types/wait_block_yaml.py b/skyvern/client/types/wait_block_yaml.py new file mode 100644 index 00000000..91c20285 --- /dev/null +++ b/skyvern/client/types/wait_block_yaml.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class WaitBlockYaml(UniversalBaseModel): + label: str + continue_on_failure: typing.Optional[bool] = None + wait_sec: typing.Optional[int] = 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/workflow_create_yaml_request.py b/skyvern/client/types/workflow_create_yaml_request.py new file mode 100644 index 00000000..306bc4c5 --- /dev/null +++ b/skyvern/client/types/workflow_create_yaml_request.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from .for_loop_block_yaml import ForLoopBlockYaml +import typing +from .proxy_location import ProxyLocation +from .workflow_definition_yaml import WorkflowDefinitionYaml +from .workflow_status import WorkflowStatus +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class WorkflowCreateYamlRequest(UniversalBaseModel): + title: str + description: typing.Optional[str] = None + proxy_location: typing.Optional[ProxyLocation] = None + webhook_callback_url: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + persist_browser_session: typing.Optional[bool] = None + workflow_definition: WorkflowDefinitionYaml + is_saved_task: typing.Optional[bool] = None + status: typing.Optional[WorkflowStatus] = 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/workflow_definition_yaml.py b/skyvern/client/types/workflow_definition_yaml.py new file mode 100644 index 00000000..7e93261f --- /dev/null +++ b/skyvern/client/types/workflow_definition_yaml.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from .for_loop_block_yaml import ForLoopBlockYaml +import typing +from .workflow_definition_yaml_parameters_item import WorkflowDefinitionYamlParametersItem +from .workflow_definition_yaml_blocks_item import WorkflowDefinitionYamlBlocksItem +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class WorkflowDefinitionYaml(UniversalBaseModel): + parameters: typing.List[WorkflowDefinitionYamlParametersItem] + blocks: typing.List[WorkflowDefinitionYamlBlocksItem] + + 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/workflow_definition_yaml_blocks_item.py b/skyvern/client/types/workflow_definition_yaml_blocks_item.py new file mode 100644 index 00000000..62787102 --- /dev/null +++ b/skyvern/client/types/workflow_definition_yaml_blocks_item.py @@ -0,0 +1,449 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic +from .extraction_block_yaml_data_schema import ExtractionBlockYamlDataSchema +from .file_storage_type import FileStorageType +import typing_extensions +from ..core.serialization import FieldMetadata +from .file_type import FileType +from .run_engine import RunEngine +from .task_block_yaml_data_schema import TaskBlockYamlDataSchema +from ..core.pydantic_utilities import update_forward_refs + + +class WorkflowDefinitionYamlBlocksItem_Action(UniversalBaseModel): + block_type: typing.Literal["action"] = "action" + label: str + continue_on_failure: typing.Optional[bool] = None + url: typing.Optional[str] = None + title: typing.Optional[str] = None + navigation_goal: typing.Optional[str] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + parameter_keys: typing.Optional[typing.List[str]] = None + complete_on_download: typing.Optional[bool] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlBlocksItem_Code(UniversalBaseModel): + block_type: typing.Literal["code"] = "code" + label: str + continue_on_failure: typing.Optional[bool] = None + code: str + parameter_keys: typing.Optional[typing.List[str]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlBlocksItem_DownloadToS3(UniversalBaseModel): + block_type: typing.Literal["download_to_s3"] = "download_to_s3" + label: str + continue_on_failure: typing.Optional[bool] = None + url: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlBlocksItem_Extraction(UniversalBaseModel): + block_type: typing.Literal["extraction"] = "extraction" + label: str + continue_on_failure: typing.Optional[bool] = None + data_extraction_goal: str + url: typing.Optional[str] = None + title: typing.Optional[str] = None + data_schema: typing.Optional[ExtractionBlockYamlDataSchema] = None + 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 + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlBlocksItem_FileDownload(UniversalBaseModel): + block_type: typing.Literal["file_download"] = "file_download" + label: str + continue_on_failure: typing.Optional[bool] = None + navigation_goal: str + url: typing.Optional[str] = None + title: typing.Optional[str] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + parameter_keys: typing.Optional[typing.List[str]] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlBlocksItem_FileUpload(UniversalBaseModel): + block_type: typing.Literal["file_upload"] = "file_upload" + label: str + continue_on_failure: typing.Optional[bool] = None + storage_type: typing.Optional[FileStorageType] = None + s3bucket: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="s3_bucket")] = None + aws_access_key_id: typing.Optional[str] = None + aws_secret_access_key: typing.Optional[str] = None + region_name: typing.Optional[str] = None + path: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlBlocksItem_FileUrlParser(UniversalBaseModel): + block_type: typing.Literal["file_url_parser"] = "file_url_parser" + label: str + continue_on_failure: typing.Optional[bool] = None + file_url: str + file_type: FileType = "csv" + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlBlocksItem_ForLoop(UniversalBaseModel): + block_type: typing.Literal["for_loop"] = "for_loop" + label: str + continue_on_failure: typing.Optional[bool] = None + loop_blocks: typing.List["ForLoopBlockYamlLoopBlocksItem"] + loop_over_parameter_key: typing.Optional[str] = None + loop_variable_reference: typing.Optional[str] = None + complete_if_empty: 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 + + +from .for_loop_block_yaml import ForLoopBlockYaml # noqa: E402 +from .for_loop_block_yaml_loop_blocks_item import ForLoopBlockYamlLoopBlocksItem # noqa: E402 + + +class WorkflowDefinitionYamlBlocksItem_GotoUrl(UniversalBaseModel): + block_type: typing.Literal["goto_url"] = "goto_url" + label: str + continue_on_failure: typing.Optional[bool] = None + url: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlBlocksItem_Login(UniversalBaseModel): + block_type: typing.Literal["login"] = "login" + label: str + continue_on_failure: typing.Optional[bool] = None + url: typing.Optional[str] = None + title: typing.Optional[str] = None + navigation_goal: typing.Optional[str] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + 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 + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + complete_verification: 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 + + +class WorkflowDefinitionYamlBlocksItem_Navigation(UniversalBaseModel): + block_type: typing.Literal["navigation"] = "navigation" + label: str + continue_on_failure: typing.Optional[bool] = None + navigation_goal: str + url: typing.Optional[str] = None + title: typing.Optional[str] = None + engine: typing.Optional[RunEngine] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + parameter_keys: typing.Optional[typing.List[str]] = None + complete_on_download: typing.Optional[bool] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + complete_verification: typing.Optional[bool] = None + include_action_history_in_verification: 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 + + +class WorkflowDefinitionYamlBlocksItem_PdfParser(UniversalBaseModel): + block_type: typing.Literal["pdf_parser"] = "pdf_parser" + label: str + continue_on_failure: typing.Optional[bool] = None + file_url: str + json_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = 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 WorkflowDefinitionYamlBlocksItem_SendEmail(UniversalBaseModel): + block_type: typing.Literal["send_email"] = "send_email" + label: str + continue_on_failure: typing.Optional[bool] = None + smtp_host_secret_parameter_key: str + smtp_port_secret_parameter_key: str + smtp_username_secret_parameter_key: str + smtp_password_secret_parameter_key: str + sender: str + recipients: typing.List[str] + subject: str + body: str + file_attachments: typing.Optional[typing.List[str]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlBlocksItem_Task(UniversalBaseModel): + block_type: typing.Literal["task"] = "task" + label: str + continue_on_failure: typing.Optional[bool] = None + url: typing.Optional[str] = None + title: typing.Optional[str] = None + navigation_goal: typing.Optional[str] = None + data_extraction_goal: typing.Optional[str] = None + data_schema: typing.Optional[TaskBlockYamlDataSchema] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + max_retries: typing.Optional[int] = None + max_steps_per_run: typing.Optional[int] = None + parameter_keys: typing.Optional[typing.List[str]] = None + complete_on_download: typing.Optional[bool] = None + download_suffix: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + cache_actions: typing.Optional[bool] = None + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + complete_verification: typing.Optional[bool] = None + include_action_history_in_verification: 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 + + +class WorkflowDefinitionYamlBlocksItem_TaskV2(UniversalBaseModel): + block_type: typing.Literal["task_v2"] = "task_v2" + label: str + continue_on_failure: typing.Optional[bool] = None + prompt: str + url: typing.Optional[str] = None + totp_verification_url: typing.Optional[str] = None + totp_identifier: typing.Optional[str] = None + max_iterations: typing.Optional[int] = None + max_steps: typing.Optional[int] = 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 WorkflowDefinitionYamlBlocksItem_TextPrompt(UniversalBaseModel): + block_type: typing.Literal["text_prompt"] = "text_prompt" + label: str + continue_on_failure: typing.Optional[bool] = None + llm_key: typing.Optional[str] = None + prompt: str + parameter_keys: typing.Optional[typing.List[str]] = None + json_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = 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 WorkflowDefinitionYamlBlocksItem_UploadToS3(UniversalBaseModel): + block_type: typing.Literal["upload_to_s3"] = "upload_to_s3" + label: str + continue_on_failure: typing.Optional[bool] = None + path: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlBlocksItem_Validation(UniversalBaseModel): + block_type: typing.Literal["validation"] = "validation" + label: str + continue_on_failure: typing.Optional[bool] = None + complete_criterion: typing.Optional[str] = None + terminate_criterion: typing.Optional[str] = None + error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None + parameter_keys: typing.Optional[typing.List[str]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlBlocksItem_Wait(UniversalBaseModel): + block_type: typing.Literal["wait"] = "wait" + label: str + continue_on_failure: typing.Optional[bool] = None + wait_sec: typing.Optional[int] = 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 + + +WorkflowDefinitionYamlBlocksItem = typing.Union[ + WorkflowDefinitionYamlBlocksItem_Action, + WorkflowDefinitionYamlBlocksItem_Code, + WorkflowDefinitionYamlBlocksItem_DownloadToS3, + WorkflowDefinitionYamlBlocksItem_Extraction, + WorkflowDefinitionYamlBlocksItem_FileDownload, + WorkflowDefinitionYamlBlocksItem_FileUpload, + WorkflowDefinitionYamlBlocksItem_FileUrlParser, + WorkflowDefinitionYamlBlocksItem_ForLoop, + WorkflowDefinitionYamlBlocksItem_GotoUrl, + WorkflowDefinitionYamlBlocksItem_Login, + WorkflowDefinitionYamlBlocksItem_Navigation, + WorkflowDefinitionYamlBlocksItem_PdfParser, + WorkflowDefinitionYamlBlocksItem_SendEmail, + WorkflowDefinitionYamlBlocksItem_Task, + WorkflowDefinitionYamlBlocksItem_TaskV2, + WorkflowDefinitionYamlBlocksItem_TextPrompt, + WorkflowDefinitionYamlBlocksItem_UploadToS3, + WorkflowDefinitionYamlBlocksItem_Validation, + WorkflowDefinitionYamlBlocksItem_Wait, +] +update_forward_refs(WorkflowDefinitionYamlBlocksItem_ForLoop) diff --git a/skyvern/client/types/workflow_definition_yaml_parameters_item.py b/skyvern/client/types/workflow_definition_yaml_parameters_item.py new file mode 100644 index 00000000..33bd969f --- /dev/null +++ b/skyvern/client/types/workflow_definition_yaml_parameters_item.py @@ -0,0 +1,163 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic +from .workflow_parameter_type import WorkflowParameterType +from .workflow_parameter_yaml_default_value import WorkflowParameterYamlDefaultValue + + +class WorkflowDefinitionYamlParametersItem_AwsSecret(UniversalBaseModel): + parameter_type: typing.Literal["aws_secret"] = "aws_secret" + key: str + description: typing.Optional[str] = None + aws_key: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlParametersItem_BitwardenCreditCardData(UniversalBaseModel): + parameter_type: typing.Literal["bitwarden_credit_card_data"] = "bitwarden_credit_card_data" + key: str + description: typing.Optional[str] = None + bitwarden_client_id_aws_secret_key: str + bitwarden_client_secret_aws_secret_key: str + bitwarden_master_password_aws_secret_key: str + bitwarden_collection_id: str + bitwarden_item_id: str + + 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 WorkflowDefinitionYamlParametersItem_BitwardenLoginCredential(UniversalBaseModel): + parameter_type: typing.Literal["bitwarden_login_credential"] = "bitwarden_login_credential" + key: str + description: typing.Optional[str] = None + bitwarden_client_id_aws_secret_key: str + bitwarden_client_secret_aws_secret_key: str + bitwarden_master_password_aws_secret_key: str + url_parameter_key: typing.Optional[str] = None + bitwarden_collection_id: typing.Optional[str] = None + bitwarden_item_id: typing.Optional[str] = None + + 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 WorkflowDefinitionYamlParametersItem_BitwardenSensitiveInformation(UniversalBaseModel): + parameter_type: typing.Literal["bitwarden_sensitive_information"] = "bitwarden_sensitive_information" + key: str + description: typing.Optional[str] = None + bitwarden_client_id_aws_secret_key: str + bitwarden_client_secret_aws_secret_key: str + bitwarden_master_password_aws_secret_key: str + bitwarden_collection_id: str + bitwarden_identity_key: str + bitwarden_identity_fields: typing.List[str] + + 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 WorkflowDefinitionYamlParametersItem_Context(UniversalBaseModel): + parameter_type: typing.Literal["context"] = "context" + key: str + description: typing.Optional[str] = None + source_parameter_key: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlParametersItem_Credential(UniversalBaseModel): + parameter_type: typing.Literal["credential"] = "credential" + key: str + description: typing.Optional[str] = None + credential_id: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlParametersItem_Output(UniversalBaseModel): + parameter_type: typing.Literal["output"] = "output" + key: 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 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +class WorkflowDefinitionYamlParametersItem_Workflow(UniversalBaseModel): + parameter_type: typing.Literal["workflow"] = "workflow" + key: str + description: typing.Optional[str] = None + workflow_parameter_type: WorkflowParameterType + default_value: typing.Optional[WorkflowParameterYamlDefaultValue] = 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 + + +WorkflowDefinitionYamlParametersItem = typing.Union[ + WorkflowDefinitionYamlParametersItem_AwsSecret, + WorkflowDefinitionYamlParametersItem_BitwardenCreditCardData, + WorkflowDefinitionYamlParametersItem_BitwardenLoginCredential, + WorkflowDefinitionYamlParametersItem_BitwardenSensitiveInformation, + WorkflowDefinitionYamlParametersItem_Context, + WorkflowDefinitionYamlParametersItem_Credential, + WorkflowDefinitionYamlParametersItem_Output, + WorkflowDefinitionYamlParametersItem_Workflow, +] diff --git a/skyvern/client/types/workflow_parameter_yaml.py b/skyvern/client/types/workflow_parameter_yaml.py new file mode 100644 index 00000000..0a781161 --- /dev/null +++ b/skyvern/client/types/workflow_parameter_yaml.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +import typing +from .workflow_parameter_type import WorkflowParameterType +from .workflow_parameter_yaml_default_value import WorkflowParameterYamlDefaultValue +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import pydantic + + +class WorkflowParameterYaml(UniversalBaseModel): + key: str + description: typing.Optional[str] = None + workflow_parameter_type: WorkflowParameterType + default_value: typing.Optional[WorkflowParameterYamlDefaultValue] = 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/workflow_parameter_yaml_default_value.py b/skyvern/client/types/workflow_parameter_yaml_default_value.py new file mode 100644 index 00000000..ecebd926 --- /dev/null +++ b/skyvern/client/types/workflow_parameter_yaml_default_value.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +WorkflowParameterYamlDefaultValue = typing.Union[ + str, int, float, bool, typing.Dict[str, typing.Optional[typing.Any]], typing.List[typing.Optional[typing.Any]] +] diff --git a/skyvern/client/types/workflow_request.py b/skyvern/client/types/workflow_request.py new file mode 100644 index 00000000..3bccd4fa --- /dev/null +++ b/skyvern/client/types/workflow_request.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.pydantic_utilities import UniversalBaseModel +from .for_loop_block_yaml import ForLoopBlockYaml +import typing +from .workflow_create_yaml_request import WorkflowCreateYamlRequest +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 + + +class WorkflowRequest(UniversalBaseModel): + json_definition: typing.Optional[WorkflowCreateYamlRequest] = pydantic.Field(default=None) + """ + Workflow definition in JSON format + """ + + yaml_definition: typing.Optional[str] = pydantic.Field(default=None) + """ + Workflow definition in YAML format + """ + + 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/workflows/client.py b/skyvern/client/workflows/client.py index 1bc6655d..7f7537c6 100644 --- a/skyvern/client/workflows/client.py +++ b/skyvern/client/workflows/client.py @@ -1,9 +1,11 @@ # This file was auto-generated by Fern from our API Definition. -from ..core.client_wrapper import SyncClientWrapper import typing +from ..core.client_wrapper import SyncClientWrapper +from ..types.workflow_create_yaml_request import WorkflowCreateYamlRequest from ..core.request_options import RequestOptions from ..types.workflow import Workflow +from ..core.serialization import convert_and_respect_annotation_metadata from ..core.pydantic_utilities import parse_obj_as from ..errors.unprocessable_entity_error import UnprocessableEntityError from json.decoder import JSONDecodeError @@ -11,17 +13,32 @@ from ..core.api_error import ApiError from ..core.jsonable_encoder import jsonable_encoder from ..core.client_wrapper import AsyncClientWrapper +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + class WorkflowsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper - def create_workflow(self, *, request_options: typing.Optional[RequestOptions] = None) -> Workflow: + def create_workflow( + self, + *, + json_definition: typing.Optional[WorkflowCreateYamlRequest] = OMIT, + yaml_definition: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Workflow: """ - Create a new workflow + Create a new workflow definition Parameters ---------- + json_definition : typing.Optional[WorkflowCreateYamlRequest] + Workflow definition in JSON format + + yaml_definition : typing.Optional[str] + Workflow definition in YAML format + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -43,7 +60,92 @@ class WorkflowsClient: _response = self._client_wrapper.httpx_client.request( "v1/workflows", method="POST", + json={ + "json_definition": convert_and_respect_annotation_metadata( + object_=json_definition, annotation=WorkflowCreateYamlRequest, direction="write" + ), + "yaml_definition": yaml_definition, + }, request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + Workflow, + parse_obj_as( + type_=Workflow, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def update_workflow( + self, + workflow_id: str, + *, + json_definition: typing.Optional[WorkflowCreateYamlRequest] = OMIT, + yaml_definition: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Workflow: + """ + Update a workflow definition + + Parameters + ---------- + workflow_id : str + The ID of the workflow to update. Workflow ID starts with `wpid_`. + + json_definition : typing.Optional[WorkflowCreateYamlRequest] + Workflow definition in JSON format + + yaml_definition : typing.Optional[str] + Workflow definition in YAML format + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Workflow + Successfully updated workflow + + Examples + -------- + from skyvern import Skyvern + + client = Skyvern( + api_key="YOUR_API_KEY", + authorization="YOUR_AUTHORIZATION", + ) + client.workflows.update_workflow( + workflow_id="wpid_123", + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"v1/workflows/{jsonable_encoder(workflow_id)}", + method="POST", + json={ + "json_definition": convert_and_respect_annotation_metadata( + object_=json_definition, annotation=WorkflowCreateYamlRequest, direction="write" + ), + "yaml_definition": yaml_definition, + }, + request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -134,12 +236,24 @@ class AsyncWorkflowsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper - async def create_workflow(self, *, request_options: typing.Optional[RequestOptions] = None) -> Workflow: + async def create_workflow( + self, + *, + json_definition: typing.Optional[WorkflowCreateYamlRequest] = OMIT, + yaml_definition: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Workflow: """ - Create a new workflow + Create a new workflow definition Parameters ---------- + json_definition : typing.Optional[WorkflowCreateYamlRequest] + Workflow definition in JSON format + + yaml_definition : typing.Optional[str] + Workflow definition in YAML format + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -169,7 +283,100 @@ class AsyncWorkflowsClient: _response = await self._client_wrapper.httpx_client.request( "v1/workflows", method="POST", + json={ + "json_definition": convert_and_respect_annotation_metadata( + object_=json_definition, annotation=WorkflowCreateYamlRequest, direction="write" + ), + "yaml_definition": yaml_definition, + }, request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + Workflow, + parse_obj_as( + type_=Workflow, # type: ignore + object_=_response.json(), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + typing.cast( + typing.Optional[typing.Any], + parse_obj_as( + type_=typing.Optional[typing.Any], # type: ignore + object_=_response.json(), + ), + ) + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def update_workflow( + self, + workflow_id: str, + *, + json_definition: typing.Optional[WorkflowCreateYamlRequest] = OMIT, + yaml_definition: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Workflow: + """ + Update a workflow definition + + Parameters + ---------- + workflow_id : str + The ID of the workflow to update. Workflow ID starts with `wpid_`. + + json_definition : typing.Optional[WorkflowCreateYamlRequest] + Workflow definition in JSON format + + yaml_definition : typing.Optional[str] + Workflow definition in YAML format + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Workflow + Successfully updated workflow + + Examples + -------- + import asyncio + + from skyvern import AsyncSkyvern + + client = AsyncSkyvern( + api_key="YOUR_API_KEY", + authorization="YOUR_AUTHORIZATION", + ) + + + async def main() -> None: + await client.workflows.update_workflow( + workflow_id="wpid_123", + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"v1/workflows/{jsonable_encoder(workflow_id)}", + method="POST", + json={ + "json_definition": convert_and_respect_annotation_metadata( + object_=json_definition, annotation=WorkflowCreateYamlRequest, direction="write" + ), + "yaml_definition": yaml_definition, + }, + request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: