Skip to content

Automate browser based workflows with AI

Bump version to 1.0.24 (#5086)

Marc Kelechava7face2033c46
diff --git a/.gitignore b/.gitignore
index d4ce17d7f..75e058d73 100644
--- a/.gitignore
+++ b/.gitignore
@@ -160,6 +160,7 @@ ig_*
.idea/
# Skyvern ignores
+browser_sessions/
videos/
skyvern/artifacts/
artifacts/
diff --git a/pyproject.toml b/pyproject.toml
index 7f9ca99f5..6d28c2b83 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "skyvern"
-version = "1.0.23"
+version = "1.0.24"
description = ""
authors = [{ name = "Skyvern AI", email = "[email protected]" }]
requires-python = ">=3.11,<3.14"
diff --git a/skyvern-ts/client/package-lock.json b/skyvern-ts/client/package-lock.json
index 7bf19af1e..96f0615e0 100644
--- a/skyvern-ts/client/package-lock.json
+++ b/skyvern-ts/client/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@skyvern/client",
- "version": "1.0.23",
+ "version": "1.0.24",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@skyvern/client",
- "version": "1.0.23",
+ "version": "1.0.24",
"dependencies": {
"playwright": "^1.48.0"
},
@@ -196,9 +196,9 @@
}
},
"node_modules/@esbuild/aix-ppc64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz",
- "integrity": "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz",
+ "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==",
"cpu": [
"ppc64"
],
@@ -212,9 +212,9 @@
}
},
"node_modules/@esbuild/android-arm": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.3.tgz",
- "integrity": "sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz",
+ "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==",
"cpu": [
"arm"
],
@@ -228,9 +228,9 @@
}
},
"node_modules/@esbuild/android-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.3.tgz",
- "integrity": "sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz",
+ "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==",
"cpu": [
"arm64"
],
@@ -244,9 +244,9 @@
}
},
"node_modules/@esbuild/android-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.3.tgz",
- "integrity": "sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz",
+ "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==",
"cpu": [
"x64"
],
@@ -260,9 +260,9 @@
}
},
"node_modules/@esbuild/darwin-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.3.tgz",
- "integrity": "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz",
+ "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==",
"cpu": [
"arm64"
],
@@ -276,9 +276,9 @@
}
},
"node_modules/@esbuild/darwin-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.3.tgz",
- "integrity": "sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz",
+ "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==",
"cpu": [
"x64"
],
@@ -292,9 +292,9 @@
}
},
"node_modules/@esbuild/freebsd-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.3.tgz",
- "integrity": "sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz",
+ "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==",
"cpu": [
"arm64"
],
@@ -308,9 +308,9 @@
}
},
"node_modules/@esbuild/freebsd-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.3.tgz",
- "integrity": "sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz",
+ "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==",
"cpu": [
"x64"
],
@@ -324,9 +324,9 @@
}
},
"node_modules/@esbuild/linux-arm": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.3.tgz",
- "integrity": "sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz",
+ "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==",
"cpu": [
"arm"
],
@@ -340,9 +340,9 @@
}
},
"node_modules/@esbuild/linux-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.3.tgz",
- "integrity": "sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz",
+ "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==",
"cpu": [
"arm64"
],
@@ -356,9 +356,9 @@
}
},
"node_modules/@esbuild/linux-ia32": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.3.tgz",
- "integrity": "sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz",
+ "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==",
"cpu": [
"ia32"
],
@@ -372,9 +372,9 @@
}
},
"node_modules/@esbuild/linux-loong64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.3.tgz",
- "integrity": "sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz",
+ "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==",
"cpu": [
"loong64"
],
@@ -388,9 +388,9 @@
}
},
"node_modules/@esbuild/linux-mips64el": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.3.tgz",
- "integrity": "sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz",
+ "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==",
"cpu": [
"mips64el"
],
@@ -404,9 +404,9 @@
}
},
"node_modules/@esbuild/linux-ppc64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.3.tgz",
- "integrity": "sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz",
+ "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==",
"cpu": [
"ppc64"
],
@@ -420,9 +420,9 @@
}
},
"node_modules/@esbuild/linux-riscv64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.3.tgz",
- "integrity": "sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz",
+ "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==",
"cpu": [
"riscv64"
],
@@ -436,9 +436,9 @@
}
},
"node_modules/@esbuild/linux-s390x": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.3.tgz",
- "integrity": "sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz",
+ "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==",
"cpu": [
"s390x"
],
@@ -452,9 +452,9 @@
}
},
"node_modules/@esbuild/linux-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.3.tgz",
- "integrity": "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz",
+ "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==",
"cpu": [
"x64"
],
@@ -468,9 +468,9 @@
}
},
"node_modules/@esbuild/netbsd-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.3.tgz",
- "integrity": "sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz",
+ "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==",
"cpu": [
"arm64"
],
@@ -484,9 +484,9 @@
}
},
"node_modules/@esbuild/netbsd-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.3.tgz",
- "integrity": "sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz",
+ "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==",
"cpu": [
"x64"
],
@@ -500,9 +500,9 @@
}
},
"node_modules/@esbuild/openbsd-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.3.tgz",
- "integrity": "sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz",
+ "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==",
"cpu": [
"arm64"
],
@@ -516,9 +516,9 @@
}
},
"node_modules/@esbuild/openbsd-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.3.tgz",
- "integrity": "sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz",
+ "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==",
"cpu": [
"x64"
],
@@ -532,9 +532,9 @@
}
},
"node_modules/@esbuild/openharmony-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.3.tgz",
- "integrity": "sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz",
+ "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==",
"cpu": [
"arm64"
],
@@ -548,9 +548,9 @@
}
},
"node_modules/@esbuild/sunos-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.3.tgz",
- "integrity": "sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz",
+ "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==",
"cpu": [
"x64"
],
@@ -564,9 +564,9 @@
}
},
"node_modules/@esbuild/win32-arm64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.3.tgz",
- "integrity": "sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz",
+ "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==",
"cpu": [
"arm64"
],
@@ -580,9 +580,9 @@
}
},
"node_modules/@esbuild/win32-ia32": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.3.tgz",
- "integrity": "sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz",
+ "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==",
"cpu": [
"ia32"
],
@@ -596,9 +596,9 @@
}
},
"node_modules/@esbuild/win32-x64": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.3.tgz",
- "integrity": "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz",
+ "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==",
"cpu": [
"x64"
],
@@ -1188,6 +1188,32 @@
"url": "https://opencollective.com/vitest"
}
},
+ "node_modules/@vitest/mocker": {
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz",
+ "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==",
+ "dev": true,
+ "dependencies": {
+ "@vitest/spy": "3.2.4",
+ "estree-walker": "^3.0.3",
+ "magic-string": "^0.30.17"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ },
+ "peerDependencies": {
+ "msw": "^2.4.9",
+ "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0"
+ },
+ "peerDependenciesMeta": {
+ "msw": {
+ "optional": true
+ },
+ "vite": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@vitest/pretty-format": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz",
@@ -1515,9 +1541,9 @@
}
},
"node_modules/baseline-browser-mapping": {
- "version": "2.10.0",
- "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.0.tgz",
- "integrity": "sha512-lIyg0szRfYbiy67j9KN8IyeD7q7hcmqnJ1ddWmNt19ItGpNN64mnllmxUNFIOdOm6by97jlL6wfpTTJrmnjWAA==",
+ "version": "2.10.7",
+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.7.tgz",
+ "integrity": "sha512-1ghYO3HnxGec0TCGBXiDLVns4eCSx4zJpxnHrlqFQajmhfKMQBzUGDdkMK7fUW7PTHTeLf+j87aTuKuuwWzMGw==",
"dev": true,
"bin": {
"baseline-browser-mapping": "dist/cli.cjs"
@@ -1587,9 +1613,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001775",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001775.tgz",
- "integrity": "sha512-s3Qv7Lht9zbVKE9XoTyRG6wVDCKdtOFIjBGg3+Yhn6JaytuNKPIjBMTMIY1AnOH3seL5mvF+x33oGAyK3hVt3A==",
+ "version": "1.0.30001778",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001778.tgz",
+ "integrity": "sha512-PN7uxFL+ExFJO61aVmP1aIEG4i9whQd4eoSCebav62UwDyp5OHh06zN4jqKSMePVgxHifCw1QJxdRkA1Pisekg==",
"dev": true,
"funding": [
{
@@ -1756,9 +1782,9 @@
}
},
"node_modules/electron-to-chromium": {
- "version": "1.5.302",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.302.tgz",
- "integrity": "sha512-sM6HAN2LyK82IyPBpznDRqlTQAtuSaO+ShzFiWTvoMJLHyZ+Y39r8VMfHzwbU8MVBzQ4Wdn85+wlZl2TLGIlwg==",
+ "version": "1.5.313",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.313.tgz",
+ "integrity": "sha512-QBMrTWEf00GXZmJyx2lbYD45jpI3TUFnNIzJ5BBc8piGUDwMPa1GV6HJWTZVvY/eiN3fSopl7NRbgGp9sZ9LTA==",
"dev": true
},
"node_modules/emoji-regex": {
@@ -1787,9 +1813,9 @@
"dev": true
},
"node_modules/esbuild": {
- "version": "0.27.3",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz",
- "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==",
+ "version": "0.25.12",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz",
+ "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==",
"dev": true,
"hasInstallScript": true,
"bin": {
@@ -1799,32 +1825,32 @@
"node": ">=18"
},
"optionalDependencies": {
- "@esbuild/aix-ppc64": "0.27.3",
- "@esbuild/android-arm": "0.27.3",
- "@esbuild/android-arm64": "0.27.3",
- "@esbuild/android-x64": "0.27.3",
- "@esbuild/darwin-arm64": "0.27.3",
- "@esbuild/darwin-x64": "0.27.3",
- "@esbuild/freebsd-arm64": "0.27.3",
- "@esbuild/freebsd-x64": "0.27.3",
- "@esbuild/linux-arm": "0.27.3",
- "@esbuild/linux-arm64": "0.27.3",
- "@esbuild/linux-ia32": "0.27.3",
- "@esbuild/linux-loong64": "0.27.3",
- "@esbuild/linux-mips64el": "0.27.3",
- "@esbuild/linux-ppc64": "0.27.3",
- "@esbuild/linux-riscv64": "0.27.3",
- "@esbuild/linux-s390x": "0.27.3",
- "@esbuild/linux-x64": "0.27.3",
- "@esbuild/netbsd-arm64": "0.27.3",
- "@esbuild/netbsd-x64": "0.27.3",
- "@esbuild/openbsd-arm64": "0.27.3",
- "@esbuild/openbsd-x64": "0.27.3",
- "@esbuild/openharmony-arm64": "0.27.3",
- "@esbuild/sunos-x64": "0.27.3",
- "@esbuild/win32-arm64": "0.27.3",
- "@esbuild/win32-ia32": "0.27.3",
- "@esbuild/win32-x64": "0.27.3"
+ "@esbuild/aix-ppc64": "0.25.12",
+ "@esbuild/android-arm": "0.25.12",
+ "@esbuild/android-arm64": "0.25.12",
+ "@esbuild/android-x64": "0.25.12",
+ "@esbuild/darwin-arm64": "0.25.12",
+ "@esbuild/darwin-x64": "0.25.12",
+ "@esbuild/freebsd-arm64": "0.25.12",
+ "@esbuild/freebsd-x64": "0.25.12",
+ "@esbuild/linux-arm": "0.25.12",
+ "@esbuild/linux-arm64": "0.25.12",
+ "@esbuild/linux-ia32": "0.25.12",
+ "@esbuild/linux-loong64": "0.25.12",
+ "@esbuild/linux-mips64el": "0.25.12",
+ "@esbuild/linux-ppc64": "0.25.12",
+ "@esbuild/linux-riscv64": "0.25.12",
+ "@esbuild/linux-s390x": "0.25.12",
+ "@esbuild/linux-x64": "0.25.12",
+ "@esbuild/netbsd-arm64": "0.25.12",
+ "@esbuild/netbsd-x64": "0.25.12",
+ "@esbuild/openbsd-arm64": "0.25.12",
+ "@esbuild/openbsd-x64": "0.25.12",
+ "@esbuild/openharmony-arm64": "0.25.12",
+ "@esbuild/sunos-x64": "0.25.12",
+ "@esbuild/win32-arm64": "0.25.12",
+ "@esbuild/win32-ia32": "0.25.12",
+ "@esbuild/win32-x64": "0.25.12"
}
},
"node_modules/escalade": {
@@ -1975,9 +2001,9 @@
"dev": true
},
"node_modules/graphql": {
- "version": "16.13.0",
- "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.13.0.tgz",
- "integrity": "sha512-uSisMYERbaB9bkA9M4/4dnqyktaEkf1kMHNKq/7DHyxVeWqHQ2mBmVqm5u6/FVHwF3iCNalKcg82Zfl+tffWoA==",
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.13.1.tgz",
+ "integrity": "sha512-gGgrVCoDKlIZ8fIqXBBb0pPKqDgki0Z/FSKNiQzSGj2uEYHr1tq5wmBegGwJx6QB5S5cM0khSBpi/JFHMCvsmQ==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0"
@@ -2222,9 +2248,9 @@
"dev": true
},
"node_modules/node-releases": {
- "version": "2.0.27",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz",
- "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==",
+ "version": "2.0.36",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz",
+ "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==",
"dev": true
},
"node_modules/outvariant": {
@@ -2328,15 +2354,6 @@
"node": "^10 || ^12 || >=14"
}
},
- "node_modules/randombytes": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
- "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
- "dev": true,
- "dependencies": {
- "safe-buffer": "^5.1.0"
- }
- },
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -2405,26 +2422,6 @@
"fsevents": "~2.3.2"
}
},
- "node_modules/safe-buffer": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ]
- },
"node_modules/schema-utils": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz",
@@ -2456,15 +2453,6 @@
"node": ">=10"
}
},
- "node_modules/serialize-javascript": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
- "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
- "dev": true,
- "dependencies": {
- "randombytes": "^2.1.0"
- }
- },
"node_modules/siginfo": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
@@ -2629,15 +2617,14 @@
}
},
"node_modules/terser-webpack-plugin": {
- "version": "5.3.16",
- "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.16.tgz",
- "integrity": "sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q==",
+ "version": "5.4.0",
+ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.4.0.tgz",
+ "integrity": "sha512-Bn5vxm48flOIfkdl5CaD2+1CiUVbonWQ3KQPyP7/EuIl9Gbzq/gQFOzaMFUEgVjB1396tcK0SG8XcNJ/2kDH8g==",
"dev": true,
"dependencies": {
"@jridgewell/trace-mapping": "^0.3.25",
"jest-worker": "^27.4.5",
"schema-utils": "^4.3.0",
- "serialize-javascript": "^6.0.2",
"terser": "^5.31.1"
},
"engines": {
@@ -2747,21 +2734,21 @@
}
},
"node_modules/tldts": {
- "version": "7.0.24",
- "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.0.24.tgz",
- "integrity": "sha512-1r6vQTTt1rUiJkI5vX7KG8PR342Ru/5Oh13kEQP2SMbRSZpOey9SrBe27IDxkoWulx8ShWu4K6C0BkctP8Z1bQ==",
+ "version": "7.0.25",
+ "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.0.25.tgz",
+ "integrity": "sha512-keinCnPbwXEUG3ilrWQZU+CqcTTzHq9m2HhoUP2l7Xmi8l1LuijAXLpAJ5zRW+ifKTNscs4NdCkfkDCBYm352w==",
"dev": true,
"dependencies": {
- "tldts-core": "^7.0.24"
+ "tldts-core": "^7.0.25"
},
"bin": {
"tldts": "bin/cli.js"
}
},
"node_modules/tldts-core": {
- "version": "7.0.24",
- "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.24.tgz",
- "integrity": "sha512-pj7yygNMoMRqG7ML2SDQ0xNIOfN3IBDUcPVM2Sg6hP96oFNN2nqnzHreT3z9xLq85IWJyNTvD38O002DdOrPMw==",
+ "version": "7.0.25",
+ "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.25.tgz",
+ "integrity": "sha512-ZjCZK0rppSBu7rjHYDYsEaMOIbbT+nWF57hKkv4IUmZWBNrBWBOjIElc0mKRgLM8bm7x/BBlof6t2gi/Oq/Asw==",
"dev": true
},
"node_modules/to-regex-range": {
@@ -2777,9 +2764,9 @@
}
},
"node_modules/tough-cookie": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.0.tgz",
- "integrity": "sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w==",
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.1.tgz",
+ "integrity": "sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==",
"dev": true,
"dependencies": {
"tldts": "^7.0.5"
@@ -2869,6 +2856,80 @@
"browserslist": ">= 4.21.0"
}
},
+ "node_modules/vite": {
+ "version": "6.4.1",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz",
+ "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
+ "dev": true,
+ "dependencies": {
+ "esbuild": "^0.25.0",
+ "fdir": "^6.4.4",
+ "picomatch": "^4.0.2",
+ "postcss": "^8.5.3",
+ "rollup": "^4.34.9",
+ "tinyglobby": "^0.2.13"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^18.0.0 || ^20.0.0 || >=22.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ },
+ "peerDependencies": {
+ "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
+ "jiti": ">=1.21.0",
+ "less": "*",
+ "lightningcss": "^1.21.0",
+ "sass": "*",
+ "sass-embedded": "*",
+ "stylus": "*",
+ "sugarss": "*",
+ "terser": "^5.16.0",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "jiti": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "lightningcss": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
+ }
+ }
+ },
"node_modules/vite-node": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz",
@@ -2891,18 +2952,7 @@
"url": "https://opencollective.com/vitest"
}
},
- "node_modules/vite-node/node_modules/@types/node": {
- "version": "25.3.3",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.3.tgz",
- "integrity": "sha512-DpzbrH7wIcBaJibpKo9nnSQL0MTRdnWttGyE5haGwK86xgMOkFLp7vEyfQPGLOJh5wNYiJ3V9PmUMDhV9u8kkQ==",
- "dev": true,
- "optional": true,
- "peer": true,
- "dependencies": {
- "undici-types": "~7.18.0"
- }
- },
- "node_modules/vite-node/node_modules/fdir": {
+ "node_modules/vite/node_modules/fdir": {
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
@@ -2919,7 +2969,7 @@
}
}
},
- "node_modules/vite-node/node_modules/fsevents": {
+ "node_modules/vite/node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
@@ -2933,7 +2983,7 @@
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
- "node_modules/vite-node/node_modules/picomatch": {
+ "node_modules/vite/node_modules/picomatch": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
@@ -2945,88 +2995,6 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
- "node_modules/vite-node/node_modules/undici-types": {
- "version": "7.18.2",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
- "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
- "dev": true,
- "optional": true,
- "peer": true
- },
- "node_modules/vite-node/node_modules/vite": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.1.tgz",
- "integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==",
- "dev": true,
- "dependencies": {
- "esbuild": "^0.27.0",
- "fdir": "^6.5.0",
- "picomatch": "^4.0.3",
- "postcss": "^8.5.6",
- "rollup": "^4.43.0",
- "tinyglobby": "^0.2.15"
- },
- "bin": {
- "vite": "bin/vite.js"
- },
- "engines": {
- "node": "^20.19.0 || >=22.12.0"
- },
- "funding": {
- "url": "https://github.com/vitejs/vite?sponsor=1"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.3"
- },
- "peerDependencies": {
- "@types/node": "^20.19.0 || >=22.12.0",
- "jiti": ">=1.21.0",
- "less": "^4.0.0",
- "lightningcss": "^1.21.0",
- "sass": "^1.70.0",
- "sass-embedded": "^1.70.0",
- "stylus": ">=0.54.8",
- "sugarss": "^5.0.0",
- "terser": "^5.16.0",
- "tsx": "^4.8.1",
- "yaml": "^2.4.2"
- },
- "peerDependenciesMeta": {
- "@types/node": {
- "optional": true
- },
- "jiti": {
- "optional": true
- },
- "less": {
- "optional": true
- },
- "lightningcss": {
- "optional": true
- },
- "sass": {
- "optional": true
- },
- "sass-embedded": {
- "optional": true
- },
- "stylus": {
- "optional": true
- },
- "sugarss": {
- "optional": true
- },
- "terser": {
- "optional": true
- },
- "tsx": {
- "optional": true
- },
- "yaml": {
- "optional": true
- }
- }
- },
"node_modules/vitest": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz",
@@ -3099,63 +3067,6 @@
}
}
},
- "node_modules/vitest/node_modules/@vitest/mocker": {
- "version": "3.2.4",
- "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz",
- "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==",
- "dev": true,
- "dependencies": {
- "@vitest/spy": "3.2.4",
- "estree-walker": "^3.0.3",
- "magic-string": "^0.30.17"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- },
- "peerDependencies": {
- "msw": "^2.4.9",
- "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0"
- },
- "peerDependenciesMeta": {
- "msw": {
- "optional": true
- },
- "vite": {
- "optional": true
- }
- }
- },
- "node_modules/vitest/node_modules/fdir": {
- "version": "6.5.0",
- "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
- "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
- "dev": true,
- "engines": {
- "node": ">=12.0.0"
- },
- "peerDependencies": {
- "picomatch": "^3 || ^4"
- },
- "peerDependenciesMeta": {
- "picomatch": {
- "optional": true
- }
- }
- },
- "node_modules/vitest/node_modules/fsevents": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
- "dev": true,
- "hasInstallScript": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
"node_modules/vitest/node_modules/picomatch": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
@@ -3168,80 +3079,6 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
- "node_modules/vitest/node_modules/vite": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.1.tgz",
- "integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==",
- "dev": true,
- "dependencies": {
- "esbuild": "^0.27.0",
- "fdir": "^6.5.0",
- "picomatch": "^4.0.3",
- "postcss": "^8.5.6",
- "rollup": "^4.43.0",
- "tinyglobby": "^0.2.15"
- },
- "bin": {
- "vite": "bin/vite.js"
- },
- "engines": {
- "node": "^20.19.0 || >=22.12.0"
- },
- "funding": {
- "url": "https://github.com/vitejs/vite?sponsor=1"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.3"
- },
- "peerDependencies": {
- "@types/node": "^20.19.0 || >=22.12.0",
- "jiti": ">=1.21.0",
- "less": "^4.0.0",
- "lightningcss": "^1.21.0",
- "sass": "^1.70.0",
- "sass-embedded": "^1.70.0",
- "stylus": ">=0.54.8",
- "sugarss": "^5.0.0",
- "terser": "^5.16.0",
- "tsx": "^4.8.1",
- "yaml": "^2.4.2"
- },
- "peerDependenciesMeta": {
- "@types/node": {
- "optional": true
- },
- "jiti": {
- "optional": true
- },
- "less": {
- "optional": true
- },
- "lightningcss": {
- "optional": true
- },
- "sass": {
- "optional": true
- },
- "sass-embedded": {
- "optional": true
- },
- "stylus": {
- "optional": true
- },
- "sugarss": {
- "optional": true
- },
- "terser": {
- "optional": true
- },
- "tsx": {
- "optional": true
- },
- "yaml": {
- "optional": true
- }
- }
- },
"node_modules/watchpack": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.1.tgz",
@@ -3256,9 +3093,9 @@
}
},
"node_modules/webpack": {
- "version": "5.105.3",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.105.3.tgz",
- "integrity": "sha512-LLBBA4oLmT7sZdHiYE/PeVuifOxYyE2uL/V+9VQP7YSYdJU7bSf7H8bZRRxW8kEPMkmVjnrXmoR3oejIdX0xbg==",
+ "version": "5.105.4",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.105.4.tgz",
+ "integrity": "sha512-jTywjboN9aHxFlToqb0K0Zs9SbBoW4zRUlGzI2tYNxVYcEi/IPpn+Xi4ye5jTLvX2YeLuic/IvxNot+Q1jMoOw==",
"dev": true,
"dependencies": {
"@types/eslint-scope": "^3.7.7",
@@ -3271,7 +3108,7 @@
"acorn-import-phases": "^1.0.3",
"browserslist": "^4.28.1",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.19.0",
+ "enhanced-resolve": "^5.20.0",
"es-module-lexer": "^2.0.0",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
@@ -3283,7 +3120,7 @@
"neo-async": "^2.6.2",
"schema-utils": "^4.3.3",
"tapable": "^2.3.0",
- "terser-webpack-plugin": "^5.3.16",
+ "terser-webpack-plugin": "^5.3.17",
"watchpack": "^2.5.1",
"webpack-sources": "^3.3.4"
},
diff --git a/skyvern-ts/client/package.json b/skyvern-ts/client/package.json
index 221335fb0..80d6db20a 100644
--- a/skyvern-ts/client/package.json
+++ b/skyvern-ts/client/package.json
@@ -1,6 +1,6 @@
{
"name": "@skyvern/client",
- "version": "1.0.23",
+ "version": "1.0.24",
"private": false,
"repository": {
"type": "git",
diff --git a/skyvern-ts/client/reference.md b/skyvern-ts/client/reference.md
index 933607e64..74cf9f484 100644
--- a/skyvern-ts/client/reference.md
+++ b/skyvern-ts/client/reference.md
@@ -1,5 +1,5 @@
# Reference
-<details><summary><code>client.<a href="/src/Client.ts">changeTierApiV1BillingChangeTierPost</a>({ ...params }) -> Skyvern.ChangeTierResponse</code></summary>
+<details><summary><code>client.<a href="/src/Client.ts">updateWorkflowFolder</a>(workflowPermanentId, { ...params }) -> Skyvern.Workflow</code></summary>
<dl>
<dd>
@@ -11,10 +11,7 @@
<dl>
<dd>
-Redirect to Stripe Portal for tier changes.
-Portal handles proration based on configured settings:
-- Upgrades: Immediate proration charge
-- Downgrades: Apply at end of billing period
+Update a workflow's folder assignment for the latest version
</dd>
</dl>
</dd>
@@ -29,9 +26,7 @@ Portal handles proration based on configured settings:
<dd>
```typescript
-await client.changeTierApiV1BillingChangeTierPost({
- tier: "free"
-});
+await client.updateWorkflowFolder("wpid_123");
```
</dd>
@@ -47,7 +42,15 @@ await client.changeTierApiV1BillingChangeTierPost({
<dl>
<dd>
-**request:** `Skyvern.ChangeTierRequest`
+**workflowPermanentId:** `string` — Workflow permanent ID
+
+</dd>
+</dl>
+
+<dl>
+<dd>
+
+**request:** `Skyvern.UpdateWorkflowFolderRequest`
</dd>
</dl>
diff --git a/skyvern-ts/client/src/Client.ts b/skyvern-ts/client/src/Client.ts
index 001b5e25e..16d539a62 100644
--- a/skyvern-ts/client/src/Client.ts
+++ b/skyvern-ts/client/src/Client.ts
@@ -26,8 +26,8 @@ export class SkyvernClient {
"x-api-key": _options?.apiKey,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@skyvern/client",
- "X-Fern-SDK-Version": "1.0.23",
- "User-Agent": "@skyvern/client/1.0.23",
+ "X-Fern-SDK-Version": "1.0.24",
+ "User-Agent": "@skyvern/client/1.0.24",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -1912,6 +1912,7 @@ export class SkyvernClient {
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.ForbiddenError}
+ * @throws {@link Skyvern.NotFoundError}
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
@@ -1958,6 +1959,8 @@ export class SkyvernClient {
switch (_response.error.statusCode) {
case 403:
throw new Skyvern.ForbiddenError(_response.error.body as unknown, _response.rawResponse);
+ case 404:
+ throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse);
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
@@ -3139,83 +3142,6 @@ export class SkyvernClient {
}
}
- /**
- * Clear all cached scripts for a specific workflow. This will trigger script regeneration on subsequent runs.
- *
- * @param {string} workflowPermanentId - The workflow permanent ID to clear cache for
- * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
- *
- * @throws {@link Skyvern.UnprocessableEntityError}
- *
- * @example
- * await client.clearWorkflowCache("wpid_abc123")
- */
- public clearWorkflowCache(
- workflowPermanentId: string,
- requestOptions?: SkyvernClient.RequestOptions,
- ): core.HttpResponsePromise<Skyvern.ClearCacheResponse> {
- return core.HttpResponsePromise.fromPromise(this.__clearWorkflowCache(workflowPermanentId, requestOptions));
- }
-
- private async __clearWorkflowCache(
- workflowPermanentId: string,
- requestOptions?: SkyvernClient.RequestOptions,
- ): Promise<core.WithRawResponse<Skyvern.ClearCacheResponse>> {
- const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
- this._options?.headers,
- mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
- requestOptions?.headers,
- );
- const _response = await core.fetcher({
- url: core.url.join(
- (await core.Supplier.get(this._options.baseUrl)) ??
- (await core.Supplier.get(this._options.environment)) ??
- environments.SkyvernEnvironment.Cloud,
- `v1/scripts/${core.url.encodePathParam(workflowPermanentId)}/cache`,
- ),
- method: "DELETE",
- headers: _headers,
- queryParameters: requestOptions?.queryParams,
- timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
- maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
- abortSignal: requestOptions?.abortSignal,
- });
- if (_response.ok) {
- return { data: _response.body as Skyvern.ClearCacheResponse, rawResponse: _response.rawResponse };
- }
-
- if (_response.error.reason === "status-code") {
- switch (_response.error.statusCode) {
- case 422:
- throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
- default:
- throw new errors.SkyvernError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse,
- });
- }
- }
-
- switch (_response.error.reason) {
- case "non-json":
- throw new errors.SkyvernError({
- statusCode: _response.error.statusCode,
- body: _response.error.rawBody,
- rawResponse: _response.rawResponse,
- });
- case "timeout":
- throw new errors.SkyvernTimeoutError(
- "Timeout exceeded when calling DELETE /v1/scripts/{workflow_permanent_id}/cache.",
- );
- case "unknown":
- throw new errors.SkyvernError({
- message: _response.error.errorMessage,
- rawResponse: _response.rawResponse,
- });
- }
- }
-
/**
* Execute a single SDK action with the specified parameters
*
@@ -3623,4 +3549,522 @@ export class SkyvernClient {
});
}
}
+
+ /**
+ * Get all folders for the organization
+ *
+ * @param {Skyvern.GetFoldersRequest} request
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Skyvern.UnprocessableEntityError}
+ *
+ * @example
+ * await client.getFolders({
+ * page: 1,
+ * page_size: 1,
+ * search: "search"
+ * })
+ */
+ public getFolders(
+ request: Skyvern.GetFoldersRequest = {},
+ requestOptions?: SkyvernClient.RequestOptions,
+ ): core.HttpResponsePromise<Skyvern.Folder[]> {
+ return core.HttpResponsePromise.fromPromise(this.__getFolders(request, requestOptions));
+ }
+
+ private async __getFolders(
+ request: Skyvern.GetFoldersRequest = {},
+ requestOptions?: SkyvernClient.RequestOptions,
+ ): Promise<core.WithRawResponse<Skyvern.Folder[]>> {
+ const { page, page_size: pageSize, search } = request;
+ const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
+ if (page != null) {
+ _queryParams.page = page.toString();
+ }
+
+ if (pageSize != null) {
+ _queryParams.page_size = pageSize.toString();
+ }
+
+ if (search != null) {
+ _queryParams.search = search;
+ }
+
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ requestOptions?.headers,
+ );
+ const _response = await core.fetcher({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)) ??
+ environments.SkyvernEnvironment.Cloud,
+ "v1/folders",
+ ),
+ method: "GET",
+ headers: _headers,
+ queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return { data: _response.body as Skyvern.Folder[], rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
+ default:
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/folders.");
+ case "unknown":
+ throw new errors.SkyvernError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ /**
+ * Create a new folder to organize workflows
+ *
+ * @param {Skyvern.FolderCreate} request
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Skyvern.BadRequestError}
+ * @throws {@link Skyvern.UnprocessableEntityError}
+ *
+ * @example
+ * await client.createFolder({
+ * title: "title"
+ * })
+ */
+ public createFolder(
+ request: Skyvern.FolderCreate,
+ requestOptions?: SkyvernClient.RequestOptions,
+ ): core.HttpResponsePromise<Skyvern.Folder> {
+ return core.HttpResponsePromise.fromPromise(this.__createFolder(request, requestOptions));
+ }
+
+ private async __createFolder(
+ request: Skyvern.FolderCreate,
+ requestOptions?: SkyvernClient.RequestOptions,
+ ): Promise<core.WithRawResponse<Skyvern.Folder>> {
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ requestOptions?.headers,
+ );
+ const _response = await core.fetcher({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)) ??
+ environments.SkyvernEnvironment.Cloud,
+ "v1/folders",
+ ),
+ method: "POST",
+ headers: _headers,
+ contentType: "application/json",
+ queryParameters: requestOptions?.queryParams,
+ requestType: "json",
+ body: request,
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return { data: _response.body as Skyvern.Folder, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 400:
+ throw new Skyvern.BadRequestError(_response.error.body as unknown, _response.rawResponse);
+ case 422:
+ throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
+ default:
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/folders.");
+ case "unknown":
+ throw new errors.SkyvernError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ /**
+ * Get a specific folder by ID
+ *
+ * @param {string} folderId - Folder ID
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Skyvern.NotFoundError}
+ * @throws {@link Skyvern.UnprocessableEntityError}
+ *
+ * @example
+ * await client.getFolder("fld_123")
+ */
+ public getFolder(
+ folderId: string,
+ requestOptions?: SkyvernClient.RequestOptions,
+ ): core.HttpResponsePromise<Skyvern.Folder> {
+ return core.HttpResponsePromise.fromPromise(this.__getFolder(folderId, requestOptions));
+ }
+
+ private async __getFolder(
+ folderId: string,
+ requestOptions?: SkyvernClient.RequestOptions,
+ ): Promise<core.WithRawResponse<Skyvern.Folder>> {
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ requestOptions?.headers,
+ );
+ const _response = await core.fetcher({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)) ??
+ environments.SkyvernEnvironment.Cloud,
+ `v1/folders/${core.url.encodePathParam(folderId)}`,
+ ),
+ method: "GET",
+ headers: _headers,
+ queryParameters: requestOptions?.queryParams,
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return { data: _response.body as Skyvern.Folder, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 404:
+ throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse);
+ case 422:
+ throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
+ default:
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/folders/{folder_id}.");
+ case "unknown":
+ throw new errors.SkyvernError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ /**
+ * Update a folder's title or description
+ *
+ * @param {string} folderId - Folder ID
+ * @param {Skyvern.FolderUpdate} request
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Skyvern.NotFoundError}
+ * @throws {@link Skyvern.UnprocessableEntityError}
+ *
+ * @example
+ * await client.updateFolder("fld_123")
+ */
+ public updateFolder(
+ folderId: string,
+ request: Skyvern.FolderUpdate = {},
+ requestOptions?: SkyvernClient.RequestOptions,
+ ): core.HttpResponsePromise<Skyvern.Folder> {
+ return core.HttpResponsePromise.fromPromise(this.__updateFolder(folderId, request, requestOptions));
+ }
+
+ private async __updateFolder(
+ folderId: string,
+ request: Skyvern.FolderUpdate = {},
+ requestOptions?: SkyvernClient.RequestOptions,
+ ): Promise<core.WithRawResponse<Skyvern.Folder>> {
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ requestOptions?.headers,
+ );
+ const _response = await core.fetcher({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)) ??
+ environments.SkyvernEnvironment.Cloud,
+ `v1/folders/${core.url.encodePathParam(folderId)}`,
+ ),
+ method: "PUT",
+ headers: _headers,
+ contentType: "application/json",
+ queryParameters: requestOptions?.queryParams,
+ requestType: "json",
+ body: request,
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return { data: _response.body as Skyvern.Folder, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 404:
+ throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse);
+ case 422:
+ throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
+ default:
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling PUT /v1/folders/{folder_id}.");
+ case "unknown":
+ throw new errors.SkyvernError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ /**
+ * Delete a folder. Optionally delete all workflows in the folder.
+ *
+ * @param {string} folderId - Folder ID
+ * @param {Skyvern.DeleteFolderRequest} request
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Skyvern.NotFoundError}
+ * @throws {@link Skyvern.UnprocessableEntityError}
+ *
+ * @example
+ * await client.deleteFolder("fld_123", {
+ * delete_workflows: true
+ * })
+ */
+ public deleteFolder(
+ folderId: string,
+ request: Skyvern.DeleteFolderRequest = {},
+ requestOptions?: SkyvernClient.RequestOptions,
+ ): core.HttpResponsePromise<Record<string, unknown>> {
+ return core.HttpResponsePromise.fromPromise(this.__deleteFolder(folderId, request, requestOptions));
+ }
+
+ private async __deleteFolder(
+ folderId: string,
+ request: Skyvern.DeleteFolderRequest = {},
+ requestOptions?: SkyvernClient.RequestOptions,
+ ): Promise<core.WithRawResponse<Record<string, unknown>>> {
+ const { delete_workflows: deleteWorkflows } = request;
+ const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
+ if (deleteWorkflows != null) {
+ _queryParams.delete_workflows = deleteWorkflows.toString();
+ }
+
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ requestOptions?.headers,
+ );
+ const _response = await core.fetcher({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)) ??
+ environments.SkyvernEnvironment.Cloud,
+ `v1/folders/${core.url.encodePathParam(folderId)}`,
+ ),
+ method: "DELETE",
+ headers: _headers,
+ queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return { data: _response.body as Record<string, unknown>, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 404:
+ throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse);
+ case 422:
+ throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
+ default:
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling DELETE /v1/folders/{folder_id}.");
+ case "unknown":
+ throw new errors.SkyvernError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ /**
+ * Update a workflow's folder assignment for the latest version
+ *
+ * @param {string} workflowPermanentId - Workflow permanent ID
+ * @param {Skyvern.UpdateWorkflowFolderRequest} request
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Skyvern.BadRequestError}
+ * @throws {@link Skyvern.NotFoundError}
+ * @throws {@link Skyvern.UnprocessableEntityError}
+ *
+ * @example
+ * await client.updateWorkflowFolder("wpid_123")
+ */
+ public updateWorkflowFolder(
+ workflowPermanentId: string,
+ request: Skyvern.UpdateWorkflowFolderRequest = {},
+ requestOptions?: SkyvernClient.RequestOptions,
+ ): core.HttpResponsePromise<Skyvern.Workflow> {
+ return core.HttpResponsePromise.fromPromise(
+ this.__updateWorkflowFolder(workflowPermanentId, request, requestOptions),
+ );
+ }
+
+ private async __updateWorkflowFolder(
+ workflowPermanentId: string,
+ request: Skyvern.UpdateWorkflowFolderRequest = {},
+ requestOptions?: SkyvernClient.RequestOptions,
+ ): Promise<core.WithRawResponse<Skyvern.Workflow>> {
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ requestOptions?.headers,
+ );
+ const _response = await core.fetcher({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)) ??
+ environments.SkyvernEnvironment.Cloud,
+ `v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/folder`,
+ ),
+ method: "PUT",
+ headers: _headers,
+ contentType: "application/json",
+ queryParameters: requestOptions?.queryParams,
+ requestType: "json",
+ body: request,
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return { data: _response.body as Skyvern.Workflow, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 400:
+ throw new Skyvern.BadRequestError(_response.error.body as unknown, _response.rawResponse);
+ case 404:
+ throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse);
+ case 422:
+ throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
+ default:
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SkyvernTimeoutError(
+ "Timeout exceeded when calling PUT /v1/workflows/{workflow_permanent_id}/folder.",
+ );
+ case "unknown":
+ throw new errors.SkyvernError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
}
diff --git a/skyvern-ts/client/src/api/client/requests/CreateBrowserSessionRequest.ts b/skyvern-ts/client/src/api/client/requests/CreateBrowserSessionRequest.ts
index 41f764f35..6d3217de5 100644
--- a/skyvern-ts/client/src/api/client/requests/CreateBrowserSessionRequest.ts
+++ b/skyvern-ts/client/src/api/client/requests/CreateBrowserSessionRequest.ts
@@ -23,9 +23,16 @@ export interface CreateBrowserSessionRequest {
* - RESIDENTIAL_DE: Germany
* - RESIDENTIAL_NZ: New Zealand
* - RESIDENTIAL_PH: Philippines
+ * - RESIDENTIAL_KR: South Korea
* - RESIDENTIAL_ZA: South Africa
* - RESIDENTIAL_AR: Argentina
* - RESIDENTIAL_AU: Australia
+ * - RESIDENTIAL_BR: Brazil
+ * - RESIDENTIAL_TR: Turkey
+ * - RESIDENTIAL_CA: Canada
+ * - RESIDENTIAL_MX: Mexico
+ * - RESIDENTIAL_IT: Italy
+ * - RESIDENTIAL_NL: Netherlands
* - RESIDENTIAL_ISP: ISP proxy
* - US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
* - US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
@@ -39,4 +46,6 @@ export interface CreateBrowserSessionRequest {
extensions?: Skyvern.Extensions[];
/** The type of browser to use for the session. */
browser_type?: Skyvern.PersistentBrowserType;
+ /** ID of a browser profile to load into this session (restores cookies, localStorage, etc.). browser_profile_id starts with `bp_`. */
+ browser_profile_id?: string;
}
diff --git a/skyvern-ts/client/src/api/client/requests/DeleteFolderRequest.ts b/skyvern-ts/client/src/api/client/requests/DeleteFolderRequest.ts
new file mode 100644
index 000000000..2ef46b104
--- /dev/null
+++ b/skyvern-ts/client/src/api/client/requests/DeleteFolderRequest.ts
@@ -0,0 +1,12 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {
+ * delete_workflows: true
+ * }
+ */
+export interface DeleteFolderRequest {
+ /** If true, also delete all workflows in this folder */
+ delete_workflows?: boolean;
+}
diff --git a/skyvern-ts/client/src/api/client/requests/FolderCreate.ts b/skyvern-ts/client/src/api/client/requests/FolderCreate.ts
new file mode 100644
index 000000000..9f8672e6d
--- /dev/null
+++ b/skyvern-ts/client/src/api/client/requests/FolderCreate.ts
@@ -0,0 +1,14 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {
+ * title: "title"
+ * }
+ */
+export interface FolderCreate {
+ /** Folder title */
+ title: string;
+ /** Folder description */
+ description?: string;
+}
diff --git a/skyvern-ts/client/src/api/client/requests/FolderUpdate.ts b/skyvern-ts/client/src/api/client/requests/FolderUpdate.ts
new file mode 100644
index 000000000..a254c1201
--- /dev/null
+++ b/skyvern-ts/client/src/api/client/requests/FolderUpdate.ts
@@ -0,0 +1,12 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {}
+ */
+export interface FolderUpdate {
+ /** Folder title */
+ title?: string;
+ /** Folder description */
+ description?: string;
+}
diff --git a/skyvern-ts/client/src/api/client/requests/GetFoldersRequest.ts b/skyvern-ts/client/src/api/client/requests/GetFoldersRequest.ts
new file mode 100644
index 000000000..fe51a7d6b
--- /dev/null
+++ b/skyvern-ts/client/src/api/client/requests/GetFoldersRequest.ts
@@ -0,0 +1,18 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {
+ * page: 1,
+ * page_size: 1,
+ * search: "search"
+ * }
+ */
+export interface GetFoldersRequest {
+ /** Page number */
+ page?: number;
+ /** Number of folders per page */
+ page_size?: number;
+ /** Search folders by title or description */
+ search?: string;
+}
diff --git a/skyvern-ts/client/src/api/client/requests/UpdateWorkflowFolderRequest.ts b/skyvern-ts/client/src/api/client/requests/UpdateWorkflowFolderRequest.ts
new file mode 100644
index 000000000..52a60875f
--- /dev/null
+++ b/skyvern-ts/client/src/api/client/requests/UpdateWorkflowFolderRequest.ts
@@ -0,0 +1,10 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {}
+ */
+export interface UpdateWorkflowFolderRequest {
+ /** Folder ID to assign workflow to. Set to null to remove from folder. */
+ folder_id?: string;
+}
diff --git a/skyvern-ts/client/src/api/client/requests/index.ts b/skyvern-ts/client/src/api/client/requests/index.ts
index 86ae5676f..8061032d6 100644
--- a/skyvern-ts/client/src/api/client/requests/index.ts
+++ b/skyvern-ts/client/src/api/client/requests/index.ts
@@ -5,9 +5,13 @@ export type { CreateBrowserProfileRequest } from "./CreateBrowserProfileRequest.
export type { CreateBrowserSessionRequest } from "./CreateBrowserSessionRequest.js";
export type { CreateScriptRequest } from "./CreateScriptRequest.js";
export type { CreateWorkflowRequest } from "./CreateWorkflowRequest.js";
+export type { DeleteFolderRequest } from "./DeleteFolderRequest.js";
export type { DeployScriptRequest } from "./DeployScriptRequest.js";
export type { DownloadFilesRequest } from "./DownloadFilesRequest.js";
+export type { FolderCreate } from "./FolderCreate.js";
+export type { FolderUpdate } from "./FolderUpdate.js";
export type { GetCredentialsRequest } from "./GetCredentialsRequest.js";
+export type { GetFoldersRequest } from "./GetFoldersRequest.js";
export type { GetRunArtifactsRequest } from "./GetRunArtifactsRequest.js";
export type { GetScriptsRequest } from "./GetScriptsRequest.js";
export type { GetWorkflowRequest } from "./GetWorkflowRequest.js";
@@ -20,3 +24,4 @@ export type { RunSdkActionRequest } from "./RunSdkActionRequest.js";
export type { RunTaskRequest } from "./RunTaskRequest.js";
export type { RunWorkflowRequest } from "./RunWorkflowRequest.js";
export type { TotpCodeCreate } from "./TotpCodeCreate.js";
+export type { UpdateWorkflowFolderRequest } from "./UpdateWorkflowFolderRequest.js";
diff --git a/skyvern-ts/client/src/api/types/BlockType.ts b/skyvern-ts/client/src/api/types/BlockType.ts
index 18811e4ce..ac42e9b34 100644
--- a/skyvern-ts/client/src/api/types/BlockType.ts
+++ b/skyvern-ts/client/src/api/types/BlockType.ts
@@ -24,5 +24,6 @@ export const BlockType = {
HttpRequest: "http_request",
HumanInteraction: "human_interaction",
PrintPage: "print_page",
+ WorkflowTrigger: "workflow_trigger",
} as const;
export type BlockType = (typeof BlockType)[keyof typeof BlockType];
diff --git a/skyvern-ts/client/src/api/types/BrowserSessionResponse.ts b/skyvern-ts/client/src/api/types/BrowserSessionResponse.ts
index 8af637771..e2481d1aa 100644
--- a/skyvern-ts/client/src/api/types/BrowserSessionResponse.ts
+++ b/skyvern-ts/client/src/api/types/BrowserSessionResponse.ts
@@ -26,6 +26,8 @@ export interface BrowserSessionResponse {
extensions?: Skyvern.Extensions[];
/** The type of browser used for the session. */
browser_type?: Skyvern.PersistentBrowserType;
+ /** ID of the browser profile loaded into this session, if any. browser_profile_id starts with `bp_`. */
+ browser_profile_id?: string;
/** Whether the browser session supports VNC streaming */
vnc_streaming_supported?: boolean;
/** The path where the browser session downloads files */
diff --git a/skyvern-ts/client/src/api/types/ClearCacheResponse.ts b/skyvern-ts/client/src/api/types/ClearCacheResponse.ts
deleted file mode 100644
index 4a0325600..000000000
--- a/skyvern-ts/client/src/api/types/ClearCacheResponse.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-// This file was auto-generated by Fern from our API Definition.
-
-/**
- * Response model for cache clearing operations.
- */
-export interface ClearCacheResponse {
- /** Number of cached entries deleted */
- deleted_count: number;
- /** Status message */
- message: string;
-}
diff --git a/skyvern-ts/client/src/api/types/Folder.ts b/skyvern-ts/client/src/api/types/Folder.ts
new file mode 100644
index 000000000..57622c344
--- /dev/null
+++ b/skyvern-ts/client/src/api/types/Folder.ts
@@ -0,0 +1,17 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * Response model for a folder
+ */
+export interface Folder {
+ /** Folder title */
+ title: string;
+ /** Folder description */
+ description?: string;
+ folder_id: string;
+ organization_id: string;
+ /** Number of workflows in this folder */
+ workflow_count?: number;
+ created_at: string;
+ modified_at: string;
+}
diff --git a/skyvern-ts/client/src/api/types/ForLoopBlockLoopBlocksItem.ts b/skyvern-ts/client/src/api/types/ForLoopBlockLoopBlocksItem.ts
index b1fb205e7..edd1c401d 100644
--- a/skyvern-ts/client/src/api/types/ForLoopBlockLoopBlocksItem.ts
+++ b/skyvern-ts/client/src/api/types/ForLoopBlockLoopBlocksItem.ts
@@ -25,7 +25,8 @@ export type ForLoopBlockLoopBlocksItem =
| Skyvern.ForLoopBlockLoopBlocksItem.TextPrompt
| Skyvern.ForLoopBlockLoopBlocksItem.UploadToS3
| Skyvern.ForLoopBlockLoopBlocksItem.Validation
- | Skyvern.ForLoopBlockLoopBlocksItem.Wait;
+ | Skyvern.ForLoopBlockLoopBlocksItem.Wait
+ | Skyvern.ForLoopBlockLoopBlocksItem.WorkflowTrigger;
export namespace ForLoopBlockLoopBlocksItem {
export interface Action extends Skyvern.ActionBlock {
@@ -119,4 +120,8 @@ export namespace ForLoopBlockLoopBlocksItem {
export interface Wait extends Skyvern.WaitBlock {
block_type: "wait";
}
+
+ export interface WorkflowTrigger extends Skyvern.WorkflowTriggerBlock {
+ block_type: "workflow_trigger";
+ }
}
diff --git a/skyvern-ts/client/src/api/types/ForLoopBlockYamlLoopBlocksItem.ts b/skyvern-ts/client/src/api/types/ForLoopBlockYamlLoopBlocksItem.ts
index e8915d16b..1ea25f3ff 100644
--- a/skyvern-ts/client/src/api/types/ForLoopBlockYamlLoopBlocksItem.ts
+++ b/skyvern-ts/client/src/api/types/ForLoopBlockYamlLoopBlocksItem.ts
@@ -25,7 +25,8 @@ export type ForLoopBlockYamlLoopBlocksItem =
| Skyvern.ForLoopBlockYamlLoopBlocksItem.TaskV2
| Skyvern.ForLoopBlockYamlLoopBlocksItem.HttpRequest
| Skyvern.ForLoopBlockYamlLoopBlocksItem.Conditional
- | Skyvern.ForLoopBlockYamlLoopBlocksItem.PrintPage;
+ | Skyvern.ForLoopBlockYamlLoopBlocksItem.PrintPage
+ | Skyvern.ForLoopBlockYamlLoopBlocksItem.WorkflowTrigger;
export namespace ForLoopBlockYamlLoopBlocksItem {
export interface Task extends Skyvern.TaskBlockYaml {
@@ -119,4 +120,8 @@ export namespace ForLoopBlockYamlLoopBlocksItem {
export interface PrintPage extends Skyvern.PrintPageBlockYaml {
block_type: "print_page";
}
+
+ export interface WorkflowTrigger extends Skyvern.WorkflowTriggerBlockYaml {
+ block_type: "workflow_trigger";
+ }
}
diff --git a/skyvern-ts/client/src/api/types/TaskRunRequest.ts b/skyvern-ts/client/src/api/types/TaskRunRequest.ts
index 5984617a6..bdf719df0 100644
--- a/skyvern-ts/client/src/api/types/TaskRunRequest.ts
+++ b/skyvern-ts/client/src/api/types/TaskRunRequest.ts
@@ -31,9 +31,16 @@ export interface TaskRunRequest {
* - RESIDENTIAL_DE: Germany
* - RESIDENTIAL_NZ: New Zealand
* - RESIDENTIAL_PH: Philippines
+ * - RESIDENTIAL_KR: South Korea
* - RESIDENTIAL_ZA: South Africa
* - RESIDENTIAL_AR: Argentina
* - RESIDENTIAL_AU: Australia
+ * - RESIDENTIAL_BR: Brazil
+ * - RESIDENTIAL_TR: Turkey
+ * - RESIDENTIAL_CA: Canada
+ * - RESIDENTIAL_MX: Mexico
+ * - RESIDENTIAL_IT: Italy
+ * - RESIDENTIAL_NL: Netherlands
* - RESIDENTIAL_ISP: ISP proxy
* - US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
* - US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
@@ -106,9 +113,16 @@ export namespace TaskRunRequest {
* - RESIDENTIAL_DE: Germany
* - RESIDENTIAL_NZ: New Zealand
* - RESIDENTIAL_PH: Philippines
+ * - RESIDENTIAL_KR: South Korea
* - RESIDENTIAL_ZA: South Africa
* - RESIDENTIAL_AR: Argentina
* - RESIDENTIAL_AU: Australia
+ * - RESIDENTIAL_BR: Brazil
+ * - RESIDENTIAL_TR: Turkey
+ * - RESIDENTIAL_CA: Canada
+ * - RESIDENTIAL_MX: Mexico
+ * - RESIDENTIAL_IT: Italy
+ * - RESIDENTIAL_NL: Netherlands
* - RESIDENTIAL_ISP: ISP proxy
* - US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
* - US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
diff --git a/skyvern-ts/client/src/api/types/Workflow.ts b/skyvern-ts/client/src/api/types/Workflow.ts
index b6b4c066b..847cc84e9 100644
--- a/skyvern-ts/client/src/api/types/Workflow.ts
+++ b/skyvern-ts/client/src/api/types/Workflow.ts
@@ -24,6 +24,8 @@ export interface Workflow {
run_with?: string;
ai_fallback?: boolean;
cache_key?: string;
+ adaptive_caching?: boolean;
+ generate_script_on_terminal?: boolean;
run_sequentially?: boolean;
sequential_key?: string;
folder_id?: string;
diff --git a/skyvern-ts/client/src/api/types/WorkflowCreateYamlRequest.ts b/skyvern-ts/client/src/api/types/WorkflowCreateYamlRequest.ts
index d6dbc5fd9..26d0bbfae 100644
--- a/skyvern-ts/client/src/api/types/WorkflowCreateYamlRequest.ts
+++ b/skyvern-ts/client/src/api/types/WorkflowCreateYamlRequest.ts
@@ -19,6 +19,8 @@ export interface WorkflowCreateYamlRequest {
run_with?: string;
ai_fallback?: boolean;
cache_key?: string;
+ adaptive_caching?: boolean;
+ generate_script_on_terminal?: boolean;
run_sequentially?: boolean;
sequential_key?: string;
folder_id?: string;
diff --git a/skyvern-ts/client/src/api/types/WorkflowDefinitionBlocksItem.ts b/skyvern-ts/client/src/api/types/WorkflowDefinitionBlocksItem.ts
index c9f8c5453..5db583b4b 100644
--- a/skyvern-ts/client/src/api/types/WorkflowDefinitionBlocksItem.ts
+++ b/skyvern-ts/client/src/api/types/WorkflowDefinitionBlocksItem.ts
@@ -25,7 +25,8 @@ export type WorkflowDefinitionBlocksItem =
| Skyvern.WorkflowDefinitionBlocksItem.TextPrompt
| Skyvern.WorkflowDefinitionBlocksItem.UploadToS3
| Skyvern.WorkflowDefinitionBlocksItem.Validation
- | Skyvern.WorkflowDefinitionBlocksItem.Wait;
+ | Skyvern.WorkflowDefinitionBlocksItem.Wait
+ | Skyvern.WorkflowDefinitionBlocksItem.WorkflowTrigger;
export namespace WorkflowDefinitionBlocksItem {
export interface Action extends Skyvern.ActionBlock {
@@ -119,4 +120,8 @@ export namespace WorkflowDefinitionBlocksItem {
export interface Wait extends Skyvern.WaitBlock {
block_type: "wait";
}
+
+ export interface WorkflowTrigger extends Skyvern.WorkflowTriggerBlock {
+ block_type: "workflow_trigger";
+ }
}
diff --git a/skyvern-ts/client/src/api/types/WorkflowDefinitionYamlBlocksItem.ts b/skyvern-ts/client/src/api/types/WorkflowDefinitionYamlBlocksItem.ts
index 0c5cbd16b..9b2cc1b3f 100644
--- a/skyvern-ts/client/src/api/types/WorkflowDefinitionYamlBlocksItem.ts
+++ b/skyvern-ts/client/src/api/types/WorkflowDefinitionYamlBlocksItem.ts
@@ -25,7 +25,8 @@ export type WorkflowDefinitionYamlBlocksItem =
| Skyvern.WorkflowDefinitionYamlBlocksItem.TextPrompt
| Skyvern.WorkflowDefinitionYamlBlocksItem.UploadToS3
| Skyvern.WorkflowDefinitionYamlBlocksItem.Validation
- | Skyvern.WorkflowDefinitionYamlBlocksItem.Wait;
+ | Skyvern.WorkflowDefinitionYamlBlocksItem.Wait
+ | Skyvern.WorkflowDefinitionYamlBlocksItem.WorkflowTrigger;
export namespace WorkflowDefinitionYamlBlocksItem {
export interface Action extends Skyvern.ActionBlockYaml {
@@ -119,4 +120,8 @@ export namespace WorkflowDefinitionYamlBlocksItem {
export interface Wait extends Skyvern.WaitBlockYaml {
block_type: "wait";
}
+
+ export interface WorkflowTrigger extends Skyvern.WorkflowTriggerBlockYaml {
+ block_type: "workflow_trigger";
+ }
}
diff --git a/skyvern-ts/client/src/api/types/WorkflowRun.ts b/skyvern-ts/client/src/api/types/WorkflowRun.ts
index b048c8c0a..65ff87204 100644
--- a/skyvern-ts/client/src/api/types/WorkflowRun.ts
+++ b/skyvern-ts/client/src/api/types/WorkflowRun.ts
@@ -29,9 +29,6 @@ export interface WorkflowRun {
sequential_key?: string;
ai_fallback?: boolean;
code_gen?: boolean;
- waiting_for_verification_code?: boolean;
- verification_code_identifier?: string;
- verification_code_polling_started_at?: string;
queued_at?: string;
started_at?: string;
finished_at?: string;
diff --git a/skyvern-ts/client/src/api/types/WorkflowRunRequest.ts b/skyvern-ts/client/src/api/types/WorkflowRunRequest.ts
index 0608d5bb6..0e11b6a99 100644
--- a/skyvern-ts/client/src/api/types/WorkflowRunRequest.ts
+++ b/skyvern-ts/client/src/api/types/WorkflowRunRequest.ts
@@ -23,9 +23,16 @@ export interface WorkflowRunRequest {
* - RESIDENTIAL_DE: Germany
* - RESIDENTIAL_NZ: New Zealand
* - RESIDENTIAL_PH: Philippines
+ * - RESIDENTIAL_KR: South Korea
* - RESIDENTIAL_ZA: South Africa
* - RESIDENTIAL_AR: Argentina
* - RESIDENTIAL_AU: Australia
+ * - RESIDENTIAL_BR: Brazil
+ * - RESIDENTIAL_TR: Turkey
+ * - RESIDENTIAL_CA: Canada
+ * - RESIDENTIAL_MX: Mexico
+ * - RESIDENTIAL_IT: Italy
+ * - RESIDENTIAL_NL: Netherlands
* - RESIDENTIAL_ISP: ISP proxy
* - US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
* - US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
@@ -58,7 +65,7 @@ export interface WorkflowRunRequest {
browser_address?: string;
/** Whether to fallback to AI if the workflow run fails. */
ai_fallback?: boolean;
- /** Whether to run the workflow with agent or code. */
+ /** Whether to run the workflow with agent, code, or code_v2 (adaptive caching). */
run_with?: string;
}
@@ -78,9 +85,16 @@ export namespace WorkflowRunRequest {
* - RESIDENTIAL_DE: Germany
* - RESIDENTIAL_NZ: New Zealand
* - RESIDENTIAL_PH: Philippines
+ * - RESIDENTIAL_KR: South Korea
* - RESIDENTIAL_ZA: South Africa
* - RESIDENTIAL_AR: Argentina
* - RESIDENTIAL_AU: Australia
+ * - RESIDENTIAL_BR: Brazil
+ * - RESIDENTIAL_TR: Turkey
+ * - RESIDENTIAL_CA: Canada
+ * - RESIDENTIAL_MX: Mexico
+ * - RESIDENTIAL_IT: Italy
+ * - RESIDENTIAL_NL: Netherlands
* - RESIDENTIAL_ISP: ISP proxy
* - US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
* - US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
diff --git a/skyvern-ts/client/src/api/types/WorkflowRunResponse.ts b/skyvern-ts/client/src/api/types/WorkflowRunResponse.ts
index db03bee88..a02d299b2 100644
--- a/skyvern-ts/client/src/api/types/WorkflowRunResponse.ts
+++ b/skyvern-ts/client/src/api/types/WorkflowRunResponse.ts
@@ -41,7 +41,7 @@ export interface WorkflowRunResponse {
errors?: Record<string, unknown>[];
/** Total number of steps executed in this run */
step_count?: number;
- /** Whether the workflow run was executed with agent or code */
+ /** Whether the workflow run was executed with agent, code, or code_v2 (adaptive caching) */
run_with?: string;
/** Whether to fallback to AI if code run fails. */
ai_fallback?: boolean;
diff --git a/skyvern-ts/client/src/api/types/WorkflowTriggerBlock.ts b/skyvern-ts/client/src/api/types/WorkflowTriggerBlock.ts
new file mode 100644
index 000000000..15eaed2ff
--- /dev/null
+++ b/skyvern-ts/client/src/api/types/WorkflowTriggerBlock.ts
@@ -0,0 +1,21 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as Skyvern from "../index.js";
+
+export interface WorkflowTriggerBlock {
+ /** Author-facing identifier for a block; unique within a workflow. */
+ label: string;
+ /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
+ next_block_label?: string;
+ output_parameter: Skyvern.OutputParameter;
+ continue_on_failure?: boolean;
+ model?: Record<string, unknown>;
+ disable_cache?: boolean;
+ next_loop_on_failure?: boolean;
+ workflow_permanent_id: string;
+ payload?: Record<string, unknown>;
+ wait_for_completion?: boolean;
+ browser_session_id?: string;
+ use_parent_browser_session?: boolean;
+ parameters?: Skyvern.WorkflowTriggerBlockParametersItem[];
+}
diff --git a/skyvern-ts/client/src/api/types/WorkflowTriggerBlockParametersItem.ts b/skyvern-ts/client/src/api/types/WorkflowTriggerBlockParametersItem.ts
new file mode 100644
index 000000000..7879a1880
--- /dev/null
+++ b/skyvern-ts/client/src/api/types/WorkflowTriggerBlockParametersItem.ts
@@ -0,0 +1,62 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as Skyvern from "../index.js";
+
+export type WorkflowTriggerBlockParametersItem =
+ | Skyvern.WorkflowTriggerBlockParametersItem.AwsSecret
+ | Skyvern.WorkflowTriggerBlockParametersItem.AzureSecret
+ | Skyvern.WorkflowTriggerBlockParametersItem.AzureVaultCredential
+ | Skyvern.WorkflowTriggerBlockParametersItem.BitwardenCreditCardData
+ | Skyvern.WorkflowTriggerBlockParametersItem.BitwardenLoginCredential
+ | Skyvern.WorkflowTriggerBlockParametersItem.BitwardenSensitiveInformation
+ | Skyvern.WorkflowTriggerBlockParametersItem.Context
+ | Skyvern.WorkflowTriggerBlockParametersItem.Credential
+ | Skyvern.WorkflowTriggerBlockParametersItem.Onepassword
+ | Skyvern.WorkflowTriggerBlockParametersItem.Output
+ | Skyvern.WorkflowTriggerBlockParametersItem.Workflow;
+
+export namespace WorkflowTriggerBlockParametersItem {
+ export interface AwsSecret extends Skyvern.AwsSecretParameter {
+ parameter_type: "aws_secret";
+ }
+
+ export interface AzureSecret extends Skyvern.AzureSecretParameter {
+ parameter_type: "azure_secret";
+ }
+
+ export interface AzureVaultCredential extends Skyvern.AzureVaultCredentialParameter {
+ parameter_type: "azure_vault_credential";
+ }
+
+ export interface BitwardenCreditCardData extends Skyvern.BitwardenCreditCardDataParameter {
+ parameter_type: "bitwarden_credit_card_data";
+ }
+
+ export interface BitwardenLoginCredential extends Skyvern.BitwardenLoginCredentialParameter {
+ parameter_type: "bitwarden_login_credential";
+ }
+
+ export interface BitwardenSensitiveInformation extends Skyvern.BitwardenSensitiveInformationParameter {
+ parameter_type: "bitwarden_sensitive_information";
+ }
+
+ export interface Context extends Skyvern.ContextParameter {
+ parameter_type: "context";
+ }
+
+ export interface Credential extends Skyvern.CredentialParameter {
+ parameter_type: "credential";
+ }
+
+ export interface Onepassword extends Skyvern.OnePasswordCredentialParameter {
+ parameter_type: "onepassword";
+ }
+
+ export interface Output extends Skyvern.OutputParameter {
+ parameter_type: "output";
+ }
+
+ export interface Workflow extends Skyvern.WorkflowParameter {
+ parameter_type: "workflow";
+ }
+}
diff --git a/skyvern-ts/client/src/api/types/WorkflowTriggerBlockYaml.ts b/skyvern-ts/client/src/api/types/WorkflowTriggerBlockYaml.ts
new file mode 100644
index 000000000..29d2121fd
--- /dev/null
+++ b/skyvern-ts/client/src/api/types/WorkflowTriggerBlockYaml.ts
@@ -0,0 +1,17 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export interface WorkflowTriggerBlockYaml {
+ /** Author-facing identifier; must be unique per workflow. */
+ label: string;
+ /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
+ next_block_label?: string;
+ continue_on_failure?: boolean;
+ model?: Record<string, unknown>;
+ next_loop_on_failure?: boolean;
+ workflow_permanent_id: string;
+ payload?: Record<string, unknown>;
+ wait_for_completion?: boolean;
+ browser_session_id?: string;
+ use_parent_browser_session?: boolean;
+ parameter_keys?: string[];
+}
diff --git a/skyvern-ts/client/src/api/types/index.ts b/skyvern-ts/client/src/api/types/index.ts
index fa0499c02..4a96794ee 100644
--- a/skyvern-ts/client/src/api/types/index.ts
+++ b/skyvern-ts/client/src/api/types/index.ts
@@ -28,7 +28,6 @@ export * from "./BrowserProfile.js";
export * from "./BrowserSessionResponse.js";
export * from "./ChangeTierResponse.js";
export * from "./CheckoutSessionResponse.js";
-export * from "./ClearCacheResponse.js";
export * from "./ClickAction.js";
export * from "./ClickContext.js";
export * from "./CodeBlock.js";
@@ -65,6 +64,7 @@ export * from "./FileStorageType.js";
export * from "./FileType.js";
export * from "./FileUploadBlock.js";
export * from "./FileUploadBlockYaml.js";
+export * from "./Folder.js";
export * from "./ForLoopBlock.js";
export * from "./ForLoopBlockLoopBlocksItem.js";
export * from "./ForLoopBlockLoopOver.js";
@@ -176,3 +176,6 @@ export * from "./WorkflowRunStatus.js";
export * from "./WorkflowRunTimeline.js";
export * from "./WorkflowRunTimelineType.js";
export * from "./WorkflowStatus.js";
+export * from "./WorkflowTriggerBlock.js";
+export * from "./WorkflowTriggerBlockParametersItem.js";
+export * from "./WorkflowTriggerBlockYaml.js";
diff --git a/skyvern-ts/client/src/version.ts b/skyvern-ts/client/src/version.ts
index 62f266f51..f2a28fe78 100644
--- a/skyvern-ts/client/src/version.ts
+++ b/skyvern-ts/client/src/version.ts
@@ -1 +1 @@
-export const SDK_VERSION = "1.0.23";
+export const SDK_VERSION = "1.0.24";
diff --git a/skyvern-ts/client/tests/wire/main.test.ts b/skyvern-ts/client/tests/wire/main.test.ts
index 377635b89..72b90b3e6 100644
--- a/skyvern-ts/client/tests/wire/main.test.ts
+++ b/skyvern-ts/client/tests/wire/main.test.ts
@@ -587,6 +587,8 @@ describe("SkyvernClient", () => {
run_with: "run_with",
ai_fallback: true,
cache_key: "cache_key",
+ adaptive_caching: true,
+ generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
folder_id: "folder_id",
@@ -663,6 +665,8 @@ describe("SkyvernClient", () => {
run_with: "run_with",
ai_fallback: true,
cache_key: "cache_key",
+ adaptive_caching: true,
+ generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
folder_id: "folder_id",
@@ -739,6 +743,8 @@ describe("SkyvernClient", () => {
run_with: "run_with",
ai_fallback: true,
cache_key: "cache_key",
+ adaptive_caching: true,
+ generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
folder_id: "folder_id",
@@ -813,6 +819,8 @@ describe("SkyvernClient", () => {
run_with: "run_with",
ai_fallback: true,
cache_key: "cache_key",
+ adaptive_caching: true,
+ generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
folder_id: "folder_id",
@@ -897,6 +905,8 @@ describe("SkyvernClient", () => {
run_with: "run_with",
ai_fallback: true,
cache_key: "cache_key",
+ adaptive_caching: true,
+ generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
folder_id: "folder_id",
@@ -968,6 +978,8 @@ describe("SkyvernClient", () => {
run_with: "run_with",
ai_fallback: true,
cache_key: "cache_key",
+ adaptive_caching: true,
+ generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
folder_id: "folder_id",
@@ -1484,9 +1496,6 @@ describe("SkyvernClient", () => {
sequential_key: "sequential_key",
ai_fallback: true,
code_gen: true,
- waiting_for_verification_code: true,
- verification_code_identifier: "verification_code_identifier",
- verification_code_polling_started_at: "2024-01-15T09:30:00Z",
queued_at: "2024-01-15T09:30:00Z",
started_at: "2024-01-15T09:30:00Z",
finished_at: "2024-01-15T09:30:00Z",
@@ -1534,9 +1543,6 @@ describe("SkyvernClient", () => {
sequential_key: "sequential_key",
ai_fallback: true,
code_gen: true,
- waiting_for_verification_code: true,
- verification_code_identifier: "verification_code_identifier",
- verification_code_polling_started_at: "2024-01-15T09:30:00Z",
queued_at: "2024-01-15T09:30:00Z",
started_at: "2024-01-15T09:30:00Z",
finished_at: "2024-01-15T09:30:00Z",
@@ -1611,6 +1617,8 @@ describe("SkyvernClient", () => {
run_with: "run_with",
ai_fallback: true,
cache_key: "cache_key",
+ adaptive_caching: true,
+ generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
folder_id: "folder_id",
@@ -1684,6 +1692,8 @@ describe("SkyvernClient", () => {
run_with: "run_with",
ai_fallback: true,
cache_key: "cache_key",
+ adaptive_caching: true,
+ generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
folder_id: "folder_id",
@@ -1766,6 +1776,8 @@ describe("SkyvernClient", () => {
run_with: "run_with",
ai_fallback: true,
cache_key: "cache_key",
+ adaptive_caching: true,
+ generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
folder_id: "folder_id",
@@ -1840,6 +1852,8 @@ describe("SkyvernClient", () => {
run_with: "run_with",
ai_fallback: true,
cache_key: "cache_key",
+ adaptive_caching: true,
+ generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
folder_id: "folder_id",
@@ -2156,6 +2170,7 @@ describe("SkyvernClient", () => {
app_url: "app_url",
extensions: ["ad-blocker"],
browser_type: "msedge",
+ browser_profile_id: "browser_profile_id",
vnc_streaming_supported: true,
download_path: "download_path",
downloaded_files: [{ url: "url" }],
@@ -2188,6 +2203,7 @@ describe("SkyvernClient", () => {
app_url: "app_url",
extensions: ["ad-blocker"],
browser_type: "msedge",
+ browser_profile_id: "browser_profile_id",
vnc_streaming_supported: true,
download_path: "download_path",
downloaded_files: [
@@ -2260,6 +2276,7 @@ describe("SkyvernClient", () => {
app_url: "app_url",
extensions: ["ad-blocker"],
browser_type: "msedge",
+ browser_profile_id: "browser_profile_id",
vnc_streaming_supported: true,
download_path: "download_path",
downloaded_files: [
@@ -2295,6 +2312,7 @@ describe("SkyvernClient", () => {
app_url: "app_url",
extensions: ["ad-blocker"],
browser_type: "msedge",
+ browser_profile_id: "browser_profile_id",
vnc_streaming_supported: true,
download_path: "download_path",
downloaded_files: [
@@ -2341,6 +2359,25 @@ describe("SkyvernClient", () => {
});
test("create_browser_session (3)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {};
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .post("/v1/browser_sessions")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(404)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.createBrowserSession();
+ }).rejects.toThrow(Skyvern.NotFoundError);
+ });
+
+ test("create_browser_session (4)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawRequestBody = {};
@@ -2429,6 +2466,7 @@ describe("SkyvernClient", () => {
app_url: "app_url",
extensions: ["ad-blocker"],
browser_type: "msedge",
+ browser_profile_id: "browser_profile_id",
vnc_streaming_supported: true,
download_path: "download_path",
downloaded_files: [
@@ -2463,6 +2501,7 @@ describe("SkyvernClient", () => {
app_url: "app_url",
extensions: ["ad-blocker"],
browser_type: "msedge",
+ browser_profile_id: "browser_profile_id",
vnc_streaming_supported: true,
download_path: "download_path",
downloaded_files: [
@@ -3457,44 +3496,6 @@ describe("SkyvernClient", () => {
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
- test("clear_workflow_cache (1)", async () => {
- const server = mockServerPool.createServer();
- const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
-
- const rawResponseBody = { deleted_count: 1, message: "message" };
- server
- .mockEndpoint()
- .delete("/v1/scripts/wpid_abc123/cache")
- .respondWith()
- .statusCode(200)
- .jsonBody(rawResponseBody)
- .build();
-
- const response = await client.clearWorkflowCache("wpid_abc123");
- expect(response).toEqual({
- deleted_count: 1,
- message: "message",
- });
- });
-
- test("clear_workflow_cache (2)", async () => {
- const server = mockServerPool.createServer();
- const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
-
- const rawResponseBody = { key: "value" };
- server
- .mockEndpoint()
- .delete("/v1/scripts/workflow_permanent_id/cache")
- .respondWith()
- .statusCode(422)
- .jsonBody(rawResponseBody)
- .build();
-
- await expect(async () => {
- return await client.clearWorkflowCache("workflow_permanent_id");
- }).rejects.toThrow(Skyvern.UnprocessableEntityError);
- });
-
test("run_sdk_action (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
@@ -3743,4 +3744,522 @@ describe("SkyvernClient", () => {
});
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
+
+ test("get_folders (1)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = [
+ {
+ title: "title",
+ description: "description",
+ folder_id: "folder_id",
+ organization_id: "organization_id",
+ workflow_count: 1,
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ },
+ ];
+ server.mockEndpoint().get("/v1/folders").respondWith().statusCode(200).jsonBody(rawResponseBody).build();
+
+ const response = await client.getFolders({
+ page: 1,
+ page_size: 1,
+ search: "search",
+ });
+ expect(response).toEqual([
+ {
+ title: "title",
+ description: "description",
+ folder_id: "folder_id",
+ organization_id: "organization_id",
+ workflow_count: 1,
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ },
+ ]);
+ });
+
+ test("get_folders (2)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server.mockEndpoint().get("/v1/folders").respondWith().statusCode(422).jsonBody(rawResponseBody).build();
+
+ await expect(async () => {
+ return await client.getFolders();
+ }).rejects.toThrow(Skyvern.UnprocessableEntityError);
+ });
+
+ test("create_folder (1)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = { title: "title" };
+ const rawResponseBody = {
+ title: "title",
+ description: "description",
+ folder_id: "folder_id",
+ organization_id: "organization_id",
+ workflow_count: 1,
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ };
+ server
+ .mockEndpoint()
+ .post("/v1/folders")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.createFolder({
+ title: "title",
+ });
+ expect(response).toEqual({
+ title: "title",
+ description: "description",
+ folder_id: "folder_id",
+ organization_id: "organization_id",
+ workflow_count: 1,
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ });
+ });
+
+ test("create_folder (2)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = { title: "x" };
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .post("/v1/folders")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(400)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.createFolder({
+ title: "x",
+ });
+ }).rejects.toThrow(Skyvern.BadRequestError);
+ });
+
+ test("create_folder (3)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = { title: "x" };
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .post("/v1/folders")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(422)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.createFolder({
+ title: "x",
+ });
+ }).rejects.toThrow(Skyvern.UnprocessableEntityError);
+ });
+
+ test("get_folder (1)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = {
+ title: "title",
+ description: "description",
+ folder_id: "folder_id",
+ organization_id: "organization_id",
+ workflow_count: 1,
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ };
+ server
+ .mockEndpoint()
+ .get("/v1/folders/fld_123")
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.getFolder("fld_123");
+ expect(response).toEqual({
+ title: "title",
+ description: "description",
+ folder_id: "folder_id",
+ organization_id: "organization_id",
+ workflow_count: 1,
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ });
+ });
+
+ test("get_folder (2)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .get("/v1/folders/folder_id")
+ .respondWith()
+ .statusCode(404)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.getFolder("folder_id");
+ }).rejects.toThrow(Skyvern.NotFoundError);
+ });
+
+ test("get_folder (3)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .get("/v1/folders/folder_id")
+ .respondWith()
+ .statusCode(422)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.getFolder("folder_id");
+ }).rejects.toThrow(Skyvern.UnprocessableEntityError);
+ });
+
+ test("update_folder (1)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {};
+ const rawResponseBody = {
+ title: "title",
+ description: "description",
+ folder_id: "folder_id",
+ organization_id: "organization_id",
+ workflow_count: 1,
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ };
+ server
+ .mockEndpoint()
+ .put("/v1/folders/fld_123")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.updateFolder("fld_123");
+ expect(response).toEqual({
+ title: "title",
+ description: "description",
+ folder_id: "folder_id",
+ organization_id: "organization_id",
+ workflow_count: 1,
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ });
+ });
+
+ test("update_folder (2)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {};
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .put("/v1/folders/folder_id")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(404)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.updateFolder("folder_id");
+ }).rejects.toThrow(Skyvern.NotFoundError);
+ });
+
+ test("update_folder (3)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {};
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .put("/v1/folders/folder_id")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(422)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.updateFolder("folder_id");
+ }).rejects.toThrow(Skyvern.UnprocessableEntityError);
+ });
+
+ test("delete_folder (1)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .delete("/v1/folders/fld_123")
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.deleteFolder("fld_123", {
+ delete_workflows: true,
+ });
+ expect(response).toEqual({
+ key: "value",
+ });
+ });
+
+ test("delete_folder (2)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .delete("/v1/folders/folder_id")
+ .respondWith()
+ .statusCode(404)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.deleteFolder("folder_id");
+ }).rejects.toThrow(Skyvern.NotFoundError);
+ });
+
+ test("delete_folder (3)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .delete("/v1/folders/folder_id")
+ .respondWith()
+ .statusCode(422)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.deleteFolder("folder_id");
+ }).rejects.toThrow(Skyvern.UnprocessableEntityError);
+ });
+
+ test("update_workflow_folder (1)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {};
+ const rawResponseBody = {
+ workflow_id: "workflow_id",
+ organization_id: "organization_id",
+ title: "title",
+ workflow_permanent_id: "workflow_permanent_id",
+ version: 1,
+ is_saved_task: true,
+ is_template: true,
+ description: "description",
+ workflow_definition: {
+ version: 1,
+ parameters: [
+ {
+ parameter_type: "aws_secret",
+ key: "key",
+ aws_secret_parameter_id: "aws_secret_parameter_id",
+ workflow_id: "workflow_id",
+ aws_key: "aws_key",
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ },
+ ],
+ blocks: [
+ {
+ block_type: "action",
+ label: "label",
+ output_parameter: {
+ key: "key",
+ output_parameter_id: "output_parameter_id",
+ workflow_id: "workflow_id",
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ },
+ },
+ ],
+ finally_block_label: "finally_block_label",
+ },
+ proxy_location: "RESIDENTIAL",
+ webhook_callback_url: "webhook_callback_url",
+ totp_verification_url: "totp_verification_url",
+ totp_identifier: "totp_identifier",
+ persist_browser_session: true,
+ model: { key: "value" },
+ status: "published",
+ max_screenshot_scrolls: 1,
+ extra_http_headers: { key: "value" },
+ run_with: "run_with",
+ ai_fallback: true,
+ cache_key: "cache_key",
+ adaptive_caching: true,
+ generate_script_on_terminal: true,
+ run_sequentially: true,
+ sequential_key: "sequential_key",
+ folder_id: "folder_id",
+ import_error: "import_error",
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ deleted_at: "2024-01-15T09:30:00Z",
+ };
+ server
+ .mockEndpoint()
+ .put("/v1/workflows/wpid_123/folder")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.updateWorkflowFolder("wpid_123");
+ expect(response).toEqual({
+ workflow_id: "workflow_id",
+ organization_id: "organization_id",
+ title: "title",
+ workflow_permanent_id: "workflow_permanent_id",
+ version: 1,
+ is_saved_task: true,
+ is_template: true,
+ description: "description",
+ workflow_definition: {
+ version: 1,
+ parameters: [
+ {
+ parameter_type: "aws_secret",
+ key: "key",
+ aws_secret_parameter_id: "aws_secret_parameter_id",
+ workflow_id: "workflow_id",
+ aws_key: "aws_key",
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ },
+ ],
+ blocks: [
+ {
+ block_type: "action",
+ label: "label",
+ output_parameter: {
+ key: "key",
+ output_parameter_id: "output_parameter_id",
+ workflow_id: "workflow_id",
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ },
+ },
+ ],
+ finally_block_label: "finally_block_label",
+ },
+ proxy_location: "RESIDENTIAL",
+ webhook_callback_url: "webhook_callback_url",
+ totp_verification_url: "totp_verification_url",
+ totp_identifier: "totp_identifier",
+ persist_browser_session: true,
+ model: {
+ key: "value",
+ },
+ status: "published",
+ max_screenshot_scrolls: 1,
+ extra_http_headers: {
+ key: "value",
+ },
+ run_with: "run_with",
+ ai_fallback: true,
+ cache_key: "cache_key",
+ adaptive_caching: true,
+ generate_script_on_terminal: true,
+ run_sequentially: true,
+ sequential_key: "sequential_key",
+ folder_id: "folder_id",
+ import_error: "import_error",
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ deleted_at: "2024-01-15T09:30:00Z",
+ });
+ });
+
+ test("update_workflow_folder (2)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {};
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .put("/v1/workflows/workflow_permanent_id/folder")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(400)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.updateWorkflowFolder("workflow_permanent_id");
+ }).rejects.toThrow(Skyvern.BadRequestError);
+ });
+
+ test("update_workflow_folder (3)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {};
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .put("/v1/workflows/workflow_permanent_id/folder")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(404)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.updateWorkflowFolder("workflow_permanent_id");
+ }).rejects.toThrow(Skyvern.NotFoundError);
+ });
+
+ test("update_workflow_folder (4)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {};
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .put("/v1/workflows/workflow_permanent_id/folder")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(422)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.updateWorkflowFolder("workflow_permanent_id");
+ }).rejects.toThrow(Skyvern.UnprocessableEntityError);
+ });
});
diff --git a/skyvern/client/__init__.py b/skyvern/client/__init__.py
index ad5ac57e7..2c281879c 100644
--- a/skyvern/client/__init__.py
+++ b/skyvern/client/__init__.py
@@ -100,9 +100,6 @@ if typing.TYPE_CHECKING:
DownloadToS3Block,
DownloadToS3BlockYaml,
Extensions,
- Folder,
- FolderCreate,
- FolderUpdate,
ExtractAction,
ExtractActionData,
ExtractActionExtractSchema,
@@ -146,6 +143,9 @@ if typing.TYPE_CHECKING:
FileType,
FileUploadBlock,
FileUploadBlockYaml,
+ Folder,
+ FolderCreate,
+ FolderUpdate,
ForLoopBlock,
ForLoopBlockDataSchema,
ForLoopBlockLoopBlocksItem,
@@ -172,6 +172,7 @@ if typing.TYPE_CHECKING:
ForLoopBlockLoopBlocksItem_UploadToS3,
ForLoopBlockLoopBlocksItem_Validation,
ForLoopBlockLoopBlocksItem_Wait,
+ ForLoopBlockLoopBlocksItem_WorkflowTrigger,
ForLoopBlockLoopOver,
ForLoopBlockLoopOver_AwsSecret,
ForLoopBlockLoopOver_AzureSecret,
@@ -210,6 +211,7 @@ if typing.TYPE_CHECKING:
ForLoopBlockYamlLoopBlocksItem_UploadToS3,
ForLoopBlockYamlLoopBlocksItem_Validation,
ForLoopBlockYamlLoopBlocksItem_Wait,
+ ForLoopBlockYamlLoopBlocksItem_WorkflowTrigger,
GeoTarget,
GetRunResponse,
GetRunResponse_AnthropicCua,
@@ -382,9 +384,9 @@ if typing.TYPE_CHECKING:
ThoughtType,
TotpCode,
TotpType,
+ UpdateWorkflowFolderRequest,
UploadFileAction,
UploadFileActionData,
- UpdateWorkflowFolderRequest,
UploadFileResponse,
UploadToS3Block,
UploadToS3BlockYaml,
@@ -464,6 +466,7 @@ if typing.TYPE_CHECKING:
WorkflowDefinitionBlocksItem_UploadToS3,
WorkflowDefinitionBlocksItem_Validation,
WorkflowDefinitionBlocksItem_Wait,
+ WorkflowDefinitionBlocksItem_WorkflowTrigger,
WorkflowDefinitionParametersItem,
WorkflowDefinitionParametersItem_AwsSecret,
WorkflowDefinitionParametersItem_AzureSecret,
@@ -501,6 +504,7 @@ if typing.TYPE_CHECKING:
WorkflowDefinitionYamlBlocksItem_UploadToS3,
WorkflowDefinitionYamlBlocksItem_Validation,
WorkflowDefinitionYamlBlocksItem_Wait,
+ WorkflowDefinitionYamlBlocksItem_WorkflowTrigger,
WorkflowDefinitionYamlParametersItem,
WorkflowDefinitionYamlParametersItem_AwsSecret,
WorkflowDefinitionYamlParametersItem_AzureVaultCredential,
@@ -533,6 +537,20 @@ if typing.TYPE_CHECKING:
WorkflowRunTimeline,
WorkflowRunTimelineType,
WorkflowStatus,
+ WorkflowTriggerBlock,
+ WorkflowTriggerBlockParametersItem,
+ WorkflowTriggerBlockParametersItem_AwsSecret,
+ WorkflowTriggerBlockParametersItem_AzureSecret,
+ WorkflowTriggerBlockParametersItem_AzureVaultCredential,
+ WorkflowTriggerBlockParametersItem_BitwardenCreditCardData,
+ WorkflowTriggerBlockParametersItem_BitwardenLoginCredential,
+ WorkflowTriggerBlockParametersItem_BitwardenSensitiveInformation,
+ WorkflowTriggerBlockParametersItem_Context,
+ WorkflowTriggerBlockParametersItem_Credential,
+ WorkflowTriggerBlockParametersItem_Onepassword,
+ WorkflowTriggerBlockParametersItem_Output,
+ WorkflowTriggerBlockParametersItem_Workflow,
+ WorkflowTriggerBlockYaml,
)
from .errors import BadRequestError, ConflictError, ForbiddenError, NotFoundError, UnprocessableEntityError
from . import scripts
@@ -636,9 +654,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"DownloadToS3Block": ".types",
"DownloadToS3BlockYaml": ".types",
"Extensions": ".types",
- "Folder": ".types",
- "FolderCreate": ".types",
- "FolderUpdate": ".types",
"ExtractAction": ".types",
"ExtractActionData": ".types",
"ExtractActionExtractSchema": ".types",
@@ -682,6 +697,9 @@ _dynamic_imports: typing.Dict[str, str] = {
"FileType": ".types",
"FileUploadBlock": ".types",
"FileUploadBlockYaml": ".types",
+ "Folder": ".types",
+ "FolderCreate": ".types",
+ "FolderUpdate": ".types",
"ForLoopBlock": ".types",
"ForLoopBlockDataSchema": ".types",
"ForLoopBlockLoopBlocksItem": ".types",
@@ -708,6 +726,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"ForLoopBlockLoopBlocksItem_UploadToS3": ".types",
"ForLoopBlockLoopBlocksItem_Validation": ".types",
"ForLoopBlockLoopBlocksItem_Wait": ".types",
+ "ForLoopBlockLoopBlocksItem_WorkflowTrigger": ".types",
"ForLoopBlockLoopOver": ".types",
"ForLoopBlockLoopOver_AwsSecret": ".types",
"ForLoopBlockLoopOver_AzureSecret": ".types",
@@ -746,6 +765,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"ForLoopBlockYamlLoopBlocksItem_UploadToS3": ".types",
"ForLoopBlockYamlLoopBlocksItem_Validation": ".types",
"ForLoopBlockYamlLoopBlocksItem_Wait": ".types",
+ "ForLoopBlockYamlLoopBlocksItem_WorkflowTrigger": ".types",
"ForbiddenError": ".errors",
"GeoTarget": ".types",
"GetRunResponse": ".types",
@@ -923,9 +943,9 @@ _dynamic_imports: typing.Dict[str, str] = {
"TotpCode": ".types",
"TotpType": ".types",
"UnprocessableEntityError": ".errors",
+ "UpdateWorkflowFolderRequest": ".types",
"UploadFileAction": ".types",
"UploadFileActionData": ".types",
- "UpdateWorkflowFolderRequest": ".types",
"UploadFileResponse": ".types",
"UploadToS3Block": ".types",
"UploadToS3BlockYaml": ".types",
@@ -1005,6 +1025,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowDefinitionBlocksItem_UploadToS3": ".types",
"WorkflowDefinitionBlocksItem_Validation": ".types",
"WorkflowDefinitionBlocksItem_Wait": ".types",
+ "WorkflowDefinitionBlocksItem_WorkflowTrigger": ".types",
"WorkflowDefinitionParametersItem": ".types",
"WorkflowDefinitionParametersItem_AwsSecret": ".types",
"WorkflowDefinitionParametersItem_AzureSecret": ".types",
@@ -1042,6 +1063,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowDefinitionYamlBlocksItem_UploadToS3": ".types",
"WorkflowDefinitionYamlBlocksItem_Validation": ".types",
"WorkflowDefinitionYamlBlocksItem_Wait": ".types",
+ "WorkflowDefinitionYamlBlocksItem_WorkflowTrigger": ".types",
"WorkflowDefinitionYamlParametersItem": ".types",
"WorkflowDefinitionYamlParametersItem_AwsSecret": ".types",
"WorkflowDefinitionYamlParametersItem_AzureVaultCredential": ".types",
@@ -1074,6 +1096,20 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowRunTimeline": ".types",
"WorkflowRunTimelineType": ".types",
"WorkflowStatus": ".types",
+ "WorkflowTriggerBlock": ".types",
+ "WorkflowTriggerBlockParametersItem": ".types",
+ "WorkflowTriggerBlockParametersItem_AwsSecret": ".types",
+ "WorkflowTriggerBlockParametersItem_AzureSecret": ".types",
+ "WorkflowTriggerBlockParametersItem_AzureVaultCredential": ".types",
+ "WorkflowTriggerBlockParametersItem_BitwardenCreditCardData": ".types",
+ "WorkflowTriggerBlockParametersItem_BitwardenLoginCredential": ".types",
+ "WorkflowTriggerBlockParametersItem_BitwardenSensitiveInformation": ".types",
+ "WorkflowTriggerBlockParametersItem_Context": ".types",
+ "WorkflowTriggerBlockParametersItem_Credential": ".types",
+ "WorkflowTriggerBlockParametersItem_Onepassword": ".types",
+ "WorkflowTriggerBlockParametersItem_Output": ".types",
+ "WorkflowTriggerBlockParametersItem_Workflow": ".types",
+ "WorkflowTriggerBlockYaml": ".types",
"__version__": ".version",
"scripts": ".scripts",
}
@@ -1197,9 +1233,6 @@ __all__ = [
"DownloadToS3Block",
"DownloadToS3BlockYaml",
"Extensions",
- "Folder",
- "FolderCreate",
- "FolderUpdate",
"ExtractAction",
"ExtractActionData",
"ExtractActionExtractSchema",
@@ -1243,6 +1276,9 @@ __all__ = [
"FileType",
"FileUploadBlock",
"FileUploadBlockYaml",
+ "Folder",
+ "FolderCreate",
+ "FolderUpdate",
"ForLoopBlock",
"ForLoopBlockDataSchema",
"ForLoopBlockLoopBlocksItem",
@@ -1269,6 +1305,7 @@ __all__ = [
"ForLoopBlockLoopBlocksItem_UploadToS3",
"ForLoopBlockLoopBlocksItem_Validation",
"ForLoopBlockLoopBlocksItem_Wait",
+ "ForLoopBlockLoopBlocksItem_WorkflowTrigger",
"ForLoopBlockLoopOver",
"ForLoopBlockLoopOver_AwsSecret",
"ForLoopBlockLoopOver_AzureSecret",
@@ -1307,6 +1344,7 @@ __all__ = [
"ForLoopBlockYamlLoopBlocksItem_UploadToS3",
"ForLoopBlockYamlLoopBlocksItem_Validation",
"ForLoopBlockYamlLoopBlocksItem_Wait",
+ "ForLoopBlockYamlLoopBlocksItem_WorkflowTrigger",
"ForbiddenError",
"GeoTarget",
"GetRunResponse",
@@ -1484,9 +1522,9 @@ __all__ = [
"TotpCode",
"TotpType",
"UnprocessableEntityError",
+ "UpdateWorkflowFolderRequest",
"UploadFileAction",
"UploadFileActionData",
- "UpdateWorkflowFolderRequest",
"UploadFileResponse",
"UploadToS3Block",
"UploadToS3BlockYaml",
@@ -1566,6 +1604,7 @@ __all__ = [
"WorkflowDefinitionBlocksItem_UploadToS3",
"WorkflowDefinitionBlocksItem_Validation",
"WorkflowDefinitionBlocksItem_Wait",
+ "WorkflowDefinitionBlocksItem_WorkflowTrigger",
"WorkflowDefinitionParametersItem",
"WorkflowDefinitionParametersItem_AwsSecret",
"WorkflowDefinitionParametersItem_AzureSecret",
@@ -1603,6 +1642,7 @@ __all__ = [
"WorkflowDefinitionYamlBlocksItem_UploadToS3",
"WorkflowDefinitionYamlBlocksItem_Validation",
"WorkflowDefinitionYamlBlocksItem_Wait",
+ "WorkflowDefinitionYamlBlocksItem_WorkflowTrigger",
"WorkflowDefinitionYamlParametersItem",
"WorkflowDefinitionYamlParametersItem_AwsSecret",
"WorkflowDefinitionYamlParametersItem_AzureVaultCredential",
@@ -1635,6 +1675,20 @@ __all__ = [
"WorkflowRunTimeline",
"WorkflowRunTimelineType",
"WorkflowStatus",
+ "WorkflowTriggerBlock",
+ "WorkflowTriggerBlockParametersItem",
+ "WorkflowTriggerBlockParametersItem_AwsSecret",
+ "WorkflowTriggerBlockParametersItem_AzureSecret",
+ "WorkflowTriggerBlockParametersItem_AzureVaultCredential",
+ "WorkflowTriggerBlockParametersItem_BitwardenCreditCardData",
+ "WorkflowTriggerBlockParametersItem_BitwardenLoginCredential",
+ "WorkflowTriggerBlockParametersItem_BitwardenSensitiveInformation",
+ "WorkflowTriggerBlockParametersItem_Context",
+ "WorkflowTriggerBlockParametersItem_Credential",
+ "WorkflowTriggerBlockParametersItem_Onepassword",
+ "WorkflowTriggerBlockParametersItem_Output",
+ "WorkflowTriggerBlockParametersItem_Workflow",
+ "WorkflowTriggerBlockYaml",
"__version__",
"scripts",
]
diff --git a/skyvern/client/client.py b/skyvern/client/client.py
index e02d01570..612f3aa51 100644
--- a/skyvern/client/client.py
+++ b/skyvern/client/client.py
@@ -199,9 +199,16 @@ class Skyvern:
- RESIDENTIAL_DE: Germany
- RESIDENTIAL_NZ: New Zealand
- RESIDENTIAL_PH: Philippines
+ - RESIDENTIAL_KR: South Korea
- RESIDENTIAL_ZA: South Africa
- RESIDENTIAL_AR: Argentina
- RESIDENTIAL_AU: Australia
+ - RESIDENTIAL_BR: Brazil
+ - RESIDENTIAL_TR: Turkey
+ - RESIDENTIAL_CA: Canada
+ - RESIDENTIAL_MX: Mexico
+ - RESIDENTIAL_IT: Italy
+ - RESIDENTIAL_NL: Netherlands
- RESIDENTIAL_ISP: ISP proxy
- US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
- US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
@@ -363,9 +370,16 @@ class Skyvern:
- RESIDENTIAL_DE: Germany
- RESIDENTIAL_NZ: New Zealand
- RESIDENTIAL_PH: Philippines
+ - RESIDENTIAL_KR: South Korea
- RESIDENTIAL_ZA: South Africa
- RESIDENTIAL_AR: Argentina
- RESIDENTIAL_AU: Australia
+ - RESIDENTIAL_BR: Brazil
+ - RESIDENTIAL_TR: Turkey
+ - RESIDENTIAL_CA: Canada
+ - RESIDENTIAL_MX: Mexico
+ - RESIDENTIAL_IT: Italy
+ - RESIDENTIAL_NL: Netherlands
- RESIDENTIAL_ISP: ISP proxy
- US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
- US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
@@ -405,7 +419,7 @@ class Skyvern:
Whether to fallback to AI if the workflow run fails.
run_with : typing.Optional[str]
- Whether to run the workflow with agent or code.
+ Whether to run the workflow with agent, code, or code_v2 (adaptive caching).
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -738,84 +752,6 @@ class Skyvern:
_response = self._raw_client.delete_workflow(workflow_id, request_options=request_options)
return _response.data
- def create_folder(
- self,
- *,
- title: str,
- description: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> Folder:
- _response = self._raw_client.create_folder(
- title=title,
- description=description,
- request_options=request_options,
- )
- return _response.data
-
- def get_folder(self, folder_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Folder:
- _response = self._raw_client.get_folder(folder_id, request_options=request_options)
- return _response.data
-
- def get_folders(
- self,
- *,
- page: typing.Optional[int] = None,
- page_size: typing.Optional[int] = None,
- search: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> typing.List[Folder]:
- _response = self._raw_client.get_folders(
- page=page,
- page_size=page_size,
- search=search,
- request_options=request_options,
- )
- return _response.data
-
- def update_folder(
- self,
- folder_id: str,
- *,
- title: typing.Optional[str] = OMIT,
- description: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> Folder:
- _response = self._raw_client.update_folder(
- folder_id,
- title=title,
- description=description,
- request_options=request_options,
- )
- return _response.data
-
- def delete_folder(
- self,
- folder_id: str,
- *,
- delete_workflows: typing.Optional[bool] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> typing.Optional[typing.Any]:
- _response = self._raw_client.delete_folder(
- folder_id,
- delete_workflows=delete_workflows,
- request_options=request_options,
- )
- return _response.data
-
- def update_workflow_folder(
- self,
- workflow_id: str,
- *,
- folder_id: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> Workflow:
- _response = self._raw_client.update_workflow_folder(
- workflow_id,
- folder_id=folder_id,
- request_options=request_options,
- )
- return _response.data
-
def get_artifact(self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Artifact:
"""
Get an artifact
@@ -1351,6 +1287,7 @@ class Skyvern:
proxy_location: typing.Optional[ProxyLocation] = OMIT,
extensions: typing.Optional[typing.Sequence[Extensions]] = OMIT,
browser_type: typing.Optional[PersistentBrowserType] = OMIT,
+ browser_profile_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BrowserSessionResponse:
"""
@@ -1376,9 +1313,16 @@ class Skyvern:
- RESIDENTIAL_DE: Germany
- RESIDENTIAL_NZ: New Zealand
- RESIDENTIAL_PH: Philippines
+ - RESIDENTIAL_KR: South Korea
- RESIDENTIAL_ZA: South Africa
- RESIDENTIAL_AR: Argentina
- RESIDENTIAL_AU: Australia
+ - RESIDENTIAL_BR: Brazil
+ - RESIDENTIAL_TR: Turkey
+ - RESIDENTIAL_CA: Canada
+ - RESIDENTIAL_MX: Mexico
+ - RESIDENTIAL_IT: Italy
+ - RESIDENTIAL_NL: Netherlands
- RESIDENTIAL_ISP: ISP proxy
- US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
- US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
@@ -1393,6 +1337,9 @@ class Skyvern:
browser_type : typing.Optional[PersistentBrowserType]
The type of browser to use for the session.
+ browser_profile_id : typing.Optional[str]
+ ID of a browser profile to load into this session (restores cookies, localStorage, etc.). browser_profile_id starts with `bp_`.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -1415,6 +1362,7 @@ class Skyvern:
proxy_location=proxy_location,
extensions=extensions,
browser_type=browser_type,
+ browser_profile_id=browser_profile_id,
request_options=request_options,
)
return _response.data
@@ -2184,33 +2132,6 @@ class Skyvern:
def clear_workflow_cache(
self, workflow_permanent_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> ClearCacheResponse:
- """
- Clear all cached scripts for a specific workflow. This will trigger script regeneration on subsequent runs.
-
- Parameters
- ----------
- workflow_permanent_id : str
- The workflow permanent ID to clear cache for
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- ClearCacheResponse
- Successful Response
-
- Examples
- --------
- from skyvern import Skyvern
-
- client = Skyvern(
- api_key="YOUR_API_KEY",
- )
- client.clear_workflow_cache(
- workflow_permanent_id="wpid_abc123",
- )
- """
_response = self._raw_client.clear_workflow_cache(workflow_permanent_id, request_options=request_options)
return _response.data
@@ -2412,113 +2333,365 @@ class Skyvern:
)
return _response.data
- @property
- def scripts(self):
- if self._scripts is None:
- from .scripts.client import ScriptsClient # noqa: E402
-
- self._scripts = ScriptsClient(client_wrapper=self._client_wrapper)
- return self._scripts
-
-
-class AsyncSkyvern:
- """
- Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.
+ def get_folders(
+ self,
+ *,
+ page: typing.Optional[int] = None,
+ page_size: typing.Optional[int] = None,
+ search: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> typing.List[Folder]:
+ """
+ Get all folders for the organization
- Parameters
- ----------
- base_url : typing.Optional[str]
- The base url to use for requests from the client.
+ Parameters
+ ----------
+ page : typing.Optional[int]
+ Page number
- environment : SkyvernEnvironment
- The environment to use for requests from the client. from .environment import SkyvernEnvironment
+ page_size : typing.Optional[int]
+ Number of folders per page
+ search : typing.Optional[str]
+ Search folders by title or description
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
- Defaults to SkyvernEnvironment.CLOUD
+ Returns
+ -------
+ typing.List[Folder]
+ Successfully retrieved folders
+ Examples
+ --------
+ from skyvern import Skyvern
+ client = Skyvern(
+ api_key="YOUR_API_KEY",
+ )
+ client.get_folders(
+ page=1,
+ page_size=1,
+ search="search",
+ )
+ """
+ _response = self._raw_client.get_folders(
+ page=page, page_size=page_size, search=search, request_options=request_options
+ )
+ return _response.data
- api_key : typing.Optional[str]
- headers : typing.Optional[typing.Dict[str, str]]
- Additional headers to send with every request.
+ def create_folder(
+ self,
+ *,
+ title: str,
+ description: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> Folder:
+ """
+ Create a new folder to organize workflows
- timeout : typing.Optional[float]
- The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
+ Parameters
+ ----------
+ title : str
+ Folder title
- follow_redirects : typing.Optional[bool]
- Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
+ description : typing.Optional[str]
+ Folder description
- httpx_client : typing.Optional[httpx.AsyncClient]
- The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
- Examples
- --------
- from skyvern import AsyncSkyvern
+ Returns
+ -------
+ Folder
+ Successfully created folder
- client = AsyncSkyvern(
- api_key="YOUR_API_KEY",
- )
- """
+ Examples
+ --------
+ from skyvern import Skyvern
- def __init__(
- self,
- *,
- base_url: typing.Optional[str] = None,
- environment: SkyvernEnvironment = SkyvernEnvironment.CLOUD,
- api_key: typing.Optional[str] = None,
- headers: typing.Optional[typing.Dict[str, str]] = None,
- timeout: typing.Optional[float] = None,
- follow_redirects: typing.Optional[bool] = True,
- httpx_client: typing.Optional[httpx.AsyncClient] = None,
- ):
- _defaulted_timeout = (
- timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
+ client = Skyvern(
+ api_key="YOUR_API_KEY",
)
- self._client_wrapper = AsyncClientWrapper(
- base_url=_get_base_url(base_url=base_url, environment=environment),
- api_key=api_key,
- headers=headers,
- httpx_client=httpx_client
- if httpx_client is not None
- else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
- if follow_redirects is not None
- else httpx.AsyncClient(timeout=_defaulted_timeout),
- timeout=_defaulted_timeout,
+ client.create_folder(
+ title="title",
)
- self._raw_client = AsyncRawSkyvern(client_wrapper=self._client_wrapper)
- self._scripts: typing.Optional[AsyncScriptsClient] = None
+ """
+ _response = self._raw_client.create_folder(
+ title=title, description=description, request_options=request_options
+ )
+ return _response.data
- @property
- def with_raw_response(self) -> AsyncRawSkyvern:
+ def get_folder(self, folder_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Folder:
"""
- Retrieves a raw implementation of this client that returns raw responses.
+ Get a specific folder by ID
+
+ Parameters
+ ----------
+ folder_id : str
+ Folder ID
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
Returns
-------
- AsyncRawSkyvern
+ Folder
+ Successfully retrieved folder
+
+ Examples
+ --------
+ from skyvern import Skyvern
+
+ client = Skyvern(
+ api_key="YOUR_API_KEY",
+ )
+ client.get_folder(
+ folder_id="fld_123",
+ )
"""
- return self._raw_client
+ _response = self._raw_client.get_folder(folder_id, request_options=request_options)
+ return _response.data
- async def run_task(
+ def update_folder(
self,
+ folder_id: str,
*,
- prompt: str,
- user_agent: typing.Optional[str] = None,
- url: typing.Optional[str] = OMIT,
- engine: typing.Optional[RunEngine] = OMIT,
title: typing.Optional[str] = OMIT,
- proxy_location: typing.Optional[TaskRunRequestProxyLocation] = OMIT,
- data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT,
- error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
- max_steps: typing.Optional[int] = OMIT,
- webhook_url: typing.Optional[str] = OMIT,
- totp_identifier: typing.Optional[str] = OMIT,
- totp_url: typing.Optional[str] = OMIT,
- browser_session_id: typing.Optional[str] = OMIT,
- model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
- extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
- publish_workflow: typing.Optional[bool] = OMIT,
+ description: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> Folder:
+ """
+ Update a folder's title or description
+
+ Parameters
+ ----------
+ folder_id : str
+ Folder ID
+
+ title : typing.Optional[str]
+ Folder title
+
+ description : typing.Optional[str]
+ Folder description
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ Folder
+ Successfully updated folder
+
+ Examples
+ --------
+ from skyvern import Skyvern
+
+ client = Skyvern(
+ api_key="YOUR_API_KEY",
+ )
+ client.update_folder(
+ folder_id="fld_123",
+ )
+ """
+ _response = self._raw_client.update_folder(
+ folder_id, title=title, description=description, request_options=request_options
+ )
+ return _response.data
+
+ def delete_folder(
+ self,
+ folder_id: str,
+ *,
+ delete_workflows: typing.Optional[bool] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> typing.Dict[str, typing.Optional[typing.Any]]:
+ """
+ Delete a folder. Optionally delete all workflows in the folder.
+
+ Parameters
+ ----------
+ folder_id : str
+ Folder ID
+
+ delete_workflows : typing.Optional[bool]
+ If true, also delete all workflows in this folder
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ typing.Dict[str, typing.Optional[typing.Any]]
+ Successfully deleted folder
+
+ Examples
+ --------
+ from skyvern import Skyvern
+
+ client = Skyvern(
+ api_key="YOUR_API_KEY",
+ )
+ client.delete_folder(
+ folder_id="fld_123",
+ delete_workflows=True,
+ )
+ """
+ _response = self._raw_client.delete_folder(
+ folder_id, delete_workflows=delete_workflows, request_options=request_options
+ )
+ return _response.data
+
+ def update_workflow_folder(
+ self,
+ workflow_permanent_id: str,
+ *,
+ folder_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> Workflow:
+ """
+ Update a workflow's folder assignment for the latest version
+
+ Parameters
+ ----------
+ workflow_permanent_id : str
+ Workflow permanent ID
+
+ folder_id : typing.Optional[str]
+ Folder ID to assign workflow to. Set to null to remove from folder.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ Workflow
+ Successfully updated workflow folder
+
+ Examples
+ --------
+ from skyvern import Skyvern
+
+ client = Skyvern(
+ api_key="YOUR_API_KEY",
+ )
+ client.update_workflow_folder(
+ workflow_permanent_id="wpid_123",
+ )
+ """
+ _response = self._raw_client.update_workflow_folder(
+ workflow_permanent_id, folder_id=folder_id, request_options=request_options
+ )
+ return _response.data
+
+ @property
+ def scripts(self):
+ if self._scripts is None:
+ from .scripts.client import ScriptsClient # noqa: E402
+
+ self._scripts = ScriptsClient(client_wrapper=self._client_wrapper)
+ return self._scripts
+
+
+class AsyncSkyvern:
+ """
+ Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.
+
+ Parameters
+ ----------
+ base_url : typing.Optional[str]
+ The base url to use for requests from the client.
+
+ environment : SkyvernEnvironment
+ The environment to use for requests from the client. from .environment import SkyvernEnvironment
+
+
+
+ Defaults to SkyvernEnvironment.CLOUD
+
+
+
+ api_key : typing.Optional[str]
+ headers : typing.Optional[typing.Dict[str, str]]
+ Additional headers to send with every request.
+
+ timeout : typing.Optional[float]
+ The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
+
+ follow_redirects : typing.Optional[bool]
+ Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
+
+ httpx_client : typing.Optional[httpx.AsyncClient]
+ The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
+
+ Examples
+ --------
+ from skyvern import AsyncSkyvern
+
+ client = AsyncSkyvern(
+ api_key="YOUR_API_KEY",
+ )
+ """
+
+ def __init__(
+ self,
+ *,
+ base_url: typing.Optional[str] = None,
+ environment: SkyvernEnvironment = SkyvernEnvironment.CLOUD,
+ api_key: typing.Optional[str] = None,
+ headers: typing.Optional[typing.Dict[str, str]] = None,
+ timeout: typing.Optional[float] = None,
+ follow_redirects: typing.Optional[bool] = True,
+ httpx_client: typing.Optional[httpx.AsyncClient] = None,
+ ):
+ _defaulted_timeout = (
+ timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
+ )
+ self._client_wrapper = AsyncClientWrapper(
+ base_url=_get_base_url(base_url=base_url, environment=environment),
+ api_key=api_key,
+ headers=headers,
+ httpx_client=httpx_client
+ if httpx_client is not None
+ else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
+ if follow_redirects is not None
+ else httpx.AsyncClient(timeout=_defaulted_timeout),
+ timeout=_defaulted_timeout,
+ )
+ self._raw_client = AsyncRawSkyvern(client_wrapper=self._client_wrapper)
+ self._scripts: typing.Optional[AsyncScriptsClient] = None
+
+ @property
+ def with_raw_response(self) -> AsyncRawSkyvern:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ AsyncRawSkyvern
+ """
+ return self._raw_client
+
+ async def run_task(
+ self,
+ *,
+ prompt: str,
+ user_agent: typing.Optional[str] = None,
+ url: typing.Optional[str] = OMIT,
+ engine: typing.Optional[RunEngine] = OMIT,
+ title: typing.Optional[str] = OMIT,
+ proxy_location: typing.Optional[TaskRunRequestProxyLocation] = OMIT,
+ data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT,
+ error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
+ max_steps: typing.Optional[int] = OMIT,
+ webhook_url: typing.Optional[str] = OMIT,
+ totp_identifier: typing.Optional[str] = OMIT,
+ totp_url: typing.Optional[str] = OMIT,
+ browser_session_id: typing.Optional[str] = OMIT,
+ model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
+ publish_workflow: typing.Optional[bool] = OMIT,
include_action_history_in_verification: typing.Optional[bool] = OMIT,
max_screenshot_scrolls: typing.Optional[int] = OMIT,
browser_address: typing.Optional[str] = OMIT,
@@ -2562,9 +2735,16 @@ class AsyncSkyvern:
- RESIDENTIAL_DE: Germany
- RESIDENTIAL_NZ: New Zealand
- RESIDENTIAL_PH: Philippines
+ - RESIDENTIAL_KR: South Korea
- RESIDENTIAL_ZA: South Africa
- RESIDENTIAL_AR: Argentina
- RESIDENTIAL_AU: Australia
+ - RESIDENTIAL_BR: Brazil
+ - RESIDENTIAL_TR: Turkey
+ - RESIDENTIAL_CA: Canada
+ - RESIDENTIAL_MX: Mexico
+ - RESIDENTIAL_IT: Italy
+ - RESIDENTIAL_NL: Netherlands
- RESIDENTIAL_ISP: ISP proxy
- US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
- US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
@@ -2734,9 +2914,16 @@ class AsyncSkyvern:
- RESIDENTIAL_DE: Germany
- RESIDENTIAL_NZ: New Zealand
- RESIDENTIAL_PH: Philippines
+ - RESIDENTIAL_KR: South Korea
- RESIDENTIAL_ZA: South Africa
- RESIDENTIAL_AR: Argentina
- RESIDENTIAL_AU: Australia
+ - RESIDENTIAL_BR: Brazil
+ - RESIDENTIAL_TR: Turkey
+ - RESIDENTIAL_CA: Canada
+ - RESIDENTIAL_MX: Mexico
+ - RESIDENTIAL_IT: Italy
+ - RESIDENTIAL_NL: Netherlands
- RESIDENTIAL_ISP: ISP proxy
- US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
- US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
@@ -2776,7 +2963,7 @@ class AsyncSkyvern:
Whether to fallback to AI if the workflow run fails.
run_with : typing.Optional[str]
- Whether to run the workflow with agent or code.
+ Whether to run the workflow with agent, code, or code_v2 (adaptive caching).
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -3165,125 +3352,47 @@ class AsyncSkyvern:
_response = await self._raw_client.delete_workflow(workflow_id, request_options=request_options)
return _response.data
- async def create_folder(
- self,
- *,
- title: str,
- description: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> Folder:
- _response = await self._raw_client.create_folder(
- title=title,
- description=description,
- request_options=request_options,
+ async def get_artifact(
+ self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> Artifact:
+ """
+ Get an artifact
+
+ Parameters
+ ----------
+ artifact_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ Artifact
+ Successfully retrieved artifact
+
+ Examples
+ --------
+ import asyncio
+
+ from skyvern import AsyncSkyvern
+
+ client = AsyncSkyvern(
+ api_key="YOUR_API_KEY",
)
- return _response.data
- async def get_folder(self, folder_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Folder:
- _response = await self._raw_client.get_folder(folder_id, request_options=request_options)
+
+ async def main() -> None:
+ await client.get_artifact(
+ artifact_id="artifact_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_artifact(artifact_id, request_options=request_options)
return _response.data
- async def get_folders(
- self,
- *,
- page: typing.Optional[int] = None,
- page_size: typing.Optional[int] = None,
- search: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> typing.List[Folder]:
- _response = await self._raw_client.get_folders(
- page=page,
- page_size=page_size,
- search=search,
- request_options=request_options,
- )
- return _response.data
-
- async def update_folder(
- self,
- folder_id: str,
- *,
- title: typing.Optional[str] = OMIT,
- description: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> Folder:
- _response = await self._raw_client.update_folder(
- folder_id,
- title=title,
- description=description,
- request_options=request_options,
- )
- return _response.data
-
- async def delete_folder(
- self,
- folder_id: str,
- *,
- delete_workflows: typing.Optional[bool] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> typing.Optional[typing.Any]:
- _response = await self._raw_client.delete_folder(
- folder_id,
- delete_workflows=delete_workflows,
- request_options=request_options,
- )
- return _response.data
-
- async def update_workflow_folder(
- self,
- workflow_id: str,
- *,
- folder_id: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> Workflow:
- _response = await self._raw_client.update_workflow_folder(
- workflow_id,
- folder_id=folder_id,
- request_options=request_options,
- )
- return _response.data
-
- async def get_artifact(
- self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> Artifact:
- """
- Get an artifact
-
- Parameters
- ----------
- artifact_id : str
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- Artifact
- Successfully retrieved artifact
-
- Examples
- --------
- import asyncio
-
- from skyvern import AsyncSkyvern
-
- client = AsyncSkyvern(
- api_key="YOUR_API_KEY",
- )
-
-
- async def main() -> None:
- await client.get_artifact(
- artifact_id="artifact_id",
- )
-
-
- asyncio.run(main())
- """
- _response = await self._raw_client.get_artifact(artifact_id, request_options=request_options)
- return _response.data
-
- async def get_run_artifacts(
+ async def get_run_artifacts(
self,
run_id: str,
*,
@@ -3884,6 +3993,7 @@ class AsyncSkyvern:
proxy_location: typing.Optional[ProxyLocation] = OMIT,
extensions: typing.Optional[typing.Sequence[Extensions]] = OMIT,
browser_type: typing.Optional[PersistentBrowserType] = OMIT,
+ browser_profile_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BrowserSessionResponse:
"""
@@ -3909,9 +4019,16 @@ class AsyncSkyvern:
- RESIDENTIAL_DE: Germany
- RESIDENTIAL_NZ: New Zealand
- RESIDENTIAL_PH: Philippines
+ - RESIDENTIAL_KR: South Korea
- RESIDENTIAL_ZA: South Africa
- RESIDENTIAL_AR: Argentina
- RESIDENTIAL_AU: Australia
+ - RESIDENTIAL_BR: Brazil
+ - RESIDENTIAL_TR: Turkey
+ - RESIDENTIAL_CA: Canada
+ - RESIDENTIAL_MX: Mexico
+ - RESIDENTIAL_IT: Italy
+ - RESIDENTIAL_NL: Netherlands
- RESIDENTIAL_ISP: ISP proxy
- US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
- US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
@@ -3926,6 +4043,9 @@ class AsyncSkyvern:
browser_type : typing.Optional[PersistentBrowserType]
The type of browser to use for the session.
+ browser_profile_id : typing.Optional[str]
+ ID of a browser profile to load into this session (restores cookies, localStorage, etc.). browser_profile_id starts with `bp_`.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -3956,6 +4076,7 @@ class AsyncSkyvern:
proxy_location=proxy_location,
extensions=extensions,
browser_type=browser_type,
+ browser_profile_id=browser_profile_id,
request_options=request_options,
)
return _response.data
@@ -4841,41 +4962,6 @@ class AsyncSkyvern:
async def clear_workflow_cache(
self, workflow_permanent_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> ClearCacheResponse:
- """
- Clear all cached scripts for a specific workflow. This will trigger script regeneration on subsequent runs.
-
- Parameters
- ----------
- workflow_permanent_id : str
- The workflow permanent ID to clear cache for
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- ClearCacheResponse
- Successful Response
-
- Examples
- --------
- import asyncio
-
- from skyvern import AsyncSkyvern
-
- client = AsyncSkyvern(
- api_key="YOUR_API_KEY",
- )
-
-
- async def main() -> None:
- await client.clear_workflow_cache(
- workflow_permanent_id="wpid_abc123",
- )
-
-
- asyncio.run(main())
- """
_response = await self._raw_client.clear_workflow_cache(workflow_permanent_id, request_options=request_options)
return _response.data
@@ -5121,6 +5207,306 @@ class AsyncSkyvern:
)
return _response.data
+ async def get_folders(
+ self,
+ *,
+ page: typing.Optional[int] = None,
+ page_size: typing.Optional[int] = None,
+ search: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> typing.List[Folder]:
+ """
+ Get all folders for the organization
+
+ Parameters
+ ----------
+ page : typing.Optional[int]
+ Page number
+
+ page_size : typing.Optional[int]
+ Number of folders per page
+
+ search : typing.Optional[str]
+ Search folders by title or description
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ typing.List[Folder]
+ Successfully retrieved folders
+
+ Examples
+ --------
+ import asyncio
+
+ from skyvern import AsyncSkyvern
+
+ client = AsyncSkyvern(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.get_folders(
+ page=1,
+ page_size=1,
+ search="search",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_folders(
+ page=page, page_size=page_size, search=search, request_options=request_options
+ )
+ return _response.data
+
+ async def create_folder(
+ self,
+ *,
+ title: str,
+ description: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> Folder:
+ """
+ Create a new folder to organize workflows
+
+ Parameters
+ ----------
+ title : str
+ Folder title
+
+ description : typing.Optional[str]
+ Folder description
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ Folder
+ Successfully created folder
+
+ Examples
+ --------
+ import asyncio
+
+ from skyvern import AsyncSkyvern
+
+ client = AsyncSkyvern(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.create_folder(
+ title="title",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.create_folder(
+ title=title, description=description, request_options=request_options
+ )
+ return _response.data
+
+ async def get_folder(self, folder_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Folder:
+ """
+ Get a specific folder by ID
+
+ Parameters
+ ----------
+ folder_id : str
+ Folder ID
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ Folder
+ Successfully retrieved folder
+
+ Examples
+ --------
+ import asyncio
+
+ from skyvern import AsyncSkyvern
+
+ client = AsyncSkyvern(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.get_folder(
+ folder_id="fld_123",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_folder(folder_id, request_options=request_options)
+ return _response.data
+
+ async def update_folder(
+ self,
+ folder_id: str,
+ *,
+ title: typing.Optional[str] = OMIT,
+ description: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> Folder:
+ """
+ Update a folder's title or description
+
+ Parameters
+ ----------
+ folder_id : str
+ Folder ID
+
+ title : typing.Optional[str]
+ Folder title
+
+ description : typing.Optional[str]
+ Folder description
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ Folder
+ Successfully updated folder
+
+ Examples
+ --------
+ import asyncio
+
+ from skyvern import AsyncSkyvern
+
+ client = AsyncSkyvern(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.update_folder(
+ folder_id="fld_123",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.update_folder(
+ folder_id, title=title, description=description, request_options=request_options
+ )
+ return _response.data
+
+ async def delete_folder(
+ self,
+ folder_id: str,
+ *,
+ delete_workflows: typing.Optional[bool] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> typing.Dict[str, typing.Optional[typing.Any]]:
+ """
+ Delete a folder. Optionally delete all workflows in the folder.
+
+ Parameters
+ ----------
+ folder_id : str
+ Folder ID
+
+ delete_workflows : typing.Optional[bool]
+ If true, also delete all workflows in this folder
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ typing.Dict[str, typing.Optional[typing.Any]]
+ Successfully deleted folder
+
+ Examples
+ --------
+ import asyncio
+
+ from skyvern import AsyncSkyvern
+
+ client = AsyncSkyvern(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.delete_folder(
+ folder_id="fld_123",
+ delete_workflows=True,
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.delete_folder(
+ folder_id, delete_workflows=delete_workflows, request_options=request_options
+ )
+ return _response.data
+
+ async def update_workflow_folder(
+ self,
+ workflow_permanent_id: str,
+ *,
+ folder_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> Workflow:
+ """
+ Update a workflow's folder assignment for the latest version
+
+ Parameters
+ ----------
+ workflow_permanent_id : str
+ Workflow permanent ID
+
+ folder_id : typing.Optional[str]
+ Folder ID to assign workflow to. Set to null to remove from folder.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ Workflow
+ Successfully updated workflow folder
+
+ Examples
+ --------
+ import asyncio
+
+ from skyvern import AsyncSkyvern
+
+ client = AsyncSkyvern(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.update_workflow_folder(
+ workflow_permanent_id="wpid_123",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.update_workflow_folder(
+ workflow_permanent_id, folder_id=folder_id, request_options=request_options
+ )
+ return _response.data
+
@property
def scripts(self):
if self._scripts is None:
diff --git a/skyvern/client/core/client_wrapper.py b/skyvern/client/core/client_wrapper.py
index 4756c7cd8..c5b1d68af 100644
--- a/skyvern/client/core/client_wrapper.py
+++ b/skyvern/client/core/client_wrapper.py
@@ -22,10 +22,10 @@ class BaseClientWrapper:
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "skyvern/1.0.23",
+ "User-Agent": "skyvern/1.0.24",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "skyvern",
- "X-Fern-SDK-Version": "1.0.23",
+ "X-Fern-SDK-Version": "1.0.24",
**(self.get_custom_headers() or {}),
}
if self._api_key is not None:
diff --git a/skyvern/client/raw_client.py b/skyvern/client/raw_client.py
index 7af69706d..2f0464e77 100644
--- a/skyvern/client/raw_client.py
+++ b/skyvern/client/raw_client.py
@@ -24,14 +24,12 @@ from .types.browser_profile import BrowserProfile
from .types.browser_session_response import BrowserSessionResponse
from .types.change_tier_response import ChangeTierResponse
from .types.checkout_session_response import CheckoutSessionResponse
-from .types.clear_cache_response import ClearCacheResponse
from .types.create_credential_request_credential import CreateCredentialRequestCredential
+from .types.clear_cache_response import ClearCacheResponse
from .types.create_script_response import CreateScriptResponse
from .types.credential_response import CredentialResponse
from .types.extensions import Extensions
from .types.folder import Folder
-from .types.folder_create import FolderCreate
-from .types.folder_update import FolderUpdate
from .types.get_run_response import GetRunResponse
from .types.otp_type import OtpType
from .types.persistent_browser_type import PersistentBrowserType
@@ -51,7 +49,6 @@ from .types.task_run_request_proxy_location import TaskRunRequestProxyLocation
from .types.task_run_response import TaskRunResponse
from .types.totp_code import TotpCode
from .types.upload_file_response import UploadFileResponse
-from .types.update_workflow_folder_request import UpdateWorkflowFolderRequest
from .types.workflow import Workflow
from .types.workflow_create_yaml_request import WorkflowCreateYamlRequest
from .types.workflow_run import WorkflowRun
@@ -131,9 +128,16 @@ class RawSkyvern:
- RESIDENTIAL_DE: Germany
- RESIDENTIAL_NZ: New Zealand
- RESIDENTIAL_PH: Philippines
+ - RESIDENTIAL_KR: South Korea
- RESIDENTIAL_ZA: South Africa
- RESIDENTIAL_AR: Argentina
- RESIDENTIAL_AU: Australia
+ - RESIDENTIAL_BR: Brazil
+ - RESIDENTIAL_TR: Turkey
+ - RESIDENTIAL_CA: Canada
+ - RESIDENTIAL_MX: Mexico
+ - RESIDENTIAL_IT: Italy
+ - RESIDENTIAL_NL: Netherlands
- RESIDENTIAL_ISP: ISP proxy
- US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
- US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
@@ -330,9 +334,16 @@ class RawSkyvern:
- RESIDENTIAL_DE: Germany
- RESIDENTIAL_NZ: New Zealand
- RESIDENTIAL_PH: Philippines
+ - RESIDENTIAL_KR: South Korea
- RESIDENTIAL_ZA: South Africa
- RESIDENTIAL_AR: Argentina
- RESIDENTIAL_AU: Australia
+ - RESIDENTIAL_BR: Brazil
+ - RESIDENTIAL_TR: Turkey
+ - RESIDENTIAL_CA: Canada
+ - RESIDENTIAL_MX: Mexico
+ - RESIDENTIAL_IT: Italy
+ - RESIDENTIAL_NL: Netherlands
- RESIDENTIAL_ISP: ISP proxy
- US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
- US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
@@ -372,7 +383,7 @@ class RawSkyvern:
Whether to fallback to AI if the workflow run fails.
run_with : typing.Optional[str]
- Whether to run the workflow with agent or code.
+ Whether to run the workflow with agent, code, or code_v2 (adaptive caching).
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -862,253 +873,6 @@ class RawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def create_folder(
- self,
- *,
- title: str,
- description: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[Folder]:
- _response = self._client_wrapper.httpx_client.request(
- "v1/folders",
- method="POST",
- json=convert_and_respect_annotation_metadata(
- object_=FolderCreate(title=title, description=description),
- annotation=FolderCreate,
- direction="write",
- ),
- headers={"content-type": "application/json"},
- request_options=request_options,
- omit=OMIT,
- )
- try:
- if 200 <= _response.status_code < 300:
- _data = typing.cast(Folder, parse_obj_as(type_=Folder, object_=_response.json())) # type: ignore
- return HttpResponse(response=_response, data=_data)
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
- def get_folder(
- self, folder_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> HttpResponse[Folder]:
- _response = self._client_wrapper.httpx_client.request(
- f"v1/folders/{jsonable_encoder(folder_id)}",
- method="GET",
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- _data = typing.cast(Folder, parse_obj_as(type_=Folder, object_=_response.json())) # type: ignore
- return HttpResponse(response=_response, data=_data)
- if _response.status_code == 404:
- raise NotFoundError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
- def get_folders(
- self,
- *,
- page: typing.Optional[int] = None,
- page_size: typing.Optional[int] = None,
- search: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[typing.List[Folder]]:
- _response = self._client_wrapper.httpx_client.request(
- "v1/folders",
- method="GET",
- params={"page": page, "page_size": page_size, "search": search},
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- _data = typing.cast(
- typing.List[Folder],
- parse_obj_as(type_=typing.List[Folder], object_=_response.json()), # type: ignore
- )
- return HttpResponse(response=_response, data=_data)
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
- def update_folder(
- self,
- folder_id: str,
- *,
- title: typing.Optional[str] = OMIT,
- description: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[Folder]:
- _response = self._client_wrapper.httpx_client.request(
- f"v1/folders/{jsonable_encoder(folder_id)}",
- method="PUT",
- json=convert_and_respect_annotation_metadata(
- object_=FolderUpdate(title=title, description=description),
- annotation=FolderUpdate,
- direction="write",
- ),
- headers={"content-type": "application/json"},
- request_options=request_options,
- omit=OMIT,
- )
- try:
- if 200 <= _response.status_code < 300:
- _data = typing.cast(Folder, parse_obj_as(type_=Folder, object_=_response.json())) # type: ignore
- return HttpResponse(response=_response, data=_data)
- if _response.status_code == 404:
- raise NotFoundError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
- def delete_folder(
- self,
- folder_id: str,
- *,
- delete_workflows: typing.Optional[bool] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[typing.Optional[typing.Any]]:
- _response = self._client_wrapper.httpx_client.request(
- f"v1/folders/{jsonable_encoder(folder_id)}",
- method="DELETE",
- params={"delete_workflows": delete_workflows},
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- if _response is None or not _response.text.strip():
- return HttpResponse(response=_response, data=None)
- _data = typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- )
- return HttpResponse(response=_response, data=_data)
- if _response.status_code == 404:
- raise NotFoundError(
- headers=dict(_response.headers),
- body=None
- if not _response.text.strip()
- else typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=None
- if not _response.text.strip()
- else typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- _response_json = None if not _response.text.strip() else _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
- def update_workflow_folder(
- self,
- workflow_id: str,
- *,
- folder_id: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[Workflow]:
- _response = self._client_wrapper.httpx_client.request(
- f"v1/workflows/{jsonable_encoder(workflow_id)}/folder",
- method="PUT",
- json=convert_and_respect_annotation_metadata(
- object_=UpdateWorkflowFolderRequest(folder_id=folder_id),
- annotation=UpdateWorkflowFolderRequest,
- direction="write",
- ),
- headers={"content-type": "application/json"},
- request_options=request_options,
- omit=OMIT,
- )
- try:
- if 200 <= _response.status_code < 300:
- _data = typing.cast(Workflow, parse_obj_as(type_=Workflow, object_=_response.json())) # type: ignore
- return HttpResponse(response=_response, data=_data)
- if _response.status_code == 400:
- raise BadRequestError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- if _response.status_code == 404:
- raise NotFoundError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
def get_artifact(
self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[Artifact]:
@@ -1969,6 +1733,7 @@ class RawSkyvern:
proxy_location: typing.Optional[ProxyLocation] = OMIT,
extensions: typing.Optional[typing.Sequence[Extensions]] = OMIT,
browser_type: typing.Optional[PersistentBrowserType] = OMIT,
+ browser_profile_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BrowserSessionResponse]:
"""
@@ -1994,9 +1759,16 @@ class RawSkyvern:
- RESIDENTIAL_DE: Germany
- RESIDENTIAL_NZ: New Zealand
- RESIDENTIAL_PH: Philippines
+ - RESIDENTIAL_KR: South Korea
- RESIDENTIAL_ZA: South Africa
- RESIDENTIAL_AR: Argentina
- RESIDENTIAL_AU: Australia
+ - RESIDENTIAL_BR: Brazil
+ - RESIDENTIAL_TR: Turkey
+ - RESIDENTIAL_CA: Canada
+ - RESIDENTIAL_MX: Mexico
+ - RESIDENTIAL_IT: Italy
+ - RESIDENTIAL_NL: Netherlands
- RESIDENTIAL_ISP: ISP proxy
- US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
- US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
@@ -2011,6 +1783,9 @@ class RawSkyvern:
browser_type : typing.Optional[PersistentBrowserType]
The type of browser to use for the session.
+ browser_profile_id : typing.Optional[str]
+ ID of a browser profile to load into this session (restores cookies, localStorage, etc.). browser_profile_id starts with `bp_`.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -2027,6 +1802,7 @@ class RawSkyvern:
"proxy_location": proxy_location,
"extensions": extensions,
"browser_type": browser_type,
+ "browser_profile_id": browser_profile_id,
},
headers={
"content-type": "application/json",
@@ -2055,6 +1831,17 @@ class RawSkyvern:
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -3139,22 +2926,6 @@ class RawSkyvern:
def clear_workflow_cache(
self, workflow_permanent_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[ClearCacheResponse]:
- """
- Clear all cached scripts for a specific workflow. This will trigger script regeneration on subsequent runs.
-
- Parameters
- ----------
- workflow_permanent_id : str
- The workflow permanent ID to clear cache for
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- HttpResponse[ClearCacheResponse]
- Successful Response
- """
_response = self._client_wrapper.httpx_client.request(
f"v1/scripts/{jsonable_encoder(workflow_permanent_id)}/cache",
method="DELETE",
@@ -3490,174 +3261,107 @@ class RawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
-class AsyncRawSkyvern:
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- async def run_task(
+ def get_folders(
self,
*,
- prompt: str,
- user_agent: typing.Optional[str] = None,
- url: typing.Optional[str] = OMIT,
- engine: typing.Optional[RunEngine] = OMIT,
- title: typing.Optional[str] = OMIT,
- proxy_location: typing.Optional[TaskRunRequestProxyLocation] = OMIT,
- data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT,
- error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
- max_steps: typing.Optional[int] = OMIT,
- webhook_url: typing.Optional[str] = OMIT,
- totp_identifier: typing.Optional[str] = OMIT,
- totp_url: typing.Optional[str] = OMIT,
- browser_session_id: typing.Optional[str] = OMIT,
- model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
- extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
- publish_workflow: typing.Optional[bool] = OMIT,
- include_action_history_in_verification: typing.Optional[bool] = OMIT,
- max_screenshot_scrolls: typing.Optional[int] = OMIT,
- browser_address: typing.Optional[str] = OMIT,
- run_with: typing.Optional[str] = OMIT,
+ page: typing.Optional[int] = None,
+ page_size: typing.Optional[int] = None,
+ search: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[TaskRunResponse]:
+ ) -> HttpResponse[typing.List[Folder]]:
"""
- Run a task
+ Get all folders for the organization
Parameters
----------
- prompt : str
-
- The goal or task description for Skyvern to accomplish
-
- user_agent : typing.Optional[str]
-
- url : typing.Optional[str]
-
- The starting URL for the task. If not provided, Skyvern will attempt to determine an appropriate URL
-
- engine : typing.Optional[RunEngine]
-
- The engine that powers the agent task. The default value is `skyvern-2.0`, the latest Skyvern agent that performs pretty well with complex and multi-step tasks. `skyvern-1.0` is good for simple tasks like filling a form, or searching for information on Google. The `openai-cua` engine uses OpenAI's CUA model. The `anthropic-cua` uses Anthropic's Claude Sonnet 3.7 model with the computer use tool.
-
- title : typing.Optional[str]
- The title for the task
-
- proxy_location : typing.Optional[TaskRunRequestProxyLocation]
-
- Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
-
- Available geotargeting options:
- - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy.
- - RESIDENTIAL_ES: Spain
- - RESIDENTIAL_IE: Ireland
- - RESIDENTIAL_GB: United Kingdom
- - RESIDENTIAL_IN: India
- - RESIDENTIAL_JP: Japan
- - RESIDENTIAL_FR: France
- - RESIDENTIAL_DE: Germany
- - RESIDENTIAL_NZ: New Zealand
- - RESIDENTIAL_PH: Philippines
- - RESIDENTIAL_ZA: South Africa
- - RESIDENTIAL_AR: Argentina
- - RESIDENTIAL_AU: Australia
- - RESIDENTIAL_ISP: ISP proxy
- - US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
- - US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
- - US-TX: Texas (deprecated, routes through RESIDENTIAL_ISP)
- - US-FL: Florida (deprecated, routes through RESIDENTIAL_ISP)
- - US-WA: Washington (deprecated, routes through RESIDENTIAL_ISP)
- - NONE: No proxy
- Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
-
- data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema]
-
- The schema for data to be extracted from the webpage. If you're looking for consistent data schema being returned by the agent, it's highly recommended to use https://json-schema.org/.
-
- error_code_mapping : typing.Optional[typing.Dict[str, typing.Optional[str]]]
-
- Custom mapping of error codes to error messages if Skyvern encounters an error.
-
- max_steps : typing.Optional[int]
-
- Maximum number of steps the task can take. Task will fail if it exceeds this number. Cautions: you are charged per step so please set this number to a reasonable value. Contact [email protected] for custom pricing.
-
- webhook_url : typing.Optional[str]
-
- After a run is finished, send an update to this URL. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for more details.
-
- totp_identifier : typing.Optional[str]
-
- Identifier for the TOTP/2FA/MFA code when the code is pushed to Skyvern. Refer to https://www.skyvern.com/docs/credentials/totp#option-3-push-code-to-skyvern for more details.
-
- totp_url : typing.Optional[str]
-
- URL that serves TOTP/2FA/MFA codes for Skyvern to use during the workflow run. Refer to https://www.skyvern.com/docs/credentials/totp#option-2-get-code-from-your-endpoint for more details.
-
- browser_session_id : typing.Optional[str]
-
- Run the task or workflow in the specific Skyvern browser session. Having a browser session can persist the real-time state of the browser, so that the next run can continue from where the previous run left off.
-
- model : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ page : typing.Optional[int]
+ Page number
- Optional model configuration.
+ page_size : typing.Optional[int]
+ Number of folders per page
- extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]]
- The extra HTTP headers for the requests in browser.
+ search : typing.Optional[str]
+ Search folders by title or description
- publish_workflow : typing.Optional[bool]
- Whether to publish this task as a reusable workflow. Only available for skyvern-2.0.
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
- include_action_history_in_verification : typing.Optional[bool]
- Whether to include action history when verifying that the task is complete
+ Returns
+ -------
+ HttpResponse[typing.List[Folder]]
+ Successfully retrieved folders
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "v1/folders",
+ method="GET",
+ params={
+ "page": page,
+ "page_size": page_size,
+ "search": search,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ typing.List[Folder],
+ parse_obj_as(
+ type_=typing.List[Folder], # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- max_screenshot_scrolls : typing.Optional[int]
- The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot.
+ def create_folder(
+ self,
+ *,
+ title: str,
+ description: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[Folder]:
+ """
+ Create a new folder to organize workflows
- browser_address : typing.Optional[str]
- The CDP address for the task.
+ Parameters
+ ----------
+ title : str
+ Folder title
- run_with : typing.Optional[str]
- Whether to run the task with agent or code.
+ description : typing.Optional[str]
+ Folder description
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[TaskRunResponse]
- Successfully run task
+ HttpResponse[Folder]
+ Successfully created folder
"""
- _response = await self._client_wrapper.httpx_client.request(
- "v1/run/tasks",
+ _response = self._client_wrapper.httpx_client.request(
+ "v1/folders",
method="POST",
json={
- "prompt": prompt,
- "url": url,
- "engine": engine,
"title": title,
- "proxy_location": convert_and_respect_annotation_metadata(
- object_=proxy_location, annotation=TaskRunRequestProxyLocation, direction="write"
- ),
- "data_extraction_schema": convert_and_respect_annotation_metadata(
- object_=data_extraction_schema, annotation=TaskRunRequestDataExtractionSchema, direction="write"
- ),
- "error_code_mapping": error_code_mapping,
- "max_steps": max_steps,
- "webhook_url": webhook_url,
- "totp_identifier": totp_identifier,
- "totp_url": totp_url,
- "browser_session_id": browser_session_id,
- "model": model,
- "extra_http_headers": extra_http_headers,
- "publish_workflow": publish_workflow,
- "include_action_history_in_verification": include_action_history_in_verification,
- "max_screenshot_scrolls": max_screenshot_scrolls,
- "browser_address": browser_address,
- "run_with": run_with,
+ "description": description,
},
headers={
"content-type": "application/json",
- "x-user-agent": str(user_agent) if user_agent is not None else None,
},
request_options=request_options,
omit=OMIT,
@@ -3665,13 +3369,13 @@ class AsyncRawSkyvern:
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- TaskRunResponse,
+ Folder,
parse_obj_as(
- type_=TaskRunResponse, # type: ignore
+ type_=Folder, # type: ignore
object_=_response.json(),
),
)
- return AsyncHttpResponse(response=_response, data=_data)
+ return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -3699,159 +3403,42 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def run_workflow(
- self,
- *,
- workflow_id: str,
- template: typing.Optional[bool] = None,
- max_steps_override: typing.Optional[int] = None,
- user_agent: typing.Optional[str] = None,
- parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
- title: typing.Optional[str] = OMIT,
- proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = OMIT,
- webhook_url: typing.Optional[str] = OMIT,
- totp_url: typing.Optional[str] = OMIT,
- totp_identifier: typing.Optional[str] = OMIT,
- browser_session_id: typing.Optional[str] = OMIT,
- browser_profile_id: typing.Optional[str] = OMIT,
- max_screenshot_scrolls: typing.Optional[int] = OMIT,
- extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
- browser_address: typing.Optional[str] = OMIT,
- ai_fallback: typing.Optional[bool] = OMIT,
- run_with: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[WorkflowRunResponse]:
+ def get_folder(
+ self, folder_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[Folder]:
"""
- Run a workflow
+ Get a specific folder by ID
Parameters
----------
- workflow_id : str
- ID of the workflow to run. Workflow ID starts with `wpid_`.
-
- template : typing.Optional[bool]
-
- max_steps_override : typing.Optional[int]
-
- user_agent : typing.Optional[str]
-
- parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
- Parameters to pass to the workflow
-
- title : typing.Optional[str]
- The title for this workflow run
-
- proxy_location : typing.Optional[WorkflowRunRequestProxyLocation]
+ folder_id : str
+ Folder ID
- Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
-
- Available geotargeting options:
- - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy.
- - RESIDENTIAL_ES: Spain
- - RESIDENTIAL_IE: Ireland
- - RESIDENTIAL_GB: United Kingdom
- - RESIDENTIAL_IN: India
- - RESIDENTIAL_JP: Japan
- - RESIDENTIAL_FR: France
- - RESIDENTIAL_DE: Germany
- - RESIDENTIAL_NZ: New Zealand
- - RESIDENTIAL_PH: Philippines
- - RESIDENTIAL_ZA: South Africa
- - RESIDENTIAL_AR: Argentina
- - RESIDENTIAL_AU: Australia
- - RESIDENTIAL_ISP: ISP proxy
- - US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
- - US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
- - US-TX: Texas (deprecated, routes through RESIDENTIAL_ISP)
- - US-FL: Florida (deprecated, routes through RESIDENTIAL_ISP)
- - US-WA: Washington (deprecated, routes through RESIDENTIAL_ISP)
- - NONE: No proxy
- Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
-
- webhook_url : typing.Optional[str]
- URL to send workflow status updates to after a run is finished. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for webhook questions.
-
- totp_url : typing.Optional[str]
-
- URL that serves TOTP/2FA/MFA codes for Skyvern to use during the workflow run. Refer to https://www.skyvern.com/docs/credentials/totp#option-2-get-code-from-your-endpoint for more details.
-
- totp_identifier : typing.Optional[str]
-
- Identifier for the TOTP/2FA/MFA code when the code is pushed to Skyvern. Refer to https://www.skyvern.com/docs/credentials/totp#option-3-push-code-to-skyvern for more details.
-
- browser_session_id : typing.Optional[str]
- ID of a Skyvern browser session to reuse, having it continue from the current screen state
-
- browser_profile_id : typing.Optional[str]
- ID of a browser profile to reuse for this workflow run
-
- max_screenshot_scrolls : typing.Optional[int]
- The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot.
-
- extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]]
- The extra HTTP headers for the requests in browser.
-
- browser_address : typing.Optional[str]
- The CDP address for the workflow run.
-
- ai_fallback : typing.Optional[bool]
- Whether to fallback to AI if the workflow run fails.
-
- run_with : typing.Optional[str]
- Whether to run the workflow with agent or code.
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
Returns
-------
- AsyncHttpResponse[WorkflowRunResponse]
- Successfully run workflow
+ HttpResponse[Folder]
+ Successfully retrieved folder
"""
- _response = await self._client_wrapper.httpx_client.request(
- "v1/run/workflows",
- method="POST",
- params={
- "template": template,
- },
- json={
- "workflow_id": workflow_id,
- "parameters": parameters,
- "title": title,
- "proxy_location": convert_and_respect_annotation_metadata(
- object_=proxy_location, annotation=WorkflowRunRequestProxyLocation, direction="write"
- ),
- "webhook_url": webhook_url,
- "totp_url": totp_url,
- "totp_identifier": totp_identifier,
- "browser_session_id": browser_session_id,
- "browser_profile_id": browser_profile_id,
- "max_screenshot_scrolls": max_screenshot_scrolls,
- "extra_http_headers": extra_http_headers,
- "browser_address": browser_address,
- "ai_fallback": ai_fallback,
- "run_with": run_with,
- },
- headers={
- "content-type": "application/json",
- "x-max-steps-override": str(max_steps_override) if max_steps_override is not None else None,
- "x-user-agent": str(user_agent) if user_agent is not None else None,
- },
+ _response = self._client_wrapper.httpx_client.request(
+ f"v1/folders/{jsonable_encoder(folder_id)}",
+ method="GET",
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- WorkflowRunResponse,
+ Folder,
parse_obj_as(
- type_=WorkflowRunResponse, # type: ignore
+ type_=Folder, # type: ignore
object_=_response.json(),
),
)
- return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 400:
- raise BadRequestError(
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 404:
+ raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
@@ -3877,40 +3464,59 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_run(
- self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[GetRunResponse]:
+ def update_folder(
+ self,
+ folder_id: str,
+ *,
+ title: typing.Optional[str] = OMIT,
+ description: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[Folder]:
"""
- Get run information (task run, workflow run)
+ Update a folder's title or description
Parameters
----------
- run_id : str
- The id of the task run or the workflow run.
+ folder_id : str
+ Folder ID
+
+ title : typing.Optional[str]
+ Folder title
+
+ description : typing.Optional[str]
+ Folder description
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[GetRunResponse]
- Successfully got run
+ HttpResponse[Folder]
+ Successfully updated folder
"""
- _response = await self._client_wrapper.httpx_client.request(
- f"v1/runs/{jsonable_encoder(run_id)}",
- method="GET",
+ _response = self._client_wrapper.httpx_client.request(
+ f"v1/folders/{jsonable_encoder(folder_id)}",
+ method="PUT",
+ json={
+ "title": title,
+ "description": description,
+ },
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- GetRunResponse,
+ Folder,
parse_obj_as(
- type_=GetRunResponse, # type: ignore
+ type_=Folder, # type: ignore
object_=_response.json(),
),
)
- return AsyncHttpResponse(response=_response, data=_data)
+ return HttpResponse(response=_response, data=_data)
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
@@ -3938,139 +3544,755 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def cancel_run(
- self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
+ def delete_folder(
+ self,
+ folder_id: str,
+ *,
+ delete_workflows: typing.Optional[bool] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[typing.Dict[str, typing.Optional[typing.Any]]]:
"""
- Cancel a run (task or workflow)
+ Delete a folder. Optionally delete all workflows in the folder.
Parameters
----------
- run_id : str
- The id of the task run or the workflow run to cancel.
+ folder_id : str
+ Folder ID
+
+ delete_workflows : typing.Optional[bool]
+ If true, also delete all workflows in this folder
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[typing.Optional[typing.Any]]
- Successful Response
+ HttpResponse[typing.Dict[str, typing.Optional[typing.Any]]]
+ Successfully deleted folder
"""
- _response = await self._client_wrapper.httpx_client.request(
- f"v1/runs/{jsonable_encoder(run_id)}/cancel",
- method="POST",
+ _response = self._client_wrapper.httpx_client.request(
+ f"v1/folders/{jsonable_encoder(folder_id)}",
+ method="DELETE",
+ params={
+ "delete_workflows": delete_workflows,
+ },
request_options=request_options,
)
try:
- if _response is None or not _response.text.strip():
- return AsyncHttpResponse(response=_response, data=None)
if 200 <= _response.status_code < 300:
+ if _response is None or not _response.text.strip():
+ return HttpResponse(response=_response, data=None)
_data = typing.cast(
typing.Optional[typing.Any],
- parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
+ parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=None
+ if not _response.text.strip()
+ else typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
),
)
- return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
- body=typing.cast(
+ body=None
+ if not _response.text.strip()
+ else typing.cast(
typing.Optional[typing.Any],
- parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
+ parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
),
)
- _response_json = _response.json()
+ _response_json = None if not _response.text.strip() else _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_workflows(
+ def update_workflow_folder(
self,
+ workflow_permanent_id: str,
*,
- page: typing.Optional[int] = None,
- page_size: typing.Optional[int] = None,
- only_saved_tasks: typing.Optional[bool] = None,
- only_workflows: typing.Optional[bool] = None,
- only_templates: typing.Optional[bool] = None,
- search_key: typing.Optional[str] = None,
- title: typing.Optional[str] = None,
- folder_id: typing.Optional[str] = None,
- status: typing.Optional[typing.Union[WorkflowStatus, typing.Sequence[WorkflowStatus]]] = None,
- template: typing.Optional[bool] = None,
+ folder_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[typing.List[Workflow]]:
+ ) -> HttpResponse[Workflow]:
"""
- Get all workflows with the latest version for the organization.
-
- Search semantics:
- - If `search_key` is provided, its value is used as a unified search term for
- `workflows.title`, `folders.title`, and workflow parameter metadata (key, description, and default_value for
- `WorkflowParameterModel`).
- - Falls back to deprecated `title` (title-only search) if `search_key` is not provided.
- - Parameter metadata search excludes soft-deleted parameter rows across all parameter tables.
+ Update a workflow's folder assignment for the latest version
Parameters
----------
- page : typing.Optional[int]
-
- page_size : typing.Optional[int]
-
- only_saved_tasks : typing.Optional[bool]
-
- only_workflows : typing.Optional[bool]
-
- only_templates : typing.Optional[bool]
-
- search_key : typing.Optional[str]
- Case-insensitive substring search across: workflow title, folder name, and parameter metadata (key, description, default_value). A workflow is returned if any of these fields match. Soft-deleted parameter definitions are excluded. Takes precedence over the deprecated `title` parameter.
-
- title : typing.Optional[str]
- Deprecated: use search_key instead. Falls back to title-only search if search_key is not provided.
+ workflow_permanent_id : str
+ Workflow permanent ID
folder_id : typing.Optional[str]
- Filter workflows by folder ID
-
- status : typing.Optional[typing.Union[WorkflowStatus, typing.Sequence[WorkflowStatus]]]
-
- template : typing.Optional[bool]
+ Folder ID to assign workflow to. Set to null to remove from folder.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[typing.List[Workflow]]
- Successful Response
+ HttpResponse[Workflow]
+ Successfully updated workflow folder
"""
- _response = await self._client_wrapper.httpx_client.request(
- "v1/workflows",
- method="GET",
- params={
- "page": page,
- "page_size": page_size,
- "only_saved_tasks": only_saved_tasks,
- "only_workflows": only_workflows,
- "only_templates": only_templates,
- "search_key": search_key,
- "title": title,
+ _response = self._client_wrapper.httpx_client.request(
+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/folder",
+ method="PUT",
+ json={
"folder_id": folder_id,
- "status": status,
- "template": template,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- typing.List[Workflow],
+ Workflow,
parse_obj_as(
- type_=typing.List[Workflow], # type: ignore
+ type_=Workflow, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+
+class AsyncRawSkyvern:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ async def run_task(
+ self,
+ *,
+ prompt: str,
+ user_agent: typing.Optional[str] = None,
+ url: typing.Optional[str] = OMIT,
+ engine: typing.Optional[RunEngine] = OMIT,
+ title: typing.Optional[str] = OMIT,
+ proxy_location: typing.Optional[TaskRunRequestProxyLocation] = OMIT,
+ data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT,
+ error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
+ max_steps: typing.Optional[int] = OMIT,
+ webhook_url: typing.Optional[str] = OMIT,
+ totp_identifier: typing.Optional[str] = OMIT,
+ totp_url: typing.Optional[str] = OMIT,
+ browser_session_id: typing.Optional[str] = OMIT,
+ model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
+ publish_workflow: typing.Optional[bool] = OMIT,
+ include_action_history_in_verification: typing.Optional[bool] = OMIT,
+ max_screenshot_scrolls: typing.Optional[int] = OMIT,
+ browser_address: typing.Optional[str] = OMIT,
+ run_with: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[TaskRunResponse]:
+ """
+ Run a task
+
+ Parameters
+ ----------
+ prompt : str
+
+ The goal or task description for Skyvern to accomplish
+
+ user_agent : typing.Optional[str]
+
+ url : typing.Optional[str]
+
+ The starting URL for the task. If not provided, Skyvern will attempt to determine an appropriate URL
+
+ engine : typing.Optional[RunEngine]
+
+ The engine that powers the agent task. The default value is `skyvern-2.0`, the latest Skyvern agent that performs pretty well with complex and multi-step tasks. `skyvern-1.0` is good for simple tasks like filling a form, or searching for information on Google. The `openai-cua` engine uses OpenAI's CUA model. The `anthropic-cua` uses Anthropic's Claude Sonnet 3.7 model with the computer use tool.
+
+ title : typing.Optional[str]
+ The title for the task
+
+ proxy_location : typing.Optional[TaskRunRequestProxyLocation]
+
+ Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
+
+ Available geotargeting options:
+ - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy.
+ - RESIDENTIAL_ES: Spain
+ - RESIDENTIAL_IE: Ireland
+ - RESIDENTIAL_GB: United Kingdom
+ - RESIDENTIAL_IN: India
+ - RESIDENTIAL_JP: Japan
+ - RESIDENTIAL_FR: France
+ - RESIDENTIAL_DE: Germany
+ - RESIDENTIAL_NZ: New Zealand
+ - RESIDENTIAL_PH: Philippines
+ - RESIDENTIAL_KR: South Korea
+ - RESIDENTIAL_ZA: South Africa
+ - RESIDENTIAL_AR: Argentina
+ - RESIDENTIAL_AU: Australia
+ - RESIDENTIAL_BR: Brazil
+ - RESIDENTIAL_TR: Turkey
+ - RESIDENTIAL_CA: Canada
+ - RESIDENTIAL_MX: Mexico
+ - RESIDENTIAL_IT: Italy
+ - RESIDENTIAL_NL: Netherlands
+ - RESIDENTIAL_ISP: ISP proxy
+ - US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
+ - US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
+ - US-TX: Texas (deprecated, routes through RESIDENTIAL_ISP)
+ - US-FL: Florida (deprecated, routes through RESIDENTIAL_ISP)
+ - US-WA: Washington (deprecated, routes through RESIDENTIAL_ISP)
+ - NONE: No proxy
+ Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
+
+ data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema]
+
+ The schema for data to be extracted from the webpage. If you're looking for consistent data schema being returned by the agent, it's highly recommended to use https://json-schema.org/.
+
+ error_code_mapping : typing.Optional[typing.Dict[str, typing.Optional[str]]]
+
+ Custom mapping of error codes to error messages if Skyvern encounters an error.
+
+ max_steps : typing.Optional[int]
+
+ Maximum number of steps the task can take. Task will fail if it exceeds this number. Cautions: you are charged per step so please set this number to a reasonable value. Contact [email protected] for custom pricing.
+
+ webhook_url : typing.Optional[str]
+
+ After a run is finished, send an update to this URL. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for more details.
+
+ totp_identifier : typing.Optional[str]
+
+ Identifier for the TOTP/2FA/MFA code when the code is pushed to Skyvern. Refer to https://www.skyvern.com/docs/credentials/totp#option-3-push-code-to-skyvern for more details.
+
+ totp_url : typing.Optional[str]
+
+ URL that serves TOTP/2FA/MFA codes for Skyvern to use during the workflow run. Refer to https://www.skyvern.com/docs/credentials/totp#option-2-get-code-from-your-endpoint for more details.
+
+ browser_session_id : typing.Optional[str]
+
+ Run the task or workflow in the specific Skyvern browser session. Having a browser session can persist the real-time state of the browser, so that the next run can continue from where the previous run left off.
+
+ model : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+
+ Optional model configuration.
+
+ extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]]
+ The extra HTTP headers for the requests in browser.
+
+ publish_workflow : typing.Optional[bool]
+ Whether to publish this task as a reusable workflow. Only available for skyvern-2.0.
+
+ include_action_history_in_verification : typing.Optional[bool]
+ Whether to include action history when verifying that the task is complete
+
+ max_screenshot_scrolls : typing.Optional[int]
+ The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot.
+
+ browser_address : typing.Optional[str]
+ The CDP address for the task.
+
+ run_with : typing.Optional[str]
+ Whether to run the task with agent or code.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[TaskRunResponse]
+ Successfully run task
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "v1/run/tasks",
+ method="POST",
+ json={
+ "prompt": prompt,
+ "url": url,
+ "engine": engine,
+ "title": title,
+ "proxy_location": convert_and_respect_annotation_metadata(
+ object_=proxy_location, annotation=TaskRunRequestProxyLocation, direction="write"
+ ),
+ "data_extraction_schema": convert_and_respect_annotation_metadata(
+ object_=data_extraction_schema, annotation=TaskRunRequestDataExtractionSchema, direction="write"
+ ),
+ "error_code_mapping": error_code_mapping,
+ "max_steps": max_steps,
+ "webhook_url": webhook_url,
+ "totp_identifier": totp_identifier,
+ "totp_url": totp_url,
+ "browser_session_id": browser_session_id,
+ "model": model,
+ "extra_http_headers": extra_http_headers,
+ "publish_workflow": publish_workflow,
+ "include_action_history_in_verification": include_action_history_in_verification,
+ "max_screenshot_scrolls": max_screenshot_scrolls,
+ "browser_address": browser_address,
+ "run_with": run_with,
+ },
+ headers={
+ "content-type": "application/json",
+ "x-user-agent": str(user_agent) if user_agent is not None else None,
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ TaskRunResponse,
+ parse_obj_as(
+ type_=TaskRunResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def run_workflow(
+ self,
+ *,
+ workflow_id: str,
+ template: typing.Optional[bool] = None,
+ max_steps_override: typing.Optional[int] = None,
+ user_agent: typing.Optional[str] = None,
+ parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ title: typing.Optional[str] = OMIT,
+ proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = OMIT,
+ webhook_url: typing.Optional[str] = OMIT,
+ totp_url: typing.Optional[str] = OMIT,
+ totp_identifier: typing.Optional[str] = OMIT,
+ browser_session_id: typing.Optional[str] = OMIT,
+ browser_profile_id: typing.Optional[str] = OMIT,
+ max_screenshot_scrolls: typing.Optional[int] = OMIT,
+ extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
+ browser_address: typing.Optional[str] = OMIT,
+ ai_fallback: typing.Optional[bool] = OMIT,
+ run_with: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[WorkflowRunResponse]:
+ """
+ Run a workflow
+
+ Parameters
+ ----------
+ workflow_id : str
+ ID of the workflow to run. Workflow ID starts with `wpid_`.
+
+ template : typing.Optional[bool]
+
+ max_steps_override : typing.Optional[int]
+
+ user_agent : typing.Optional[str]
+
+ parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
+ Parameters to pass to the workflow
+
+ title : typing.Optional[str]
+ The title for this workflow run
+
+ proxy_location : typing.Optional[WorkflowRunRequestProxyLocation]
+
+ Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
+
+ Available geotargeting options:
+ - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy.
+ - RESIDENTIAL_ES: Spain
+ - RESIDENTIAL_IE: Ireland
+ - RESIDENTIAL_GB: United Kingdom
+ - RESIDENTIAL_IN: India
+ - RESIDENTIAL_JP: Japan
+ - RESIDENTIAL_FR: France
+ - RESIDENTIAL_DE: Germany
+ - RESIDENTIAL_NZ: New Zealand
+ - RESIDENTIAL_PH: Philippines
+ - RESIDENTIAL_KR: South Korea
+ - RESIDENTIAL_ZA: South Africa
+ - RESIDENTIAL_AR: Argentina
+ - RESIDENTIAL_AU: Australia
+ - RESIDENTIAL_BR: Brazil
+ - RESIDENTIAL_TR: Turkey
+ - RESIDENTIAL_CA: Canada
+ - RESIDENTIAL_MX: Mexico
+ - RESIDENTIAL_IT: Italy
+ - RESIDENTIAL_NL: Netherlands
+ - RESIDENTIAL_ISP: ISP proxy
+ - US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
+ - US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
+ - US-TX: Texas (deprecated, routes through RESIDENTIAL_ISP)
+ - US-FL: Florida (deprecated, routes through RESIDENTIAL_ISP)
+ - US-WA: Washington (deprecated, routes through RESIDENTIAL_ISP)
+ - NONE: No proxy
+ Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
+
+ webhook_url : typing.Optional[str]
+ URL to send workflow status updates to after a run is finished. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for webhook questions.
+
+ totp_url : typing.Optional[str]
+
+ URL that serves TOTP/2FA/MFA codes for Skyvern to use during the workflow run. Refer to https://www.skyvern.com/docs/credentials/totp#option-2-get-code-from-your-endpoint for more details.
+
+ totp_identifier : typing.Optional[str]
+
+ Identifier for the TOTP/2FA/MFA code when the code is pushed to Skyvern. Refer to https://www.skyvern.com/docs/credentials/totp#option-3-push-code-to-skyvern for more details.
+
+ browser_session_id : typing.Optional[str]
+ ID of a Skyvern browser session to reuse, having it continue from the current screen state
+
+ browser_profile_id : typing.Optional[str]
+ ID of a browser profile to reuse for this workflow run
+
+ max_screenshot_scrolls : typing.Optional[int]
+ The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot.
+
+ extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]]
+ The extra HTTP headers for the requests in browser.
+
+ browser_address : typing.Optional[str]
+ The CDP address for the workflow run.
+
+ ai_fallback : typing.Optional[bool]
+ Whether to fallback to AI if the workflow run fails.
+
+ run_with : typing.Optional[str]
+ Whether to run the workflow with agent, code, or code_v2 (adaptive caching).
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[WorkflowRunResponse]
+ Successfully run workflow
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "v1/run/workflows",
+ method="POST",
+ params={
+ "template": template,
+ },
+ json={
+ "workflow_id": workflow_id,
+ "parameters": parameters,
+ "title": title,
+ "proxy_location": convert_and_respect_annotation_metadata(
+ object_=proxy_location, annotation=WorkflowRunRequestProxyLocation, direction="write"
+ ),
+ "webhook_url": webhook_url,
+ "totp_url": totp_url,
+ "totp_identifier": totp_identifier,
+ "browser_session_id": browser_session_id,
+ "browser_profile_id": browser_profile_id,
+ "max_screenshot_scrolls": max_screenshot_scrolls,
+ "extra_http_headers": extra_http_headers,
+ "browser_address": browser_address,
+ "ai_fallback": ai_fallback,
+ "run_with": run_with,
+ },
+ headers={
+ "content-type": "application/json",
+ "x-max-steps-override": str(max_steps_override) if max_steps_override is not None else None,
+ "x-user-agent": str(user_agent) if user_agent is not None else None,
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ WorkflowRunResponse,
+ parse_obj_as(
+ type_=WorkflowRunResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def get_run(
+ self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[GetRunResponse]:
+ """
+ Get run information (task run, workflow run)
+
+ Parameters
+ ----------
+ run_id : str
+ The id of the task run or the workflow run.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[GetRunResponse]
+ Successfully got run
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"v1/runs/{jsonable_encoder(run_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ GetRunResponse,
+ parse_obj_as(
+ type_=GetRunResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def cancel_run(
+ self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
+ """
+ Cancel a run (task or workflow)
+
+ Parameters
+ ----------
+ run_id : str
+ The id of the task run or the workflow run to cancel.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[typing.Optional[typing.Any]]
+ Successful Response
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"v1/runs/{jsonable_encoder(run_id)}/cancel",
+ method="POST",
+ request_options=request_options,
+ )
+ try:
+ if _response is None or not _response.text.strip():
+ return AsyncHttpResponse(response=_response, data=None)
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def get_workflows(
+ self,
+ *,
+ page: typing.Optional[int] = None,
+ page_size: typing.Optional[int] = None,
+ only_saved_tasks: typing.Optional[bool] = None,
+ only_workflows: typing.Optional[bool] = None,
+ only_templates: typing.Optional[bool] = None,
+ search_key: typing.Optional[str] = None,
+ title: typing.Optional[str] = None,
+ folder_id: typing.Optional[str] = None,
+ status: typing.Optional[typing.Union[WorkflowStatus, typing.Sequence[WorkflowStatus]]] = None,
+ template: typing.Optional[bool] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[typing.List[Workflow]]:
+ """
+ Get all workflows with the latest version for the organization.
+
+ Search semantics:
+ - If `search_key` is provided, its value is used as a unified search term for
+ `workflows.title`, `folders.title`, and workflow parameter metadata (key, description, and default_value for
+ `WorkflowParameterModel`).
+ - Falls back to deprecated `title` (title-only search) if `search_key` is not provided.
+ - Parameter metadata search excludes soft-deleted parameter rows across all parameter tables.
+
+ Parameters
+ ----------
+ page : typing.Optional[int]
+
+ page_size : typing.Optional[int]
+
+ only_saved_tasks : typing.Optional[bool]
+
+ only_workflows : typing.Optional[bool]
+
+ only_templates : typing.Optional[bool]
+
+ search_key : typing.Optional[str]
+ Case-insensitive substring search across: workflow title, folder name, and parameter metadata (key, description, default_value). A workflow is returned if any of these fields match. Soft-deleted parameter definitions are excluded. Takes precedence over the deprecated `title` parameter.
+
+ title : typing.Optional[str]
+ Deprecated: use search_key instead. Falls back to title-only search if search_key is not provided.
+
+ folder_id : typing.Optional[str]
+ Filter workflows by folder ID
+
+ status : typing.Optional[typing.Union[WorkflowStatus, typing.Sequence[WorkflowStatus]]]
+
+ template : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[typing.List[Workflow]]
+ Successful Response
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "v1/workflows",
+ method="GET",
+ params={
+ "page": page,
+ "page_size": page_size,
+ "only_saved_tasks": only_saved_tasks,
+ "only_workflows": only_workflows,
+ "only_templates": only_templates,
+ "search_key": search_key,
+ "title": title,
+ "folder_id": folder_id,
+ "status": status,
+ "template": template,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ typing.List[Workflow],
+ parse_obj_as(
+ type_=typing.List[Workflow], # type: ignore
object_=_response.json(),
),
)
@@ -4137,14 +4359,256 @@ class AsyncRawSkyvern:
"content-type": "application/json",
},
request_options=request_options,
- omit=OMIT,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ Workflow,
+ parse_obj_as(
+ type_=Workflow, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def update_workflow(
+ self,
+ workflow_id: str,
+ *,
+ json_definition: typing.Optional[WorkflowCreateYamlRequest] = OMIT,
+ yaml_definition: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[Workflow]:
+ """
+ Update a workflow
+
+ Parameters
+ ----------
+ workflow_id : str
+ The ID of the workflow to update. Workflow ID starts with `wpid_`.
+
+ json_definition : typing.Optional[WorkflowCreateYamlRequest]
+ Workflow definition in JSON format
+
+ yaml_definition : typing.Optional[str]
+ Workflow definition in YAML format
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[Workflow]
+ Successfully updated workflow
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"v1/workflows/{jsonable_encoder(workflow_id)}",
+ method="POST",
+ json={
+ "json_definition": convert_and_respect_annotation_metadata(
+ object_=json_definition, annotation=WorkflowCreateYamlRequest, direction="write"
+ ),
+ "yaml_definition": yaml_definition,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ Workflow,
+ parse_obj_as(
+ type_=Workflow, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def delete_workflow(
+ self, workflow_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
+ """
+ Delete a workflow
+
+ Parameters
+ ----------
+ workflow_id : str
+ The ID of the workflow to delete. Workflow ID starts with `wpid_`.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[typing.Optional[typing.Any]]
+ Successfully deleted workflow
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"v1/workflows/{jsonable_encoder(workflow_id)}/delete",
+ method="POST",
+ request_options=request_options,
+ )
+ try:
+ if _response is None or not _response.text.strip():
+ return AsyncHttpResponse(response=_response, data=None)
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def get_artifact(
+ self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[Artifact]:
+ """
+ Get an artifact
+
+ Parameters
+ ----------
+ artifact_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[Artifact]
+ Successfully retrieved artifact
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"v1/artifacts/{jsonable_encoder(artifact_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ Artifact,
+ parse_obj_as(
+ type_=Artifact, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def get_run_artifacts(
+ self,
+ run_id: str,
+ *,
+ artifact_type: typing.Optional[typing.Union[ArtifactType, typing.Sequence[ArtifactType]]] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[typing.List[Artifact]]:
+ """
+ Get artifacts for a run
+
+ Parameters
+ ----------
+ run_id : str
+ The id of the task run or the workflow run.
+
+ artifact_type : typing.Optional[typing.Union[ArtifactType, typing.Sequence[ArtifactType]]]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[typing.List[Artifact]]
+ Successful Response
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"v1/runs/{jsonable_encoder(run_id)}/artifacts",
+ method="GET",
+ params={
+ "artifact_type": artifact_type,
+ },
+ request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Workflow,
+ typing.List[Artifact],
parse_obj_as(
- type_=Workflow, # type: ignore
+ type_=typing.List[Artifact], # type: ignore
object_=_response.json(),
),
)
@@ -4165,45 +4629,37 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def update_workflow(
+ async def retry_run_webhook(
self,
- workflow_id: str,
+ run_id: str,
*,
- json_definition: typing.Optional[WorkflowCreateYamlRequest] = OMIT,
- yaml_definition: typing.Optional[str] = OMIT,
+ request: typing.Optional[RetryRunWebhookRequest] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[Workflow]:
+ ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
"""
- Update a workflow
+ Retry sending the webhook for a run
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
+ run_id : str
+ The id of the task run or the workflow run.
- yaml_definition : typing.Optional[str]
- Workflow definition in YAML format
+ request : typing.Optional[RetryRunWebhookRequest]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[Workflow]
- Successfully updated workflow
+ AsyncHttpResponse[typing.Optional[typing.Any]]
+ Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/workflows/{jsonable_encoder(workflow_id)}",
+ f"v1/runs/{jsonable_encoder(run_id)}/retry_webhook",
method="POST",
- json={
- "json_definition": convert_and_respect_annotation_metadata(
- object_=json_definition, annotation=WorkflowCreateYamlRequest, direction="write"
- ),
- "yaml_definition": yaml_definition,
- },
+ json=convert_and_respect_annotation_metadata(
+ object_=request, annotation=RetryRunWebhookRequest, direction="write"
+ ),
headers={
"content-type": "application/json",
},
@@ -4211,11 +4667,13 @@ class AsyncRawSkyvern:
omit=OMIT,
)
try:
+ if _response is None or not _response.text.strip():
+ return AsyncHttpResponse(response=_response, data=None)
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Workflow,
+ typing.Optional[typing.Any],
parse_obj_as(
- type_=Workflow, # type: ignore
+ type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
)
@@ -4236,44 +4694,42 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def delete_workflow(
- self, workflow_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
+ async def get_run_timeline(
+ self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[typing.List[WorkflowRunTimeline]]:
"""
- Delete a workflow
+ Get timeline for a run (workflow run or task_v2 run)
Parameters
----------
- workflow_id : str
- The ID of the workflow to delete. Workflow ID starts with `wpid_`.
+ run_id : str
+ The id of the workflow run or task_v2 run.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[typing.Optional[typing.Any]]
- Successfully deleted workflow
+ AsyncHttpResponse[typing.List[WorkflowRunTimeline]]
+ Successfully retrieved run timeline
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/workflows/{jsonable_encoder(workflow_id)}/delete",
- method="POST",
+ f"v1/runs/{jsonable_encoder(run_id)}/timeline",
+ method="GET",
request_options=request_options,
)
try:
- if _response is None or not _response.text.strip():
- return AsyncHttpResponse(response=_response, data=None)
if 200 <= _response.status_code < 300:
_data = typing.cast(
- typing.Optional[typing.Any],
+ typing.List[WorkflowRunTimeline],
parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
+ type_=typing.List[WorkflowRunTimeline], # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 422:
- raise UnprocessableEntityError(
+ if _response.status_code == 400:
+ raise BadRequestError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
@@ -4283,65 +4739,15 @@ class AsyncRawSkyvern:
),
),
)
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
- async def create_folder(
- self,
- *,
- title: str,
- description: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[Folder]:
- _response = await self._client_wrapper.httpx_client.request(
- "v1/folders",
- method="POST",
- json=convert_and_respect_annotation_metadata(
- object_=FolderCreate(title=title, description=description),
- annotation=FolderCreate,
- direction="write",
- ),
- headers={"content-type": "application/json"},
- request_options=request_options,
- omit=OMIT,
- )
- try:
- if 200 <= _response.status_code < 300:
- _data = typing.cast(Folder, parse_obj_as(type_=Folder, object_=_response.json())) # type: ignore
- return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
- async def get_folder(
- self, folder_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[Folder]:
- _response = await self._client_wrapper.httpx_client.request(
- f"v1/folders/{jsonable_encoder(folder_id)}",
- method="GET",
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- _data = typing.cast(Folder, parse_obj_as(type_=Folder, object_=_response.json())) # type: ignore
- return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
),
)
if _response.status_code == 422:
@@ -4349,7 +4755,10 @@ class AsyncRawSkyvern:
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
),
)
_response_json = _response.json()
@@ -4357,177 +4766,162 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_folders(
+ async def get_workflow_runs(
self,
*,
page: typing.Optional[int] = None,
page_size: typing.Optional[int] = None,
- search: typing.Optional[str] = None,
+ status: typing.Optional[typing.Union[WorkflowRunStatus, typing.Sequence[WorkflowRunStatus]]] = None,
+ search_key: typing.Optional[str] = None,
+ error_code: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[typing.List[Folder]]:
- _response = await self._client_wrapper.httpx_client.request(
- "v1/folders",
- method="GET",
- params={"page": page, "page_size": page_size, "search": search},
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- _data = typing.cast(
- typing.List[Folder],
- parse_obj_as(type_=typing.List[Folder], object_=_response.json()), # type: ignore
- )
- return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+ ) -> AsyncHttpResponse[typing.List[WorkflowRun]]:
+ """
+ List workflow runs across all workflows for the current organization.
- async def update_folder(
- self,
- folder_id: str,
- *,
- title: typing.Optional[str] = OMIT,
- description: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[Folder]:
- _response = await self._client_wrapper.httpx_client.request(
- f"v1/folders/{jsonable_encoder(folder_id)}",
- method="PUT",
- json=convert_and_respect_annotation_metadata(
- object_=FolderUpdate(title=title, description=description),
- annotation=FolderUpdate,
- direction="write",
- ),
- headers={"content-type": "application/json"},
- request_options=request_options,
- omit=OMIT,
- )
- try:
- if 200 <= _response.status_code < 300:
- _data = typing.cast(Folder, parse_obj_as(type_=Folder, object_=_response.json())) # type: ignore
- return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 404:
- raise NotFoundError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+ Results are paginated and can be filtered by **status**, **search_key**, and **error_code**. All filters are combined with **AND** logic — a run must match every supplied filter to be returned.
- async def delete_folder(
- self,
- folder_id: str,
- *,
- delete_workflows: typing.Optional[bool] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
+ ### search_key
+
+ A case-insensitive substring search that matches against **any** of the following fields:
+
+ | Searched field | Description |
+ |---|---|
+ | `workflow_run_id` | The unique run identifier (e.g. `wr_123…`) |
+ | Parameter **key** | The `key` of any workflow parameter definition associated with the run |
+ | Parameter **description** | The `description` of any workflow parameter definition |
+ | Run parameter **value** | The actual value supplied for any parameter when the run was created |
+ | `extra_http_headers` | Extra HTTP headers attached to the run (searched as raw JSON text) |
+
+ Soft-deleted parameter definitions are excluded from key/description matching. A run is returned if **any** of the fields above contain the search term.
+
+ ### error_code
+
+ An **exact-match** filter against the `error_code` field inside each task's `errors` JSON array. A run matches if **any** of its tasks contains an error object with a matching `error_code` value. Error codes are user-defined strings set during workflow execution (e.g. `INVALID_CREDENTIALS`, `LOGIN_FAILED`, `CAPTCHA_DETECTED`).
+
+ ### Combining filters
+
+ All query parameters use AND logic:
+ - `?status=failed` — only failed runs
+ - `?status=failed&error_code=LOGIN_FAILED` — failed runs **and** have a LOGIN_FAILED error
+ - `?status=failed&error_code=LOGIN_FAILED&search_key=prod_credential` — all three conditions must match
+
+ Parameters
+ ----------
+ page : typing.Optional[int]
+ Page number for pagination.
+
+ page_size : typing.Optional[int]
+ Number of runs to return per page.
+
+ status : typing.Optional[typing.Union[WorkflowRunStatus, typing.Sequence[WorkflowRunStatus]]]
+ Filter by one or more run statuses.
+
+ search_key : typing.Optional[str]
+ Case-insensitive substring search across: workflow run ID, parameter key, parameter description, run parameter value, and extra HTTP headers. A run is returned if any of these fields match. Soft-deleted parameter definitions are excluded from key/description matching.
+
+ error_code : typing.Optional[str]
+ Exact-match filter on the error_code field inside each task's errors JSON array. A run matches if any of its tasks contains an error with a matching error_code. Error codes are user-defined strings set during workflow execution.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[typing.List[WorkflowRun]]
+ Successful Response
+ """
_response = await self._client_wrapper.httpx_client.request(
- f"v1/folders/{jsonable_encoder(folder_id)}",
- method="DELETE",
- params={"delete_workflows": delete_workflows},
+ "v1/workflows/runs",
+ method="GET",
+ params={
+ "page": page,
+ "page_size": page_size,
+ "status": status,
+ "search_key": search_key,
+ "error_code": error_code,
+ },
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
- if _response is None or not _response.text.strip():
- return AsyncHttpResponse(response=_response, data=None)
_data = typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- )
- return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 404:
- raise NotFoundError(
- headers=dict(_response.headers),
- body=None
- if not _response.text.strip()
- else typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
+ typing.List[WorkflowRun],
+ parse_obj_as(
+ type_=typing.List[WorkflowRun], # type: ignore
+ object_=_response.json(),
),
)
+ return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
- body=None
- if not _response.text.strip()
- else typing.cast(
+ body=typing.cast(
typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
),
)
- _response_json = None if not _response.text.strip() else _response.json()
+ _response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def update_workflow_folder(
+ async def get_workflow(
self,
- workflow_id: str,
+ workflow_permanent_id: str,
*,
- folder_id: typing.Optional[str] = OMIT,
+ version: typing.Optional[int] = None,
+ template: typing.Optional[bool] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[Workflow]:
+ """
+ Parameters
+ ----------
+ workflow_permanent_id : str
+
+ version : typing.Optional[int]
+
+ template : typing.Optional[bool]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[Workflow]
+ Successful Response
+ """
_response = await self._client_wrapper.httpx_client.request(
- f"v1/workflows/{jsonable_encoder(workflow_id)}/folder",
- method="PUT",
- json=convert_and_respect_annotation_metadata(
- object_=UpdateWorkflowFolderRequest(folder_id=folder_id),
- annotation=UpdateWorkflowFolderRequest,
- direction="write",
- ),
- headers={"content-type": "application/json"},
+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}",
+ method="GET",
+ params={
+ "version": version,
+ "template": template,
+ },
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
- _data = typing.cast(Workflow, parse_obj_as(type_=Workflow, object_=_response.json())) # type: ignore
- return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 400:
- raise BadRequestError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
- ),
- )
- if _response.status_code == 404:
- raise NotFoundError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
+ _data = typing.cast(
+ Workflow,
+ parse_obj_as(
+ type_=Workflow, # type: ignore
+ object_=_response.json(),
),
)
+ return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
- parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
),
)
_response_json = _response.json()
@@ -4535,50 +4929,48 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_artifact(
- self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[Artifact]:
+ async def get_workflow_versions(
+ self,
+ workflow_permanent_id: str,
+ *,
+ template: typing.Optional[bool] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[typing.List[Workflow]]:
"""
- Get an artifact
+ Get all versions of a workflow by its permanent ID.
Parameters
----------
- artifact_id : str
+ workflow_permanent_id : str
+
+ template : typing.Optional[bool]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[Artifact]
- Successfully retrieved artifact
+ AsyncHttpResponse[typing.List[Workflow]]
+ Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/artifacts/{jsonable_encoder(artifact_id)}",
+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/versions",
method="GET",
+ params={
+ "template": template,
+ },
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Artifact,
+ typing.List[Workflow],
parse_obj_as(
- type_=Artifact, # type: ignore
+ type_=typing.List[Workflow], # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 404:
- raise NotFoundError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
- ),
- )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -4595,45 +4987,40 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_run_artifacts(
- self,
- run_id: str,
- *,
- artifact_type: typing.Optional[typing.Union[ArtifactType, typing.Sequence[ArtifactType]]] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[typing.List[Artifact]]:
+ async def upload_file(
+ self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[UploadFileResponse]:
"""
- Get artifacts for a run
-
Parameters
----------
- run_id : str
- The id of the task run or the workflow run.
-
- artifact_type : typing.Optional[typing.Union[ArtifactType, typing.Sequence[ArtifactType]]]
+ file : core.File
+ See core.File for more documentation
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[typing.List[Artifact]]
+ AsyncHttpResponse[UploadFileResponse]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/runs/{jsonable_encoder(run_id)}/artifacts",
- method="GET",
- params={
- "artifact_type": artifact_type,
+ "v1/upload_file",
+ method="POST",
+ data={},
+ files={
+ "file": file,
},
request_options=request_options,
+ omit=OMIT,
+ force_multipart=True,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- typing.List[Artifact],
+ UploadFileResponse,
parse_obj_as(
- type_=typing.List[Artifact], # type: ignore
+ type_=UploadFileResponse, # type: ignore
object_=_response.json(),
),
)
@@ -4654,51 +5041,39 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def retry_run_webhook(
- self,
- run_id: str,
- *,
- request: typing.Optional[RetryRunWebhookRequest] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
+ async def list_browser_profiles(
+ self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[typing.List[BrowserProfile]]:
"""
- Retry sending the webhook for a run
+ Get all browser profiles for the organization
Parameters
----------
- run_id : str
- The id of the task run or the workflow run.
-
- request : typing.Optional[RetryRunWebhookRequest]
+ include_deleted : typing.Optional[bool]
+ Include deleted browser profiles
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[typing.Optional[typing.Any]]
- Successful Response
+ AsyncHttpResponse[typing.List[BrowserProfile]]
+ Successfully retrieved browser profiles
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/runs/{jsonable_encoder(run_id)}/retry_webhook",
- method="POST",
- json=convert_and_respect_annotation_metadata(
- object_=request, annotation=RetryRunWebhookRequest, direction="write"
- ),
- headers={
- "content-type": "application/json",
+ "v1/browser_profiles",
+ method="GET",
+ params={
+ "include_deleted": include_deleted,
},
request_options=request_options,
- omit=OMIT,
)
try:
- if _response is None or not _response.text.strip():
- return AsyncHttpResponse(response=_response, data=None)
if 200 <= _response.status_code < 300:
_data = typing.cast(
- typing.Optional[typing.Any],
+ typing.List[BrowserProfile],
parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
+ type_=typing.List[BrowserProfile], # type: ignore
object_=_response.json(),
),
)
@@ -4719,36 +5094,61 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_run_timeline(
- self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[typing.List[WorkflowRunTimeline]]:
+ async def create_browser_profile(
+ self,
+ *,
+ name: str,
+ description: typing.Optional[str] = OMIT,
+ browser_session_id: typing.Optional[str] = OMIT,
+ workflow_run_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BrowserProfile]:
"""
- Get timeline for a run (workflow run or task_v2 run)
+ Create a browser profile from a persistent browser session or workflow run.
Parameters
----------
- run_id : str
- The id of the workflow run or task_v2 run.
+ name : str
+ Name for the browser profile
+
+ description : typing.Optional[str]
+ Optional profile description
+
+ browser_session_id : typing.Optional[str]
+ Persistent browser session to convert into a profile
+
+ workflow_run_id : typing.Optional[str]
+ Workflow run whose persisted session should be captured
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
- -------
- AsyncHttpResponse[typing.List[WorkflowRunTimeline]]
- Successfully retrieved run timeline
+ -------
+ AsyncHttpResponse[BrowserProfile]
+ Successfully created browser profile
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/runs/{jsonable_encoder(run_id)}/timeline",
- method="GET",
+ "v1/browser_profiles",
+ method="POST",
+ json={
+ "name": name,
+ "description": description,
+ "browser_session_id": browser_session_id,
+ "workflow_run_id": workflow_run_id,
+ },
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- typing.List[WorkflowRunTimeline],
+ BrowserProfile,
parse_obj_as(
- type_=typing.List[WorkflowRunTimeline], # type: ignore
+ type_=BrowserProfile, # type: ignore
object_=_response.json(),
),
)
@@ -4764,8 +5164,8 @@ class AsyncRawSkyvern:
),
),
)
- if _response.status_code == 404:
- raise NotFoundError(
+ if _response.status_code == 409:
+ raise ConflictError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
@@ -4791,93 +5191,51 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_workflow_runs(
- self,
- *,
- page: typing.Optional[int] = None,
- page_size: typing.Optional[int] = None,
- status: typing.Optional[typing.Union[WorkflowRunStatus, typing.Sequence[WorkflowRunStatus]]] = None,
- search_key: typing.Optional[str] = None,
- error_code: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[typing.List[WorkflowRun]]:
+ async def get_browser_profile(
+ self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[BrowserProfile]:
"""
- List workflow runs across all workflows for the current organization.
-
- Results are paginated and can be filtered by **status**, **search_key**, and **error_code**. All filters are combined with **AND** logic — a run must match every supplied filter to be returned.
-
- ### search_key
-
- A case-insensitive substring search that matches against **any** of the following fields:
-
- | Searched field | Description |
- |---|---|
- | `workflow_run_id` | The unique run identifier (e.g. `wr_123…`) |
- | Parameter **key** | The `key` of any workflow parameter definition associated with the run |
- | Parameter **description** | The `description` of any workflow parameter definition |
- | Run parameter **value** | The actual value supplied for any parameter when the run was created |
- | `extra_http_headers` | Extra HTTP headers attached to the run (searched as raw JSON text) |
-
- Soft-deleted parameter definitions are excluded from key/description matching. A run is returned if **any** of the fields above contain the search term.
-
- ### error_code
-
- An **exact-match** filter against the `error_code` field inside each task's `errors` JSON array. A run matches if **any** of its tasks contains an error object with a matching `error_code` value. Error codes are user-defined strings set during workflow execution (e.g. `INVALID_CREDENTIALS`, `LOGIN_FAILED`, `CAPTCHA_DETECTED`).
-
- ### Combining filters
-
- All query parameters use AND logic:
- - `?status=failed` — only failed runs
- - `?status=failed&error_code=LOGIN_FAILED` — failed runs **and** have a LOGIN_FAILED error
- - `?status=failed&error_code=LOGIN_FAILED&search_key=prod_credential` — all three conditions must match
+ Get a specific browser profile by ID
Parameters
----------
- page : typing.Optional[int]
- Page number for pagination.
-
- page_size : typing.Optional[int]
- Number of runs to return per page.
-
- status : typing.Optional[typing.Union[WorkflowRunStatus, typing.Sequence[WorkflowRunStatus]]]
- Filter by one or more run statuses.
-
- search_key : typing.Optional[str]
- Case-insensitive substring search across: workflow run ID, parameter key, parameter description, run parameter value, and extra HTTP headers. A run is returned if any of these fields match. Soft-deleted parameter definitions are excluded from key/description matching.
-
- error_code : typing.Optional[str]
- Exact-match filter on the error_code field inside each task's errors JSON array. A run matches if any of its tasks contains an error with a matching error_code. Error codes are user-defined strings set during workflow execution.
+ profile_id : str
+ The ID of the browser profile. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[typing.List[WorkflowRun]]
- Successful Response
+ AsyncHttpResponse[BrowserProfile]
+ Successfully retrieved browser profile
"""
_response = await self._client_wrapper.httpx_client.request(
- "v1/workflows/runs",
+ f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
method="GET",
- params={
- "page": page,
- "page_size": page_size,
- "status": status,
- "search_key": search_key,
- "error_code": error_code,
- },
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- typing.List[WorkflowRun],
+ BrowserProfile,
parse_obj_as(
- type_=typing.List[WorkflowRun], # type: ignore
+ type_=BrowserProfile, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -4894,50 +5252,43 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_workflow(
- self,
- workflow_permanent_id: str,
- *,
- version: typing.Optional[int] = None,
- template: typing.Optional[bool] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[Workflow]:
+ async def delete_browser_profile(
+ self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[None]:
"""
+ Delete a browser profile (soft delete)
+
Parameters
----------
- workflow_permanent_id : str
-
- version : typing.Optional[int]
-
- template : typing.Optional[bool]
+ profile_id : str
+ The ID of the browser profile to delete. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[Workflow]
- Successful Response
+ AsyncHttpResponse[None]
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}",
- method="GET",
- params={
- "version": version,
- "template": template,
- },
+ f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
+ method="DELETE",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
- _data = typing.cast(
- Workflow,
- parse_obj_as(
- type_=Workflow, # type: ignore
- object_=_response.json(),
+ return AsyncHttpResponse(response=_response, data=None)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
),
)
- return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -4954,48 +5305,48 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_workflow_versions(
- self,
- workflow_permanent_id: str,
- *,
- template: typing.Optional[bool] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[typing.List[Workflow]]:
+ async def get_browser_sessions(
+ self, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[typing.List[BrowserSessionResponse]]:
"""
- Get all versions of a workflow by its permanent ID.
+ Get all active browser sessions for the organization
Parameters
----------
- workflow_permanent_id : str
-
- template : typing.Optional[bool]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[typing.List[Workflow]]
- Successful Response
+ AsyncHttpResponse[typing.List[BrowserSessionResponse]]
+ Successfully retrieved all active browser sessions
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/versions",
+ "v1/browser_sessions",
method="GET",
- params={
- "template": template,
- },
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- typing.List[Workflow],
+ typing.List[BrowserSessionResponse],
parse_obj_as(
- type_=typing.List[Workflow], # type: ignore
+ type_=typing.List[BrowserSessionResponse], # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -5012,44 +5363,122 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def upload_file(
- self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[UploadFileResponse]:
+ async def create_browser_session(
+ self,
+ *,
+ timeout: typing.Optional[int] = OMIT,
+ proxy_location: typing.Optional[ProxyLocation] = OMIT,
+ extensions: typing.Optional[typing.Sequence[Extensions]] = OMIT,
+ browser_type: typing.Optional[PersistentBrowserType] = OMIT,
+ browser_profile_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[BrowserSessionResponse]:
"""
+ Create a browser session that persists across multiple runs
+
Parameters
----------
- file : core.File
- See core.File for more documentation
+ timeout : typing.Optional[int]
+ Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 1440. Defaults to 60.
+
+ proxy_location : typing.Optional[ProxyLocation]
+
+ Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
+
+ Available geotargeting options:
+ - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy.
+ - RESIDENTIAL_ES: Spain
+ - RESIDENTIAL_IE: Ireland
+ - RESIDENTIAL_GB: United Kingdom
+ - RESIDENTIAL_IN: India
+ - RESIDENTIAL_JP: Japan
+ - RESIDENTIAL_FR: France
+ - RESIDENTIAL_DE: Germany
+ - RESIDENTIAL_NZ: New Zealand
+ - RESIDENTIAL_PH: Philippines
+ - RESIDENTIAL_KR: South Korea
+ - RESIDENTIAL_ZA: South Africa
+ - RESIDENTIAL_AR: Argentina
+ - RESIDENTIAL_AU: Australia
+ - RESIDENTIAL_BR: Brazil
+ - RESIDENTIAL_TR: Turkey
+ - RESIDENTIAL_CA: Canada
+ - RESIDENTIAL_MX: Mexico
+ - RESIDENTIAL_IT: Italy
+ - RESIDENTIAL_NL: Netherlands
+ - RESIDENTIAL_ISP: ISP proxy
+ - US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
+ - US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
+ - US-TX: Texas (deprecated, routes through RESIDENTIAL_ISP)
+ - US-FL: Florida (deprecated, routes through RESIDENTIAL_ISP)
+ - US-WA: Washington (deprecated, routes through RESIDENTIAL_ISP)
+ - NONE: No proxy
+
+ extensions : typing.Optional[typing.Sequence[Extensions]]
+ A list of extensions to install in the browser session.
+
+ browser_type : typing.Optional[PersistentBrowserType]
+ The type of browser to use for the session.
+
+ browser_profile_id : typing.Optional[str]
+ ID of a browser profile to load into this session (restores cookies, localStorage, etc.). browser_profile_id starts with `bp_`.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[UploadFileResponse]
- Successful Response
+ AsyncHttpResponse[BrowserSessionResponse]
+ Successfully created browser session
"""
_response = await self._client_wrapper.httpx_client.request(
- "v1/upload_file",
+ "v1/browser_sessions",
method="POST",
- data={},
- files={
- "file": file,
+ json={
+ "timeout": timeout,
+ "proxy_location": proxy_location,
+ "extensions": extensions,
+ "browser_type": browser_type,
+ "browser_profile_id": browser_profile_id,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
- force_multipart=True,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- UploadFileResponse,
+ BrowserSessionResponse,
parse_obj_as(
- type_=UploadFileResponse, # type: ignore
+ type_=BrowserSessionResponse, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -5066,43 +5495,53 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def list_browser_profiles(
- self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[typing.List[BrowserProfile]]:
+ async def close_browser_session(
+ self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
"""
- Get all browser profiles for the organization
+ Close a session. Once closed, the session cannot be used again.
Parameters
----------
- include_deleted : typing.Optional[bool]
- Include deleted browser profiles
+ browser_session_id : str
+ The ID of the browser session to close. completed_at will be set when the browser session is closed. browser_session_id starts with `pbs_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[typing.List[BrowserProfile]]
- Successfully retrieved browser profiles
+ AsyncHttpResponse[typing.Optional[typing.Any]]
+ Successfully closed browser session
"""
_response = await self._client_wrapper.httpx_client.request(
- "v1/browser_profiles",
- method="GET",
- params={
- "include_deleted": include_deleted,
- },
+ f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}/close",
+ method="POST",
request_options=request_options,
)
try:
+ if _response is None or not _response.text.strip():
+ return AsyncHttpResponse(response=_response, data=None)
if 200 <= _response.status_code < 300:
_data = typing.cast(
- typing.List[BrowserProfile],
+ typing.Optional[typing.Any],
parse_obj_as(
- type_=typing.List[BrowserProfile], # type: ignore
+ type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -5119,67 +5558,42 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def create_browser_profile(
- self,
- *,
- name: str,
- description: typing.Optional[str] = OMIT,
- browser_session_id: typing.Optional[str] = OMIT,
- workflow_run_id: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[BrowserProfile]:
+ async def get_browser_session(
+ self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[BrowserSessionResponse]:
"""
- Create a browser profile from a persistent browser session or workflow run.
+ Get details about a specific browser session, including the browser address for cdp connection.
Parameters
----------
- name : str
- Name for the browser profile
-
- description : typing.Optional[str]
- Optional profile description
-
- browser_session_id : typing.Optional[str]
- Persistent browser session to convert into a profile
-
- workflow_run_id : typing.Optional[str]
- Workflow run whose persisted session should be captured
+ browser_session_id : str
+ The ID of the browser session. browser_session_id starts with `pbs_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[BrowserProfile]
- Successfully created browser profile
+ AsyncHttpResponse[BrowserSessionResponse]
+ Successfully retrieved browser session details
"""
_response = await self._client_wrapper.httpx_client.request(
- "v1/browser_profiles",
- method="POST",
- json={
- "name": name,
- "description": description,
- "browser_session_id": browser_session_id,
- "workflow_run_id": workflow_run_id,
- },
- headers={
- "content-type": "application/json",
- },
+ f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}",
+ method="GET",
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BrowserProfile,
+ BrowserSessionResponse,
parse_obj_as(
- type_=BrowserProfile, # type: ignore
+ type_=BrowserSessionResponse, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 400:
- raise BadRequestError(
+ if _response.status_code == 403:
+ raise ForbiddenError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
@@ -5189,8 +5603,8 @@ class AsyncRawSkyvern:
),
),
)
- if _response.status_code == 409:
- raise ConflictError(
+ if _response.status_code == 404:
+ raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
@@ -5216,51 +5630,85 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_browser_profile(
- self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[BrowserProfile]:
+ async def send_totp_code(
+ self,
+ *,
+ totp_identifier: str,
+ content: str,
+ task_id: typing.Optional[str] = OMIT,
+ workflow_id: typing.Optional[str] = OMIT,
+ workflow_run_id: typing.Optional[str] = OMIT,
+ source: typing.Optional[str] = OMIT,
+ expired_at: typing.Optional[dt.datetime] = OMIT,
+ type: typing.Optional[OtpType] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[TotpCode]:
"""
- Get a specific browser profile by ID
+ Forward a TOTP (2FA, MFA) email or sms message containing the code to Skyvern. This endpoint stores the code in database so that Skyvern can use it while running tasks/workflows.
Parameters
----------
- profile_id : str
- The ID of the browser profile. browser_profile_id starts with `bp_`
+ totp_identifier : str
+ The identifier of the TOTP code. It can be the email address, phone number, or the identifier of the user.
+
+ content : str
+ The content of the TOTP code. It can be the email content that contains the TOTP code, or the sms message that contains the TOTP code. Skyvern will automatically extract the TOTP code from the content.
+
+ task_id : typing.Optional[str]
+ The task_id the totp code is for. It can be the task_id of the task that the TOTP code is for.
+
+ workflow_id : typing.Optional[str]
+ The workflow ID the TOTP code is for. It can be the workflow ID of the workflow that the TOTP code is for.
+
+ workflow_run_id : typing.Optional[str]
+ The workflow run id that the TOTP code is for. It can be the workflow run id of the workflow run that the TOTP code is for.
+
+ source : typing.Optional[str]
+ An optional field. The source of the TOTP code. e.g. email, sms, etc.
+
+ expired_at : typing.Optional[dt.datetime]
+ The timestamp when the TOTP code expires
+
+ type : typing.Optional[OtpType]
+ Optional. If provided, forces extraction of this specific OTP type (totp or magic_link). Use this when the content contains multiple OTP types and you want to specify which one to extract.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[BrowserProfile]
- Successfully retrieved browser profile
+ AsyncHttpResponse[TotpCode]
+ Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
- method="GET",
+ "v1/credentials/totp",
+ method="POST",
+ json={
+ "totp_identifier": totp_identifier,
+ "task_id": task_id,
+ "workflow_id": workflow_id,
+ "workflow_run_id": workflow_run_id,
+ "source": source,
+ "content": content,
+ "expired_at": expired_at,
+ "type": type,
+ },
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BrowserProfile,
+ TotpCode,
parse_obj_as(
- type_=BrowserProfile, # type: ignore
+ type_=TotpCode, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 404:
- raise NotFoundError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
- ),
- )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -5277,43 +5725,51 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def delete_browser_profile(
- self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[None]:
+ async def get_credentials(
+ self,
+ *,
+ page: typing.Optional[int] = None,
+ page_size: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[typing.List[CredentialResponse]]:
"""
- Delete a browser profile (soft delete)
+ Retrieves a paginated list of credentials for the current organization
Parameters
----------
- profile_id : str
- The ID of the browser profile to delete. browser_profile_id starts with `bp_`
+ page : typing.Optional[int]
+ Page number for pagination
+
+ page_size : typing.Optional[int]
+ Number of items per page
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[None]
+ AsyncHttpResponse[typing.List[CredentialResponse]]
+ Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
- method="DELETE",
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- return AsyncHttpResponse(response=_response, data=None)
- if _response.status_code == 404:
- raise NotFoundError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
+ "v1/credentials",
+ method="GET",
+ params={
+ "page": page,
+ "page_size": page_size,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ typing.List[CredentialResponse],
+ parse_obj_as(
+ type_=typing.List[CredentialResponse], # type: ignore
+ object_=_response.json(),
),
)
+ return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -5330,48 +5786,62 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_browser_sessions(
- self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[typing.List[BrowserSessionResponse]]:
+ async def create_credential(
+ self,
+ *,
+ name: str,
+ credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType,
+ credential: CreateCredentialRequestCredential,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[CredentialResponse]:
"""
- Get all active browser sessions for the organization
+ Creates a new credential for the current organization
Parameters
----------
+ name : str
+ Name of the credential
+
+ credential_type : SkyvernForgeSdkSchemasCredentialsCredentialType
+ Type of credential to create
+
+ credential : CreateCredentialRequestCredential
+ The credential data to store
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[typing.List[BrowserSessionResponse]]
- Successfully retrieved all active browser sessions
+ AsyncHttpResponse[CredentialResponse]
+ Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- "v1/browser_sessions",
- method="GET",
+ "v1/credentials",
+ method="POST",
+ json={
+ "name": name,
+ "credential_type": credential_type,
+ "credential": convert_and_respect_annotation_metadata(
+ object_=credential, annotation=CreateCredentialRequestCredential, direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- typing.List[BrowserSessionResponse],
+ CredentialResponse,
parse_obj_as(
- type_=typing.List[BrowserSessionResponse], # type: ignore
+ type_=CredentialResponse, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 403:
- raise ForbiddenError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
- ),
- )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -5388,71 +5858,49 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def create_browser_session(
+ async def update_credential(
self,
+ credential_id: str,
*,
- timeout: typing.Optional[int] = OMIT,
- proxy_location: typing.Optional[ProxyLocation] = OMIT,
- extensions: typing.Optional[typing.Sequence[Extensions]] = OMIT,
- browser_type: typing.Optional[PersistentBrowserType] = OMIT,
+ name: str,
+ credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType,
+ credential: CreateCredentialRequestCredential,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[BrowserSessionResponse]:
+ ) -> AsyncHttpResponse[CredentialResponse]:
"""
- Create a browser session that persists across multiple runs
+ Overwrites the stored credential data (e.g. username/password) while keeping the same credential_id.
Parameters
----------
- timeout : typing.Optional[int]
- Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 1440. Defaults to 60.
-
- proxy_location : typing.Optional[ProxyLocation]
-
- Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
+ credential_id : str
+ The unique identifier of the credential to update
- Available geotargeting options:
- - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy.
- - RESIDENTIAL_ES: Spain
- - RESIDENTIAL_IE: Ireland
- - RESIDENTIAL_GB: United Kingdom
- - RESIDENTIAL_IN: India
- - RESIDENTIAL_JP: Japan
- - RESIDENTIAL_FR: France
- - RESIDENTIAL_DE: Germany
- - RESIDENTIAL_NZ: New Zealand
- - RESIDENTIAL_PH: Philippines
- - RESIDENTIAL_ZA: South Africa
- - RESIDENTIAL_AR: Argentina
- - RESIDENTIAL_AU: Australia
- - RESIDENTIAL_ISP: ISP proxy
- - US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
- - US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
- - US-TX: Texas (deprecated, routes through RESIDENTIAL_ISP)
- - US-FL: Florida (deprecated, routes through RESIDENTIAL_ISP)
- - US-WA: Washington (deprecated, routes through RESIDENTIAL_ISP)
- - NONE: No proxy
+ name : str
+ Name of the credential
- extensions : typing.Optional[typing.Sequence[Extensions]]
- A list of extensions to install in the browser session.
+ credential_type : SkyvernForgeSdkSchemasCredentialsCredentialType
+ Type of credential to create
- browser_type : typing.Optional[PersistentBrowserType]
- The type of browser to use for the session.
+ credential : CreateCredentialRequestCredential
+ The credential data to store
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[BrowserSessionResponse]
- Successfully created browser session
+ AsyncHttpResponse[CredentialResponse]
+ Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- "v1/browser_sessions",
+ f"v1/credentials/{jsonable_encoder(credential_id)}/update",
method="POST",
json={
- "timeout": timeout,
- "proxy_location": proxy_location,
- "extensions": extensions,
- "browser_type": browser_type,
+ "name": name,
+ "credential_type": credential_type,
+ "credential": convert_and_respect_annotation_metadata(
+ object_=credential, annotation=CreateCredentialRequestCredential, direction="write"
+ ),
},
headers={
"content-type": "application/json",
@@ -5463,24 +5911,13 @@ class AsyncRawSkyvern:
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BrowserSessionResponse,
+ CredentialResponse,
parse_obj_as(
- type_=BrowserSessionResponse, # type: ignore
+ type_=CredentialResponse, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 403:
- raise ForbiddenError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
- ),
- )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -5497,53 +5934,32 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def close_browser_session(
- self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
+ async def delete_credential(
+ self, credential_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[None]:
"""
- Close a session. Once closed, the session cannot be used again.
+ Deletes a specific credential by its ID
Parameters
----------
- browser_session_id : str
- The ID of the browser session to close. completed_at will be set when the browser session is closed. browser_session_id starts with `pbs_`
+ credential_id : str
+ The unique identifier of the credential to delete
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[typing.Optional[typing.Any]]
- Successfully closed browser session
+ AsyncHttpResponse[None]
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}/close",
+ f"v1/credentials/{jsonable_encoder(credential_id)}/delete",
method="POST",
request_options=request_options,
)
try:
- if _response is None or not _response.text.strip():
- return AsyncHttpResponse(response=_response, data=None)
if 200 <= _response.status_code < 300:
- _data = typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
- )
- return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 403:
- raise ForbiddenError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
- ),
- )
+ return AsyncHttpResponse(response=_response, data=None)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -5560,62 +5976,40 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_browser_session(
- self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[BrowserSessionResponse]:
+ async def get_credential(
+ self, credential_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[CredentialResponse]:
"""
- Get details about a specific browser session, including the browser address for cdp connection.
+ Retrieves a specific credential by its ID
Parameters
----------
- browser_session_id : str
- The ID of the browser session. browser_session_id starts with `pbs_`
+ credential_id : str
+ The unique identifier of the credential
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[BrowserSessionResponse]
- Successfully retrieved browser session details
+ AsyncHttpResponse[CredentialResponse]
+ Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}",
+ f"v1/credentials/{jsonable_encoder(credential_id)}",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- BrowserSessionResponse,
+ CredentialResponse,
parse_obj_as(
- type_=BrowserSessionResponse, # type: ignore
+ type_=CredentialResponse, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 403:
- raise ForbiddenError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- if _response.status_code == 404:
- raise NotFoundError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
- ),
- )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -5632,68 +6026,133 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def send_totp_code(
+ async def login(
self,
*,
- totp_identifier: str,
- content: str,
- task_id: typing.Optional[str] = OMIT,
- workflow_id: typing.Optional[str] = OMIT,
- workflow_run_id: typing.Optional[str] = OMIT,
- source: typing.Optional[str] = OMIT,
- expired_at: typing.Optional[dt.datetime] = OMIT,
- type: typing.Optional[OtpType] = OMIT,
+ credential_type: SkyvernSchemasRunBlocksCredentialType,
+ url: typing.Optional[str] = OMIT,
+ webhook_url: typing.Optional[str] = OMIT,
+ proxy_location: typing.Optional[ProxyLocation] = OMIT,
+ totp_identifier: typing.Optional[str] = OMIT,
+ totp_url: typing.Optional[str] = OMIT,
+ browser_session_id: typing.Optional[str] = OMIT,
+ browser_profile_id: typing.Optional[str] = OMIT,
+ browser_address: typing.Optional[str] = OMIT,
+ extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
+ max_screenshot_scrolling_times: typing.Optional[int] = OMIT,
+ prompt: typing.Optional[str] = OMIT,
+ credential_id: typing.Optional[str] = OMIT,
+ bitwarden_collection_id: typing.Optional[str] = OMIT,
+ bitwarden_item_id: typing.Optional[str] = OMIT,
+ onepassword_vault_id: typing.Optional[str] = OMIT,
+ onepassword_item_id: typing.Optional[str] = OMIT,
+ azure_vault_name: typing.Optional[str] = OMIT,
+ azure_vault_username_key: typing.Optional[str] = OMIT,
+ azure_vault_password_key: typing.Optional[str] = OMIT,
+ azure_vault_totp_secret_key: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[TotpCode]:
+ ) -> AsyncHttpResponse[WorkflowRunResponse]:
"""
- Forward a TOTP (2FA, MFA) email or sms message containing the code to Skyvern. This endpoint stores the code in database so that Skyvern can use it while running tasks/workflows.
+ Log in to a website using either credential stored in Skyvern, Bitwarden, 1Password, or Azure Vault
Parameters
----------
- totp_identifier : str
- The identifier of the TOTP code. It can be the email address, phone number, or the identifier of the user.
+ credential_type : SkyvernSchemasRunBlocksCredentialType
+ Where to get the credential from
- content : str
- The content of the TOTP code. It can be the email content that contains the TOTP code, or the sms message that contains the TOTP code. Skyvern will automatically extract the TOTP code from the content.
+ url : typing.Optional[str]
+ Website URL
- task_id : typing.Optional[str]
- The task_id the totp code is for. It can be the task_id of the task that the TOTP code is for.
+ webhook_url : typing.Optional[str]
+ Webhook URL to send status updates
- workflow_id : typing.Optional[str]
- The workflow ID the TOTP code is for. It can be the workflow ID of the workflow that the TOTP code is for.
+ proxy_location : typing.Optional[ProxyLocation]
+ Proxy location to use
- workflow_run_id : typing.Optional[str]
- The workflow run id that the TOTP code is for. It can be the workflow run id of the workflow run that the TOTP code is for.
+ totp_identifier : typing.Optional[str]
+ Identifier for TOTP (Time-based One-Time Password) if required
- source : typing.Optional[str]
- An optional field. The source of the TOTP code. e.g. email, sms, etc.
+ totp_url : typing.Optional[str]
+ TOTP URL to fetch one-time passwords
- expired_at : typing.Optional[dt.datetime]
- The timestamp when the TOTP code expires
+ browser_session_id : typing.Optional[str]
+ ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456`
- type : typing.Optional[OtpType]
- Optional. If provided, forces extraction of this specific OTP type (totp or magic_link). Use this when the content contains multiple OTP types and you want to specify which one to extract.
+ browser_profile_id : typing.Optional[str]
+ ID of a browser profile to reuse for this run
+
+ browser_address : typing.Optional[str]
+ The CDP address for the task.
+
+ extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]]
+ Additional HTTP headers to include in requests
+
+ max_screenshot_scrolling_times : typing.Optional[int]
+ Maximum number of times to scroll for screenshots
+
+ prompt : typing.Optional[str]
+ Login instructions. Skyvern has default prompt/instruction for login if this field is not provided.
+
+ credential_id : typing.Optional[str]
+ ID of the Skyvern credential to use for login.
+
+ bitwarden_collection_id : typing.Optional[str]
+ Bitwarden collection ID. You can find it in the Bitwarden collection URL. e.g. `https://vault.bitwarden.com/vaults/collection_id/items`
+
+ bitwarden_item_id : typing.Optional[str]
+ Bitwarden item ID
+
+ onepassword_vault_id : typing.Optional[str]
+ 1Password vault ID
+
+ onepassword_item_id : typing.Optional[str]
+ 1Password item ID
+
+ azure_vault_name : typing.Optional[str]
+ Azure Vault Name
+
+ azure_vault_username_key : typing.Optional[str]
+ Azure Vault username key
+
+ azure_vault_password_key : typing.Optional[str]
+ Azure Vault password key
+
+ azure_vault_totp_secret_key : typing.Optional[str]
+ Azure Vault TOTP secret key
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[TotpCode]
+ AsyncHttpResponse[WorkflowRunResponse]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- "v1/credentials/totp",
+ "v1/run/tasks/login",
method="POST",
json={
+ "url": url,
+ "webhook_url": webhook_url,
+ "proxy_location": proxy_location,
"totp_identifier": totp_identifier,
- "task_id": task_id,
- "workflow_id": workflow_id,
- "workflow_run_id": workflow_run_id,
- "source": source,
- "content": content,
- "expired_at": expired_at,
- "type": type,
+ "totp_url": totp_url,
+ "browser_session_id": browser_session_id,
+ "browser_profile_id": browser_profile_id,
+ "browser_address": browser_address,
+ "extra_http_headers": extra_http_headers,
+ "max_screenshot_scrolling_times": max_screenshot_scrolling_times,
+ "credential_type": credential_type,
+ "prompt": prompt,
+ "credential_id": credential_id,
+ "bitwarden_collection_id": bitwarden_collection_id,
+ "bitwarden_item_id": bitwarden_item_id,
+ "onepassword_vault_id": onepassword_vault_id,
+ "onepassword_item_id": onepassword_item_id,
+ "azure_vault_name": azure_vault_name,
+ "azure_vault_username_key": azure_vault_username_key,
+ "azure_vault_password_key": azure_vault_password_key,
+ "azure_vault_totp_secret_key": azure_vault_totp_secret_key,
},
headers={
"content-type": "application/json",
@@ -5704,9 +6163,9 @@ class AsyncRawSkyvern:
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- TotpCode,
+ WorkflowRunResponse,
parse_obj_as(
- type_=TotpCode, # type: ignore
+ type_=WorkflowRunResponse, # type: ignore
object_=_response.json(),
),
)
@@ -5727,47 +6186,111 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_credentials(
+ async def download_files(
self,
*,
- page: typing.Optional[int] = None,
- page_size: typing.Optional[int] = None,
+ navigation_goal: str,
+ url: typing.Optional[str] = OMIT,
+ webhook_url: typing.Optional[str] = OMIT,
+ proxy_location: typing.Optional[ProxyLocation] = OMIT,
+ totp_identifier: typing.Optional[str] = OMIT,
+ totp_url: typing.Optional[str] = OMIT,
+ browser_session_id: typing.Optional[str] = OMIT,
+ browser_profile_id: typing.Optional[str] = OMIT,
+ browser_address: typing.Optional[str] = OMIT,
+ extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
+ max_screenshot_scrolling_times: typing.Optional[int] = OMIT,
+ download_suffix: typing.Optional[str] = OMIT,
+ download_timeout: typing.Optional[float] = OMIT,
+ max_steps_per_run: typing.Optional[int] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[typing.List[CredentialResponse]]:
+ ) -> AsyncHttpResponse[WorkflowRunResponse]:
"""
- Retrieves a paginated list of credentials for the current organization
+ Download a file from a website by navigating and clicking download buttons
Parameters
----------
- page : typing.Optional[int]
- Page number for pagination
+ navigation_goal : str
+ Instructions for navigating to and downloading the file
- page_size : typing.Optional[int]
- Number of items per page
+ url : typing.Optional[str]
+ Website URL
+
+ webhook_url : typing.Optional[str]
+ Webhook URL to send status updates
+
+ proxy_location : typing.Optional[ProxyLocation]
+ Proxy location to use
+
+ totp_identifier : typing.Optional[str]
+ Identifier for TOTP (Time-based One-Time Password) if required
+
+ totp_url : typing.Optional[str]
+ TOTP URL to fetch one-time passwords
+
+ browser_session_id : typing.Optional[str]
+ ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456`
+
+ browser_profile_id : typing.Optional[str]
+ ID of a browser profile to reuse for this run
+
+ browser_address : typing.Optional[str]
+ The CDP address for the task.
+
+ extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]]
+ Additional HTTP headers to include in requests
+
+ max_screenshot_scrolling_times : typing.Optional[int]
+ Maximum number of times to scroll for screenshots
+
+ download_suffix : typing.Optional[str]
+ Suffix or complete filename for the downloaded file
+
+ download_timeout : typing.Optional[float]
+ Timeout in seconds for the download operation
+
+ max_steps_per_run : typing.Optional[int]
+ Maximum number of steps to execute
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[typing.List[CredentialResponse]]
+ AsyncHttpResponse[WorkflowRunResponse]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- "v1/credentials",
- method="GET",
- params={
- "page": page,
- "page_size": page_size,
+ "v1/run/tasks/download_files",
+ method="POST",
+ json={
+ "url": url,
+ "webhook_url": webhook_url,
+ "proxy_location": proxy_location,
+ "totp_identifier": totp_identifier,
+ "totp_url": totp_url,
+ "browser_session_id": browser_session_id,
+ "browser_profile_id": browser_profile_id,
+ "browser_address": browser_address,
+ "extra_http_headers": extra_http_headers,
+ "max_screenshot_scrolling_times": max_screenshot_scrolling_times,
+ "navigation_goal": navigation_goal,
+ "download_suffix": download_suffix,
+ "download_timeout": download_timeout,
+ "max_steps_per_run": max_steps_per_run,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- typing.List[CredentialResponse],
+ WorkflowRunResponse,
parse_obj_as(
- type_=typing.List[CredentialResponse], # type: ignore
+ type_=WorkflowRunResponse, # type: ignore
object_=_response.json(),
),
)
@@ -5788,58 +6311,47 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def create_credential(
+ async def get_scripts(
self,
*,
- name: str,
- credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType,
- credential: CreateCredentialRequestCredential,
+ page: typing.Optional[int] = None,
+ page_size: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[CredentialResponse]:
+ ) -> AsyncHttpResponse[typing.List[Script]]:
"""
- Creates a new credential for the current organization
+ Retrieves a paginated list of scripts for the current organization
Parameters
----------
- name : str
- Name of the credential
-
- credential_type : SkyvernForgeSdkSchemasCredentialsCredentialType
- Type of credential to create
+ page : typing.Optional[int]
+ Page number for pagination
- credential : CreateCredentialRequestCredential
- The credential data to store
+ page_size : typing.Optional[int]
+ Number of items per page
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[CredentialResponse]
+ AsyncHttpResponse[typing.List[Script]]
Successful Response
"""
- _response = await self._client_wrapper.httpx_client.request(
- "v1/credentials",
- method="POST",
- json={
- "name": name,
- "credential_type": credential_type,
- "credential": convert_and_respect_annotation_metadata(
- object_=credential, annotation=CreateCredentialRequestCredential, direction="write"
- ),
- },
- headers={
- "content-type": "application/json",
+ _response = await self._client_wrapper.httpx_client.request(
+ "v1/scripts",
+ method="GET",
+ params={
+ "page": page,
+ "page_size": page_size,
},
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- CredentialResponse,
+ typing.List[Script],
parse_obj_as(
- type_=CredentialResponse, # type: ignore
+ type_=typing.List[Script], # type: ignore
object_=_response.json(),
),
)
@@ -5860,48 +6372,44 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def update_credential(
+ async def create_script(
self,
- credential_id: str,
*,
- name: str,
- credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType,
- credential: CreateCredentialRequestCredential,
+ workflow_id: typing.Optional[str] = OMIT,
+ run_id: typing.Optional[str] = OMIT,
+ files: typing.Optional[typing.Sequence[ScriptFileCreate]] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[CredentialResponse]:
+ ) -> AsyncHttpResponse[CreateScriptResponse]:
"""
- Overwrites the stored credential data (e.g. username/password) while keeping the same credential_id.
+ Create a new script with optional files and metadata
Parameters
----------
- credential_id : str
- The unique identifier of the credential to update
-
- name : str
- Name of the credential
+ workflow_id : typing.Optional[str]
+ Associated workflow ID
- credential_type : SkyvernForgeSdkSchemasCredentialsCredentialType
- Type of credential to create
+ run_id : typing.Optional[str]
+ Associated run ID
- credential : CreateCredentialRequestCredential
- The credential data to store
+ files : typing.Optional[typing.Sequence[ScriptFileCreate]]
+ Array of files to include in the script
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[CredentialResponse]
+ AsyncHttpResponse[CreateScriptResponse]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/credentials/{jsonable_encoder(credential_id)}/update",
+ "v1/scripts",
method="POST",
json={
- "name": name,
- "credential_type": credential_type,
- "credential": convert_and_respect_annotation_metadata(
- object_=credential, annotation=CreateCredentialRequestCredential, direction="write"
+ "workflow_id": workflow_id,
+ "run_id": run_id,
+ "files": convert_and_respect_annotation_metadata(
+ object_=files, annotation=typing.Sequence[ScriptFileCreate], direction="write"
),
},
headers={
@@ -5913,9 +6421,9 @@ class AsyncRawSkyvern:
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- CredentialResponse,
+ CreateScriptResponse,
parse_obj_as(
- type_=CredentialResponse, # type: ignore
+ type_=CreateScriptResponse, # type: ignore
object_=_response.json(),
),
)
@@ -5936,32 +6444,40 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def delete_credential(
- self, credential_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[None]:
+ async def get_script(
+ self, script_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[Script]:
"""
- Deletes a specific credential by its ID
+ Retrieves a specific script by its ID
Parameters
----------
- credential_id : str
- The unique identifier of the credential to delete
+ script_id : str
+ The unique identifier of the script
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[None]
+ AsyncHttpResponse[Script]
+ Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/credentials/{jsonable_encoder(credential_id)}/delete",
- method="POST",
+ f"v1/scripts/{jsonable_encoder(script_id)}",
+ method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
- return AsyncHttpResponse(response=_response, data=None)
+ _data = typing.cast(
+ Script,
+ parse_obj_as(
+ type_=Script, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -5978,36 +6494,52 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_credential(
- self, credential_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[CredentialResponse]:
+ async def deploy_script(
+ self,
+ script_id: str,
+ *,
+ files: typing.Sequence[ScriptFileCreate],
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[CreateScriptResponse]:
"""
- Retrieves a specific credential by its ID
+ Deploy a script with updated files, creating a new version
Parameters
----------
- credential_id : str
- The unique identifier of the credential
+ script_id : str
+ The unique identifier of the script
+
+ files : typing.Sequence[ScriptFileCreate]
+ Array of files to include in the script
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[CredentialResponse]
+ AsyncHttpResponse[CreateScriptResponse]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/credentials/{jsonable_encoder(credential_id)}",
- method="GET",
+ f"v1/scripts/{jsonable_encoder(script_id)}/deploy",
+ method="POST",
+ json={
+ "files": convert_and_respect_annotation_metadata(
+ object_=files, annotation=typing.Sequence[ScriptFileCreate], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- CredentialResponse,
+ CreateScriptResponse,
parse_obj_as(
- type_=CredentialResponse, # type: ignore
+ type_=CreateScriptResponse, # type: ignore
object_=_response.json(),
),
)
@@ -6028,146 +6560,20 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def login(
- self,
- *,
- credential_type: SkyvernSchemasRunBlocksCredentialType,
- url: typing.Optional[str] = OMIT,
- webhook_url: typing.Optional[str] = OMIT,
- proxy_location: typing.Optional[ProxyLocation] = OMIT,
- totp_identifier: typing.Optional[str] = OMIT,
- totp_url: typing.Optional[str] = OMIT,
- browser_session_id: typing.Optional[str] = OMIT,
- browser_profile_id: typing.Optional[str] = OMIT,
- browser_address: typing.Optional[str] = OMIT,
- extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
- max_screenshot_scrolling_times: typing.Optional[int] = OMIT,
- prompt: typing.Optional[str] = OMIT,
- credential_id: typing.Optional[str] = OMIT,
- bitwarden_collection_id: typing.Optional[str] = OMIT,
- bitwarden_item_id: typing.Optional[str] = OMIT,
- onepassword_vault_id: typing.Optional[str] = OMIT,
- onepassword_item_id: typing.Optional[str] = OMIT,
- azure_vault_name: typing.Optional[str] = OMIT,
- azure_vault_username_key: typing.Optional[str] = OMIT,
- azure_vault_password_key: typing.Optional[str] = OMIT,
- azure_vault_totp_secret_key: typing.Optional[str] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[WorkflowRunResponse]:
- """
- Log in to a website using either credential stored in Skyvern, Bitwarden, 1Password, or Azure Vault
-
- Parameters
- ----------
- credential_type : SkyvernSchemasRunBlocksCredentialType
- Where to get the credential from
-
- url : typing.Optional[str]
- Website URL
-
- webhook_url : typing.Optional[str]
- Webhook URL to send status updates
-
- proxy_location : typing.Optional[ProxyLocation]
- Proxy location to use
-
- totp_identifier : typing.Optional[str]
- Identifier for TOTP (Time-based One-Time Password) if required
-
- totp_url : typing.Optional[str]
- TOTP URL to fetch one-time passwords
-
- browser_session_id : typing.Optional[str]
- ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456`
-
- browser_profile_id : typing.Optional[str]
- ID of a browser profile to reuse for this run
-
- browser_address : typing.Optional[str]
- The CDP address for the task.
-
- extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]]
- Additional HTTP headers to include in requests
-
- max_screenshot_scrolling_times : typing.Optional[int]
- Maximum number of times to scroll for screenshots
-
- prompt : typing.Optional[str]
- Login instructions. Skyvern has default prompt/instruction for login if this field is not provided.
-
- credential_id : typing.Optional[str]
- ID of the Skyvern credential to use for login.
-
- bitwarden_collection_id : typing.Optional[str]
- Bitwarden collection ID. You can find it in the Bitwarden collection URL. e.g. `https://vault.bitwarden.com/vaults/collection_id/items`
-
- bitwarden_item_id : typing.Optional[str]
- Bitwarden item ID
-
- onepassword_vault_id : typing.Optional[str]
- 1Password vault ID
-
- onepassword_item_id : typing.Optional[str]
- 1Password item ID
-
- azure_vault_name : typing.Optional[str]
- Azure Vault Name
-
- azure_vault_username_key : typing.Optional[str]
- Azure Vault username key
-
- azure_vault_password_key : typing.Optional[str]
- Azure Vault password key
-
- azure_vault_totp_secret_key : typing.Optional[str]
- Azure Vault TOTP secret key
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- AsyncHttpResponse[WorkflowRunResponse]
- Successful Response
- """
+ async def clear_workflow_cache(
+ self, workflow_permanent_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[ClearCacheResponse]:
_response = await self._client_wrapper.httpx_client.request(
- "v1/run/tasks/login",
- method="POST",
- json={
- "url": url,
- "webhook_url": webhook_url,
- "proxy_location": proxy_location,
- "totp_identifier": totp_identifier,
- "totp_url": totp_url,
- "browser_session_id": browser_session_id,
- "browser_profile_id": browser_profile_id,
- "browser_address": browser_address,
- "extra_http_headers": extra_http_headers,
- "max_screenshot_scrolling_times": max_screenshot_scrolling_times,
- "credential_type": credential_type,
- "prompt": prompt,
- "credential_id": credential_id,
- "bitwarden_collection_id": bitwarden_collection_id,
- "bitwarden_item_id": bitwarden_item_id,
- "onepassword_vault_id": onepassword_vault_id,
- "onepassword_item_id": onepassword_item_id,
- "azure_vault_name": azure_vault_name,
- "azure_vault_username_key": azure_vault_username_key,
- "azure_vault_password_key": azure_vault_password_key,
- "azure_vault_totp_secret_key": azure_vault_totp_secret_key,
- },
- headers={
- "content-type": "application/json",
- },
+ f"v1/scripts/{jsonable_encoder(workflow_permanent_id)}/cache",
+ method="DELETE",
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- WorkflowRunResponse,
+ ClearCacheResponse,
parse_obj_as(
- type_=WorkflowRunResponse, # type: ignore
+ type_=ClearCacheResponse, # type: ignore
object_=_response.json(),
),
)
@@ -6188,98 +6594,55 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def download_files(
+ async def run_sdk_action(
self,
*,
- navigation_goal: str,
- url: typing.Optional[str] = OMIT,
- webhook_url: typing.Optional[str] = OMIT,
- proxy_location: typing.Optional[ProxyLocation] = OMIT,
- totp_identifier: typing.Optional[str] = OMIT,
- totp_url: typing.Optional[str] = OMIT,
+ url: str,
+ action: RunSdkActionRequestAction,
browser_session_id: typing.Optional[str] = OMIT,
- browser_profile_id: typing.Optional[str] = OMIT,
browser_address: typing.Optional[str] = OMIT,
- extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
- max_screenshot_scrolling_times: typing.Optional[int] = OMIT,
- download_suffix: typing.Optional[str] = OMIT,
- download_timeout: typing.Optional[float] = OMIT,
- max_steps_per_run: typing.Optional[int] = OMIT,
+ workflow_run_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[WorkflowRunResponse]:
+ ) -> AsyncHttpResponse[RunSdkActionResponse]:
"""
- Download a file from a website by navigating and clicking download buttons
+ Execute a single SDK action with the specified parameters
Parameters
----------
- navigation_goal : str
- Instructions for navigating to and downloading the file
-
- url : typing.Optional[str]
- Website URL
-
- webhook_url : typing.Optional[str]
- Webhook URL to send status updates
-
- proxy_location : typing.Optional[ProxyLocation]
- Proxy location to use
-
- totp_identifier : typing.Optional[str]
- Identifier for TOTP (Time-based One-Time Password) if required
+ url : str
+ The URL where the action should be executed
- totp_url : typing.Optional[str]
- TOTP URL to fetch one-time passwords
+ action : RunSdkActionRequestAction
+ The action to execute with its specific parameters
browser_session_id : typing.Optional[str]
- ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456`
-
- browser_profile_id : typing.Optional[str]
- ID of a browser profile to reuse for this run
+ The browser session ID
browser_address : typing.Optional[str]
- The CDP address for the task.
-
- extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]]
- Additional HTTP headers to include in requests
-
- max_screenshot_scrolling_times : typing.Optional[int]
- Maximum number of times to scroll for screenshots
-
- download_suffix : typing.Optional[str]
- Suffix or complete filename for the downloaded file
-
- download_timeout : typing.Optional[float]
- Timeout in seconds for the download operation
+ The browser address
- max_steps_per_run : typing.Optional[int]
- Maximum number of steps to execute
+ workflow_run_id : typing.Optional[str]
+ Optional workflow run ID to continue an existing workflow run
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[WorkflowRunResponse]
+ AsyncHttpResponse[RunSdkActionResponse]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- "v1/run/tasks/download_files",
+ "v1/sdk/run_action",
method="POST",
json={
"url": url,
- "webhook_url": webhook_url,
- "proxy_location": proxy_location,
- "totp_identifier": totp_identifier,
- "totp_url": totp_url,
"browser_session_id": browser_session_id,
- "browser_profile_id": browser_profile_id,
"browser_address": browser_address,
- "extra_http_headers": extra_http_headers,
- "max_screenshot_scrolling_times": max_screenshot_scrolling_times,
- "navigation_goal": navigation_goal,
- "download_suffix": download_suffix,
- "download_timeout": download_timeout,
- "max_steps_per_run": max_steps_per_run,
+ "workflow_run_id": workflow_run_id,
+ "action": convert_and_respect_annotation_metadata(
+ object_=action, annotation=RunSdkActionRequestAction, direction="write"
+ ),
},
headers={
"content-type": "application/json",
@@ -6290,9 +6653,9 @@ class AsyncRawSkyvern:
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- WorkflowRunResponse,
+ RunSdkActionResponse,
parse_obj_as(
- type_=WorkflowRunResponse, # type: ignore
+ type_=RunSdkActionResponse, # type: ignore
object_=_response.json(),
),
)
@@ -6313,47 +6676,48 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_scripts(
- self,
- *,
- page: typing.Optional[int] = None,
- page_size: typing.Optional[int] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[typing.List[Script]]:
+ async def create_checkout_session_api_v1billing_checkout_post(
+ self, *, tier: PlanTier, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[CheckoutSessionResponse]:
"""
- Retrieves a paginated list of scripts for the current organization
+ Create a Stripe Checkout Session for subscribing to a tier.
+
+ Frontend should redirect the user to the returned URL.
+ After successful checkout, Stripe will send a webhook that we handle
+ to store the subscription and initialize billing state.
+
+ Returns 400 if org already has an active subscription (use portal instead).
Parameters
----------
- page : typing.Optional[int]
- Page number for pagination
-
- page_size : typing.Optional[int]
- Number of items per page
+ tier : PlanTier
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[typing.List[Script]]
+ AsyncHttpResponse[CheckoutSessionResponse]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- "v1/scripts",
- method="GET",
- params={
- "page": page,
- "page_size": page_size,
+ "api/v1/billing/checkout",
+ method="POST",
+ json={
+ "tier": tier,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- typing.List[Script],
+ CheckoutSessionResponse,
parse_obj_as(
- type_=typing.List[Script], # type: ignore
+ type_=CheckoutSessionResponse, # type: ignore
object_=_response.json(),
),
)
@@ -6374,58 +6738,40 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def create_script(
- self,
- *,
- workflow_id: typing.Optional[str] = OMIT,
- run_id: typing.Optional[str] = OMIT,
- files: typing.Optional[typing.Sequence[ScriptFileCreate]] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[CreateScriptResponse]:
+ async def create_portal_session_api_v1billing_portal_post(
+ self, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[PortalSessionResponse]:
"""
- Create a new script with optional files and metadata
+ Create a Stripe Customer Portal session for managing subscription.
+
+ Frontend should redirect the user to the returned URL.
+ The portal allows users to:
+ - Update payment methods
+ - Upgrade/downgrade plans
+ - Cancel subscription
+ - View invoices
Parameters
----------
- workflow_id : typing.Optional[str]
- Associated workflow ID
-
- run_id : typing.Optional[str]
- Associated run ID
-
- files : typing.Optional[typing.Sequence[ScriptFileCreate]]
- Array of files to include in the script
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[CreateScriptResponse]
+ AsyncHttpResponse[PortalSessionResponse]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- "v1/scripts",
+ "api/v1/billing/portal",
method="POST",
- json={
- "workflow_id": workflow_id,
- "run_id": run_id,
- "files": convert_and_respect_annotation_metadata(
- object_=files, annotation=typing.Sequence[ScriptFileCreate], direction="write"
- ),
- },
- headers={
- "content-type": "application/json",
- },
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- CreateScriptResponse,
+ PortalSessionResponse,
parse_obj_as(
- type_=CreateScriptResponse, # type: ignore
+ type_=PortalSessionResponse, # type: ignore
object_=_response.json(),
),
)
@@ -6446,36 +6792,33 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_script(
- self, script_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[Script]:
+ async def get_organization_billing_api_v1billing_state_get(
+ self, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[typing.Optional[BillingStateResponse]]:
"""
- Retrieves a specific script by its ID
-
Parameters
----------
- script_id : str
- The unique identifier of the script
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[Script]
+ AsyncHttpResponse[typing.Optional[BillingStateResponse]]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/scripts/{jsonable_encoder(script_id)}",
+ "api/v1/billing/state",
method="GET",
request_options=request_options,
)
try:
+ if _response is None or not _response.text.strip():
+ return AsyncHttpResponse(response=_response, data=None)
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Script,
+ typing.Optional[BillingStateResponse],
parse_obj_as(
- type_=Script, # type: ignore
+ type_=typing.Optional[BillingStateResponse], # type: ignore
object_=_response.json(),
),
)
@@ -6496,39 +6839,32 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def deploy_script(
- self,
- script_id: str,
- *,
- files: typing.Sequence[ScriptFileCreate],
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[CreateScriptResponse]:
+ async def change_tier_api_v1billing_change_tier_post(
+ self, *, tier: PlanTier, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[ChangeTierResponse]:
"""
- Deploy a script with updated files, creating a new version
+ Redirect to Stripe Portal for tier changes.
+ Portal handles proration based on configured settings:
+ - Upgrades: Immediate proration charge
+ - Downgrades: Apply at end of billing period
Parameters
----------
- script_id : str
- The unique identifier of the script
-
- files : typing.Sequence[ScriptFileCreate]
- Array of files to include in the script
+ tier : PlanTier
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[CreateScriptResponse]
+ AsyncHttpResponse[ChangeTierResponse]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/scripts/{jsonable_encoder(script_id)}/deploy",
+ "api/v1/billing/change-tier",
method="POST",
json={
- "files": convert_and_respect_annotation_metadata(
- object_=files, annotation=typing.Sequence[ScriptFileCreate], direction="write"
- ),
+ "tier": tier,
},
headers={
"content-type": "application/json",
@@ -6539,9 +6875,9 @@ class AsyncRawSkyvern:
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- CreateScriptResponse,
+ ChangeTierResponse,
parse_obj_as(
- type_=CreateScriptResponse, # type: ignore
+ type_=ChangeTierResponse, # type: ignore
object_=_response.json(),
),
)
@@ -6562,36 +6898,52 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def clear_workflow_cache(
- self, workflow_permanent_id: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[ClearCacheResponse]:
+ async def get_folders(
+ self,
+ *,
+ page: typing.Optional[int] = None,
+ page_size: typing.Optional[int] = None,
+ search: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[typing.List[Folder]]:
"""
- Clear all cached scripts for a specific workflow. This will trigger script regeneration on subsequent runs.
+ Get all folders for the organization
Parameters
----------
- workflow_permanent_id : str
- The workflow permanent ID to clear cache for
+ page : typing.Optional[int]
+ Page number
+
+ page_size : typing.Optional[int]
+ Number of folders per page
+
+ search : typing.Optional[str]
+ Search folders by title or description
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[ClearCacheResponse]
- Successful Response
+ AsyncHttpResponse[typing.List[Folder]]
+ Successfully retrieved folders
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/scripts/{jsonable_encoder(workflow_permanent_id)}/cache",
- method="DELETE",
+ "v1/folders",
+ method="GET",
+ params={
+ "page": page,
+ "page_size": page_size,
+ "search": search,
+ },
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- ClearCacheResponse,
+ typing.List[Folder],
parse_obj_as(
- type_=ClearCacheResponse, # type: ignore
+ type_=typing.List[Folder], # type: ignore
object_=_response.json(),
),
)
@@ -6612,55 +6964,38 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def run_sdk_action(
+ async def create_folder(
self,
*,
- url: str,
- action: RunSdkActionRequestAction,
- browser_session_id: typing.Optional[str] = OMIT,
- browser_address: typing.Optional[str] = OMIT,
- workflow_run_id: typing.Optional[str] = OMIT,
+ title: str,
+ description: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[RunSdkActionResponse]:
+ ) -> AsyncHttpResponse[Folder]:
"""
- Execute a single SDK action with the specified parameters
+ Create a new folder to organize workflows
Parameters
----------
- url : str
- The URL where the action should be executed
-
- action : RunSdkActionRequestAction
- The action to execute with its specific parameters
-
- browser_session_id : typing.Optional[str]
- The browser session ID
-
- browser_address : typing.Optional[str]
- The browser address
+ title : str
+ Folder title
- workflow_run_id : typing.Optional[str]
- Optional workflow run ID to continue an existing workflow run
+ description : typing.Optional[str]
+ Folder description
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[RunSdkActionResponse]
- Successful Response
+ AsyncHttpResponse[Folder]
+ Successfully created folder
"""
_response = await self._client_wrapper.httpx_client.request(
- "v1/sdk/run_action",
+ "v1/folders",
method="POST",
json={
- "url": url,
- "browser_session_id": browser_session_id,
- "browser_address": browser_address,
- "workflow_run_id": workflow_run_id,
- "action": convert_and_respect_annotation_metadata(
- object_=action, annotation=RunSdkActionRequestAction, direction="write"
- ),
+ "title": title,
+ "description": description,
},
headers={
"content-type": "application/json",
@@ -6671,13 +7006,24 @@ class AsyncRawSkyvern:
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- RunSdkActionResponse,
+ Folder,
parse_obj_as(
- type_=RunSdkActionResponse, # type: ignore
+ type_=Folder, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -6694,52 +7040,51 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def create_checkout_session_api_v1billing_checkout_post(
- self, *, tier: PlanTier, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[CheckoutSessionResponse]:
+ async def get_folder(
+ self, folder_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[Folder]:
"""
- Create a Stripe Checkout Session for subscribing to a tier.
-
- Frontend should redirect the user to the returned URL.
- After successful checkout, Stripe will send a webhook that we handle
- to store the subscription and initialize billing state.
-
- Returns 400 if org already has an active subscription (use portal instead).
+ Get a specific folder by ID
Parameters
----------
- tier : PlanTier
+ folder_id : str
+ Folder ID
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[CheckoutSessionResponse]
- Successful Response
+ AsyncHttpResponse[Folder]
+ Successfully retrieved folder
"""
_response = await self._client_wrapper.httpx_client.request(
- "api/v1/billing/checkout",
- method="POST",
- json={
- "tier": tier,
- },
- headers={
- "content-type": "application/json",
- },
+ f"v1/folders/{jsonable_encoder(folder_id)}",
+ method="GET",
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- CheckoutSessionResponse,
+ Folder,
parse_obj_as(
- type_=CheckoutSessionResponse, # type: ignore
+ type_=Folder, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -6756,44 +7101,70 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def create_portal_session_api_v1billing_portal_post(
- self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[PortalSessionResponse]:
+ async def update_folder(
+ self,
+ folder_id: str,
+ *,
+ title: typing.Optional[str] = OMIT,
+ description: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[Folder]:
"""
- Create a Stripe Customer Portal session for managing subscription.
-
- Frontend should redirect the user to the returned URL.
- The portal allows users to:
- - Update payment methods
- - Upgrade/downgrade plans
- - Cancel subscription
- - View invoices
+ Update a folder's title or description
Parameters
----------
+ folder_id : str
+ Folder ID
+
+ title : typing.Optional[str]
+ Folder title
+
+ description : typing.Optional[str]
+ Folder description
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[PortalSessionResponse]
- Successful Response
+ AsyncHttpResponse[Folder]
+ Successfully updated folder
"""
_response = await self._client_wrapper.httpx_client.request(
- "api/v1/billing/portal",
- method="POST",
+ f"v1/folders/{jsonable_encoder(folder_id)}",
+ method="PUT",
+ json={
+ "title": title,
+ "description": description,
+ },
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- PortalSessionResponse,
+ Folder,
parse_obj_as(
- type_=PortalSessionResponse, # type: ignore
+ type_=Folder, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -6810,79 +7181,105 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_organization_billing_api_v1billing_state_get(
- self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[typing.Optional[BillingStateResponse]]:
+ async def delete_folder(
+ self,
+ folder_id: str,
+ *,
+ delete_workflows: typing.Optional[bool] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[typing.Dict[str, typing.Optional[typing.Any]]]:
"""
+ Delete a folder. Optionally delete all workflows in the folder.
+
Parameters
----------
+ folder_id : str
+ Folder ID
+
+ delete_workflows : typing.Optional[bool]
+ If true, also delete all workflows in this folder
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[typing.Optional[BillingStateResponse]]
- Successful Response
+ AsyncHttpResponse[typing.Dict[str, typing.Optional[typing.Any]]]
+ Successfully deleted folder
"""
_response = await self._client_wrapper.httpx_client.request(
- "api/v1/billing/state",
- method="GET",
+ f"v1/folders/{jsonable_encoder(folder_id)}",
+ method="DELETE",
+ params={
+ "delete_workflows": delete_workflows,
+ },
request_options=request_options,
)
try:
- if _response is None or not _response.text.strip():
- return AsyncHttpResponse(response=_response, data=None)
if 200 <= _response.status_code < 300:
+ if _response is None or not _response.text.strip():
+ return AsyncHttpResponse(response=_response, data=None)
_data = typing.cast(
- typing.Optional[BillingStateResponse],
- parse_obj_as(
- type_=typing.Optional[BillingStateResponse], # type: ignore
- object_=_response.json(),
- ),
+ typing.Optional[typing.Any],
+ parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
)
return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=None
+ if not _response.text.strip()
+ else typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
+ ),
+ )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
- body=typing.cast(
+ body=None
+ if not _response.text.strip()
+ else typing.cast(
typing.Optional[typing.Any],
- parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
+ parse_obj_as(type_=typing.Optional[typing.Any], object_=_response.json()), # type: ignore
),
)
- _response_json = _response.json()
+ _response_json = None if not _response.text.strip() else _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def change_tier_api_v1billing_change_tier_post(
- self, *, tier: PlanTier, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[ChangeTierResponse]:
+ async def update_workflow_folder(
+ self,
+ workflow_permanent_id: str,
+ *,
+ folder_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[Workflow]:
"""
- Redirect to Stripe Portal for tier changes.
- Portal handles proration based on configured settings:
- - Upgrades: Immediate proration charge
- - Downgrades: Apply at end of billing period
+ Update a workflow's folder assignment for the latest version
Parameters
----------
- tier : PlanTier
+ workflow_permanent_id : str
+ Workflow permanent ID
+
+ folder_id : typing.Optional[str]
+ Folder ID to assign workflow to. Set to null to remove from folder.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[ChangeTierResponse]
- Successful Response
+ AsyncHttpResponse[Workflow]
+ Successfully updated workflow folder
"""
_response = await self._client_wrapper.httpx_client.request(
- "api/v1/billing/change-tier",
- method="POST",
+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/folder",
+ method="PUT",
json={
- "tier": tier,
+ "folder_id": folder_id,
},
headers={
"content-type": "application/json",
@@ -6893,13 +7290,35 @@ class AsyncRawSkyvern:
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- ChangeTierResponse,
+ Workflow,
parse_obj_as(
- type_=ChangeTierResponse, # type: ignore
+ type_=Workflow, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
diff --git a/skyvern/client/types/__init__.py b/skyvern/client/types/__init__.py
index 5bece30e1..7a1ae3827 100644
--- a/skyvern/client/types/__init__.py
+++ b/skyvern/client/types/__init__.py
@@ -107,9 +107,6 @@ if typing.TYPE_CHECKING:
from .download_to_s3block import DownloadToS3Block
from .download_to_s3block_yaml import DownloadToS3BlockYaml
from .extensions import Extensions
- from .folder import Folder
- from .folder_create import FolderCreate
- from .folder_update import FolderUpdate
from .extract_action import ExtractAction
from .extract_action_data import ExtractActionData
from .extract_action_extract_schema import ExtractActionExtractSchema
@@ -157,6 +154,9 @@ if typing.TYPE_CHECKING:
from .file_type import FileType
from .file_upload_block import FileUploadBlock
from .file_upload_block_yaml import FileUploadBlockYaml
+ from .folder import Folder
+ from .folder_create import FolderCreate
+ from .folder_update import FolderUpdate
from .for_loop_block import ForLoopBlock
from .for_loop_block_data_schema import ForLoopBlockDataSchema
from .for_loop_block_loop_blocks_item import (
@@ -184,6 +184,7 @@ if typing.TYPE_CHECKING:
ForLoopBlockLoopBlocksItem_UploadToS3,
ForLoopBlockLoopBlocksItem_Validation,
ForLoopBlockLoopBlocksItem_Wait,
+ ForLoopBlockLoopBlocksItem_WorkflowTrigger,
)
from .for_loop_block_loop_over import (
ForLoopBlockLoopOver,
@@ -226,6 +227,7 @@ if typing.TYPE_CHECKING:
ForLoopBlockYamlLoopBlocksItem_UploadToS3,
ForLoopBlockYamlLoopBlocksItem_Validation,
ForLoopBlockYamlLoopBlocksItem_Wait,
+ ForLoopBlockYamlLoopBlocksItem_WorkflowTrigger,
)
from .geo_target import GeoTarget
from .get_run_response import (
@@ -417,9 +419,9 @@ if typing.TYPE_CHECKING:
from .thought_type import ThoughtType
from .totp_code import TotpCode
from .totp_type import TotpType
+ from .update_workflow_folder_request import UpdateWorkflowFolderRequest
from .upload_file_action import UploadFileAction
from .upload_file_action_data import UploadFileActionData
- from .update_workflow_folder_request import UpdateWorkflowFolderRequest
from .upload_file_response import UploadFileResponse
from .upload_to_s3block import UploadToS3Block
from .upload_to_s3block_yaml import UploadToS3BlockYaml
@@ -506,6 +508,7 @@ if typing.TYPE_CHECKING:
WorkflowDefinitionBlocksItem_UploadToS3,
WorkflowDefinitionBlocksItem_Validation,
WorkflowDefinitionBlocksItem_Wait,
+ WorkflowDefinitionBlocksItem_WorkflowTrigger,
)
from .workflow_definition_parameters_item import (
WorkflowDefinitionParametersItem,
@@ -547,6 +550,7 @@ if typing.TYPE_CHECKING:
WorkflowDefinitionYamlBlocksItem_UploadToS3,
WorkflowDefinitionYamlBlocksItem_Validation,
WorkflowDefinitionYamlBlocksItem_Wait,
+ WorkflowDefinitionYamlBlocksItem_WorkflowTrigger,
)
from .workflow_definition_yaml_parameters_item import (
WorkflowDefinitionYamlParametersItem,
@@ -582,6 +586,22 @@ if typing.TYPE_CHECKING:
from .workflow_run_timeline import WorkflowRunTimeline
from .workflow_run_timeline_type import WorkflowRunTimelineType
from .workflow_status import WorkflowStatus
+ from .workflow_trigger_block import WorkflowTriggerBlock
+ from .workflow_trigger_block_parameters_item import (
+ WorkflowTriggerBlockParametersItem,
+ WorkflowTriggerBlockParametersItem_AwsSecret,
+ WorkflowTriggerBlockParametersItem_AzureSecret,
+ WorkflowTriggerBlockParametersItem_AzureVaultCredential,
+ WorkflowTriggerBlockParametersItem_BitwardenCreditCardData,
+ WorkflowTriggerBlockParametersItem_BitwardenLoginCredential,
+ WorkflowTriggerBlockParametersItem_BitwardenSensitiveInformation,
+ WorkflowTriggerBlockParametersItem_Context,
+ WorkflowTriggerBlockParametersItem_Credential,
+ WorkflowTriggerBlockParametersItem_Onepassword,
+ WorkflowTriggerBlockParametersItem_Output,
+ WorkflowTriggerBlockParametersItem_Workflow,
+ )
+ from .workflow_trigger_block_yaml import WorkflowTriggerBlockYaml
_dynamic_imports: typing.Dict[str, str] = {
"ActAction": ".act_action",
"ActActionData": ".act_action_data",
@@ -676,9 +696,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"DownloadToS3Block": ".download_to_s3block",
"DownloadToS3BlockYaml": ".download_to_s3block_yaml",
"Extensions": ".extensions",
- "Folder": ".folder",
- "FolderCreate": ".folder_create",
- "FolderUpdate": ".folder_update",
"ExtractAction": ".extract_action",
"ExtractActionData": ".extract_action_data",
"ExtractActionExtractSchema": ".extract_action_extract_schema",
@@ -722,6 +739,9 @@ _dynamic_imports: typing.Dict[str, str] = {
"FileType": ".file_type",
"FileUploadBlock": ".file_upload_block",
"FileUploadBlockYaml": ".file_upload_block_yaml",
+ "Folder": ".folder",
+ "FolderCreate": ".folder_create",
+ "FolderUpdate": ".folder_update",
"ForLoopBlock": ".for_loop_block",
"ForLoopBlockDataSchema": ".for_loop_block_data_schema",
"ForLoopBlockLoopBlocksItem": ".for_loop_block_loop_blocks_item",
@@ -748,6 +768,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"ForLoopBlockLoopBlocksItem_UploadToS3": ".for_loop_block_loop_blocks_item",
"ForLoopBlockLoopBlocksItem_Validation": ".for_loop_block_loop_blocks_item",
"ForLoopBlockLoopBlocksItem_Wait": ".for_loop_block_loop_blocks_item",
+ "ForLoopBlockLoopBlocksItem_WorkflowTrigger": ".for_loop_block_loop_blocks_item",
"ForLoopBlockLoopOver": ".for_loop_block_loop_over",
"ForLoopBlockLoopOver_AwsSecret": ".for_loop_block_loop_over",
"ForLoopBlockLoopOver_AzureSecret": ".for_loop_block_loop_over",
@@ -786,6 +807,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"ForLoopBlockYamlLoopBlocksItem_UploadToS3": ".for_loop_block_yaml_loop_blocks_item",
"ForLoopBlockYamlLoopBlocksItem_Validation": ".for_loop_block_yaml_loop_blocks_item",
"ForLoopBlockYamlLoopBlocksItem_Wait": ".for_loop_block_yaml_loop_blocks_item",
+ "ForLoopBlockYamlLoopBlocksItem_WorkflowTrigger": ".for_loop_block_yaml_loop_blocks_item",
"GeoTarget": ".geo_target",
"GetRunResponse": ".get_run_response",
"GetRunResponse_AnthropicCua": ".get_run_response",
@@ -958,9 +980,9 @@ _dynamic_imports: typing.Dict[str, str] = {
"ThoughtType": ".thought_type",
"TotpCode": ".totp_code",
"TotpType": ".totp_type",
+ "UpdateWorkflowFolderRequest": ".update_workflow_folder_request",
"UploadFileAction": ".upload_file_action",
"UploadFileActionData": ".upload_file_action_data",
- "UpdateWorkflowFolderRequest": ".update_workflow_folder_request",
"UploadFileResponse": ".upload_file_response",
"UploadToS3Block": ".upload_to_s3block",
"UploadToS3BlockYaml": ".upload_to_s3block_yaml",
@@ -1040,6 +1062,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowDefinitionBlocksItem_UploadToS3": ".workflow_definition_blocks_item",
"WorkflowDefinitionBlocksItem_Validation": ".workflow_definition_blocks_item",
"WorkflowDefinitionBlocksItem_Wait": ".workflow_definition_blocks_item",
+ "WorkflowDefinitionBlocksItem_WorkflowTrigger": ".workflow_definition_blocks_item",
"WorkflowDefinitionParametersItem": ".workflow_definition_parameters_item",
"WorkflowDefinitionParametersItem_AwsSecret": ".workflow_definition_parameters_item",
"WorkflowDefinitionParametersItem_AzureSecret": ".workflow_definition_parameters_item",
@@ -1077,6 +1100,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowDefinitionYamlBlocksItem_UploadToS3": ".workflow_definition_yaml_blocks_item",
"WorkflowDefinitionYamlBlocksItem_Validation": ".workflow_definition_yaml_blocks_item",
"WorkflowDefinitionYamlBlocksItem_Wait": ".workflow_definition_yaml_blocks_item",
+ "WorkflowDefinitionYamlBlocksItem_WorkflowTrigger": ".workflow_definition_yaml_blocks_item",
"WorkflowDefinitionYamlParametersItem": ".workflow_definition_yaml_parameters_item",
"WorkflowDefinitionYamlParametersItem_AwsSecret": ".workflow_definition_yaml_parameters_item",
"WorkflowDefinitionYamlParametersItem_AzureVaultCredential": ".workflow_definition_yaml_parameters_item",
@@ -1109,6 +1133,20 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowRunTimeline": ".workflow_run_timeline",
"WorkflowRunTimelineType": ".workflow_run_timeline_type",
"WorkflowStatus": ".workflow_status",
+ "WorkflowTriggerBlock": ".workflow_trigger_block",
+ "WorkflowTriggerBlockParametersItem": ".workflow_trigger_block_parameters_item",
+ "WorkflowTriggerBlockParametersItem_AwsSecret": ".workflow_trigger_block_parameters_item",
+ "WorkflowTriggerBlockParametersItem_AzureSecret": ".workflow_trigger_block_parameters_item",
+ "WorkflowTriggerBlockParametersItem_AzureVaultCredential": ".workflow_trigger_block_parameters_item",
+ "WorkflowTriggerBlockParametersItem_BitwardenCreditCardData": ".workflow_trigger_block_parameters_item",
+ "WorkflowTriggerBlockParametersItem_BitwardenLoginCredential": ".workflow_trigger_block_parameters_item",
+ "WorkflowTriggerBlockParametersItem_BitwardenSensitiveInformation": ".workflow_trigger_block_parameters_item",
+ "WorkflowTriggerBlockParametersItem_Context": ".workflow_trigger_block_parameters_item",
+ "WorkflowTriggerBlockParametersItem_Credential": ".workflow_trigger_block_parameters_item",
+ "WorkflowTriggerBlockParametersItem_Onepassword": ".workflow_trigger_block_parameters_item",
+ "WorkflowTriggerBlockParametersItem_Output": ".workflow_trigger_block_parameters_item",
+ "WorkflowTriggerBlockParametersItem_Workflow": ".workflow_trigger_block_parameters_item",
+ "WorkflowTriggerBlockYaml": ".workflow_trigger_block_yaml",
}
@@ -1227,9 +1265,6 @@ __all__ = [
"DownloadToS3Block",
"DownloadToS3BlockYaml",
"Extensions",
- "Folder",
- "FolderCreate",
- "FolderUpdate",
"ExtractAction",
"ExtractActionData",
"ExtractActionExtractSchema",
@@ -1273,6 +1308,9 @@ __all__ = [
"FileType",
"FileUploadBlock",
"FileUploadBlockYaml",
+ "Folder",
+ "FolderCreate",
+ "FolderUpdate",
"ForLoopBlock",
"ForLoopBlockDataSchema",
"ForLoopBlockLoopBlocksItem",
@@ -1299,6 +1337,7 @@ __all__ = [
"ForLoopBlockLoopBlocksItem_UploadToS3",
"ForLoopBlockLoopBlocksItem_Validation",
"ForLoopBlockLoopBlocksItem_Wait",
+ "ForLoopBlockLoopBlocksItem_WorkflowTrigger",
"ForLoopBlockLoopOver",
"ForLoopBlockLoopOver_AwsSecret",
"ForLoopBlockLoopOver_AzureSecret",
@@ -1337,6 +1376,7 @@ __all__ = [
"ForLoopBlockYamlLoopBlocksItem_UploadToS3",
"ForLoopBlockYamlLoopBlocksItem_Validation",
"ForLoopBlockYamlLoopBlocksItem_Wait",
+ "ForLoopBlockYamlLoopBlocksItem_WorkflowTrigger",
"GeoTarget",
"GetRunResponse",
"GetRunResponse_AnthropicCua",
@@ -1509,9 +1549,9 @@ __all__ = [
"ThoughtType",
"TotpCode",
"TotpType",
+ "UpdateWorkflowFolderRequest",
"UploadFileAction",
"UploadFileActionData",
- "UpdateWorkflowFolderRequest",
"UploadFileResponse",
"UploadToS3Block",
"UploadToS3BlockYaml",
@@ -1591,6 +1631,7 @@ __all__ = [
"WorkflowDefinitionBlocksItem_UploadToS3",
"WorkflowDefinitionBlocksItem_Validation",
"WorkflowDefinitionBlocksItem_Wait",
+ "WorkflowDefinitionBlocksItem_WorkflowTrigger",
"WorkflowDefinitionParametersItem",
"WorkflowDefinitionParametersItem_AwsSecret",
"WorkflowDefinitionParametersItem_AzureSecret",
@@ -1628,6 +1669,7 @@ __all__ = [
"WorkflowDefinitionYamlBlocksItem_UploadToS3",
"WorkflowDefinitionYamlBlocksItem_Validation",
"WorkflowDefinitionYamlBlocksItem_Wait",
+ "WorkflowDefinitionYamlBlocksItem_WorkflowTrigger",
"WorkflowDefinitionYamlParametersItem",
"WorkflowDefinitionYamlParametersItem_AwsSecret",
"WorkflowDefinitionYamlParametersItem_AzureVaultCredential",
@@ -1660,4 +1702,18 @@ __all__ = [
"WorkflowRunTimeline",
"WorkflowRunTimelineType",
"WorkflowStatus",
+ "WorkflowTriggerBlock",
+ "WorkflowTriggerBlockParametersItem",
+ "WorkflowTriggerBlockParametersItem_AwsSecret",
+ "WorkflowTriggerBlockParametersItem_AzureSecret",
+ "WorkflowTriggerBlockParametersItem_AzureVaultCredential",
+ "WorkflowTriggerBlockParametersItem_BitwardenCreditCardData",
+ "WorkflowTriggerBlockParametersItem_BitwardenLoginCredential",
+ "WorkflowTriggerBlockParametersItem_BitwardenSensitiveInformation",
+ "WorkflowTriggerBlockParametersItem_Context",
+ "WorkflowTriggerBlockParametersItem_Credential",
+ "WorkflowTriggerBlockParametersItem_Onepassword",
+ "WorkflowTriggerBlockParametersItem_Output",
+ "WorkflowTriggerBlockParametersItem_Workflow",
+ "WorkflowTriggerBlockYaml",
]
diff --git a/skyvern/client/types/block_type.py b/skyvern/client/types/block_type.py
index d5eb44146..180cee4af 100644
--- a/skyvern/client/types/block_type.py
+++ b/skyvern/client/types/block_type.py
@@ -27,6 +27,7 @@ BlockType = typing.Union[
"http_request",
"human_interaction",
"print_page",
+ "workflow_trigger",
],
typing.Any,
]
diff --git a/skyvern/client/types/browser_session_response.py b/skyvern/client/types/browser_session_response.py
index ba8e538af..e8b12c533 100644
--- a/skyvern/client/types/browser_session_response.py
+++ b/skyvern/client/types/browser_session_response.py
@@ -65,6 +65,11 @@ class BrowserSessionResponse(UniversalBaseModel):
The type of browser used for the session.
"""
+ browser_profile_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ ID of the browser profile loaded into this session, if any. browser_profile_id starts with `bp_`.
+ """
+
vnc_streaming_supported: typing.Optional[bool] = pydantic.Field(default=None)
"""
Whether the browser session supports VNC streaming
diff --git a/skyvern/client/types/folder.py b/skyvern/client/types/folder.py
index cb600eae7..c3e4ae788 100644
--- a/skyvern/client/types/folder.py
+++ b/skyvern/client/types/folder.py
@@ -1,7 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-from __future__ import annotations
-
import datetime as dt
import typing
@@ -10,11 +8,27 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class Folder(UniversalBaseModel):
+ """
+ Response model for a folder
+ """
+
+ title: str = pydantic.Field()
+ """
+ Folder title
+ """
+
+ description: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Folder description
+ """
+
folder_id: str
organization_id: str
- title: str
- description: typing.Optional[str] = None
- workflow_count: int
+ workflow_count: typing.Optional[int] = pydantic.Field(default=None)
+ """
+ Number of workflows in this folder
+ """
+
created_at: dt.datetime
modified_at: dt.datetime
diff --git a/skyvern/client/types/for_loop_block_loop_blocks_item.py b/skyvern/client/types/for_loop_block_loop_blocks_item.py
index 91a750278..ad0e488f6 100644
--- a/skyvern/client/types/for_loop_block_loop_blocks_item.py
+++ b/skyvern/client/types/for_loop_block_loop_blocks_item.py
@@ -39,6 +39,7 @@ from .url_block_parameters_item import UrlBlockParametersItem
from .validation_block_data_schema import ValidationBlockDataSchema
from .validation_block_parameters_item import ValidationBlockParametersItem
from .wait_block_parameters_item import WaitBlockParametersItem
+from .workflow_trigger_block_parameters_item import WorkflowTriggerBlockParametersItem
class ForLoopBlockLoopBlocksItem_Action(UniversalBaseModel):
@@ -753,6 +754,32 @@ class ForLoopBlockLoopBlocksItem_Wait(UniversalBaseModel):
extra = pydantic.Extra.allow
+class ForLoopBlockLoopBlocksItem_WorkflowTrigger(UniversalBaseModel):
+ block_type: typing.Literal["workflow_trigger"] = "workflow_trigger"
+ label: str
+ next_block_label: typing.Optional[str] = None
+ output_parameter: OutputParameter
+ continue_on_failure: typing.Optional[bool] = None
+ model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ disable_cache: typing.Optional[bool] = None
+ next_loop_on_failure: typing.Optional[bool] = None
+ workflow_permanent_id: str
+ payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ wait_for_completion: typing.Optional[bool] = None
+ browser_session_id: typing.Optional[str] = None
+ use_parent_browser_session: typing.Optional[bool] = None
+ parameters: typing.Optional[typing.List[WorkflowTriggerBlockParametersItem]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
from .context_parameter import ContextParameter # noqa: E402, F401, I001
ForLoopBlockLoopBlocksItem = typing.Union[
@@ -779,6 +806,7 @@ ForLoopBlockLoopBlocksItem = typing.Union[
ForLoopBlockLoopBlocksItem_UploadToS3,
ForLoopBlockLoopBlocksItem_Validation,
ForLoopBlockLoopBlocksItem_Wait,
+ ForLoopBlockLoopBlocksItem_WorkflowTrigger,
]
update_forward_refs(ForLoopBlockLoopBlocksItem_Action)
update_forward_refs(ForLoopBlockLoopBlocksItem_Code)
@@ -795,3 +823,4 @@ update_forward_refs(ForLoopBlockLoopBlocksItem_Task)
update_forward_refs(ForLoopBlockLoopBlocksItem_TextPrompt)
update_forward_refs(ForLoopBlockLoopBlocksItem_Validation)
update_forward_refs(ForLoopBlockLoopBlocksItem_Wait)
+update_forward_refs(ForLoopBlockLoopBlocksItem_WorkflowTrigger)
diff --git a/skyvern/client/types/for_loop_block_yaml_loop_blocks_item.py b/skyvern/client/types/for_loop_block_yaml_loop_blocks_item.py
index 262726430..cc4e1159e 100644
--- a/skyvern/client/types/for_loop_block_yaml_loop_blocks_item.py
+++ b/skyvern/client/types/for_loop_block_yaml_loop_blocks_item.py
@@ -595,6 +595,30 @@ class ForLoopBlockYamlLoopBlocksItem_PrintPage(UniversalBaseModel):
extra = pydantic.Extra.allow
+class ForLoopBlockYamlLoopBlocksItem_WorkflowTrigger(UniversalBaseModel):
+ block_type: typing.Literal["workflow_trigger"] = "workflow_trigger"
+ label: str
+ next_block_label: typing.Optional[str] = None
+ continue_on_failure: typing.Optional[bool] = None
+ model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ next_loop_on_failure: typing.Optional[bool] = None
+ workflow_permanent_id: str
+ payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ wait_for_completion: typing.Optional[bool] = None
+ browser_session_id: typing.Optional[str] = None
+ use_parent_browser_session: typing.Optional[bool] = 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
+
+
ForLoopBlockYamlLoopBlocksItem = typing.Union[
ForLoopBlockYamlLoopBlocksItem_Task,
ForLoopBlockYamlLoopBlocksItem_ForLoop,
@@ -619,5 +643,6 @@ ForLoopBlockYamlLoopBlocksItem = typing.Union[
ForLoopBlockYamlLoopBlocksItem_HttpRequest,
ForLoopBlockYamlLoopBlocksItem_Conditional,
ForLoopBlockYamlLoopBlocksItem_PrintPage,
+ ForLoopBlockYamlLoopBlocksItem_WorkflowTrigger,
]
update_forward_refs(ForLoopBlockYamlLoopBlocksItem_ForLoop)
diff --git a/skyvern/client/types/task_run_request.py b/skyvern/client/types/task_run_request.py
index cad2e2d85..5d8b59ff6 100644
--- a/skyvern/client/types/task_run_request.py
+++ b/skyvern/client/types/task_run_request.py
@@ -49,9 +49,16 @@ class TaskRunRequest(UniversalBaseModel):
- RESIDENTIAL_DE: Germany
- RESIDENTIAL_NZ: New Zealand
- RESIDENTIAL_PH: Philippines
+ - RESIDENTIAL_KR: South Korea
- RESIDENTIAL_ZA: South Africa
- RESIDENTIAL_AR: Argentina
- RESIDENTIAL_AU: Australia
+ - RESIDENTIAL_BR: Brazil
+ - RESIDENTIAL_TR: Turkey
+ - RESIDENTIAL_CA: Canada
+ - RESIDENTIAL_MX: Mexico
+ - RESIDENTIAL_IT: Italy
+ - RESIDENTIAL_NL: Netherlands
- RESIDENTIAL_ISP: ISP proxy
- US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
- US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
diff --git a/skyvern/client/types/workflow.py b/skyvern/client/types/workflow.py
index b60945fec..9dd28c79c 100644
--- a/skyvern/client/types/workflow.py
+++ b/skyvern/client/types/workflow.py
@@ -34,6 +34,8 @@ class Workflow(UniversalBaseModel):
run_with: typing.Optional[str] = None
ai_fallback: typing.Optional[bool] = None
cache_key: typing.Optional[str] = None
+ adaptive_caching: typing.Optional[bool] = None
+ generate_script_on_terminal: typing.Optional[bool] = None
run_sequentially: typing.Optional[bool] = None
sequential_key: typing.Optional[str] = None
folder_id: typing.Optional[str] = None
diff --git a/skyvern/client/types/workflow_create_yaml_request.py b/skyvern/client/types/workflow_create_yaml_request.py
index d9594e714..af79fc3c8 100644
--- a/skyvern/client/types/workflow_create_yaml_request.py
+++ b/skyvern/client/types/workflow_create_yaml_request.py
@@ -28,6 +28,8 @@ class WorkflowCreateYamlRequest(UniversalBaseModel):
run_with: typing.Optional[str] = None
ai_fallback: typing.Optional[bool] = None
cache_key: typing.Optional[str] = None
+ adaptive_caching: typing.Optional[bool] = None
+ generate_script_on_terminal: typing.Optional[bool] = None
run_sequentially: typing.Optional[bool] = None
sequential_key: typing.Optional[str] = None
folder_id: typing.Optional[str] = None
diff --git a/skyvern/client/types/workflow_definition_blocks_item.py b/skyvern/client/types/workflow_definition_blocks_item.py
index bc363db23..6162fd81d 100644
--- a/skyvern/client/types/workflow_definition_blocks_item.py
+++ b/skyvern/client/types/workflow_definition_blocks_item.py
@@ -39,6 +39,7 @@ from .url_block_parameters_item import UrlBlockParametersItem
from .validation_block_data_schema import ValidationBlockDataSchema
from .validation_block_parameters_item import ValidationBlockParametersItem
from .wait_block_parameters_item import WaitBlockParametersItem
+from .workflow_trigger_block_parameters_item import WorkflowTriggerBlockParametersItem
class WorkflowDefinitionBlocksItem_Action(UniversalBaseModel):
@@ -754,6 +755,32 @@ class WorkflowDefinitionBlocksItem_Wait(UniversalBaseModel):
extra = pydantic.Extra.allow
+class WorkflowDefinitionBlocksItem_WorkflowTrigger(UniversalBaseModel):
+ block_type: typing.Literal["workflow_trigger"] = "workflow_trigger"
+ label: str
+ next_block_label: typing.Optional[str] = None
+ output_parameter: OutputParameter
+ continue_on_failure: typing.Optional[bool] = None
+ model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ disable_cache: typing.Optional[bool] = None
+ next_loop_on_failure: typing.Optional[bool] = None
+ workflow_permanent_id: str
+ payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ wait_for_completion: typing.Optional[bool] = None
+ browser_session_id: typing.Optional[str] = None
+ use_parent_browser_session: typing.Optional[bool] = None
+ parameters: typing.Optional[typing.List[WorkflowTriggerBlockParametersItem]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
from .context_parameter import ContextParameter # noqa: E402, F401, I001
WorkflowDefinitionBlocksItem = typing.Union[
@@ -780,6 +807,7 @@ WorkflowDefinitionBlocksItem = typing.Union[
WorkflowDefinitionBlocksItem_UploadToS3,
WorkflowDefinitionBlocksItem_Validation,
WorkflowDefinitionBlocksItem_Wait,
+ WorkflowDefinitionBlocksItem_WorkflowTrigger,
]
update_forward_refs(WorkflowDefinitionBlocksItem_Action)
update_forward_refs(WorkflowDefinitionBlocksItem_Code)
@@ -796,3 +824,4 @@ update_forward_refs(WorkflowDefinitionBlocksItem_Task)
update_forward_refs(WorkflowDefinitionBlocksItem_TextPrompt)
update_forward_refs(WorkflowDefinitionBlocksItem_Validation)
update_forward_refs(WorkflowDefinitionBlocksItem_Wait)
+update_forward_refs(WorkflowDefinitionBlocksItem_WorkflowTrigger)
diff --git a/skyvern/client/types/workflow_definition_yaml_blocks_item.py b/skyvern/client/types/workflow_definition_yaml_blocks_item.py
index dfaca1f47..6edab9847 100644
--- a/skyvern/client/types/workflow_definition_yaml_blocks_item.py
+++ b/skyvern/client/types/workflow_definition_yaml_blocks_item.py
@@ -596,6 +596,30 @@ class WorkflowDefinitionYamlBlocksItem_Wait(UniversalBaseModel):
extra = pydantic.Extra.allow
+class WorkflowDefinitionYamlBlocksItem_WorkflowTrigger(UniversalBaseModel):
+ block_type: typing.Literal["workflow_trigger"] = "workflow_trigger"
+ label: str
+ next_block_label: typing.Optional[str] = None
+ continue_on_failure: typing.Optional[bool] = None
+ model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ next_loop_on_failure: typing.Optional[bool] = None
+ workflow_permanent_id: str
+ payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ wait_for_completion: typing.Optional[bool] = None
+ browser_session_id: typing.Optional[str] = None
+ use_parent_browser_session: typing.Optional[bool] = 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
+
+
WorkflowDefinitionYamlBlocksItem = typing.Union[
WorkflowDefinitionYamlBlocksItem_Action,
WorkflowDefinitionYamlBlocksItem_Code,
@@ -620,5 +644,6 @@ WorkflowDefinitionYamlBlocksItem = typing.Union[
WorkflowDefinitionYamlBlocksItem_UploadToS3,
WorkflowDefinitionYamlBlocksItem_Validation,
WorkflowDefinitionYamlBlocksItem_Wait,
+ WorkflowDefinitionYamlBlocksItem_WorkflowTrigger,
]
update_forward_refs(WorkflowDefinitionYamlBlocksItem_ForLoop)
diff --git a/skyvern/client/types/workflow_run_request.py b/skyvern/client/types/workflow_run_request.py
index b407af5ae..03498936e 100644
--- a/skyvern/client/types/workflow_run_request.py
+++ b/skyvern/client/types/workflow_run_request.py
@@ -39,9 +39,16 @@ class WorkflowRunRequest(UniversalBaseModel):
- RESIDENTIAL_DE: Germany
- RESIDENTIAL_NZ: New Zealand
- RESIDENTIAL_PH: Philippines
+ - RESIDENTIAL_KR: South Korea
- RESIDENTIAL_ZA: South Africa
- RESIDENTIAL_AR: Argentina
- RESIDENTIAL_AU: Australia
+ - RESIDENTIAL_BR: Brazil
+ - RESIDENTIAL_TR: Turkey
+ - RESIDENTIAL_CA: Canada
+ - RESIDENTIAL_MX: Mexico
+ - RESIDENTIAL_IT: Italy
+ - RESIDENTIAL_NL: Netherlands
- RESIDENTIAL_ISP: ISP proxy
- US-CA: California (deprecated, routes through RESIDENTIAL_ISP)
- US-NY: New York (deprecated, routes through RESIDENTIAL_ISP)
@@ -101,7 +108,7 @@ class WorkflowRunRequest(UniversalBaseModel):
run_with: typing.Optional[str] = pydantic.Field(default=None)
"""
- Whether to run the workflow with agent or code.
+ Whether to run the workflow with agent, code, or code_v2 (adaptive caching).
"""
if IS_PYDANTIC_V2:
diff --git a/skyvern/client/types/workflow_run_response.py b/skyvern/client/types/workflow_run_response.py
index b0476102b..1ed65287d 100644
--- a/skyvern/client/types/workflow_run_response.py
+++ b/skyvern/client/types/workflow_run_response.py
@@ -110,7 +110,7 @@ class WorkflowRunResponse(UniversalBaseModel):
run_with: typing.Optional[str] = pydantic.Field(default=None)
"""
- Whether the workflow run was executed with agent or code
+ Whether the workflow run was executed with agent, code, or code_v2 (adaptive caching)
"""
ai_fallback: typing.Optional[bool] = pydantic.Field(default=None)
diff --git a/skyvern/client/types/workflow_trigger_block.py b/skyvern/client/types/workflow_trigger_block.py
new file mode 100644
index 000000000..6fac10299
--- /dev/null
+++ b/skyvern/client/types/workflow_trigger_block.py
@@ -0,0 +1,48 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from __future__ import annotations
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs
+from .output_parameter import OutputParameter
+from .workflow_trigger_block_parameters_item import WorkflowTriggerBlockParametersItem
+
+
+class WorkflowTriggerBlock(UniversalBaseModel):
+ label: str = pydantic.Field()
+ """
+ Author-facing identifier for a block; unique within a workflow.
+ """
+
+ next_block_label: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
+ """
+
+ output_parameter: OutputParameter
+ continue_on_failure: typing.Optional[bool] = None
+ model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ disable_cache: typing.Optional[bool] = None
+ next_loop_on_failure: typing.Optional[bool] = None
+ workflow_permanent_id: str
+ payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ wait_for_completion: typing.Optional[bool] = None
+ browser_session_id: typing.Optional[str] = None
+ use_parent_browser_session: typing.Optional[bool] = None
+ parameters: typing.Optional[typing.List[WorkflowTriggerBlockParametersItem]] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+from .context_parameter import ContextParameter # noqa: E402, F401, I001
+
+update_forward_refs(WorkflowTriggerBlock)
diff --git a/skyvern/client/types/workflow_trigger_block_parameters_item.py b/skyvern/client/types/workflow_trigger_block_parameters_item.py
new file mode 100644
index 000000000..73d1ff539
--- /dev/null
+++ b/skyvern/client/types/workflow_trigger_block_parameters_item.py
@@ -0,0 +1,277 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from __future__ import annotations
+
+import datetime as dt
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs
+from .context_parameter_value import ContextParameterValue
+from .workflow_parameter_default_value import WorkflowParameterDefaultValue
+from .workflow_parameter_type import WorkflowParameterType
+
+
+class WorkflowTriggerBlockParametersItem_AwsSecret(UniversalBaseModel):
+ parameter_type: typing.Literal["aws_secret"] = "aws_secret"
+ key: str
+ description: typing.Optional[str] = None
+ aws_secret_parameter_id: str
+ workflow_id: str
+ aws_key: str
+ created_at: dt.datetime
+ modified_at: dt.datetime
+ deleted_at: typing.Optional[dt.datetime] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class WorkflowTriggerBlockParametersItem_AzureSecret(UniversalBaseModel):
+ parameter_type: typing.Literal["azure_secret"] = "azure_secret"
+ key: str
+ description: typing.Optional[str] = None
+ azure_secret_parameter_id: str
+ workflow_id: str
+ azure_key: str
+ created_at: dt.datetime
+ modified_at: dt.datetime
+ deleted_at: typing.Optional[dt.datetime] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class WorkflowTriggerBlockParametersItem_AzureVaultCredential(UniversalBaseModel):
+ parameter_type: typing.Literal["azure_vault_credential"] = "azure_vault_credential"
+ key: str
+ description: typing.Optional[str] = None
+ azure_vault_credential_parameter_id: str
+ workflow_id: str
+ vault_name: str
+ username_key: str
+ password_key: str
+ totp_secret_key: typing.Optional[str] = None
+ created_at: dt.datetime
+ modified_at: dt.datetime
+ deleted_at: typing.Optional[dt.datetime] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class WorkflowTriggerBlockParametersItem_BitwardenCreditCardData(UniversalBaseModel):
+ parameter_type: typing.Literal["bitwarden_credit_card_data"] = "bitwarden_credit_card_data"
+ key: str
+ description: typing.Optional[str] = None
+ bitwarden_credit_card_data_parameter_id: str
+ workflow_id: str
+ bitwarden_client_id_aws_secret_key: str
+ bitwarden_client_secret_aws_secret_key: str
+ bitwarden_master_password_aws_secret_key: str
+ bitwarden_collection_id: str
+ bitwarden_item_id: str
+ created_at: dt.datetime
+ modified_at: dt.datetime
+ deleted_at: typing.Optional[dt.datetime] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class WorkflowTriggerBlockParametersItem_BitwardenLoginCredential(UniversalBaseModel):
+ parameter_type: typing.Literal["bitwarden_login_credential"] = "bitwarden_login_credential"
+ key: str
+ description: typing.Optional[str] = None
+ bitwarden_login_credential_parameter_id: str
+ workflow_id: str
+ bitwarden_client_id_aws_secret_key: str
+ bitwarden_client_secret_aws_secret_key: str
+ bitwarden_master_password_aws_secret_key: str
+ url_parameter_key: typing.Optional[str] = None
+ bitwarden_collection_id: typing.Optional[str] = None
+ bitwarden_item_id: typing.Optional[str] = None
+ created_at: dt.datetime
+ modified_at: dt.datetime
+ deleted_at: typing.Optional[dt.datetime] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class WorkflowTriggerBlockParametersItem_BitwardenSensitiveInformation(UniversalBaseModel):
+ parameter_type: typing.Literal["bitwarden_sensitive_information"] = "bitwarden_sensitive_information"
+ key: str
+ description: typing.Optional[str] = None
+ bitwarden_sensitive_information_parameter_id: str
+ workflow_id: str
+ bitwarden_client_id_aws_secret_key: str
+ bitwarden_client_secret_aws_secret_key: str
+ bitwarden_master_password_aws_secret_key: str
+ bitwarden_collection_id: str
+ bitwarden_identity_key: str
+ bitwarden_identity_fields: typing.List[str]
+ created_at: dt.datetime
+ modified_at: dt.datetime
+ deleted_at: typing.Optional[dt.datetime] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class WorkflowTriggerBlockParametersItem_Context(UniversalBaseModel):
+ parameter_type: typing.Literal["context"] = "context"
+ key: str
+ description: typing.Optional[str] = None
+ source: "ContextParameterSource"
+ value: typing.Optional[ContextParameterValue] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+from .context_parameter import ContextParameter # noqa: E402, F401, I001
+from .context_parameter_source import ContextParameterSource # noqa: E402, F401, I001
+
+
+class WorkflowTriggerBlockParametersItem_Credential(UniversalBaseModel):
+ parameter_type: typing.Literal["credential"] = "credential"
+ key: str
+ description: typing.Optional[str] = None
+ credential_parameter_id: str
+ workflow_id: str
+ credential_id: str
+ created_at: dt.datetime
+ modified_at: dt.datetime
+ deleted_at: typing.Optional[dt.datetime] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class WorkflowTriggerBlockParametersItem_Onepassword(UniversalBaseModel):
+ parameter_type: typing.Literal["onepassword"] = "onepassword"
+ key: str
+ description: typing.Optional[str] = None
+ onepassword_credential_parameter_id: str
+ workflow_id: str
+ vault_id: str
+ item_id: str
+ created_at: dt.datetime
+ modified_at: dt.datetime
+ deleted_at: typing.Optional[dt.datetime] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class WorkflowTriggerBlockParametersItem_Output(UniversalBaseModel):
+ parameter_type: typing.Literal["output"] = "output"
+ key: str
+ description: typing.Optional[str] = None
+ output_parameter_id: str
+ workflow_id: str
+ created_at: dt.datetime
+ modified_at: dt.datetime
+ deleted_at: typing.Optional[dt.datetime] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+class WorkflowTriggerBlockParametersItem_Workflow(UniversalBaseModel):
+ parameter_type: typing.Literal["workflow"] = "workflow"
+ key: str
+ description: typing.Optional[str] = None
+ workflow_parameter_id: str
+ workflow_parameter_type: WorkflowParameterType
+ workflow_id: str
+ default_value: typing.Optional[WorkflowParameterDefaultValue] = None
+ created_at: dt.datetime
+ modified_at: dt.datetime
+ deleted_at: typing.Optional[dt.datetime] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
+WorkflowTriggerBlockParametersItem = typing.Union[
+ WorkflowTriggerBlockParametersItem_AwsSecret,
+ WorkflowTriggerBlockParametersItem_AzureSecret,
+ WorkflowTriggerBlockParametersItem_AzureVaultCredential,
+ WorkflowTriggerBlockParametersItem_BitwardenCreditCardData,
+ WorkflowTriggerBlockParametersItem_BitwardenLoginCredential,
+ WorkflowTriggerBlockParametersItem_BitwardenSensitiveInformation,
+ WorkflowTriggerBlockParametersItem_Context,
+ WorkflowTriggerBlockParametersItem_Credential,
+ WorkflowTriggerBlockParametersItem_Onepassword,
+ WorkflowTriggerBlockParametersItem_Output,
+ WorkflowTriggerBlockParametersItem_Workflow,
+]
+update_forward_refs(WorkflowTriggerBlockParametersItem_Context)
diff --git a/skyvern/client/types/workflow_trigger_block_yaml.py b/skyvern/client/types/workflow_trigger_block_yaml.py
new file mode 100644
index 000000000..94d24c387
--- /dev/null
+++ b/skyvern/client/types/workflow_trigger_block_yaml.py
@@ -0,0 +1,37 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+
+
+class WorkflowTriggerBlockYaml(UniversalBaseModel):
+ label: str = pydantic.Field()
+ """
+ Author-facing identifier; must be unique per workflow.
+ """
+
+ next_block_label: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
+ """
+
+ continue_on_failure: typing.Optional[bool] = None
+ model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ next_loop_on_failure: typing.Optional[bool] = None
+ workflow_permanent_id: str
+ payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ wait_for_completion: typing.Optional[bool] = None
+ browser_session_id: typing.Optional[str] = None
+ use_parent_browser_session: typing.Optional[bool] = 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/uv.lock b/uv.lock
index 619eb57eb..01cc02b17 100644
--- a/uv.lock
+++ b/uv.lock
@@ -5588,7 +5588,7 @@ wheels = [
[[package]]
name = "skyvern"
-version = "1.0.23"
+version = "1.0.24"
source = { editable = "." }
dependencies = [
{ name = "aioboto3" },